We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Auto update product Metafield based on tag

Auto update product Metafield based on tag

RonAS1
Visitor
2 0 0

I would like to add a metafield automation to help improve our search filters. We currently have an automated import from our POS system when creating products. The import auto tags the product MALE or FEMALE based on the indicated gender. For context, these cannot currently be changed.

 

I want to run the following flow, but am struggling to get it to work.

 

IF Product Tag Equals 'MALE'

Add 'Mens' to the product metafield titled 'Gender'

 

IF Product Tag equals 'FEMALE'

Add 'Womens' to the product metafield titled 'Gender'

 

IF both 'MALE' & 'FEMALE' are present

Add 'Unisex' to the product metafield titled 'Gender'

 

Is this even possible using Shopify Flow? Any pointers on how I can achieve it?

Replies 3 (3)

rajweb
Shopify Partner
845 71 161

Hey @RonAS1 ,

Thank you for reaching out! It’s definitely possible to automate the process of adding gender-based metafields using Shopify Flow. Here's how we can set it up:

1. Trigger: Set the flow to run when a product is created or updated.

2. Conditions:

- If the product tag contains 'MALE', add 'Mens' to the 'Gender' metafield.

-If the product tag contains 'FEMALE', add 'Womens' to the 'Gender' metafield.

-If both 'MALE' and 'FEMALE' tags are present, add 'Unisex' to the 'Gender' metafield.

This should improve your search filters by ensuring that each product has the correct gender tag automatically assigned. Let me know if you’d like me to set this up for you, or if you need further assistance!

Please feel free to reach out to my email if you have any questions.

Best regards,

Rajat

Rajat | Shopify Expert Developer
Need a reliable developer for your next Shopify project? Let's connect!
Email: rajat.shopify@gmail.com
Portfolio: rajatweb.dev
Your one-stop partner for Shopify development, SEO, and performance. Let’s grow your store together!
RonAS1
Visitor
2 0 0

Hi RajWeb,

Thanks for the reply, however, I am aware of he process that needs to happen, the issue I am having what to enter at the action stage stage of the flow.

Here is my current flow for an example of the Mens tag (which isn't working)
Metafield update example.PNG

The product metafield 'Gender' has already been created with a single line text list of (Mens, Womens, Unisex).

I have selected that in both the namespace and key, but worried this is incorrect, and is the part I am looking for advice on.

paul_n
Shopify Staff
1828 199 435

Yeah, those are not namespaces or keys. From my own Admin:

 

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.