How to know if an item is the last one from a Web Hook payload ?

JohannR
New Member
1 0 0

Hi, 

We have implemented a private apps that is listening to Shopify Order events.

Once a new order is received we split it into sub-orders based on where the given SKUs will be fulfilled and manufactured. 

During this process , we survey the stock available on Shopify for each SKUs: if it's below a specific threshold then the app notifies the stock manager.

If the returned available quantity in Shopify is 0, then it sends the item to be fulfilled at a default fulfillment location. There, actions can be taken if reaaally we can't find any of the given SKUs.

The issue with the current system is that, even when we read a quantity of 0 for all locations on Shopify, we still don't know with absolute certainty that the item in the order is actually the last one. For all I know there might be another that went through at very close time.

Is there a way to know from the Order Create/Update payload if an item is the last one ? Or is there another API endpoint that could be used ? 

We are using an other app from the Shopify Market place to manage and synchronize inventory from the stores. I really want to avoid tracking inventory in a table on our end.

0 Likes