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

Add Access Email Template- Binding Variables

rama_roy
New Contributor III
New Contributor III

Hi Team,

We are having a requirement that an email will be triggered upon successful completion of ARS task. The below variables are exposed for the template

Group Name:null resourceOwners =
tasktype = Add Access
manager = 
accountOwners = []
randompassword = null
entitlement =
provisioningOwners =
users = Test_user_
requestor = 
out = java.io.PrintWriter@4b60b312
account_password = null
task = com.saviynt.ecm.task.ArsTasks : 1234
accountname = Test_user_ Password - null
requestid = 
endpointDisplayName = 
account_name = 
endpointOwners =
requestormanager = 
baseUrlForEmail = 
user = 
taskaction = Add Access
account = Test_user_

We are facing issue while adding these in the email. The mail is not getting triggere.

Could you please provide the binding variables for the below:

  1. tasktype
  2. entilement value. if more than one then , seperated
  3. entitlements in tabular format
  4. Endpointdisplayname
  5. requesttype
  6. user firstname for whom access approved

Regards,

Rama

17 REPLIES 17

rushikeshvartak
All-Star
All-Star
  1. tasktype ${tasktype}
  2. entilement value. if more than one then , seperated - ${task.entitlement_valueKey.entitlement_value}
  3. entitlements in tabular format 
    <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>
  4. Endpointdisplayname ${endpointDisplayName}
  5. requesttype ${task?.requestKey?.requestType}
  6. user firstname for whom access approved ${user.firstname}

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

rama_roy
New Contributor III
New Contributor III

Hi Rushikesh,

Thanks for the update. Facing issue while printing entitlement value.  getting only one entitlement value in the mail with this variable ${task.entitlement_valueKey.entitlement_value} where I have requested for multiple.

Tabular format also not working. eg: abc.co.in is coming like abc. and in next line co and then nect line in

Regards,

Rama

 

Raghu
Honored Contributor
Honored Contributor

@rama_roy  can you try below one and check :

<b><strong>Entitlements<strong></b></p> <table border="2" cellpadding="2" cellspacing="0" width="100%"> <tbody> <tr style="border-bottom: 1px solid black;"> <td>${entitlementshtmltablerows}</td> </tr> </tbody> </table> </tr>


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

rama_roy
New Contributor III
New Contributor III

Hi Raghu,

I am getting this with above code

rama_roy_0-1716819971540.png

Regards,
Rama

Raghu
Honored Contributor
Honored Contributor

@rama_roy  it should work , alreay we are using above synatx

 

<tr pardot-repeatable="" style=""> <td align="left" class="bodyContent" pardot-region="body_content" style="-webkit-text-size-adjust: 100%; -ms-text-size-adjust: 100%; mso-table-lspace: 0pt; mso-table-rspace: 0pt; color: #505050; font-family: Helvetica; font-size: 14px; line-height: 21px; text-align: left; padding: 20px;" valign="top"> <p style="text-align: center; font-weight: bold;"><b><strong>Entitlements<strong></b></p> <table border="2" cellpadding="2" cellspacing="0" width="100%"> <tbody> <tr style="border-bottom: 1px solid black;"> <td>${entitlementshtmltablerows}</td> </tr> </tbody> </table> </tr>

 

Raghu_0-1716820668368.png

 


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

rama_roy
New Contributor III
New Contributor III

Not Sure Raghu. Why ${entitlementshtmltablerows} variable is not working. ${entitlement} is working but need the exact same table format.

entitlementshtmltablerows is not exposed. Please use updated code


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

Should I try the same code same code with ${entitlement}. 

Yes


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

<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("com,", 0)[i].replaceAll("\\[","").replaceAll("\\]","")}</td></tr><%}%></table>

 


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

Share sample screenshots of non working variables 


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

${task.entitlement_valueKey.entitlement_value}  non working variable. Printing single entitlement in case request is for many. 

${entitlementshtmltablerows}- not working means when I am using these variables in the email body, it is printing the variable as text, no values are coming.

Regards,

Rama

Use ${entitlement} as mentioned share output 


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

This code is working with a bit modification in split function and the output is coming as below:

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

rama_roy_0-1716820755270.png

but we need to have it as the below. we are looking for how to get the boarders with the above working code.

 

Your Add Access request for DataPower has been approved and you have been granted access to the following Security Group(s).

Access Details

CN=abc,OU=DP,OU= Applications,DC=dev,DC=com

CN=xyz,OU=DP,OU= Applications,DC=dev,DC=com

 

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


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

rama_roy
New Contributor III
New Contributor III

Please find the below working code. where we did few modification to get the entitlement in the below format:

Access Details

CN=abc,OU=DP,OU= Applications,DC=dev,DC=com

CN=xyz,OU=DP,OU= Applications,DC=dev,DC=com

Working Code:
<table style="width:80%;border:1px solid black;border-collapse:collapse"><tr> <th style="background: rgb(0, 0, 255);vertical-align: top;">Access Details</th> </tr> <% int count = Integer.parseInt("${entitlement.split(", ", 0).size()}"); for(int i = 0; i < count; i++) { %> <tr style="border:1px solid black;border-collapse:collapse"> <td style="border:1px solid black;border-collapse:collapse">${entitlement.split(", ", 0)[i].replaceAll("\\[","").replaceAll("\\]","")}</td> </tr> <% } %> </table>

Regards,

Rama

👍Please click the 'Accept As Solution' button on the replies that best answered your original question. and hit kudos


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