Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

How to exclude a user from a dynamic email template

Jaya
Regular Contributor II
Regular Contributor II

Hi Team,

This is in the continuation to my previous query - 'How to exclude a user from a dynamic email template', for that I got an response is -

 

'It is possible through a conditional logic, you can write a conditional logic in the 'TO' field and make it null or blank when a specific manager is matched'.

 

So someone can please give an example, how can we achieve this.

@Nikitaj 

 

Thanks

Jaya

 

Thanks
Jaya Karothia
6 REPLIES 6

Nikitaj
Saviynt Employee
Saviynt Employee

Hi Jaya,

Here you go..

To:

<% if (task?.tasktype == 3) print "${manager?.email}" else if (task?.tasktype == 1) print "${manager?.email},${requestor?.email},${user.email}" %>

 

cc:

<% if (task?.tasktype == 3) print "${user.customproperty33},${requestor?.email}" else if (task?.tasktype == 1) print "${requestor?.email}" %>

 

Thanks

Nikita


Thanks
Nikita

Jaya
Regular Contributor II
Regular Contributor II

Hi @Nikitaj ,

We are using below query in 'TO' field to achieve this, but unable to trigger email through this -

<% if(users?.email == '123@bank.co.uk') print("abc@bank.co.uk") else { print ("${users?.email}")} %>

Please help me in this.

 

Thanks

Jaya

Thanks
Jaya Karothia

Jaya
Regular Contributor II
Regular Contributor II

Hi @Nikitaj 

Please help me with above query.

Thanks

Jaya

Thanks
Jaya Karothia

Hi Jaya,

Could you please use 'user' instead of 'users' . Example below :
<% if (task?.source=='REQUEST') print "${requestor.email},${user.email}" else print "" %>

 


Regards,
Sahaj Ranajee
Sr. Product Specialist

amit_krishnajit
Saviynt Employee
Saviynt Employee

You may want to try the following way:

${3 == task?.tasktype ? manager?.email : user?.email}

Thanks,
Amit

Jaya
Regular Contributor II
Regular Contributor II

Thanks for the solution sahaj & amit.🙂

Thanks
Jaya Karothia