I’m adding products with the productSet Mutation and then trying to update inventory with the ActivateInventoryItem mutation
I’m trying to enable inventory tracking and set the inventorytracker to shopify but I don’t see any way to do this.
The ActivteInventoryItem mutation doesn’t create any errors but also seems to be completely ignored by the system since none information included in the mutation exists after running the mutation
The issue likely lies in how the Shopify API handles inventory tracking and inventory updates. Here’s a breakdown of your situation and how to address it:
1. Activating Inventory Tracking
To enable inventory tracking for an item, you need to ensure the inventory item is associated with a location and has tracking enabled. This requires a combination of the inventorySet mutation (to enable tracking) and inventoryActivate mutation (to activate the inventory at a location).
Correct Steps:1. Enable Inventory Tracking: Use the inventorySet mutation to update the inventory tracking of your product. Example mutation:
The UpdateInventoryItem mutation let me enable inventory tracking.
The ActivateInventoryItem mutation still doesn’t do anything but I can set the initial inventory quantity in the productSet mutation so I will just stop using ActivateInventoryItem