Unable to control inventory tracking using productSet mutation

I wanted to bring up a limitation I’ve encountered with the new productSet mutation that’s affecting our app’s functionality.

Background: Previously with productUpdate, we could modify the inventoryItem field on variants to control inventory tracking settings. This was pretty straightforward and worked well for our use case.

Current Issue: With the migration to productSet, we’ve hit a snag. The mutation doesn’t provide support for the inventoryItem field on variants. This means we now need to:

  1. First use productSet to update the product/variant
  2. Make an additional API call specifically to update the inventoryItem field

This two-step process isn’t ideal as it:

  • Increases API consumption
  • Adds complexity to what could be a single operation
  • Creates potential for race conditions
  • Impacts performance

Question: Is there a roadmap to include inventoryItem field support in the productSet mutation? This would help streamline our operations and reduce unnecessary API calls.

4 Likes

Hi @prakhar ,

Totaly understand how this would help.

We added this support productSet just recently, and only for variant creation

These limitation were intentional, while we will continue to evaluate the level of support this mutation offers, we believe the inventory management should be done via the inventory mutations.

Thank You @Asaf_Gitai for clearing this up.

While I believe inventoryItem is a much simpler field than inventoryQuantities (since it doesn’t require any external IDs) and using a common variantInput would make things much more intuitive and easier for us devs.

Also, using an inventory mutation won’t be ideal here because that only supports a single update. We will have to use ProductVariantsBulkUpdate just to update a single boolean field for all variants. Not sure, how the support for 2000 variants would work here since the productSet API supports async flag while ProductVariantsBulkUpdate doesn’t.

Replacing a single API with multiple API calls in this case, doesn’t seems like an ideal experience.

But looking at the message, I think it’s safe to assume that it’s not in the roadmap for future. Is that correct?

using an inventory mutation won’t be ideal here because that only supports a single update. We will have to use ProductVariantsBulkUpdate just to update a single boolean field for all variants. Not sure, how the support for 2000 variants would work here since the productSet API supports async flag while ProductVariantsBulkUpdate doesn’t.

100% agree, our Inventory team is aware of this and I will share this feedback as well.
FWIW similar to productSet, do not think ProductVariantsBulkUpdate should be the long term option either for managing inventory. But I understand how it is available, and the most convenient to use ATM

But looking at the message, I think it’s safe to assume that it’s not in the roadmap for future. Is that correct?

I mean, never say never, but yes, ATM we are focusing on getting the current input to perform well with 2K variants.
On that note, for large/complex inputs we recommend implementing with the async option on to avoid time outs

1 Like

Hello @Asaf_Gitai,

Are there any updates on this topic? I believe that having the option to set inventory tracking would be extremely helpful.

I am currently developing an application that migrates products from various third-party apps into Shopify. It utilizes the ProductSet mutation to create and update products and their inventories. Unfortunately, the newly added inventoryQuantities field does not fulfill my requirements during product creation. While I am able to create products, the quantity is not saved because the product does not track inventory by default. I believe it would be highly beneficial to have the option to set inventory tracking in this context.

3 Likes

Hi there,

Have you found a solution for this? I completely agree, especially in my case, where I’m migrating nearly 5,000 products(and maybe endup with 20k products), each with at least 10 variants. Enabling inventory tracking one by one is a real challenge. :melting_face:

1 Like

This is ridiculous. What’s the point of productSet if you can’t update some of the critical variant fields, such as inventory tracking, measurement (weight), and HS or country code?

The whole point of productSet is to be able to set all the data in a single API request. Yet the devs only respond to the many complaints I’m seeing with “well we just decided you shouldn’t be able to do that”, as if they know exactly what everyone’s use case is and as if the alternatives work for everyone.

In my case, this is putting me in a huge dilemma with my app. I’m tired of explaining to my users “well we can’t do that because Shopify has limitations we can’t control”.

Sorry for the rant. It’s nothing personal, but these breaking changes in the API with no solution is extremely annoying.

2 Likes

@DavidT Same problem, same disappointment here. The experience with the REST API was flawless, but this forced migration without a proper migration path is incredibly frustrating. It feels like they don’t care about developers in this situation. Have you managed to find a solution?

I’ve created a thread in the hopes that Shopify will at least provide a clear guide on how to address this issue => How To Safely and Efficiently Sync Products and Inventory Using ProductSet Mutation?

2 Likes

Fully agree! This is totally frustrating!

Here as well, syncing with external systems makes it hard. When you look at a product in a ERP system you have the HS, Cost, Country on the product itself. You want to sync this as easy as possible, that is the reason the productSet is created right?

Bumping this one. Every two months, we have a new product line. 2000-3000 products with 10,000+ total variants. We are doing this with a bulk request but at the end of the bulk request, we have to update all the variants that were just created using productSet.

Totally ridiculous. The variant connection should include ALL the input needed to create or update a variant. Why have us submit another bulk request of 10,000 variants just to update inventory tracking, weight and cost? That seems to be counter-productive re: processing resources on Shopify.

Adding my two cents here.

If I have inventory Policy = DENY when creating a product variant using the ProductSet Mutation, plus have added the InventoryQuantities and provide a location ID, Managed Inventory should automatically be assumed to be True. If inventoryPolicy is not provided, or provided with continue without also providing InventoryQuantities then managed could be assumed to be False.

Either way though, not being able to indicate that inventory is managed via the variants in the ProductSet is quite the oversight.

Cheers,
Gary

Hey man, that isn’t really helpful. This thread is related to making updates via the API which people will be using in their app(s), not from a store owner POV.

1 Like

Any update on this?

Or anyone know a easy workaround?

Sadly no, its a total mess and is very frustrating - and they don’t care. We try to

  1. create the product with a dummy variant
  2. then delete all variants
  3. and try to bulk create all variants

but this is not possible because then options are deleted to, and you would need to know all option ids first.

any help would be appreciated.

Hi everyone,
Thank you for your valuable feedback and engaged discussions.

After consulting with our inventory team and reviewing their roadmap, we’ve decided to extend support for inventoryItem within productSet, similar to how productVariantsBulkCreate is handled.
We plan to have this ready within the next 1-2 weeks, and we will also backport this enhancement to the 2024-10 version.

Thank you for your continued support!

7 Likes

Thank you! Please update this thread when it is live.

That’s the best news I’ve heard in a long time! Thank you, now we can finally migrate to GraphQL. Please let us know when it’s live. Thanks!

I don’t work for Shopify, but they’ve notified me in another thread that this is live.

True, was waiting for it to be up in the docs & change log before posting :slight_smile:

On a similar note, wanted to share this update regarding scope requirements that should make it a bit more easy as well.

2 Likes