Add product metafield value to customer tag

6 0 23



Hoping someone can help me as I'm relatively new to Flow.


I am trying to add a tag to a customer based on a product that they order.


I believe have successfully gotten the first part of this correct, but I can't seem to find a way to get the value from within a product metafield (custom.subscription_customer_tag) and add it to the customer tags. The alternative to this is manually creating a flow (or check if/action) for every product that needs this tagging feature.

Please let me know if I have missed something simple.


Thank you and Happy New Year!




Reply 1 (1)

Shopify Staff
1056 136 250

Inside of the tag action, you can add Liquid code to the tag. To add a specific metafield, you would put something like:
{%- assign tag_to_add = order.metafields | where: "namespace", "custom" | where: "key", "subscription_customer_tag" | first -%}{{ tag_to_add.value }}

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.