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


댓글을 남기려면 로그인하세요.

원하는 정보를 못 찾으셨나요?

새 게시물