Skip to main content

Shopify Order Header to iPaaS

Transfer Shopify order headers to iPaaS

Updated yesterday

Summary

Shopify Order Headers can be transferred from Shopify Orders to iPaaS through mapping collections. The mapping collection identifies Order Header (using a filter) and maps their header, address, line, and payment details into iPaaS for downstream accounting and integration workflows.

This collection supports Order Header transfers, including Gift Card payments and other Payment transactions.
Disable this mapping collection if you are using Shopify PLUS. Order and deposit ticket mappings are configured to support Counterpoint integration requirements.

Field Constraints

  • OrderNumber does not end with the suffixes “-D” (Deposit Ticket) or “-GC” (Gift Card).

  • Gateway must be properly classified into gift card or non-gift card payment flows.

  • All amounts (discount, tax, subtotal, total) must be valid decimals.

Mapping Collection Status

  • Status: Enabled

  • Trigger Events: Shopify Orders with OrderNumber.Ends do not end with("-D") and (“-GC”).

Id Format

Order Headers use the OrderNumber without “-D “and “-GC” suffix as a unique transaction number in iPaaS.

Supported Child Collections

Parent Collection: Shopify Order Header Add From iPaaS

  • Child Collection: Shopify Order Address To iPaaS.

  • Child Collection Shopify Order Line To iPaaS.

  • Child Collection Shopify Order Note To iPaaS.

  • Child Collection: Shopify Order Payment Gift Card To iPaaS

  • Child Collection: Shopify Order Payment To iPaaS

  • Child Collection: Shopify Order Tax To iPaaS

System Caveats

iPaaS Caveats

  • Requires correct external IDs (SystemId).

  • Gift card logic must be enabled only when supported.

Shopify Caveats

  • Order Headers are recognized by the suffix not containing “-D” and “-GC”, not by explicit Shopify settings.

Setup Requirements

iPaaS Configuration

  • Enable Shopify Order Header Add To iPaaS mapping collection.

  • Configure child mappings for Inventory, Options, Option Values, Variants, and Variant Inventory.

  • Ensure Lookup Translations for Status and InventoryPolicy are configured.

Shopify Configuration

In the integration settings, enter the following correctly.

  • OAuth URL Template:

    https://{API Store}.myshopify.com/admin/oauth/authorize?client_id={SystemTypeVersion:Client_Id}&scope={SystemTypeVersion:Scope}&redirect_uri={SystemTypeVersion:RedirectUrl}&state={iPaaSState}

  • OAuth Identifier Field: timestamp

  • OAuth Success Callback Field: code

Shopify Store Credentials

  • Client_Secret: Secret saved when creating your Shopify store

  • Scope: read_inventory,read_locations,read_order_edits,read_payment_terms, read_merchant_managed_fulfillment_orders, read_publications, read_fulfillments,read_files

  • RedirectUrl: https://portal.ipaas.com/Order Header /subscription-mgmt/subscriptions/authorization/app

Authentication & Security

  • OAuth 2.0 Token: Used for Shopify API authentication.

Integration Flow

  1. Shopify Orders are evaluated for OrderNumbers that do not end with –D or “-GC”.

  2. Header-level data is transferred (SystemId, TransactionNumber, totals).

  3. Address, Line Items, and Payments are processed through child collections.

  4. iPaaS records a structured Order Header for downstream system integration.

  5. Variants and their inventory sync back into iPaaS.

Mappings

Shopify Order Header to iPaaS (Parent)

Mapping filter

!OrderNumber.EndsWith("-D") && !OrderNumber.EndsWith("-GC") && Confirmed

Description

Disable this mapping collection if you are using Shopify PLUS. Order and deposit ticket mappings are configured to support Counterpoint integration requirements.

Mapping Type

Source Field (Shopify)

Destination Field (iPaaS)

Description

Dynamic Formula

SpaceportSystemId

SystemId

Required

Field

OrderNumber

TransactionNumber

Required

Static

Order

Type

Lookup Translation

Status

This lookup translation converts the Shopify Transaction Status to the iPaaS Transaction Status.

Dynamic Formula

if(Email == null || Email == "") return "defaultCustomer@shopify.com"; return Email;

