Hello,
I am trying to figure out how to set the “available” inventory through the GraphQL api and have been struggling to find a decent solution. The reason why I need the ability to set the “available” inventory, rather than the “onHand” inventory, is because we well the same product across multiple listings within bundles. This means that whenever we sell a product on one listing, we need the available inventory to be adjusted on all listings.
If I use the inventorySetOnHandQuantities mutation, the available inventory will end up accounting for up to 2x the committed inventory because my proprietary software accounts for the committed inventory (globally across all product listings that include the component), and then Shopify accounts for what is committed for that listing.
If I use any of the adjust quantity mutations, I would first have to get the available inventory for each listing, and then deduct the incoming change from that to get the difference and deduct that from the available inventory that I am trying to push. This can lead to some pretty awful performance when a single item may be listed across several dozen listings.
Currently I am using the REST /inventory_levels/set.json endpoint, however that only allows for 1 item to be updated at a time, however it is also rather inefficient. I know there is the inventoryActive mutation, however that also only allows for 1 item to be updated per request.
While updating 1 product per request via the REST option or the inventoryActive mutation, I am hoping to find a way of updating pages of items per request. With our order volume (x,000 orders per day) and limited supply, some items will sell out in a matter of hours. This makes inventory updates critical to avoid over-selling while maintaining reasonable reserve inventory.
Is there an option that I am not seeing?