Hey,
I had two questions?
- Are shopify flows run async?
- Can you query a variant inventory level (not related to an order) and return available quantity?
Hey,
I had two questions?
Thanks @kyle_liu
I am doing on orderCreated Flow, so dont have access to inventory of product (due to the nature of the call), so just whipping up a webhook to manage inventory depreciation.
dont happen to know if it times out? my server is returning in 1second from the call (was not build for this purpose)
you create create two actions , and that one you can use get product variant data.
in this response , you can get inventoryQuantity field
As Eric said, you can retrieve inventory data through the flow. If it still doesn’t meet your logic requirements, you can handle the idempotency logic yourself. Shopify webhooks have a retry mechanism.
hey @Eric_Han
Updated as I have figure it out, so its an advanced query, IE:
sku:XYZ
then the following step allows you to see the specific keys
If you are using order created, then you should not need a query. Instead look at:
order / lineItems / variant / inventoryItem / inventoryLevels
Thanks, the variant isnt related to the order so I need to query it seperately (its a gift with purchase, so adding to order but need to make sure there is stock first)