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

PropertyTypeExampleAvailability
order.idString"order_123" or "gid://shopify/Order/123456"Always
order.nameString"#1001"Always
order.numberNumber1001With New Customer Accounts
order.orderNumberNumber1001Classic Orders
order.confirmationNumberString"ABC123"With New Customer Accounts
order.emailString"[email protected]"Always
order.phoneString"+1234567890"Always
order.currencyCodeString"USD"Always

Order Status & Dates

PropertyTypeExampleAvailability
order.financialStatusString"PAID"Always
order.fulfillmentStatusString"FULFILLED"Classic Orders
order.editedBooleanfalseAlways
order.createdAtString (ISO)"2023-01-01T00:00:00Z"With New Customer Accounts
order.processedAtString (ISO)"2023-01-01T00:00:00Z"Always
order.updatedAtString (ISO)"2023-01-01T00:00:00Z"With New Customer Accounts
order.cancelledAtString (ISO)"2023-01-02T00:00:00Z"If Cancelled
order.canceledAtString (ISO)"2023-01-02T00:00:00Z"Classic Orders (If Cancelled)
order.cancelReasonString"inventory"If Cancelled

Customer & Locale Information

PropertyTypeExampleAvailability
order.customerLocaleString"en"Classic Orders
order.customerUrlString"https://..."Classic Orders
order.statusUrlString"https://..."Classic Orders
order.statusPageUrlString"https://..."With New Customer Accounts
order.requiresShippingBooleantrueWith New Customer Accounts

Pricing Structure (New Customer Accounts)

PropertyTypeExampleAvailability
order.subtotalObject{ "amount": "100.00", "currencyCode": "USD" }With New Customer Accounts
order.totalPriceObject{ "amount": "110.00", "currencyCode": "USD" }With New Customer Accounts
order.totalShippingObject{ "amount": "5.00", "currencyCode": "USD" }With New Customer Accounts
order.totalTaxObject{ "amount": "5.00", "currencyCode": "USD" }With New Customer Accounts
order.totalRefundedObject{ "amount": "0.00", "currencyCode": "USD" }Always

Pricing Structure (Classic Orders)

PropertyTypeExampleAvailability
order.currentSubtotalPriceObject{ "amount": "100.00", "currencyCode": "USD" }Classic Orders
order.currentTotalPriceObject{ "amount": "110.00", "currencyCode": "USD" }Classic Orders
order.currentTotalShippingPriceObject{ "amount": "5.00", "currencyCode": "USD" }Classic Orders
order.currentTotalTaxObject{ "amount": "5.00", "currencyCode": "USD" }Classic Orders

Line Items (New Customer Accounts)

PropertyTypeExampleAvailability
order.lineItemsArray[{ "id": "line_item_123", ... }]Always
order.lineItems[].idString"line_item_123"With New Customer Accounts
order.lineItems[].titleString"Product Title"Always
order.lineItems[].quantityNumber2Always
order.lineItems[].priceObject{ "amount": "50.00", "currencyCode": "USD" }With New Customer Accounts
order.lineItems[].totalPriceObject{ "amount": "100.00", "currencyCode": "USD" }With New Customer Accounts
order.lineItems[].imageObject{ "url": "https://...", "altText": "Product image" }If Available
order.lineItems[].variantTitleString"Blue / Large"Always
order.lineItems[].skuString"SKU123"Always
order.lineItems[].vendorString"Vendor Name"Always
order.lineItems[].productTypeString"Type"Always
order.lineItems[].requiresShippingBooleantrueWith New Customer Accounts
order.lineItems[].refundableQuantityNumber2With New Customer Accounts

Line Items (Classic Orders)

PropertyTypeExampleAvailability
order.lineItems[].currentQuantityNumber2Classic Orders
order.lineItems[].originalTotalPriceObject{ "amount": "100.00", "currencyCode": "USD" }Classic Orders
order.lineItems[].discountedTotalPriceObject{ "amount": "100.00", "currencyCode": "USD" }Classic Orders

Line Item Variant (Classic Orders)

