Inventory behavior changed? Fetch_stock.json is unclear

Shopify Partner
94 7 59

Hi Shopify staff,


I hope you can answer this puzzling behavior for me.


We've been building a fulfillment service app. In the past we used the following logic:


  • Product 1 has stock 3 in Shopify and 3PL
  • Customer A placed Order X with quantity 1 for Product 1
  • Shopify deducts the stock by -1 and is now at 2
  • 3PL still has stock 3, as the order hasn't been fulfilled yet
  • When fetch_stock.json happens, we return quantity 3 for Product 1
  • Shopify internally deducts -1 for Product 1 because it has been used in Order X


I am pretty adamant that this logic was working for a long time. However, I just cannot figure out what is going wrong right now. It seems Shopify is not deducting the stock for pending Order X, and when we return quantity 3 for Product 1, Shopify just inserts quantity 3 for Product 1. Even though Order X is still pending.


Did something recently change?



Reply 1 (1)
Shopify Partner
94 7 59

Hi @_JB  hope you don't mind tagging you.


In that reply, you're mentioning that Shopify already takes into account the pending orders. Did something change recently? Would really appreciate it if you could check in with me about this issue in the OP.