Il markup liquido è comunemente usato nelle regole aziendali per personalizzare i commenti e le notifiche email. Le istruzioni Liquid markup case consentono di definire più messaggi da usare dinamicamente in base ad alcuni attributi del ticket.
Questo articolo fornisce alcuni esempi, come il supporto delle risposte in più lingue. Molte aziende e organizzazioni supportano utenti finali che parlano lingue diverse dall’inglese. Esistono diversi modi per gestirlo. Per messaggi più complessi o in molte lingue, ti consigliamo di usare il contenuto dinamico. Per messaggi semplici in alcune lingue, il markup liquido può essere la soluzione ideale.
Uso di un’istruzione Liquid markup case per supportare più lingue
Quando il tuo account supporta più lingue, gli utenti possono specificare la lingua preferita nei propri profili. Quindi, puoi fare riferimento alla lingua preferita dell'utente in una serie di istruzioni condizionali nel corpo del messaggio che stai definendo per l'automazione, la macro o il trigger.
L’esempio seguente mostra il corpo email di un trigger Notifica tramite: Email utente azione. In questo caso, la lingua predefinita dell'account è l'inglese, quindi non è stato necessario etichettarlo nella formattazione del markup Liquid.
{% case ticket.requester.language %}
{% when 'Italiano' %}
Ciao,
La tua richiesta (#{{ticket.id}}) è stata ricevuta, è stato esaminato dal nostro staff di assistenza.
Per esaminare lo stato della richiesta e aggiungere ulteriori commenti, segui il link qui sotto:
http://{{ticket.url}}
{% when 'Danish' %}
Hej,
Din anmodning (# {{ticket.id}}) er blevet modtaget og bliver gennemgået af vores supportmedarbejdere.
At gennemgå status for anmodningen og tilføje yderligere kommentarer, skal du følge nedenstående link:
http:// {{ticket.url}}
{% else %}
Hello,
Your request (#{{ticket.id}}) has been received, and is being reviewed by our support staff.
To review the status of the request and add additional comments, follow the link below:
http://{{ticket.url}}
{% endcase %}
Uso di un’istruzione Liquid markup case per modificare dinamicamente il testo in base al valore di un campo a discesa
-
FIELDID
viene sostituito con l’ID del campo a discesa personalizzato. - Ciascuno
{% when "Value X" %}
viene sostituita con una delle opzioni definite nel campo a discesa. - Ciascuno
Your text X here.
viene sostituita con la risposta desiderata per il valore del campo che la precede.
{% case ticket.ticket_field_option_title_FIELDID %}
{% when "Value 1" %}
Your text 1 here.
{% when "Value 2" %}
Your text 2 here.
{% when "Value 3" %}
Your text 3 here.
{% else %}
-
{% endcase %}
Uso di un’istruzione Case di markup Liquid per creare altre risposte dinamiche
Puoi usare una struttura simile per creare risposte dinamiche in contesti diversi dalla lingua preferita. Ad esempio, è possibile usare una struttura dei casi simile se si desidera rispondere in base all’organizzazione dell’utente. In tale scenario, definiresti il caso come {% case ticket.organization.name %}
e la risposta per ciascuna organizzazione sarebbe preceduta da {% when 'OrganizationName'
%}
.
Avvertenza sulla traduzione: questo articolo è stato tradotto usando un software di traduzione automatizzata per fornire una comprensione di base del contenuto. È stato fatto tutto il possibile per fornire una traduzione accurata, tuttavia Zendesk non garantisce l'accuratezza della traduzione.
Per qualsiasi dubbio sull'accuratezza delle informazioni contenute nell'articolo tradotto, fai riferimento alla versione inglese dell'articolo come versione ufficiale.
13 commenti
Carmelo Rigatuso
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.
0
Amar Taggar
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
Carmelo Rigatuso
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
Cameron Eng
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
Jacob the Moderator
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
Dylan Tragjasi
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:
Using the ticket.ticket_form placeholder doesn't seem to work either. Any advice? Thank you!
0
Yvonne P.
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
Bry Fitzgerald
2
Khajik Khajadourian
What is the difference between using dynamic content for multiple languages and liquid markup?
1
Giuseppe
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
Accedi per lasciare un commento.