Stocks
Structure for sending stocks to location, a single call can contain updates on different locations.
The location_id refers to the Shopify location ID retrievable in the URL:
e.g: https://admin.shopify.com/store/myshopify/settings/locations/99333760019
Flow-specific Stocks
Inventory updates update ONHAND stock, i.e. the quantity present in warehouse, which is debited from orders still to be fulfilled (fulfillment missing). Alternatively, it is possible to update AVAILABLE stock, i.e. the sellable quantity (ONHAND - COMMITTED = AVAILABLE).
The location_id corresponds to the Shopify location ID to which the stock is associated, in the case it is unique it is possible to configure it
directly on Flowlyze thus avoiding sending it with every communication.
[
{
"sku": "BGSM001C210A-1",
"qty": 34,
"location_id": 99333760019
},
{
"sku": "BGSM001C210A-2",
"qty": 35,
"location_id": 99333760071
}
]
It is possible to send negative quantities, but care must be taken, as depending on the type of stock being updated there is a certain behavior:
- if the update concerns AVAILABLE stock, the value will be synchronized as is;
- if instead the update concerns ONHAND stock, the value will be set to 0 (negative quantities in warehouse are not allowed).
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 | Stock update | POST /egress/stock-to-shopify |
GraphQL endpoint URL | https://SHOPIFYURL.myshopify.com/ | Shopify Admin 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 | |
Fulfillment location | gid://shopify/Location/… | Shopify location identifier used for inventory updates |
Update available quantity | true / false | When true, updates available inventory quantities at the location (required) |
Ignore missing SKU | true / false | When true, skips stock updates when the SKU is not found instead of failing (default: false, required) |
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.
In addition to the basic data flow configuration, the following Settings Override settings were required:
| Field | Value | Notes |
|---|---|---|
Base Url | https://adapter.flowlyze.io | Adapter URL |
Resource Path | /api/adp/shopify/egress/stock-to-shopify | Adapter path for stock |
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-shopify-update-available | true | Allows modifying AVAILABLE stock directly |
Headers :: x-shopify-location | locationID | Default location for each call |
Headers :: x-ignore-missing-sku | true | Ignores missing SKUs (default: false) |