E-Commerce & Transactions

Published Updated
Coordinate shopping cart transactions, store checkout pipelines, and commercial gateway integrations.

E-Commerce & Transactions operators connect 3D product configurations directly to transactional storefronts, enabling purchase completions and pricing syncs.

Purchaser Plugin Operator for Shopify & Carts#

Operator<PurchaserPluginOperator>: Bridge connecting real-time 3D configurator states, dynamic pricing models, and digital shopping carts (Shopify) for digital checkout sequences.

1. Functional Overview

The Purchaser Plugin Operator (PurchaserPluginOperator) is the core e-commerce bridge in the Aircada SDK. It connects interactive 3D scene parameters, option models, and relational datasets directly to digital shopping cart flows (such as Shopify native carts and App Proxy dynamic bundling pipelines).

2. Public Operator Action Surface (Inputs)

| Action Port | Trigger Method | Purpose |

| :--- | :--- | :--- |

| submit | purchaser.submit() | Gathers current configuration data, validates selections, executes staged screenshot upload, and initiates the checkout redirect or cart payload dispatch. |

| screenshot | purchaser.screenshot(mediaItemOrBlob) | Ingests a custom 3D WebGL viewport canvas render or media item ID for background staged upload into Shopify line items. |

| bundledData | purchaser.bundledData | Ingests child component item data for multi-item bundle configurations (BundledProductBin). |

| dataInput | purchaser.dataInput | Inbound data block stream from connected operators or dataset mappers. |

3. Public Operator Trigger Surface (Outputs)

| Trigger Port | Type | Purpose |

| :--- | :--- | :--- |

| price | AirEvent<string> | Emits computed price string (e.g. '49.99') whenever bound option selections or pricing rules update. |

| onSubmit | AirEvent<InitiatePurchaseRequest> | Dispatched immediately when .submit() begins execution. |

| onSuccess | AirEvent<InitiatePurchaseResponse> | Dispatched when cart addition/checkout succeeds. |

| onFailure | AirEvent<InitiatePurchaseResponse> | Dispatched if cart submission or validation fails. |

| onValidationPassed | AirEvent<void> | Dispatched when configured option blocks satisfy all validation rules. |

| onValidationFailed | AirEvent<void> | Dispatched when configured option sets or required inputs fail validation. |

| startupContext | AirEvent<DataBlock[]> | Emits initial Shopify window startup context blocks. |

| issueMessage | AirEvent<IPurchaserIssue> | Emits structured diagnostic issue blocks (SCREENSHOT_FAILED, VALIDATION_FAILED, MEDIA_UPLOAD_FAILED, BACKEND_REJECTED, NETWORK_ERROR). |

4. Public Properties & Configuration

| Property | Type | Default | Description |

| :--- | :--- | :--- | :--- |

| configUrl | string | 'TEST_PLUGIN_CONSTANT' | Configuration URL or alias identifying the merchant or test product model. |

| setConfigFromContext | boolean | false | When enabled on storefronts, automatically overrides configUrl from the active Shopify page context (window.__AIR_SHOPIFY_CONTEXT__). |

| includeInBundle | boolean | false | Declares whether this product participates in a multi-product bundle. |

| dryRunMode | boolean | false | Enables test mode without performing live Shopify cart additions. |

| quantity | number | 1 | Selected line item purchase quantity. |

| couponCode | string | '' | Promotional or discount code string. |

5. Architectural Guidance for External SDK Agents

For step-by-step guidance on instantiating PurchaserPluginOperator via CLI-generated plugins.generated.ts (ProductPurchasers) vs. configs.generated.ts (AirConfigs), see the Purchaser Codegen & Operator Usage Guide.

Purchaser Plugin

DATA_BLOCK.PURCHASER_PLUGIN
Operator
Operator Type
PURCHASER_PLUGIN
Operator Group
DATA_BLOCK

Purchaser Plugin Properties Details

Property & TypeDisplay NameSystem TypeDefault
configUrl: string
Config
STRING
DROPDOWN
"TEST"
setConfigFromContext: boolean
Set Product From Page
BOOL
TOGGLE
false
includeInBundle: boolean
Include In Bundle
BOOL
TOGGLE
false
dryRunMode: boolean
Dry Run Mode
BOOL
TOGGLE
false
quantity: int
Quantity
INT
TEXT INPUT
1

@Input

@Input & TypeDisplay Name@Input TypeGroup
dataInput: (payload: DataBlock[]) => void
Data Input
DATA_BLOCKDATA_BLOCK
submit: () => void
Submit
OPERATOROPERATOR
bundledData: (payload: DataBlock[]) => void
Bundled Data
DATA_BLOCKDATA_BLOCK
screenshot: (payload: IMediaItem) => void
Screenshot
DATA_MEDIA_ITEMAIR_PROPERTY

@Output

@Output & TypeDisplay Name@Output TypeGroup
dataOutput: AirEvent<DataBlock[]>
Data Output
DATA_BLOCKDATA_BLOCK
startupContext: AirEvent<DataBlock[]>
Startup Context
DATA_BLOCKDATA_BLOCK
onSubmit: AirEvent<void>
On Submit
OPERATOROPERATOR
onSuccess: AirEvent<void>
On Success
OPERATOROPERATOR
onFailure: AirEvent<void>
On Failure
OPERATOROPERATOR
onValidationPassed: AirEvent<void>
On Validation Passed
OPERATOROPERATOR
onValidationFailed: AirEvent<void>
On Validation Failed
OPERATOROPERATOR
price: AirEvent<string>
Price
DATA_STRINGAIR_PROPERTY
issueMessage: AirEvent<DataBlock[]>
Issue Message
DATA_BLOCKDATA_BLOCK