GraphQL Bulk Update Inventory at Location PROBLEM

HunkyBill
Shopify Expert
4488 45 485

Pretty simple Query. Payload is not too much of a headscratcher.

 

{
	"inventoryItemAdjustments": [
		{
			"inventoryItemId": "gid://shopify/InventoryItem/19506080374848",
			"availableDelta": 4
		}
	],
	"locationId": "gid://shopify/Location/58513435712"
}

 

The PROBLEM is, the query is rejected with this message:   "message": "Quantity couldn't be adjusted because the location was deleted."

Except that this location is in fact perfectly existing, and is assigned for this particular variant. Could not be a simpler thing to update, but apparently, SHOPIFY won't let me. So the merchant is noticeably perturbed. Disturbed? Ticked off? You comprendo?

Happy to hear from Shopify what this message actually represents, because it sure does not click with reality.

By the by, bye... The only way I discovered this, was that when I saw a -3 plus 4 was not coming out as +1, but instead, staying at -3, with that transaction buried in hundreds and hundreds of others, Shopify spews no such error messages. So you are left wondering. What happened? How much of my updates work? ZERO? Half? Who knows. The only way I discovered this blooping mess was by executing the query with ONE item, this item, and exposing the junk.

 

 

 

 

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

Just to highlight even more crap with this issue. How is this philosophical analysis squared up Shopify? Hello! Good morning!

Since I update 18,741 SKUs with a quantity, 100 at a time, using this bulk pattern, and I get no errors out the process whatsoever, am I supposed to be happy? AM I? Answer that one! Hah.

No. I am probably not. Because if all 18,741 inventory updates failed because the location is deemed deleted even though it is not, and this query does not report that, then this query is worth the back-end of what comes out of a pig's arse. We should get back messaging that says, hey! We updated 18,741 SKUs for you. Or Hey, we updated 0 of 18,741 SKUs for you because "Location was bad".

How does this square? The ONLY reason I know something is up is that we concentrated on ONE SKU and started wondering, why is this SKU not updating? And we discover this bizarro reason. So now am I supposed to trust that the 18,740 OTHER SKUs are updated fine? Probably not.

 

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

Hey @HunkyBill ,

Happy to look into this for you. Can you provide the x-request-id for the request that's returning the error Quantity couldn't be adjusted because the location was deleted.

Thanks,

John

John C | Developer Support @ Shopify 
 - Was my reply helpful? Click Like to let me know! 
 - Was your question answered? Mark it as an Accepted Solution
 - To learn more visit Shopify.dev or the Shopify Web Design and Development Blog

0 Likes
HunkyBill
Shopify Expert
4488 45 485

Thanks for jumping in on this.

Unfortunately, I just ran the offending query on the offending product, and wouldn't you know it. It just worked. So that totally screws up my chances of offering you the x-request-id on a platter, for your debugging delight. I guess that was just a bad day for the machine. Someone must've fed it some Pepto in the meantime.

Not sure how bad that sucks, but I accept that for now, it works again. I will monitor the situation and the next time it happens, I will be more proactive about saving an x-request-id.

Thanks

 

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