Thanks @Liam ,
what is the best way to update product quantities by having the id of the product, variant and inventoryItem ?
I am passed the total quantity in the inventory so the delta would require calculations that I would rather not do .
Thank you very much for your support
Topic summary
Issue: Updating a variant’s inventory via GraphQL using productVariantUpdate doesn’t change quantity. Using productUpdate risks deleting unspecified variants.
Key guidance:
- productVariantUpdate cannot update inventory. Use GraphQL inventoryQuantityAdjust to change available by a delta. Example provided using inventoryLevelId (the location-specific inventory level) and availableDelta (increment/decrement).
- For absolute quantity (set, not adjust), support pointed to REST Admin inventory_levels endpoints: set.json (set exact available) and adjust.json (delta). Doc link shared for REST.
- To update variant fields without deleting others, use productVariantsBulkUpdate. It’s implied for non-inventory fields (e.g., price), not quantities.
Open questions/clarifications:
- Request for GraphQL inventoryQuantitySet doc: not found; no GraphQL mutation confirmed for setting “available” directly. Support pivoted to REST for that use case.
- Whether productVariantsBulkUpdate can update quantities remains unanswered.
- A participant notes confusing behavior: productVariantUpdate accepts inventoryQuantities input but doesn’t change stock and doesn’t error; asks for rationale and better error/warnings.
Status: Partially resolved. Clear path: use inventoryQuantityAdjust (GraphQL) for deltas or REST set/adjust for absolute updates. Some GraphQL-specific needs remain unresolved.