Automatically update product weights

I’m trying to setup a flow to automatically update product weights so I can use conditional pricing for shipping rates so if a customer buys 2 or more of the same item they get charged for shipping on each item.

We have been using flat rate shipping for the longest time and have never inputted weights into these products. We want to update all the products with the same weight so it triggers this conditional pricing for shipping rates.

There are over 350 products with multiple variants that need updating.

I want to automate this so if new products get created with the same product type they get the same weights added automatically. Additionally I want to use this to update all of my current products with weight as I cannot export this many products at once.

It seems like Shopify used to have a “Update Product” action in Flow but that no longer exists for some reason.

How can I achieve this?

You can update products or variants via Send Admin API request.

You can backfill data in Flow by building a workflow using “Product created” and then running it in the Admin (select the products and click “…” and “Run Flow automation”.

Regarding the workflow itself, I think the weight is stored under product / variants / inventory item / measurement / weight. It’s not clear though how you would map product type weights to each product. You could maybe store that data in a shop metafield/metaobject?

1 Like

:waving_hand: +1-ing @paul_n here, Send Admin API Request is the best bet, for updating the existing products, you’d likely want to use inventoryItemUpdate to change the weights (this can also be used in Flow too):

For updating all of the product weights in bulk, the easiest way to do that via the API would be using our Bulk Operations API:

You’d want to use the productVariantsBulkUpdate mutation within a Bulk Operation to update the inventoryItem object (where you can set the weights.). Hope this helps, just wanted to add a bit more info here from the Admin API perspective.