EmailAddress

Recommended: This snippet is designed to provide a fallback email address ("defaultCustomer@shopify.com") in cases where Email is either not defined (null) or blank ("").

Field

TotalDiscounts

DiscountAmount

Recommended

Field

TotalTax

TaxAmount

Recommended

Field

ShippingPrice

ShippingAmount

Recommended

Field

SubtotalPrice

Subtotal

Recommended

Field

TotalPrice

Total

Recommended

Field

ItemsTotal

TotalQty

Recommended

Shopify Order Header Address To iPaaS (Child)

Mapping Type

Source Field (Shopify)

Destination Field (iPaaS)

Description

Dynamic Formula

IsBillingAddress == "TRUE"

IsPrimaryBilling

Dynamic Formula

IsShippingAddress == "TRUE"

IsPrimaryShipping

Field

Address1

Address1

Field

Address2

Address2

Field

City

City

Field

ProvinceCode

Region

Field

Country

Country

Field

Zip

PostalCode

Dynamic Formula

if (IsShippingAddress == "TRUE" && Parent.ShippingLines[0] != null) { var carrier = Parent.ShippingLines[0].Code; if (carrier == "Standard") {return "UPS GROUND";} else if (carrier == "AnotherShopifyValue") {return "Another iPaaS.com Shipment Method";} else {return null;} } else {return null;}

ShippingMethod

The iPaaS transaction shipping address requires a shipping method, but the shipping method is in another Shopify model. Normally, you would want to use a translation collection to map shipping methods from your source system to iPaaS. But since the data is only available in another model, you can't easily use translations. So, this formula is a way to get a similar translation manually. There is only one example in the template formula demonstrating a single mapping from "Standard" to "UPS GROUND", but you could expand it as needed:

if (IsShippingAddress == "TRUE" && Parent.ShippingLines[0] != null) { var carrier = Parent.ShippingLines[0].Code; if (carrier == "Standard") {return "UPS GROUND";} else if (carrier == "AnotherShopifyValue") {return "Another iPaaS.com Shipment Method";} else {return null;} } else{return null;}

Field

FirstName

FirstName

Field

LastName

LastName

Field

Company

Company

Shopify Order Header Line To iPaaS (Child)

Mapping Type

Source Field (Shopify)

Destination Field (iPaaS)

Description

Static

Product

Type

Lookup Translation

Status

This lookup translation converts the status of Shopify Transaction Line Status to iPaaS Transaction Line Status.

Dynamic Formula

if(GiftCard){return "SHOPIFY-GC";} else {return Sku;}

Sku

This code checks whether a condition related to a gift card is true and returns Sku => "SHOPIFY-GC", otherwise a simple SKU.

Field

Title

Description

Field

Quantity

Qty

Dynamic Formula

if(GiftCard){return "SHOPIFY-GC";} else {return Sku;}

UnitPrice

This expression calculates the effective unit price of a product after discounts. It takes the total price (Price * Quantity), subtracts the sum of discounts from DiscountAllocations, and then divides by Quantity to get the discounted price per item.

Field

Price

OriginalUnitPrice

Dynamic Formula

(ConvertToDecimal(Price) * Quantity) - SumFieldFromCollection(DiscountAllocations, "Amount")

DiscountAmount

This expression calculates the total discount amount by summing the values of the "Amount" field in the DiscountAllocations collection.

Dynamic Formula

SumFieldFromCollection(TaxLines, "Rate")

TaxPercent

This expression calculates the total tax rate by summing the values of the "Rate" field from the TaxLines collection.

Dynamic Formula

SumFieldFromCollection(TaxLines, "Price")

EstimatedTaxAmount

This expression calculates the total tax amount by summing the values of the "Price" field from the TaxLines collection.

Shopify Order Note To iPaaS (Child)

Mapping filter

!IsEmpty(Parent.Note) && SourceTypeName == "ParentOnly"

Mapping Type

Source Field (Shopify)

Destination Field (iPaaS)

Description

Static

Customer Note

Type

Dynamic Formula

Gateway

Text

Getting the value from Order Note.

Static

true

IsPublic

Setting it to true

