Skip to content

Search Subscription Notification Email Template

The Subscription Notification email is sent to administrators when a scheduled search is run.

Note

By default, for security reasons, subscriptions are configured to exclude detailed results (designated in the section below). However, the subscription creator can select the Add a detailed summary of results to the report to include that information. For more information, refer to Subscribing to Saved Searches.

Name: Subscription Notification

Subject: [${PRODUCT_NAME}] Subscription: {searchName}#if () (no results)#end

Body:

You're receiving this email because you're subscribed to the search query: <span style="font-weight: bold;">${searchName}</span>.
#if (${displayQueryDetails})
<p>
The query for this subscription is:
<table style="margin-top: 3px; margin-left: 15px; background-color: #ffffff; border: 3px double #bbbbbb; border-spacing: 0px; font-family: helvetica,arial,sans-serif;">
<tr>
<td style="background-color: #e8e8e8; padding: 5px;">${searchQuery}</td>
</tr>
</table>
</p>
#end
#if (!${searchResults.isEmpty()})
<p>
Here's a summary of the results for this query:<br>
<br>
#set ($count = 1)
#foreach ($documentType in ${searchResults.keySet()})
<span style="margin-left: 15px; font-weight: bold;">${searchResults.get($documentType).get("count")} ${searchResults.get($documentType).get("noun")}</span>#if ($count < ${searchResults.keySet().size()})<br><span style="font-size: 4px;"> </span><br>#end
#set ($count = ${count} + 1)
#end
</p>
#else
<p>
${searchName} is returning no results at this time.
</p>
#end
<p>
View results:<br>
<br>
<span style="margin-left: 15px;">Click <a href="${identityNowUrl}/ui/search/?savedSearchId=${savedSearchId}">here</a> to run this query in ${PRODUCT_NAME}.</span><br>
<span style="font-size: 4px;"> </span><br>
<span style="margin-left: 15px;">Click <a href="${identityNowUrl}/ui/d/reports/${taskResultId}/?name=${fileNameEncoded}&savedSearchId=${savedSearchId}">here</a> to download the generated report.</span><br>
<span style="font-size: 8px;"> </span><br>
</p>

## Exclusion of detailed results

#if (${displayQueryDetails} && !${searchResults.isEmpty()})
#foreach ($documentType in ${searchResults.keySet()})

<p style="margin-bottom: 20px;">
${documentType} Results Preview#if (${searchResults.get($documentType).get("preview").size()} > 20) (displaying first 20 results)#end:
<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
#end

<p>
If you have any questions about this email, please contact the subscription owner <a href="mailto:${ownerEmail}?subject=Re: [${PRODUCT_NAME}] Subscription: ${searchNameEncoded}">${ownerName}</a>.
</p>

<p>
Thanks,<br>
<br>
The ${PRODUCT_NAME} Team
</p>

<p>
<a href="${identityNowUrl}/ui/d/unsubscribe/${scheduleId}">Unsubscribe</a>
</p>

Attributes

This email template uses version 1 global variables and the following template-specific attributes:

Name Type Description
displayQueryDetails Boolean Indicates if query details should be displayed.
fileNameEncoded String The file name of the downloaded report.
ownerEmail String The email address of the subscription owner.
ownerName String The display name of the subscription owner.
savedSearchId String The ID of the saved search.
scheduleId String The ID of the scheduled search.
searchName String The name of the saved search.
searchNameEncoded String The name of the saved search (encoded).
searchQuery String The saved search query.
searchResults Map A map of the results returned for each searchable item.
taskResultId String The ID of the TaskResult that generated the report.