Very excited about the upcoming changes.
One of my most common tasks is to update variant stock at locations, prices (including secondary markets) and metafields.
The mutation productVariantsBulkUpdate can only take one product at a time so it needs to be called thousands of times. It seems this doesn’t change even in the unstable api version.
Will the new productSet mutation help with this?
Is there a sneak preview of what that mutation is shaping up to be?
Thanks
Hello
Thanks for your question.
You will need to call the productVariantsBulkUpdate for every product whose variant information you need to change (Eg. inventory , prices, metafields)
This may not apply to your workflow, but another option for you is to use the Product CSV Import functionality on Admin
I agree with that. Bulk updating variants for multiple products would be the expected behavior of this endpoint. It’s very limiting to only allow bulk updates for a single product. At the very least, improve its data validation; when a non-existing variant ID is given, the rest of the variant update operations fail as well, even when partial updates are specified in the mutation. It should return an error for non-existing variants and apply changes only to variants that exist.
There has been an interesting change here since this thread was originally posted.
productVariantsBulkUpdate is still scoped to a single product — it still takes a productId and an array of variants belonging to that product.
However, for large catalogs it can now be run as part of Shopify Bulk Operations. In practice, you can prepare a JSONL file containing separate productVariantsBulkUpdate inputs for many different products and let Shopify execute those mutations asynchronously, rather than managing thousands of individual API requests yourself.
There is also now an allowPartialUpdates option.
With partial updates enabled, valid variant changes can be persisted even when some of the submitted variant updates fail validation. That addresses at least part of the failure-mode concern raised above, where one bad item could otherwise prevent the rest of the mutation from being applied.
So there are really two different meanings of “bulk” here:
For large catalog changes, I think the remaining operational problem is less about whether Shopify can execute thousands of mutations and more about how you validate the proposed changes, identify failures, retry only the affected records, and verify what actually reached the catalog after the bulk operation completes.
At that scale, execution is only one part of the workflow; failure isolation and post-write verification become just as important.
Hey @newbie_01
hope you’re doing well!
productSet looks promising, but based on what’s been shared so far, it doesn’t appear to solve the need for bulk updates across thousands of variants. Hopefully Shopify introduces a true multi product bulk mutation for inventory, prices, and meta fields in the future