Auto tag products by variant + collection names with Shopify Flow

dmitry_z
Shopify Partner
68 0 7

Hey guys, is it possible to auto tag products in collections with their variant name (size in our case) and each collection these products are? Tagging all current products would be ideal, but waiting for new products would do too.

 

If above is possible, looking to see if removing tags when product is removed from collection, is also possible action.

- Dmitry
Replies 3 (3)

paul_n
Shopify Staff
1012 133 242

Yes you can tag products, and you can use collection names in the tags. I'm not sure it makes sense to use those tags to make a product enter a collection and then use that same collection membership to set a tag...seems a bit circular. I think you need to think out what you actually want to happen and when and give an example if you need more detail about how it could work.

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.
dmitry_z
Shopify Partner
68 0 7

Hey @paul_n ! 

We use Tapcart for mobile shopping app, and filtering is not working unless we tag how they want..

This is what they want ->>>

Tapcart filters work in conjunction with your Shopify tags. To utilize this feature you will need to tag every product with both the variant tag(s) and the collection group(s) they live in. For example, if you have a men’s product called ‘Blue Shirt’ which lives in both the ‘New Arrivals’ collection and the ‘Men’s Tops’ collection, the product must be tagged with both the variant name ‘color-blue and the collection group names, ‘New Arrivals’ and ‘Men’s Tops’. This is required for this item to be filtered within the app in both collections. In simple form, a product must be tagged with both the variant name and collection names to which it belongs to. 

 

This scares me so much, I won't be doing it manually that's for sure 😞 

- Dmitry
paul_n
Shopify Staff
1012 133 242

Yuck, I sympathize. This is a brittle approach. Two approaches would work. You could use "Product added to store" to autotag any new product. In the admin, you could back fill those tags by running the same workflow...choose the products and click "Run Flow automation" from the "..." menu. 

 

The workflow would look like:

  • Product added to store
  • Add product tags (loop over product.collections and output titles in a comma separated list)
  • Add product tags (loop over product.varants and output variant titles)

 

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.