Recent searches


No recent searches

if/else liquid markup trigger

Answered


Posted Nov 15, 2021

I'm looking to send the requester's language to another app as the corresponding language code, i.e. instead of French, I will send fr. However, the following liquid markup sends fr each time, regardless of the language preference set. How can I correct this behavior? 

"requester_language":"{% if {{ticket.requester.language}}% == 'français (France)'%} fr {% elsif {{ticket.requester.language}}% == 'Deutsch' %} de {% else %} en-us {% endif %}",


1

3

3 comments

I figured out that the brackets on the placeholders were causing the issue. The following resolves my request. 

"requester_language":"{% if ticket.requester.language% == 'Deutsch'%} DE {% endif %} {% if ticket.requester.language% == 'English'%} EN-US {% endif %} {% if ticket.requester.language% == 'Italiano'%} IT {% endif %} {% if ticket.requester.language% == 'Português (Portugal)'%} PT-BR {% endif %} {% if ticket.requester.language% == 'Português (Brasil)'%} PT-BR {% endif %} {% if ticket.requester.language% == 'Español'%} ES-ES {% endif %} {% if ticket.requester.language% == 'Español (España)'%} ES-ES {% endif %}",

2


image avatar

Heather Rommel

Zendesk LuminaryThe Product Manager Whisperer - 2021Community Moderator

Thanks for posting the solution!

1


this will work 

{% if ticket.ticket_field_option_title_1900002251207 == "DVT/SCD Pump" %}

UDI #: {{ticket.ticket_field_option_title_13823381549204}}

 

{%else if  ticket.ticket_field_option_title_1900002251207 == "Bladder Scanners" %}

UDI #: {{ticket.ticket_field_option_title_13823750041364}}

 

 

{% endif %}

 

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post