Liquid Markup 通常用于业务规则,以自定义评论和电邮通知。Liquid Markup case 语句使您可以根据工单的某些属性动态定义要使用的多条消息。
这篇文章提供了一些例子,例如支持 用多种语言回复。许多公司和组织都支持使用英语以外语言的终端用户。有几种方法可以解决这个问题。对于更复杂的消息或多种语言,我们建议使用 动态内容。对于几种语言的简单消息,Liquid Markup 是一个很好的选择。
使用 Liquid Markup case 语句支持多种语言
当您的帐户支持多种语言时,用户可在其个人资料中指定其首选语言。然后,您可以在为自行程序、宏或触发器定义的消息正文中的一系列条件语句中引用用户的首选语言。
以下示例显示了触发器的 Notify by:用户电邮 操作。在这种情况下,帐户的默认语言是英语,因此我们不需要使用 Liquid Markup 格式对其添加标签。
{% 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 %}
使用 Liquid Markup case 语句根据下拉字段的值动态更改文本
如果您已经定义了自定义下拉工单字段,则可能需要定义一个触发器操作或宏响应,该操作或宏响应会根据在下拉字段中选择的值而变化。在这种情况下,您可以使用以下示例语句作为模板,其中
-
FIELDID
已替换为您的自定义下拉字段的 ID。 - 每个
{% when "Value X" %}
语句已替换为下拉字段的已定义选项之一。 - 每个
Your text X here.
语句 将替换为其前面字段值所需的响应。
{% 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 %}
使用 Liquid Markup case 语句创建其它动态响应
您可以使用类似的结构在首选语言以外的上下文环境中创建动态响应。例如,如果您想根据用户的组织进行回复,可以使用类似的用例结构。在这种情况下,您应将个案定义为 {% case ticket.organization.name %}
每个组织的回复前缀 {% when 'OrganizationName'
%}
更新。
翻译免责声明:本文章使用自动翻译软件翻译,以便您了解基本内容。 我们已采取合理措施提供准确翻译,但不保证翻译准确性
如对翻译准确性有任何疑问,请以文章的英语版本为准。
13 条评论
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
登录再写评论。