Where I first could create a product for a fulfillment service in a single mutation, with inventory at the fulfillment service location with their inventories, I now need to fire many many mutations just to create a single product with their variants correctly.
Create a product with their variants using productSet
This creates the product at the default location of the store (which is not what I want)
I then need to fire off inventoryItemUpdate mutation for each variant to set tracked: true
I then fire a inventoryActivate mutation for each variant to activate them for the Fulfillment service location
But then, all the variants are still activated for the default location of the store, WHICH IS NOT WHAT I WANT
So then I need to figure out the default location ID, and deactivate each variant for the default location
I should be using productCreate without passing any variants. And then using productVariantsBulkCreate with strategy: REMOVE_STANDALONE_VARIANT. This allows me to create the product with correct options and optionValues in 1 mutation, and then add its variants in a single followup mutation that also provides the fulfillment service location ID, and their starting quantities. That way I only need to fire 2 mutations per product.
Basically my suggestion: do not use productSet if you care about which location your variants are stocked
In the new API version 2024-10, inventoryQuantities has been added, which now makes it possible to directly activate a product at a desired location. This way, an inventoryItem is created for the respective product at the correct location.
However, it is still not possible to update the inventoryItem directly, which means the property tracked is set to false. We now have to create an additional bulk task to update all inventoryItems to tracked=true.
We are being forced to update the entire flow for 2025, but this still works incompletely. Could we please get an indication of whether this feature will be added, and when? If it’s not available in time, we will have to implement a suboptimal flow.
Does anyone know more about this, or perhaps another interesting implementation?
Hmm, In my case I don’t mind that productSet can’t do it all, I also checked out the FAQ on it and it makes sense. But I think all other use-cases that are tied with products should also be bulkable. The list is short and it’s a bit odd to build a pipeline that’s meant for bulk, and then at the end have to send lots of requests for each product to do little fixes such as marking it tracked.