PropertyTypeExampleAvailability
order.lineItems[].variantObject{ "id": "gid://shopify/ProductVariant/789", ... }Classic Orders
order.lineItems[].variant.idString"gid://shopify/ProductVariant/789"Classic Orders
order.lineItems[].variant.titleString"Blue / Large"Classic Orders
order.lineItems[].variant.skuString"SKU123"Classic Orders
order.lineItems[].variant.priceObject{ "amount": "50.00", "currencyCode": "USD" }Classic Orders

Line Item Product (Classic Orders)

PropertyTypeExampleAvailability
order.lineItems[].variant.productObject{ "id": "gid://shopify/Product/456", ... }Classic Orders
order.lineItems[].variant.product.idString"gid://shopify/Product/456"Classic Orders
order.lineItems[].variant.product.handleString"test-product"Classic Orders
order.lineItems[].variant.product.titleString"Test Product"Classic Orders
order.lineItems[].variant.product.productTypeString"Type"Classic Orders
order.lineItems[].variant.product.vendorString"Vendor"Classic Orders

Fulfillments (New Customer Accounts)

PropertyTypeExampleAvailability
order.fulfillmentsArray[{ "id": "fulfillment_123", ... }]With New Customer Accounts
order.fulfillments[].idString"fulfillment_123"With New Customer Accounts
order.fulfillments[].statusString"SUCCESS"With New Customer Accounts
order.fulfillments[].createdAtString (ISO)"2023-01-01T00:00:00Z"With New Customer Accounts
order.fulfillments[].estimatedDeliveryAtString (ISO)"2023-01-05T00:00:00Z"With New Customer Accounts

Fulfillment Tracking (New Customer Accounts)

PropertyTypeExampleAvailability
order.fulfillments[].trackingInformationObject{ "number": "1Z999AA1234567890", ... }With New Customer Accounts
order.fulfillments[].trackingInformation.numberString"1Z999AA1234567890"With New Customer Accounts
order.fulfillments[].trackingInformation.urlString"https://..."With New Customer Accounts
order.fulfillments[].trackingInformation.companyString"UPS"With New Customer Accounts

Fulfillments (Classic Orders)

PropertyTypeExampleAvailability
order.successfulFulfillmentsArray[{ "trackingCompany": "UPS", ... }]Classic Orders
order.successfulFulfillments[].trackingCompanyString"UPS"Classic Orders
order.successfulFulfillments[].trackingInfoArray[{ "number": "1Z999AA1234567890", ... }]Classic Orders
order.successfulFulfillments[].trackingInfo[].numberString"1Z999AA1234567890"Classic Orders
order.successfulFulfillments[].trackingInfo[].urlString"https://..."Classic Orders

Transactions (New Customer Accounts)

PropertyTypeExampleAvailability
order.transactionsArray[{ "id": "transaction_123", ... }]With New Customer Accounts
order.transactions[].idString"transaction_123"With New Customer Accounts
order.transactions[].statusString"SUCCESS"With New Customer Accounts
order.transactions[].kindString"SALE"With New Customer Accounts
order.transactions[].processedAtString (ISO)"2023-01-01T00:00:00Z"With New Customer Accounts

Refunds

PropertyTypeExampleAvailability
order.refundsArray[]With New Customer Accounts

Addresses

PropertyTypeExampleAvailability
order.billingAddressObject{ "address1": "123 Main St", ... }Always
order.billingAddress.address1String"123 Main St"Always
order.billingAddress.cityString"Anytown"Always
order.billingAddress.countryString"United States"Always
order.billingAddress.countryCodeV2String"US"Classic Orders
order.billingAddress.provinceString"CA"Always
order.billingAddress.provinceCodeString"CA"Classic Orders
order.billingAddress.zipString"12345"Always

Shipping Address

PropertyTypeExampleAvailability
order.shippingAddressObject{ "address1": "123 Main St", ... }With New Customer Accounts
order.shippingAddress.address1String"123 Main St"With New Customer Accounts
order.shippingAddress.cityString"Anytown"With New Customer Accounts
order.shippingAddress.countryString"United States"With New Customer Accounts
order.shippingAddress.provinceString"CA"With New Customer Accounts
order.shippingAddress.zipString"12345"With New Customer Accounts

Shipping Line

PropertyTypeExampleAvailability
order.shippingLineObject{ "title": "Standard Shipping" }With New Customer Accounts
order.shippingLine.titleString"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 Fields

The 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 conventions

When 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 vs canceledAt, number vs orderNumber)
  • 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