Fastest (most efficient) way to set inventory using api/graphql

I am after the most efficient way to set an inventory value. It has to be set, rather than adjust

Currently I am using the rest api: admin/inventory_levels/set.json

That woks, but I have 10,000s of products to update, across multiple stores

There doesn’t seem to be a bulk set, there is a bulk adjust (inventoryBulkAdjustQuantityAtLocation) which wont work as my stock truth is in a separate application. Have to be able to set the value

Products are only in one location. The value in Shopify is just saying I have 100 products that I can sell

I notice that there is a graphql call called inventorySetOnHandQuantities. I have a feeling that that could work for me in my case, has anyone used that? Looks like it can do 250 in one go

The only issue I see is that this could affect the other inventory types, like committed. I think that would be OK as my system doesn’t hold orders, if there are stock and someone pays, it goes straight through to our order processing system

I see some possible issues with it for example error reports - https://community.shopify.com/post/2231459 (an a general exprience https://community.shopify.com/topic/2054010)

Any insight would be appreciated

Thanks

Grant

1 Like