Customer Tags use in versioning Notifications

thomas-ragnyc
New Member
1 0 0

Given the following JSON:
{
"orders": {
"customer": {
"tags": "Active Subscriber, Discovery Subscriber"
}
}
}

We are trying to create a variant in the Order Confirmation Notification in which we check if a customer contains a tag of "Discovery Subscriber" and then shows different images. I've tried the following liquid code and have not had any success.

{% if customer.tags contains "Discovery Subscriber" %}
{% assign dxsubs = true %}
{% endif %}

{% if dxsubs %}
Show Image
{% endif %}

and also what is advised in the documentation:

{% for tag in customer.tags %}
{% if tag contains "Discovery Subscriber" %}
{% assign dxsubs = true %}
{% endif %}
{% endfor %}

{% if dxsubs %}
Show Image
{% endif %}

Is this an issue with the code or does the "tags" not get applied until after the Order event hits the Notification?

0 Likes