Summary
This mapping collection transfers Gift Card Tickets from Shopify Plus to iPaaS.com. It ensures that when a Gift Card order is fulfilled in Shopify, the corresponding Transaction Record is created in iPaaS to support Counterpoint integration requirements.
Synchronization is driven by filtering logic applied to Gift Card orders and is enabled via the Shopify Templates Latest API.
Mapping Collection Status
Status: Enabled
Trigger Events: Order/Transaction that includes -GC suffix in creation or update events in Shopify.
Id Format
Order Gift Cards use the OrderNumber “-GC” suffix as a unique transaction number in iPaaS.
Supported Child Collections
Parent Collection: Shopify Plus Gift Card Ticket To iPaaS
Child Collection 1: Gift Card Ticket Address – Transfers billing and shipping address details.
Child Collection 2: Gift Card Ticket Payment – Transfers valid payment transactions (sale/authorization).
Child Collection 3: Gift Card Ticket Line – Transfers individual gift card line items.
System Caveats
iPaaS Caveats
Only Shopify Plus stores can use Gift Card API features.
Shopify Caveats
Order Gift Cards are recognized by the suffix not containing “-D” and “-GC”, not by explicit Shopify settings.
Setup Requirements
iPaaS Configuration
Enable Shopify Order Gift Card 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 Gift Card /subscription-mgmt/subscriptions/authorization/app
Authentication & Security
OAuth 2.0 Token: Used for Shopify API authentication.
Integration Flow
Shopify generates a Gift Card when an order with a gift card is placed.
iPaaS retrieves the order, ticket, and related line items via the Shopify API.
Mapping applies formulas, lookups, and static values to transform data.
Ticket, address, payment, and line items are stored in iPaaS for downstream use.
Mappings
Shopify Order Gift Card to iPaaS (Parent)
Mapping Filter
Id.EndsWith("-GC") && GetGiftCardFulfillmentCount(Fulfillments ) > 0
Description
Disable this mapping collection if you are not 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 |
| SystemId | Required |
Field | OrderNumber | TransactionNumber | Required |
Dynamic Formula |
| ParentId | This mapping uses an iPaaS.com function to retrieve the iPaaS.com internal ID for a transaction based on the Shopify transaction Id. |
Static | Ticket | Type |
|
Lookup Translation | Status | This lookup translation converts the Shopify Transaction Status to iPaaS Transaction Status. | |
Dynamic Formula |
| EmailAddress | Recommended |
Field | TotalDiscounts | DiscountAmount |
|
Field | TotalTax | TaxAmount |
|
Field | ShippingPrice | ShippingAmount |
|
Dynamic Formula |
| Subtotal | The method GiftCardSoldTotal filters the gift card items from the provided list of LineItem objects, calculates the total value for each gift card based on its price and quantity, and returns the accumulated total value for all gift cards. If no gift cards are found, it returns 0. |
Dynamic Formula |
| Total | The method GiftCardSoldTotal filters the gift card items from the provided list of LineItem objects, calculates the total value for each gift card based on its price and quantity, and returns the accumulated total value for all gift cards. If no gift cards are found, it returns 0.| |
Dynamic Formula |
| TotalQty | The GiftCardSoldCount method filters the gift card items from the provided list of LineItem objects, calculates the total quantity for each gift card, and returns the total count of all gift cards sold. If no gift cards are found in the list, it returns 0.| |
Shopify Plus Gift Card Ticket Address To iPaaS (Child) |
Mapping Type | Source Field (Shopify) | Destination Field (iPaaS) | Description |
Dynamic Formula |
| IsPrimaryBilling |
|
Dynamic Formula |
| IsPrimaryShipping |
|
Field | Address1 | Address1 |
|
Field | Address2 | Address2 |
|
Field | City | City |
|
Field | ProvinceCode | Region |
|
Field | Country | Country |
|
Field | Zip | PostalCode |
|
Dynamic Formula |
| 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 Gift Card Line To iPaaS (Child)
Filter
GiftCard
Mapping Type | Source Field (Shopify) | Destination Field (iPaaS) | Description |
Dynamic Formula |
| LineInfo | The code retrieves a list of fulfillments associated with an order, extracts the Gift Card ID from the fulfillments, asynchronously fetches additional gift card information using an external service, and then returns the gift card data as a JSON-formatted dictionary containing the GiftCardId. |
Lookup Translation | Status | This lookup translation converts the status of Shopify Transaction Line Status to iPaaS Transaction Line Status. | |
Dynamic Formula |
| Type | This transfer is for the Transaction Line Type of Product if GiftCard is not true or null |
Static | Complete | Status |
|
Static | SHOPIFY-GC | Sku |
|
Field | Title | Description |
|
Field | Quantity | Qty |
|
Dynamic Formula |
| UnitPrice | This expression calculates the effective unit price of a product after discounts. It takes the total price ( |
Dynamic Formula |
| ExtendedPrice | | This expression calculates the total cost of a product by multiplying its price (Price) by the quantity (Quantity), and then subtracting the total discounts from the DiscountAllocations collection. The result gives the net cost after discounts have been applied. |
Field | Price | OriginalUnitPrice |
|
Dynamic Formula |
| DiscountAmount | This expression calculates the total discount amount by summing the values of the "Amount" field in the DiscountAllocations collection. |
Dynamic Formula |
| TaxPercent | This expression calculates the total tax rate by summing the values of the "Rate" field from the TaxLines collection. |
Dynamic Formula |
| EstimatedTaxAmount | This expression calculates the total tax amount by summing the "Price" field values in the TaxLines collection. |
Shopify Gift Card Ticket 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 logic checks for either a successful authorization or a sale transaction processed outside a gift card transaction. If these conditions are met, the order is transferred. If not, the order will not be transferred.
Mapping Type | Source Field (Shopify) | Destination Field (iPaaS) | Description |
Dynamic Formula |
| Method |
|
Field | Message | Description |
|
Dynamic Formula |
| Amount | The GiftCardSoldTotal method calculates the total price for gift card products in a list of LineItem objects. It filters out items where GiftCard is set to true, indicating they are gift card items. If no gift card items are found, the method returns 0. Otherwise, it iterates through the gift card items, calculates the total price for each by multiplying its price by its quantity, and sums these totals. Finally, it returns the accumulated total value of all gift card items. |
Dynamic Formula |
| Status | If the transaction is an authorization that has not yet been captured, it returns "Authorized". If the transaction is an authorization that has been captured, it returns "Captured". If the transaction is a sale and the status is success, it returns "Captured". |
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
Missing Email: Formula returns an empty string.
Invalid Transaction Type: Transactions without “authorization” or “sale” status are ignored.
Gift Card API Disabled: Mapping fails if the store is not Shopify Plus.
Testing & Validation
Test Scenarios
Gift Card Purchase: Ensure ticket, payment, and line items sync to iPaaS.
Gift Card with Discount: Validate the discount calculation maps correctly.
Gift Card with Tax: Confirm tax mapping matches Shopify.
Validation Rules
Only Shopify Plus accounts are supported.
Gift card codes must remain internal to Shopify.
Validation Checklist
Tickets created in Shopify appear in iPaaS.
Status translations are correct.
Additional Notes
Ensure error logging is enabled for reconciliation.
