How can I create a flow with customer tags and product tags?

9 0 0

hi im trying to make a flow similar to :

{% if customer.tags contains 'dealer' and product.tags does not contains 'customerstage'%}
  {% render 'product-accordions' %}   
{% endif%}
or something like
{% if customer.tags contains 'dealer' %}
      {% render 'product-accordions' %}
{% elsif product.tags contains 'customerstage'%}
      do nothing 
{% endif%}
i've tried to replace my do nothing in the second flow with a text flow but the product-accordions is always showing
any help will be appreciate thank you !
Replies 2 (2)

Shopify Staff
946 128 225

I don't think `does not contain` is valid liquid. Also, your second example is not the same logic as the first and it would always output if dealer is in the tags.

I think you want `unless` instead of does not contain, but you need to nest that condition instead the if statement. 


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.

21 0 4

According to you can use 'unless' instead of an if-then statement.