We need an API call to find out how much of a given product is being used in new and in progress orders. These orders have not reached our system yet, or are waiting for the stock to come in.
In order to get an accurate stock count we need to validate that the stock we have equals the stock Shopify has plus the stock in orders
Right now we fetch all new and in progress orders, and count the quantities for each order. This represents a problem because it takes too much time.
Is there a way to query the Shopify inventory to know who much of a given product is used in new and in progress orders?
Here is a high-level view of a complex question. Using the API you can certainly download all your open orders with unfulfilled items. You thus know the SKU and quantity sold.
But that is not the whole story. You do not know how much is sitting around in Shopify. For that you need to look at each item (SKU) and ask the question where is it stocked? Each location in a Shopify store can have an inventory quantity. So you need to venture beyond the order to know "Stock that Shopify has". To know "Stock sold in orders" is easy, that is a given. How much stock you have is yet another question.
So you have to organize your question perhaps with a wee bit more detail? At the high-level, it is pretty certain you can use API calls to give you these answers automatically. How you organize those calls is dictated by how you organize inventory both inside Shopify and at your external system. There is no easy one-size-fits-all, but, it is pretty easy to get the numbers you need without a pencil, eraser and head-scratching.
Thank you for your response.
We are fetching the stock held in Shopify at all locations. That us a simple call, and is resolved quickly.
We would need a similar API call to return the amount of each product used in each order (only new and in progress).
Like I said, this is because the actual stock level on the warehouse might not be the same as we are expecting new arrivals.
I think we will solve this by storing the order items locally so we don't have to get this information all the time.
The amount of stock used up in an order is simply the quantity of each SKU in the order. How is that a problem to figure out?
Obviously from that alone you have no clue where you actually get that stock from since an order has no fulfillment until you make one.
Not sure now what your actual problem or question is.