Orders
Order Variables
Order variables represent order data returned from webbridge via Shopify. The structure and availability of these variables depends significantly on whether you have the New Customer Accounts feature enabled.
Access in App Studio SDK
Tapcart.variables.orders
Basic Order Properties
Property | Type | Example | Availability |
---|---|---|---|
order.id | String | "order_123" or "gid://shopify/Order/123456" | Always |
order.name | String | "#1001" | Always |
order.number | Number | 1001 | With New Customer Accounts |
order.orderNumber | Number | 1001 | Classic Orders |
order.confirmationNumber | String | "ABC123" | With New Customer Accounts |
order.email | String | "[email protected]" | Always |
order.phone | String | "+1234567890" | Always |
order.currencyCode | String | "USD" | Always |
Order Status & Dates
Property | Type | Example | Availability |
---|---|---|---|
order.financialStatus | String | "PAID" | Always |
order.fulfillmentStatus | String | "FULFILLED" | Classic Orders |
order.edited | Boolean | false | Always |
order.createdAt | String (ISO) | "2023-01-01T00:00:00Z" | With New Customer Accounts |
order.processedAt | String (ISO) | "2023-01-01T00:00:00Z" | Always |
order.updatedAt | String (ISO) | "2023-01-01T00:00:00Z" | With New Customer Accounts |
order.cancelledAt | String (ISO) | "2023-01-02T00:00:00Z" | If Cancelled |
order.canceledAt | String (ISO) | "2023-01-02T00:00:00Z" | Classic Orders (If Cancelled) |
order.cancelReason | String | "inventory" | If Cancelled |
Customer & Locale Information
Property | Type | Example | Availability |
---|---|---|---|
order.customerLocale | String | "en" | Classic Orders |
order.customerUrl | String | "https://..." | Classic Orders |
order.statusUrl | String | "https://..." | Classic Orders |
order.statusPageUrl | String | "https://..." | With New Customer Accounts |
order.requiresShipping | Boolean | true | With New Customer Accounts |
Pricing Structure (New Customer Accounts)
Property | Type | Example | Availability |
---|---|---|---|
order.subtotal | Object | { "amount": "100.00", "currencyCode": "USD" } | With New Customer Accounts |
order.totalPrice | Object | { "amount": "110.00", "currencyCode": "USD" } | With New Customer Accounts |
order.totalShipping | Object | { "amount": "5.00", "currencyCode": "USD" } | With New Customer Accounts |
order.totalTax | Object | { "amount": "5.00", "currencyCode": "USD" } | With New Customer Accounts |
order.totalRefunded | Object | { "amount": "0.00", "currencyCode": "USD" } | Always |
Pricing Structure (Classic Orders)
Property | Type | Example | Availability |
---|---|---|---|
order.currentSubtotalPrice | Object | { "amount": "100.00", "currencyCode": "USD" } | Classic Orders |
order.currentTotalPrice | Object | { "amount": "110.00", "currencyCode": "USD" } | Classic Orders |
order.currentTotalShippingPrice | Object | { "amount": "5.00", "currencyCode": "USD" } | Classic Orders |
order.currentTotalTax | Object | { "amount": "5.00", "currencyCode": "USD" } | Classic Orders |
Line Items (New Customer Accounts)
Property | Type | Example | Availability |
---|---|---|---|
order.lineItems | Array | [{ "id": "line_item_123", ... }] | Always |
order.lineItems[].id | String | "line_item_123" | With New Customer Accounts |
order.lineItems[].title | String | "Product Title" | Always |
order.lineItems[].quantity | Number | 2 | Always |
order.lineItems[].price | Object | { "amount": "50.00", "currencyCode": "USD" } | With New Customer Accounts |
order.lineItems[].totalPrice | Object | { "amount": "100.00", "currencyCode": "USD" } | With New Customer Accounts |
order.lineItems[].image | Object | { "url": "https://...", "altText": "Product image" } | If Available |
order.lineItems[].variantTitle | String | "Blue / Large" | Always |
order.lineItems[].sku | String | "SKU123" | Always |
order.lineItems[].vendor | String | "Vendor Name" | Always |
order.lineItems[].productType | String | "Type" | Always |
order.lineItems[].requiresShipping | Boolean | true | With New Customer Accounts |
order.lineItems[].refundableQuantity | Number | 2 | With New Customer Accounts |
Line Items (Classic Orders)
Property | Type | Example | Availability |
---|---|---|---|
order.lineItems[].currentQuantity | Number | 2 | Classic Orders |
order.lineItems[].originalTotalPrice | Object | { "amount": "100.00", "currencyCode": "USD" } | Classic Orders |
order.lineItems[].discountedTotalPrice | Object | { "amount": "100.00", "currencyCode": "USD" } | Classic Orders |
Line Item Variant (Classic Orders)
Property | Type | Example | Availability |
---|---|---|---|
order.lineItems[].variant | Object | { "id": "gid://shopify/ProductVariant/789", ... } | Classic Orders |
order.lineItems[].variant.id | String | "gid://shopify/ProductVariant/789" | Classic Orders |
order.lineItems[].variant.title | String | "Blue / Large" | Classic Orders |
order.lineItems[].variant.sku | String | "SKU123" | Classic Orders |
order.lineItems[].variant.price | Object | { "amount": "50.00", "currencyCode": "USD" } | Classic Orders |
Line Item Product (Classic Orders)
Property | Type | Example | Availability |
---|---|---|---|
order.lineItems[].variant.product | Object | { "id": "gid://shopify/Product/456", ... } | Classic Orders |
order.lineItems[].variant.product.id | String | "gid://shopify/Product/456" | Classic Orders |
order.lineItems[].variant.product.handle | String | "test-product" | Classic Orders |
order.lineItems[].variant.product.title | String | "Test Product" | Classic Orders |
order.lineItems[].variant.product.productType | String | "Type" | Classic Orders |
order.lineItems[].variant.product.vendor | String | "Vendor" | Classic Orders |
Fulfillments (New Customer Accounts)
Property | Type | Example | Availability |
---|---|---|---|
order.fulfillments | Array | [{ "id": "fulfillment_123", ... }] | With New Customer Accounts |
order.fulfillments[].id | String | "fulfillment_123" | With New Customer Accounts |
order.fulfillments[].status | String | "SUCCESS" | With New Customer Accounts |
order.fulfillments[].createdAt | String (ISO) | "2023-01-01T00:00:00Z" | With New Customer Accounts |
order.fulfillments[].estimatedDeliveryAt | String (ISO) | "2023-01-05T00:00:00Z" | With New Customer Accounts |
Fulfillment Tracking (New Customer Accounts)
Property | Type | Example | Availability |
---|---|---|---|
order.fulfillments[].trackingInformation | Object | { "number": "1Z999AA1234567890", ... } | With New Customer Accounts |
order.fulfillments[].trackingInformation.number | String | "1Z999AA1234567890" | With New Customer Accounts |
order.fulfillments[].trackingInformation.url | String | "https://..." | With New Customer Accounts |
order.fulfillments[].trackingInformation.company | String | "UPS" | With New Customer Accounts |
Fulfillments (Classic Orders)
Property | Type | Example | Availability |
---|---|---|---|
order.successfulFulfillments | Array | [{ "trackingCompany": "UPS", ... }] | Classic Orders |
order.successfulFulfillments[].trackingCompany | String | "UPS" | Classic Orders |
order.successfulFulfillments[].trackingInfo | Array | [{ "number": "1Z999AA1234567890", ... }] | Classic Orders |
order.successfulFulfillments[].trackingInfo[].number | String | "1Z999AA1234567890" | Classic Orders |
order.successfulFulfillments[].trackingInfo[].url | String | "https://..." | Classic Orders |
Transactions (New Customer Accounts)
Property | Type | Example | Availability |
---|---|---|---|
order.transactions | Array | [{ "id": "transaction_123", ... }] | With New Customer Accounts |
order.transactions[].id | String | "transaction_123" | With New Customer Accounts |
order.transactions[].status | String | "SUCCESS" | With New Customer Accounts |
order.transactions[].kind | String | "SALE" | With New Customer Accounts |
order.transactions[].processedAt | String (ISO) | "2023-01-01T00:00:00Z" | With New Customer Accounts |
Refunds
Property | Type | Example | Availability |
---|---|---|---|
order.refunds | Array | [] | With New Customer Accounts |
Addresses
Property | Type | Example | Availability |
---|---|---|---|
order.billingAddress | Object | { "address1": "123 Main St", ... } | Always |
order.billingAddress.address1 | String | "123 Main St" | Always |
order.billingAddress.city | String | "Anytown" | Always |
order.billingAddress.country | String | "United States" | Always |
order.billingAddress.countryCodeV2 | String | "US" | Classic Orders |
order.billingAddress.province | String | "CA" | Always |
order.billingAddress.provinceCode | String | "CA" | Classic Orders |
order.billingAddress.zip | String | "12345" | Always |
Shipping Address
Property | Type | Example | Availability |
---|---|---|---|
order.shippingAddress | Object | { "address1": "123 Main St", ... } | With New Customer Accounts |
order.shippingAddress.address1 | String | "123 Main St" | With New Customer Accounts |
order.shippingAddress.city | String | "Anytown" | With New Customer Accounts |
order.shippingAddress.country | String | "United States" | With New Customer Accounts |
order.shippingAddress.province | String | "CA" | With New Customer Accounts |
order.shippingAddress.zip | String | "12345" | With New Customer Accounts |
Shipping Line
Property | Type | Example | Availability |
---|---|---|---|
order.shippingLine | Object | { "title": "Standard Shipping" } | With New Customer Accounts |
order.shippingLine.title | String | "Standard Shipping" | With New Customer Accounts |
Sample Order Response
New Customer Accounts Format
{
"customer": {
"orders": [
{
"id": "order_123",
"name": "#1001",
"confirmationNumber": "ABC123",
"createdAt": "2023-01-01T00:00:00Z",
"processedAt": "2023-01-01T00:00:00Z",
"updatedAt": "2023-01-01T00:00:00Z",
"currencyCode": "USD",
"edited": false,
"email": "[email protected]",
"financialStatus": "PAID",
"cancelReason": null,
"cancelledAt": null,
"number": 1001,
"phone": "+1234567890",
"requiresShipping": true,
"statusPageUrl": "https://...",
"subtotal": { "amount": "100.00", "currencyCode": "USD" },
"totalPrice": { "amount": "110.00", "currencyCode": "USD" },
"totalShipping": { "amount": "5.00", "currencyCode": "USD" },
"totalTax": { "amount": "5.00", "currencyCode": "USD" },
"totalRefunded": { "amount": "0.00", "currencyCode": "USD" },
"lineItems": [
{
"id": "line_item_123",
"title": "Product Title",
"quantity": 2,
"price": { "amount": "50.00", "currencyCode": "USD" },
"totalPrice": { "amount": "100.00", "currencyCode": "USD" },
"image": { "url": "https://...", "altText": "Product image" },
"variantTitle": "Blue / Large",
"sku": "SKU123",
"vendor": "Vendor Name",
"productType": "Type",
"requiresShipping": true,
"refundableQuantity": 2
}
],
"fulfillments": [
{
"id": "fulfillment_123",
"status": "SUCCESS",
"trackingInformation": {
"number": "1Z999AA1234567890",
"url": "https://...",
"company": "UPS"
},
"createdAt": "2023-01-01T00:00:00Z",
"estimatedDeliveryAt": "2023-01-05T00:00:00Z"
}
],
"transactions": [
{
"id": "transaction_123",
"status": "SUCCESS",
"kind": "SALE",
"processedAt": "2023-01-01T00:00:00Z"
}
],
"refunds": [],
"billingAddress": {
"address1": "123 Main St",
"city": "Anytown",
"country": "United States",
"province": "CA",
"zip": "12345"
},
"shippingAddress": {
"address1": "123 Main St",
"city": "Anytown",
"country": "United States",
"province": "CA",
"zip": "12345"
},
"shippingLine": {
"title": "Standard Shipping"
}
}
],
"hasPreviousOrders": true
}
}
Classic Orders Format
{
"customer": {
"orders": [
{
"id": "gid://shopify/Order/123456",
"name": "#1001",
"processedAt": "2023-01-01T00:00:00Z",
"financialStatus": "PAID",
"fulfillmentStatus": "FULFILLED",
"cancelReason": null,
"canceledAt": null,
"currencyCode": "USD",
"edited": false,
"email": "[email protected]",
"phone": "+1234567890",
"customerLocale": "en",
"customerUrl": "https://...",
"statusUrl": "https://...",
"orderNumber": 1001,
"currentSubtotalPrice": { "amount": "100.00", "currencyCode": "USD" },
"currentTotalPrice": { "amount": "110.00", "currencyCode": "USD" },
"currentTotalShippingPrice": {
"amount": "5.00",
"currencyCode": "USD"
},
"currentTotalTax": { "amount": "5.00", "currencyCode": "USD" },
"totalRefunded": { "amount": "0.00", "currencyCode": "USD" },
"lineItems": [
{
"title": "Product Title",
"quantity": 2,
"currentQuantity": 2,
"originalTotalPrice": { "amount": "100.00", "currencyCode": "USD" },
"discountedTotalPrice": {
"amount": "100.00",
"currencyCode": "USD"
},
"variant": {
"id": "gid://shopify/ProductVariant/789",
"title": "Blue / Large",
"sku": "SKU123",
"price": { "amount": "50.00", "currencyCode": "USD" },
"product": {
"id": "gid://shopify/Product/456",
"handle": "test-product",
"title": "Test Product",
"productType": "Type",
"vendor": "Vendor"
}
}
}
],
"successfulFulfillments": [
{
"trackingInfo": [
{ "number": "1Z999AA1234567890", "url": "https://..." }
],
"trackingCompany": "UPS"
}
],
"billingAddress": {
"address1": "123 Main St",
"city": "Anytown",
"country": "United States",
"countryCodeV2": "US",
"province": "CA",
"provinceCode": "CA",
"zip": "12345"
}
}
],
"hasPreviousOrders": true
}
}
Configuration-Dependent FieldsThe format and availability of order data varies significantly based on your platform configuration:
New Customer Accounts: Enhanced structure with transactions, detailed fulfillments, shipping addresses, and more granular data
Classic Orders: Simplified structure with variant/product nesting and different field naming conventionsWhen building blocks that use order variables, ensure you handle both formats gracefully by checking for field existence before accessing nested properties.
Important Notes
- Order data structure differs significantly between New Customer Accounts and Classic configurations
- Field names may vary (
cancelledAt
vscanceledAt
,number
vsorderNumber
)- Line item structure is completely different between the two formats
- Fulfillment tracking has different structures and field names
- Always check for field existence when accessing nested properties
Updated 9 days ago