Inventory behavior changed? Fetch_stock.json is unclear

tolgapaksoy
Shopify Partner
86 7 46

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?

 

@Staff 

Reply 1 (1)
tolgapaksoy
Shopify Partner
86 7 46

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

 

https://community.shopify.com/c/shopify-apis-and-sdks/inventory-decremented-twice-by-shopify-and-app...

 

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.