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

Syntax to check multiple user Titles in To address of Email Template

harishyara
Regular Contributor
Regular Contributor

Hello All,

We have a requirement to check if user's title is not in any of below title's then only email needs to be triggered.

Titles

1. Director
2. CEO
3. CIO
4. CTO
5. EVP
6. SVP
7. VP

Please help me with syntax to be configured.

Regards,

Harish

9 REPLIES 9

pmahalle
All-Star
All-Star

Hi @harishyara ,

From where you are triggering this email? Update rule , endpoint, workflow or other?


Pandharinath Mahalle(Paddy)
If this reply answered your question, please Accept As Solution to help other who may have a same problem. Give Kudos 🙂

harishyara
Regular Contributor
Regular Contributor

Hi @pmahalle - I am triggering from Campaign Reminder Email Template

@pmahalle - In a way I need syntax to check user's title using like operator (user.title like '%Chief%') in To Address. So I need exact syntax of using like operator.

Hsoumare
New Contributor III
New Contributor III

Hi Harishyara,

You can add a condition filtering on the "TO" part on your email template. 

you can try like this sample :

<% if (null!=user.title && user.title !='Director') print"${user.email}" else print"${}" %>Email

Regards
Harouna SOUMARE
If this reply answered your question, please Accept As Solution to help other who may have a same problem. Give Kudos 😉

 

harishyara
Regular Contributor
Regular Contributor

Hi @Hsoumare As per users data title don't have fixed value

example - 

title=Director, IT Dept.

title=President, Finance Department 

So is there any way that we can use like operator for title ?

Hsoumare
New Contributor III
New Contributor III

Hi harishyara,

the easiest way will by to add some OR condition on the IF like : 

<% if (null!=user.title && ((user.title !='Director') ||(user.title !='IT Dept') )print"${user.email}" else print"${}" %>Email

 

Regards
Harouna SOUMARE
If this reply answered your question, please Accept As Solution to help other who may have a same problem. Give Kudos 😉

rushikeshvartak
All-Star
All-Star

Below are possible solutions

  • Enable Mute Email for such users
  • Supress email notifications using conditional logic
    • Populate customproperty65 for all users where you don't want to send email notifications
    • <% if (user.cusomproperty65.equalsIgnoreCase('DONOTDISTRUB')) print"${user.email}" else print"" %>


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

@rushikeshvartak - Unfortunately we exhausted all the user custom properties.

Update mute email flag DONOTDISTURBDELEGATE


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