BIG Question with Multi-Location Inventory

Shopify Expert
2000 13 313

In the OLD days, variant.inventory_quantity gave a number. From -87 to 334, it was a number. We could use that number. 

Now you tell us it is deprecated. You tell us we can shift to multi-location queries. So if I want to know how many of a thing there is, I have to query all the locations where the thing is stored, and add those values up. There is no GOD number for that. OK. 

Now you tell us that if Shopify is not set as the entity tracking inventory, you no longer track inventory, so if we ask for the amount of that thing in stock, the answer is NULL. NIL, NONE, ZILCH.

Right? OK. So now a merchant is actually of the "I don't care variety" and they have inventory management or tracking off for a product. Our Apps can no longer know what they may have? Am I right? We must defer now so that if a variant's InventoryItem tracking is FALSE, we just say ZERO. You have none? We cannot know how many they have? Right? 

 

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
0 Likes
Community Manager
Community Manager
317 16 73

Dave,

In the OLD days, variant.inventory_quantity gave a number. From -87 to 334, it was a number. We could use that number. 

Now you tell us it is deprecated. You tell us we can shift to multi-location queries. So if I want to know how many of a thing there is, I have to query all the locations where the thing is stored, and add those values up. There is no GOD number for that. OK. 

variant.inventory_quantity remains as a readable property.  It contains the aggregate of inventory across all locations.  If you wish for this number, you will continue to use this property.

Now you tell us that if Shopify is not set as the entity tracking inventory, you no longer track inventory, so if we ask for the amount of that thing in stock, the answer is NULL. NIL, NONE, ZILCH.

If "inventory_management": null, Shopify is not tracking the quantity, it is up to you whether you treat this as a NULL or 0.

 

Developer Experience @ Shopify
0 Likes
Shopify Expert
2000 13 313

So please update the docs as currently whoever put deprecated in there is missing half the battle. It is deprecated at a POST/PUT but in fact is super useful on a GET as a aggregate value. Also, we will NOT have our Apps removed from use for using the variant.inventory_quantity in a GET situation, but only if we were silly enough to continue using it as a POST or PUT.

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
0 Likes
Community Manager
Community Manager
317 16 73

Yes that doc is being updated in the next round of doc changes.

Developer Experience @ Shopify
0 Likes
Highlighted
Shopify Expert
2000 13 313

Too bad it cost me some time today. I feel ripped off ;)

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
0 Likes