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

Conditional Email based on Role Custom Property

ewalton
Regular Contributor
Regular Contributor

 

Hello,

When an enterprise role is approved, we aim to send an email to the user, informing them that the role will be provisioned within a few hours. We have a requirement to send emails only for approved role requests that have a custom property populated. I have attempted to implement the following logic in the 'To:' field within the email template utilized in the workflow, but it doesn't seem to be functioning correctly. Could you please review the syntax provided below and offer any insights? Your assistance would be greatly appreciated.

${if(role.customproperty22?.equalsIgnoreCase('SENDMAIL')){users?.email}}

5 REPLIES 5

rushikeshvartak
All-Star
All-Star

To get what variables are present to use in the email template, check using the below expression. By putting it in the email body, it will print all variable names with values, and then accordingly, you can use it:


${this.binding.variables.each {k,v -> println "$k = $v" + "" + "br" + ">"}}


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

CR
Regular Contributor III
Regular Contributor III

@ewalton  try below

<% if(role.customproperty22.equalsIgnoreCase('SENDMAIL') print "${user.email}"%>

 


Thanks,
Raghu
If this reply answered your question, Please Accept As Solution and hit Kudos.

ewalton
Regular Contributor
Regular Contributor

Thank you for your assistance!

ewalton
Regular Contributor
Regular Contributor

Thank you!

rushikeshvartak
All-Star
All-Star

Use  below

<% if(tasks?.assignedFromRoles?.customproperty22?.equalsIgnoreCase('SENDMAIL') print "${user.email}"%>


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