Click HERE to see how Saviynt Intelligence is transforming the industry. |
06/25/2024 07:37 AM
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,
06/25/2024 08:31 AM
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.
06/25/2024 09:06 AM
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:
06/25/2024 11:05 AM
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!
06/25/2024 01:07 PM
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
${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: This does not print <table> start tag and end tag. So, this can be defined in the email template as shown below: |
${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. |
06/25/2024 08:22 PM
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>