We are experiencing an issue with product stock management. Our shop (https://obdev2.myshopify.com/) uses a custom fulfillment service. Shopify periodically asks for the stock of one or more product SKUs and our system returns it in the form a dictionary of SKU and StockAmount as per the documentation (https://shopify.dev/docs/admin-api/rest/reference/shipping-and-fulfillment/fulfillmentservice).
Everything appears to be working correctly, we receive Shopify's requests and return back the results. The problem is that Shopify does not update our products with the new results. We saw many people with the same issue and no real response from Shopify on these forums. Not even to say that the issue is being looked at. It looks like this is an issue with Shopify and not the developers and it makes me wonder how much we rely on Shopify to keep our products updated. We are planning to run this on thousands of products and we cannot afford to have out-of-date stocks even for 1 day.
Can we get some support on this?
This question often comes up because the fulfillment service isn't accounting for pending unfulfilled units when responding to Shopify, so I'd like to outline the expected behaviour to confirm:
Shopify expects your fetch_stock response to include any units of inventory that have been purchased, but haven't been fulfilled yet. Shopify accounts for these units automatically when displaying a SKU's available quantity in the admin, so you need to ensure the app always responds to fetch_stock with the number of units currently at the warehouse (in other words, unsold inventory and sold+unshipped inventory).
For example, say you start the day with 10 units of the sku SHIRT:
9am fetch_stock request- response should be 10 (Shopify displays 10 units available in admin)
10am fetch_stock request- response should be 10 (Shopify displays 10 units available in admin)
10:30am new order for 1 SHIRT. (Shopify displays 9 units available in admin)
11am fetch_stock request- response should be 10 (Shopify subtracts pending unfulfilled units from your response. So 10 - 1 = 9, admin is already displaying 9 so no adjustment is made)
11:30am- SHIRT order is shipped and marked as fulfilled
12pm fetch_stock request- response should be 9 (Shopify subtracts pending unfulfilled units from your response. So 9 - 0 = 9, admin is already displaying 9 so no adjustment is made)
If you can confirm that your app is accounting for pending unfulfilled units, please provide some example inventory_item ids where Shopify isn't updating the stock as expected, and I'll use those to check our logs for more information.
I am having the same issue. I have unfulfilled orders (purchased today) and yet my inventory remains the same on the items. Some items I am now technically sold out on, but they are still available for purchase on my site and still showing fully in stock (no change to inventory). Are there any updates to fix this?