Tagging products based on location

Tagging products based on location

USAToolDepot
Tourist
5 0 1

We would like to set up a flow automation that will tag our products based on the warehouse location that has inventory.  We have 2 warehouses... Warehouse 1 and Warehouse 2.  If we have inventory in warehouse 1, we would like to tag the product "Warehouse 1".  Likewise, if we have inventory in Warehouse 2, we would like to tag the product "Warehouse 2".  I don't see a template for this and I'm having difficulty creating one from scratch.

Replies 2 (2)

Kalen_Jordan
Shopify Partner
743 34 130

You'll probably need a small run code step for this, but you basically just loop over the variants => inventory item => inventory levels from the product.

RPiii
Shopify Staff
44 7 18

This can be a littler tricky since productVariant.inventoryItem.inventoryLevel requires a locationID argument to return quantities. That means the variable picker in the Flow UI can't (yet) be used to define that condition.

 

@Kalen_Jordan is probably correct that you may need a Run code or Send Admin API request to return the relevant data so that you can Add product tags in subsequent steps of your workflow.