Exchange
⚠️ Deprecated Endpoint
This endpoint is deprecated and will no longer be maintained. Compared to the previous version:
- all previously collected information remains associated with the order
- the use of Shopify webhooks is removed
For all new developments, use Orders > Import List, which introduces:
- a more standard handling of order retrieval
👉 See the new documentation: Import List
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.
Destination configuration
Configure a Shopify destination and associate it with the flow, in addition to the basic data flow configuration.
| Field | Value | Notes |
|---|---|---|
Destination Type | Shopify | |
Operation | [DEPRECATED] - Exchange sync to NetSuite | POST /egress/sync-exchange-to-ns-api |
GraphQL endpoint URL | https://SHOPIFYURL.myshopify.com/ | Shopify Admin API GraphQL endpoint URL |
Admin API access token | shpat_CODICEALFANUMERICO | Or Client ID (API key) + Client secret — see Authentication |
Client ID (API key) | YOUR_CLIENT_ID | |
Client secret | YOUR_CLIENT_SECRET |
NetSuite header
Token-based credentials for sending exchange data to NetSuite.
| Field | Value | Notes |
|---|---|---|
NetSuite API URL | https://ACCOUNT.suitetalk.api.netsuite.com/ | NetSuite REST or SOAP web services base URL |
Consumer key | ********** | Consumer key for NetSuite token-based authentication |
Consumer secret | ********** | NetSuite consumer secret |
Token ID | ********** | NetSuite OAuth token ID |
Token secret | ********** | NetSuite OAuth token secret |
Account ID | ACCOUNT_ID | NetSuite account or realm identifier |
Deprecated — previous configuration (HTTP Adapter)
Configuration via HTTP Adapter with Base Url, Resource Path, and x-api-key header in Settings Override is deprecated. Use the Shopify destination configuration described above. For new developments, prefer Import List.
In addition to the basic data flow configuration the following settings were required in the destination's Settings Override:
| Field | Value | Note |
|---|---|---|
Base Url | https://adapter.flowlyze.io | 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 |
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
}
]
}