Solved

Is it possible to add a customer's metafield value to a tag in Shopify Flow?

masahiro
Shopify Partner
8 0 1

Is it possible to add a customer's metafield value to a tag in Shopify Flow?
Even if I enter a variable in metafield, I cannot expand the contents of the loop, so I cannot retrieve the value. Is there a way to achieve this?

 

 2022-06-17 12.45.45.png

Accepted Solution (1)

G-L
Shopify Staff (Retired)
29 4 10

This is an accepted solution.

Hi, you can add metafields values in tag and use liquid loops in as the body of a tag. An example is: 

 

{% for metafields_item in order.customer.metafields %} {% if metafields_item.key == 'yourkeyname' %} {{metafields_item.value}}{% endif %}{% endfor %}

 

To learn more visit the Shopify Help Center or the Community Blog.

View solution in original post

Reply 1 (1)

G-L
Shopify Staff (Retired)
29 4 10

This is an accepted solution.

Hi, you can add metafields values in tag and use liquid loops in as the body of a tag. An example is: 

 

{% for metafields_item in order.customer.metafields %} {% if metafields_item.key == 'yourkeyname' %} {{metafields_item.value}}{% endif %}{% endfor %}

 

To learn more visit the Shopify Help Center or the Community Blog.