Shopify Order Payment Gift Card To iPaaS (Child)

Mapping filter

Gateway == "gift_card"

Description

This payment transfer is for gateways of the "gift card" type.

Mapping Type

Source Field (Shopify)

Destination Field (iPaaS)

Dynamic Formula

Gateway

Method

Static

Shopify Gift Certificate

Description

Field

Amount

Amount

Static

Captured

Status

Shopify Order Payment To iPaaS (Child)

Mapping filter

if (Kind == "authorization" && CreditCardAuthIsCaptured(Authorization, Parent.Transactions) == false && Status == "success" && Gateway !="gift_card" ) {return true;} else if (Kind == "authorization" && CreditCardAuthIsCaptured(Authorization, Parent.Transactions) == true && Status == "success" && Gateway !="gift_card" ) {return true;} else if (Kind == "sale" && Status == "success" && Gateway !="gift_card") {return true;} else {return false;}

Description

The code checks the type and status of a transaction: If the transaction is an "authorization" and has not been captured yet, but the status is successful, and the gateway is not "gift_card", it returns true. If the transaction is an "authorization" that has been captured, with a successful status and not a "gift_card" gateway, it also returns true. If the transaction type is "sale", the status is "successful", and the gateway is not "gift_card", then it returns true. Otherwise, it returns false. This logic is likely used to determine whether a payment transaction is valid for further processing or action based on its type and status..

Mapping Type

Source Field (Shopify)

Destination Field (iPaaS)

Description

Dynamic Formula

Gateway

Method

Field

Message

Description

Field

Amount

Amount

Dynamic Formula

if (Kind == "authorization" && CreditCardAuthIsCaptured(Authorization, Parent.Transactions) == false && Status == "success") {return "Authorized";} else if (Kind == "authorization" && CreditCardAuthIsCaptured(Authorization, Parent.Transactions) == true && Status == "success") {return "Captured";} else if (Kind == "sale" && Status == "success") {return "Captured";}

Status

This code checks the type, capture status, and success status of a transaction to determine the appropriate label:

Authorization Not Captured: If Kind is "authorization", Status is "success", and the authorization hasn't been captured, it returns "Authorized".

Authorization Captured: If Kind is "authorization", Status is "success", and the authorization has been captured, it returns "Captured".

Sale Transaction: If Kind is "sale" and Status is "success", it also returns "Captured"

Shopify Order Tax To iPaaS (Child)|

Mapping Type

Source Field (Shopify)

Destination Field (iPaaS)

Field

Title

Description

Field

Price

Amount

Field

Rate

TaxPercent

LookUp Translations

Shopify Transaction Status To iPaaS

Destination Field (Shopify)

Source Field (iPaaS)

PENDING

Pending

FULFILLED

Complete

VOIDED

Cancelled

SHIPPED

Shipped

CONFIRMED

Pending

PAID

Pending

REFUNDED

Cancelled

true

Pending

Shopify Transaction Line Status To iPaaS

Destination Field (Shopify)

Source Field (iPaaS)

PARTIAL

Pending

FULFILLED

Complete

NOT ELIGIBLE

Cancelled

true

Pending

Error Handling

  • OrderNumber without -D: Skipped from Order Header mapping.

  • GiftCard flag missing: May cause incorrect line mapping.

  • Authorization not captured: Payment skipped.

Testing & Validation

Test Scenarios

  • Order Header Creation in iPaaS: Order Header added with correct title, SKU, and price.

  • Option Exclusion: Order Headers with default “Title” options are skipped.

  • Variant Sync: Variants created with correct options and SKUs.

  • Inventory Sync: Quantities reflected per Shopify location.

Validation Rules

  • Deposit Order (Add): Correctly processed into iPaaS.

  • Deposit Order (Gift Card Payment): Gift Card mapping validated.

  • Authorization Payment: Captured properly.

  • Non-Deposit Order: Skipped.

Validation Checklist

  • OrderNumber suffix validated

  • Header, Address, Line, Payment mappings correct

  • Gift card vs non-gift card split works

  • Totals match Shopify order

Additional Notes

  • Validate dynamic formulas for smooth transfer.

Did this answer your question?