Currently, the policy violation emails are unusable for my organization because there are too many default fields and the vertical formatting to conserve space makes each field unreadable. The policy email notifications could find use at my organization if there was the ability for admins to remove certain fields that have no relevance to end users (like Created, Modified, IdentityNow UserName, etc).
Hi @dominick-miller,
Have you tried changing template from UI, are you facing issue with it, or you want dynamic modification?
Kindly let me know if I am not getting the use-case.
Thanks
There is no option to change template from UI.
If you know otherwise, please let me know how exactly to do it.
Hi @dominick-miller,
From this admin screen (snapshot given below) you can go and edit the template that we have in system. Let me know if there is some gap in the understanding of your use-case.
Thanks
Hi @ashutosh08,
Thanks for informing me that we can edit the policy violations email template. Do you know how to change the actual table displayed in the email? It just references ${previewCell} in the template and I am wanting to change which cells we display.
Please check below two link and see if it answers your query about modification.
Let me know if you still need help.
Thanks
I have taken a look and they don’t give any indication as to what the previewCell is or where it comes from (other than previewRow). Do you know how to remove certain previewCell elements either directly or by removing them from previewRow?
Hi @dominick-miller,
As per configuration these are being derived from some other variable. Please look at the below template and see it is being derived from “${previewRow}” which in turn is coming from “${searchResults.get($documentType).get(“preview”)}”.
You may take reference from below template and then add your logic with if condition to just show it depending upon your use-case.
<![CDATA[
<font face="helvetica,arial,sans-serif">
<p> Separation of Duties (SoD) policy violations have been identified within ${PRODUCT_NAME}</p>
<br>
<p><strong> SOD Policy</strong></p>
<p> Business Name: ${policyName}</p>
<p> Description: ${description}</p>
<p> External Reference: ${externalReference}</p>
<br>
<p> You are receiving this email because you are designated as an SoD policy remediator or notification recipient. The owner of this policy is ${ownerName}.</p>
<br>
<p> ${ownerName} recommends the following corrective actions: ${correctionAdvice}</p>
<br>
<p> If this violation is unavoidable, ${ownerName} recommends the following: ${mitigatingControls}</p>
<br>
<p> Use the violations report link below to take appropriate action.</p>
<br>
<p> Violators were identified with this implementation query:</p>
<p> ${searchQuery}</p>
<br>
#if (!${searchResults.isEmpty()})
<p>Here's a preview of the results for this query:<br>
<br>
#set ($count = 1)
#foreach ($documentType in ${searchResults.keySet()})
<span style="font-weight: bold;">${searchResults.get($documentType).get("count")} ${searchResults.get($documentType).get("noun")}</span>#if ($count < ${searchResults.keySet().size()}),#end
#set ($count = ${count} + 1)
#end
</p>
#foreach ($documentType in ${searchResults.keySet()})
<p style="margin-bottom: 20px;">
${documentType} Results Preview:
<table style="margin-top: 3px; background-color: #ffffff; border: 1px solid #bbbbbb; border-collapse: collapse; color: #333333; font-family: helvetica,arial,sans-serif;">
#set ($isHeader = true)
#foreach ($previewRow in ${searchResults.get($documentType).get("preview")})
<tr>
#foreach ($previewCell in ${previewRow})
#if ($isHeader)
<th style="border: 1px solid #bbbbbb; padding: 5px; background-color: #dddddd; font-weight: bold;"> ${previewCell}</th>
#else
<td style="border: 1px solid #bbbbbb; padding: 5px;">${previewCell}</td>
#end
#end
</tr>
#set ($isHeader = false)
#end
</table>
</p>
#end
#else
<p>${policyName} is returning no results at this time.</p>
#end
<br>
<p>To download the complete results, click here: <a href="${linkToCsv}"></a></p>
<br>
<p>Thanks,<br>
<br>
The ${PRODUCT_NAME} Team</p>
</font>
]]>
Right… my suggestion would be to have the ability to edit the previewRow via the ‘edit policy’ UI.
