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).
Stock flow configurations
In addition to the base data flow configurations add the following settings in Settings Override:
| Field | Valore | Note |
|---|---|---|
Base Url | https://adapt.flowlyze.com | 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 | allows avoiding inserting location_id by inserting a default one for each call |
Headers :: x-ignore-missing-sku | true | allows ignoring missing SKUs, returning the error (default: false) |