Exchange
Exchanges are managed by Flowlyze through a Shopify Webhook.
The shop URL to which the refund belongs (Shop) is retrieved, the identifier of the order (OrderId), all fulfillments present in the order (Fulfillments) and all transactions (Transactions) that have been made on the order up to that point except the first, i.e. the one referring to the initial sale.
The Adapter handles sending information to a NetSuite endpoint configured to receive exchange data.
Exchange Flow Configuration
In addition to the base data flow configuration, it is necessary to add the following settings in the destination's Settings Override:
| Field | Value | Note |
|---|---|---|
Base Url | https://adapt.flowlyze.com | adapter URL |
Resource Path | /api/adp/shopify/egress/sync-exchange-to-ns-api | adapter path for the exchange flow. |
Headers :: x-api-key | ********** | API key for endpoint interaction verification |
Headers :: x-shopify-graphql-url | https://SHOPIFYURL.myshopify.com/ | Shopify shop URL to connect to |
Headers :: x-shopify-access-token | shpat_CODICEALFANUMERICO | secret of the custom app created for integration |
Headers :: x-ns-api-url | NetSuite API URL | NetSuite API URL to send refund-related data to. |
Headers :: x-ns-consumer-key | Consumer Key | Consumer key value generated for NetSuite |
Headers :: x-ns-consumer-secret | Consumer Secret | Consumer secret value generated for NetSuite |
Headers :: x-ns-token-id | Access Token Id | Access token for NetSuite |
Headers :: x-ns-token-secret | Token Secret | Token secret generated for NetSuite |
Headers :: x-ns-account-id | Account Id | The account ID (Realm) for NetSuite |
info
How to configure the Webhook on Shopify
- Go to the Settings section in your Shopify admin panel.
- Select Notifications from the left menu.
- Select the Webhooks section.
- Click on Create Webhook.
- Choose the event for which you want to receive the notification (e.g. for this flow you need to select
Fulfillment creation). - Select the format (e.g.
Json). - Enter the URL where you will receive notifications (e.g. for this flow the Flowlyze flow URL).
- Select the API version 'Webhook API version' (e.g.
2024-10)
For more information, visit the official Shopify documentation for creating Webhooks.
Example of retrieved information
{
"Shop": "https://demoipaas.myshopify.com/",
"OrderId": "gid://shopify/Order/6092762644787",
"Fulfillments": [
{
"Id": "gid://shopify/Fulfillment/5383304970547",
"Name": "#1037-F2",
"Status": "SUCCESS",
"CreatedAt": "2024-10-17T14:52:21+00:00",
"UpdatedAt": "2024-10-17T14:52:21+00:00",
"DeliveredAt": null,
"DisplayStatus": "FULFILLED",
"EstimatedDeliveryAt": null,
"TrackingInfo": [],
"TotalQuantity": 1,
"Location": {
"Id": "gid://shopify/Location/99130769715"
},
"FulfillmentLineItems": {
"Nodes": [
{
"Id": "gid://shopify/FulfillmentLineItem/13217186021683",
"LineItem": {
"RequiresShipping": false,
"Taxable": false,
"IsGiftCard": false,
"Duties": null,
"TaxLines": [],
"Id": "gid://shopify/LineItem/15350206005555",
"Sku": "0135DB",
"Name": "6 Panel Linear Logo Strapback - Darkblue",
"Quantity": 1,
"Title": "6 Panel Linear Logo Strapback",
"VariantTitle": "Darkblue",
"Vendor": "51",
"TotalDiscountSet": {
"ShopMoney": {
"Amount": 0,
"CurrencyCode": "EUR"
},
"PresentmentMoney": {
"Amount": 0,
"CurrencyCode": "EUR"
}
},
"DiscountedUnitPriceAfterAllDiscountsSet": {
"ShopMoney": {
"Amount": 185,
"CurrencyCode": "EUR"
},
"PresentmentMoney": {
"Amount": 185,
"CurrencyCode": "EUR"
}
},
"DiscountedTotalSet": {
"ShopMoney": {
"Amount": 185,
"CurrencyCode": "EUR"
},
"PresentmentMoney": {
"Amount": 185,
"CurrencyCode": "EUR"
}
},
"OriginalTotalSet": {
"ShopMoney": {
"Amount": 185,
"CurrencyCode": "EUR"
},
"PresentmentMoney": {
"Amount": 185,
"CurrencyCode": "EUR"
}
},
"OriginalUnitPriceSet": {
"ShopMoney": {
"Amount": 185,
"CurrencyCode": "EUR"
},
"PresentmentMoney": {
"Amount": 185,
"CurrencyCode": "EUR"
}
},
"DiscountedUnitPriceSet": {
"ShopMoney": {
"Amount": 185,
"CurrencyCode": "EUR"
},
"PresentmentMoney": {
"Amount": 185,
"CurrencyCode": "EUR"
}
},
"Product": {
"Id": "gid://shopify/Product/9325820576051"
},
"Variant": {
"Id": "gid://shopify/ProductVariant/49503958106419",
"SelectedOptions": [
{
"Name": "color",
"Value": "Darkblue"
}
],
"Barcode": "5423930393432",
"Price": 185,
"CompareAtPrice": 185
},
"DiscountAllocations": [],
"CustomAttributes": []
},
"Quantity": 1,
"OriginalTotalSet": {
"ShopMoney": {
"Amount": 185,
"CurrencyCode": "EUR"
},
"PresentmentMoney": {
"Amount": 185,
"CurrencyCode": "EUR"
}
},
"DiscountedTotalSet": {
"ShopMoney": {
"Amount": 185,
"CurrencyCode": "EUR"
},
"PresentmentMoney": {
"Amount": 185,
"CurrencyCode": "EUR"
}
}
}
],
"PageInfo": {
"HasNextPage": false,
"EndCursor": "eyJsYXN0X2lkIjoxMzIxNzE4NjAyMTY4MywibGFzdF92YWx1ZSI6MTMyMTcxODYwMjE2ODN9"
}
}
},
{
"Id": "gid://shopify/Fulfillment/5383302316339",
"Name": "#1037-F1",
"Status": "SUCCESS",
"CreatedAt": "2024-10-17T14:50:57+00:00",
"UpdatedAt": "2024-10-17T14:50:57+00:00",
"DeliveredAt": null,
"DisplayStatus": "FULFILLED",
"EstimatedDeliveryAt": null,
"TrackingInfo": [],
"TotalQuantity": 1,
"Location": {
"Id": "gid://shopify/Location/99130769715"
},
"FulfillmentLineItems": {
"Nodes": [
{
"Id": "gid://shopify/FulfillmentLineItem/13217182482739",
"LineItem": {
"RequiresShipping": false,
"Taxable": false,
"IsGiftCard": false,
"Duties": null,
"TaxLines": [],
"Id": "gid://shopify/LineItem/15350204105011",
"Sku": "0135DL",
"Name": "6 Panel Linear Logo Strapback - Darkviolet",
"Quantity": 1,
"Title": "6 Panel Linear Logo Strapback",
"VariantTitle": "Darkviolet",
"Vendor": "51",
"TotalDiscountSet": {
"ShopMoney": {
"Amount": 0,
"CurrencyCode": "EUR"
},
"PresentmentMoney": {
"Amount": 0,
"CurrencyCode": "EUR"
}
},
"DiscountedUnitPriceAfterAllDiscountsSet": {
"ShopMoney": {
"Amount": 39.9,
"CurrencyCode": "EUR"
},
"PresentmentMoney": {
"Amount": 39.9,
"CurrencyCode": "EUR"
}
},
"DiscountedTotalSet": {
"ShopMoney": {
"Amount": 39.9,
"CurrencyCode": "EUR"
},
"PresentmentMoney": {
"Amount": 39.9,
"CurrencyCode": "EUR"
}
},
"OriginalTotalSet": {
"ShopMoney": {
"Amount": 39.9,
"CurrencyCode": "EUR"
},
"PresentmentMoney": {
"Amount": 39.9,
"CurrencyCode": "EUR"
}
},
"OriginalUnitPriceSet": {
"ShopMoney": {
"Amount": 39.9,
"CurrencyCode": "EUR"
},
"PresentmentMoney": {
"Amount": 39.9,
"CurrencyCode": "EUR"
}
},
"DiscountedUnitPriceSet": {
"ShopMoney": {
"Amount": 39.9,
"CurrencyCode": "EUR"
},
"PresentmentMoney": {
"Amount": 39.9,
"CurrencyCode": "EUR"
}
},
"Product": {
"Id": "gid://shopify/Product/9325820576051"
},
"Variant": {
"Id": "gid://shopify/ProductVariant/49503958171955",
"SelectedOptions": [
{
"Name": "color",
"Value": "Darkviolet"
}
],
"Barcode": "0426728871870",
"Price": 39.9,
"CompareAtPrice": null
},
"DiscountAllocations": [],
"CustomAttributes": []
},
"Quantity": 1,
"OriginalTotalSet": {
"ShopMoney": {
"Amount": 39.9,
"CurrencyCode": "EUR"
},
"PresentmentMoney": {
"Amount": 39.9,
"CurrencyCode": "EUR"
}
},
"DiscountedTotalSet": {
"ShopMoney": {
"Amount": 39.9,
"CurrencyCode": "EUR"
},
"PresentmentMoney": {
"Amount": 39.9,
"CurrencyCode": "EUR"
}
}
}
],
"PageInfo": {
"HasNextPage": false,
"EndCursor": "eyJsYXN0X2lkIjoxMzIxNzE4MjQ4MjczOSwibGFzdF92YWx1ZSI6MTMyMTcxODI0ODI3Mzl9"
}
}
}
],
"Transactions": [
{
"AmountSet": {
"ShopMoney": {
"Amount": 145.1,
"CurrencyCode": "EUR"
},
"PresentmentMoney": {
"Amount": 145.1,
"CurrencyCode": "EUR"
}
},
"AuthorizationCode": null,
"ProcessedAt": "2024-10-17T14:52:03Z",
"Status": "SUCCESS",
"ErrorCode": null,
"Gateway": "manual",
"Id": "gid://shopify/OrderTransaction/7358143070515",
"Kind": "SALE",
"ReceiptJson": "{}",
"ParentTransaction": null,
"PaymentDetails": null
}
]
}