Utilisation des instructions case du langage de balisage Liquid pour prendre en charge les messages dynamiques dans les automatismes, macros et déclencheurs



image avatar

Aimee Spanier

Zendesk Documentation Team

Modification le 19 mars 2025


2

0

13 commentaire

4631498187290 
I would try using the ticket.ticket_field_123 format in the case, and use the tags associated with the value you want, and then if you need to display the value, use ticket.ticket_field_option_title. So something like:
Note that I'm not 100% sure on the syntax if you're evaluating tags instead of text. you may not need the quotes.

{% case ticket.ticket_field_123 %}
{% when "xyz_abc" %}
Print ticket.ticket_field_option_title_123

0


Hey Team, I am trying to use this “Using a Liquid markup case statement to dynamically change the text based on a dropdown field's value” 

 

It works with a regular drop down just fine, but our use-case needs it to work with a cascaded dropdown field. Can someone help me on how to use it? 

 

It works with regular drop down like “XYZ”

It doesn't work with “XYZ::ABC”, I even tried with just "ABC". Any ideas on how to do this? 

0


5702658571290 A bit late, but if you haven't figured it out yet, it's ticket.ticket_field_option_title_12345 not ticket.requester_field_option_title

1


Has anyone been able to reference custom user dropdown fields with liquid markup? I'm trying the syntax “{% case ticket.requester_field_option_title_FIELDID %}” but no luck so far 


 

0


Hey 4821761052186 

I'm not sure this is documented, but from my experience, it seems the value you're evaluating is the one shown to end users. So if you have a form called “Consumer L1” for your agents, and “Consumer requests” for your end users, you would need to use the latter for it to work.

You can check this in Admin Center on the individual forms.

0


Does anyone know if the ticket form object is accessible when using liquid markup? I'm trying to create a macro with different content depending on the current form selected on the ticket. I've tried many variations of the following but can't seem to get it to work:

{% case ticket.form %}
{% when "Form 1" %}
Form 1 Selected
{% when "Form 2" %}
Form 2 Selected
{% when "Form 3" %}
Form 3 Selected
{% else %}
Other Form Selected
-
{% endcase %}

Using the ticket.ticket_form placeholder doesn't seem to work either. Any advice? Thank you!

0


Detailed Question on this: having a clickable logo in our agent signature in the brand setting (that works already) but i need it to work dynamically, so eg. when customer language is german = logo should lead to www.brand.de / when customer language is english = logo should go to www.brand.com 

I assume this should be possible with liquid markup, BUT I am new to this - so hoping someone here can help. 

In brand setting "signature" right after the logo - can I just add something like this:

{% when 'Italiano' %}(www.brand.it)
{% when 'German' %}(www.brand.de)
{% when 'English' %}(www.brand.com) 

Appreciate anyone trying to help out on this :) 

Kind regards,

Yvonne 

1


Hey Khajik! Dynamic content and liquid markup are definitely similar in what they accomplish. The main difference is that dynamic content doesn't require learning any syntax, and has a UI, so it's easier for someone who doesn't have programming experience. And dynamic content is centralized. So, in the context of business rules; with dynamic content the user only has to update the content, and all of the business rules will be updated as well. If liquid markup is used, they'll need to update each business rule individually.

2


What is the difference between using dynamic content for multiple languages and liquid markup?

1


Hi Rom Hirsh

I'll be creating a ticket for your query and send an email to you so we can investigate further.

Thanks!

0


Se connecter pour laisser un commentaire.