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

Endpoint level email template to list all entitlements from request

glegault
Regular Contributor
Regular Contributor

Hello,

We are using endpoint level email templates to notify users of remove access completed tasks.

We have been using the ${task.entitlement_valueKey.displayname} variable to display the removed  entitlement to the user in the email but as stated in this post:

 Re: Email not getting triggered for two different ... - Saviynt Forums - 61935,

When multiple entitlements are removed within a single request, only one email gets triggered. Now knowing this is expected behaviour, is it possible to guide us on which variable to use to display all entitlements from the associated request instead of referring to the $task variable and if possible how to display this nicely in a table maybe? 

 

Thank you,

5 REPLIES 5

Amit_Malik
Valued Contributor II
Valued Contributor II

Hi @glegault , I dont think you can do that at task completion email. But you can still try ${this.binding.variables.each {k,v -> println "$k = $v" + "" + "br" + ">"}} to find what binding variables are supported for that email template.

thanks,

Amit

If this answers your query, Please ACCEPT SOLUTION and give KUDOS.

Kind Regards,
Amit Malik
If this helped you move forward, please click on the "Kudos" button.
If this answers your query, please select "Accept As Solution".

rushikeshvartak
All-Star
All-Star

Please validate supported variables.

Purpose :

To get what variables are present to use in the email template.

Email Template steps :

keep Advanced HTML CSS flag is checked

Keep your email Address in TO

TO /CC/BCC & Subject - Don't use any dynamic variables

Add only below code in Email Body
${this.binding.variables.each {k,v -> println "$k = $v" + "" + "br" + ">"}}

Output : 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:


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

Hi @rushikeshvartak 

Thank you for the reply.

I was able to replace ${task.entitlement_valueKey.displayname} with ${entitlement}.

This variable seem to contain all entitlements from the same request instead of being task specific, which is what we wanted.

The only downside I see are the brackets at the beginning/end but this is more cosmetic than a real issue. Example:

[EmailTemplateTestEntl2-DN, EmailTemplateTestEntl1-DN] 

Also, when using  ${this.binding.variables.each {k,v -> println "$k = $v" + "" + "br" + ">"}} like you suggested for testing purposes, is there a way to find out which properties are available for each variables? For instance for the $entitlement variable, I don't know if I could have used $entitlement.somethingelse if you know what I mean?

Thank you again!

Hi @glegault ,

The only downside I see are the brackets at the beginning/end but this is more cosmetic than a real issue. Example: [EmailTemplateTestEntl2-DN, EmailTemplateTestEntl1-DN] 

- Can you try using below

  • Remove brackets - 
${entitlement_values.collect{it.toString().indexOf("(") == -1 ? it : it.toString().substring(0, it.toString().indexOf("(") -1)}.toListString().replaceAll('\\[|\\]','')}

${entitlementshtmltablerows}

Generates HTML Table rows as follows:
<tr><th>EndpointName</th> Entitlement_Value </th><th> Entitlement_Description </th> <th> Entitlement_Glossary </th> </tr>

This does not print <table> start tag and end tag. So, this can be defined in the email template as shown below:
update ecmemailtemplate set templatecontent =
templatecontent = '<div> <br/><table><tr><th>Endpoint</th><th> Entitlement </th> <th> Description </th> <th> Glossary </th> </tr> ${entitlementshtmltablerows} </table> </div>

${entitlementshtmltablerowsv2}

Prints all the requested entitlements, their business justification, start date, and end date, by defining the tags in email template.

${entitlementshtmltablerowsv3}

Generates HTML table to print Application Name, Entitlements, Entitlement Glossary, and Entitlement Description with the start date and end date, and Business Justification as specified by the requestor.

 

We are using below code for same.

 

  <div> <p style='margin-top:0cm;margin-right:0cm;margin-bottom:0cm;margin-left:0cm;line-height:normal;font-size:13px;font-family:"Verdana",sans-serif;'>

            <span style='font-size:13px;font-family:"Verdana",sans-serif;'> </span></p><br><table style="width:80%"> <tr> <th style="background: rgb(255, 192, 0);vertical-align: top;">Entitlement Name</th> </tr> <% int count=Integer.parseInt("${entitlement.split(",", 0).size()}"); for(int i=0;i<count;i++){%><tr><td>${entitlement.split(",", 0)[i].replaceAll("\\[","").replaceAll("\\]","")}</td></tr><%}%></table><br>


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.