Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

How to check endpoint name in "To" field of email template using if-else condition

Ajit
New Contributor III
New Contributor III

Hi Team,

We want to trigger email notification to different email address based on the endpoint name the task (New Account/Add Access) has been created for, we have tagged the email template at the endpoint level to trigger on task creation.

In the "To" field we tried with below, but its not working.

<% if (task?.endpoint == 'App1') print "xyz@dev.com" else print "abc@dev.com" %>

${task?.endpoint == 'App1' ? 'xyz@dev.com' : ''}

could you please help on this, how can we fetch the endpoint name in the "To" field of the template?

Thanks

4 REPLIES 4

dgandhi
All-Star
All-Star

try task?.endpoint.endpointname

Thanks,
Devang Gandhi
If this reply answered your question, please Accept As Solution and give Kudos to help others who may have a similar problem.

SumathiSomala
All-Star
All-Star

@Ajit Try

${task.endpoint.endpointname}

${endpointDisplayName}

 

Regards,
Sumathi Somala
If this reply answered your question, please Accept As Solution and give Kudos.

rushikeshvartak
All-Star
All-Star

 

<%if (task.endpoint.endpointname== 'ABCD') print "" else print "${user.email},${requestor.email}" %>

Regards,
Rushikesh Vartak
If you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

Ajit
New Contributor III
New Contributor III

Thanks a lot! everyone -task?.endpoint.endpointname worked