Based on condition, how to change the trigger email body

回答済み


投稿日時:2023年2月20日

Hi,

I need to trigger email content based on the number of Beneficiary selected. 

For example If beneficiary ===1 then email content should have 1 Primary beneficiary

Primary Beneficiary:    {{ticket.ticket_field_12417539333143}}. - {{ticket.ticket_field_12417498387863}}%

If beneficiary ===2 then email content should have  Primary beneficiary and Contingent beneficiary.

Primary Beneficiary:    {{ticket.ticket_field_12417539333143}}. - {{ticket.ticket_field_12417498387863}}%

[Contingent Beneficiary:]    {{ticket.ticket_field_12417508088215}} - {{ticket.ticket_field_12417499000087}}%

and so on.

So my question is how to add if else or Switch condition in the trigger email  body?


0

3

3件のコメント

Hi Vishwanath Hokrani

Unfortunately, it's not possible to customize the custom field placeholder to only call or show specific digits from the original field value. What I recommend is to create a separate ticket field in which you or your end-users can separately enter this information.

0


This will help me. Thanks a lot. 

 

One more question, i have number filed which has 12 digit number. From these fields i need to get last 3 digit in email trigger. Is there way to get it ?

0


Hello Vishwanath,

You can probably use a case statement with liquid. I have found this helpful article that you may use as a guide: Using Liquid markup to support multiple languages in automations, macros, and triggers

In your trigger, you may add this to the email body so that the content would depend on the value of the field. Just replace the <fieldID> with the correct one.

{% case ticket.ticket_field_<fieldID> %}
{% when '1' %}
case1
{% when '2' %}
case2
{% else %}
n/a
{% endcase %}

0


サインインしてコメントを残してください。

お探しのものが見つかりませんか?

新規投稿