Hi,
I have found a similar post here:
https://support.zendesk.com/hc/en-us/community/posts/208931908-LIquid-if-else-not-working
I have a problem to get some liquid expressions in triggers running correctly. I have several triggers, which informs a user about a new comment in a ticket. We are using different triggers for different ticket groups and basically this works.
But we have agents of the same group in different locations. In the e-mail notification, I want the user to know, from where he was getting the answer.
For this I have tried an if-expression with Liquid, which is not working.
What makes me really confusing is that another if-expression in the same trigger is working without problems.
The first if-expression, which is already working does only differentiate a specific agent:
{% if current_user.id == 123456789 %}
Ms. {{current_user}}
{% else %}
{{current_user}}
{% endif %}
Later on in the trigger, I have the next if-expression, which is not working and I do not know why.
{% if ticket,group.name == 'Group A' or 'Group B' %}
Office Potsdam<br />Abt. RMA<br />
{% else %}
Office Sarstedt<br />Abt. RMA<br />
{% endif %}
The output of this if-expression seems to be always true. It doesn't matter to which ticket.group the ticket is assigned, it gives me always the output like true:
Office Potsdam<br />Abt. RMA<br />
This is really confusing. In another trigger I have a if-expression, which decides also by group, if a satisfaction.rating will be send out to the customer and this is working:
{% if ticket.group.name == 'Group A' or 'Group B' or 'Group C' %}
{{satisfaction.rating_section}}
{% endif %}
The difference is, that I do not have an {% else %} tag in this expression.
I have other triggers with the same problem, where the if-expression will be always true, no matter whicht metrics the ticket really have.
Does anybody have the same issues or a tip/workaround to solve this?
Thanks in advance!