Trying to set the available
inventory for a large amount of products within multiple locations.
The problem I am running into is there is just so many products that I need to find their inventory_item_id
in order to utilize the inventoryActivate
mutation.
How can I grab a list of ALL of my 9,000 products inventory_item_id
without going one-by-one?
Use Case:
- 10 Locations used in Shopify
- 9,000 Products in Shopify
- ERP creates and holds the physical inventory of each
- Need to update the Inventory of each Product at its respective location every hour or so
I am looking at the docs found here.
2
Answers
I have found that we can utilize the
bulkOperationRunQuery
following the docs here.sku
andInventoryItem
id:This provided me with all 9,000 Products Inventory Item IDs to be used on any subsequent Inventory Updates we need to call with GraphQL.
You can export inventory in bulk and get your needed inventory item IDs, current quantities and location. Using that file (JSON) you can then loop through those and activate your inventory items.