Liquid markup is commonly used in business rules to customize comments and email notifications. Many companies and organizations support end-users who speak languages other than English and there are a number of ways to manage this.
To set up multiple language support, see Adding multiple languages to Zendesk Support.
In the example below, a case statement is used to determine what response is sent to the end-user based on their language setting. The email body of the Notify requester of received request trigger contains the following Liquid markup:
{% case ticket.requester.language %} {% when 'Italiano' %} Ciao {{ticket.requester.first_name}} 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 {{ticket.requester.first_name}} 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 {{ticket.requester.first_name}} 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 %}
The language preference is set in the user's profile. Language support is defined by an administrator (on the Localization tab of the Account page). See Language codes for Zendesk supported languages to get the corresponding language property value for each of the languages available on that page.
In this example, we could have also explicitly declared the English text like the others ({% when 'English' %}). However, if the default language is English it's not necessary. The English text will be displayed to all users who have not otherwise chosen a language setting.
As you can imagine, you can use something like this for any number of reasons, not just to support multiple languages. For example, maybe you want custom responses for users in different organizations for some reason. If so, you use ticket.organization.name in a case statement like this.
For more information on how Liquid markup can be used, see Understanding Liquid markup and Zendesk Support.
7 Comments
I have been attempting to copy the comment text (last comment) from one ticket and create another. It's working fine except for the formatting of the comment. I seem to be losing HTML tags and content while calling the new ticket API request.
I tried to structure the 'html_body' using {{ticket.latest_comment_formatted}} as well as with DC like:
But I am losing the original comment formatting in the process - has anyone been able to copy the last comment with formatting and attachments over API?
Example comment (converted to HTML)
Hi Rom,
It's possible that {{comment.value_rich}} is not returning an HTML formatted value because it is under ticket.comments, which displays all the comments in a ticket in unformatted text. See Comment Data
Instead, could you try using {{ticket.latest_public_comment}} or {{ticket.latest_public_comment_rich}}?
On another note, you may want to check the Linked Ticket app in our Marketplace and see if this also helps with your workflow.
Thanks!
@...
I tried these as well but still, I cannot get HTML to render while updating the ticket via HTML. The use of the linked tickets app is not good for me as it required much manual work and I am trying to automate this.
Any other suggestions?
Hi @...
I'll be creating a ticket for your query and send an email to you so we can investigate further.
Thanks!
What is the difference between using dynamic content for multiple languages and liquid markup?
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
Please sign in to leave a comment.