How To Safely and Efficiently Sync Products and Inventory Using ProductSet Mutation?

As already mentioned across several topics, the ProductSet mutation does not provide measurement (inventoryItem) information, which leads to the frustrating situation of piecing many things together (…).

Now, what is the best approach to handle this?

  1. First, we create (or update!) a Product using ProductSet. We add everything we know about variants in the ProductSet.

How do we update the inventory item?

  • Using the InventoryItem mutation requires tracking all IDs of all variants. How is this even feasible? This task requires far too many query calls.
  • Using productVariantsBulkCreate requires deleting all variants first, meaning we’d need to query them all beforehand. That’s too many calls.
  • Using productVariantsBulkUpdate faces the same issue.

Shopify, please provide a clear and straightforward guide on how to achieve this. The perfectly functional REST API is being deprecated, yet the suggested migration path using ProductSet is not viable.

We are syncing thousands of products, each with many variations. How should we handle this? What are the suggested steps? The guide should not contain the process of creating, also updating must be supported.

1 Like

Have you tried the CSV import feature for inventory update?

Step 1: Export Your Current Inventory CSV

Navigate to the Products section in your Shopify admin.
Export the inventory CSV file, which contains the quantities at each location. This file will act as your template.

Step 2: Update Inventory Quantities

Open the exported CSV file and update the inventory quantities for the required products and locations. Be sure to maintain the format of the file.

Step 3: Import the Updated CSV File

After making the necessary updates, save the file.
Return to your Shopify admin, go to the Inventory section, and upload the updated CSV file to apply the changes.

For detailed step-by-step instructions, refer to Shopify’s official guide:

https://help.shopify.com/en/manual/products/inventory/getting-started-with-inventory/inventory-csv#import-inventory

Dude, as mentioned on the other thread. People are asking how to do this via an API call. You’re providing a solution from a store owners POV and not for apps that want to do it.

Also sensing a bit of AI here :thinking: