Email Templates
|
New to Sentinel EMS?
|
What Are Email Templates?
An email template is a file that provides a predefined format and default content for the emails that are used to notify Sentinel EMS users. Email templates also use placeholders that dynamically fetch values using REST API calls. The REST API calls retrieve JSON data objects whose parameters are then used as placeholders in the email templates. Some placeholders are created using static data references.
You can view and edit email templates by using one of the following methods:
•Select Configuration > Email Templates and edit the template in Sentinel EMS.
•Download, modify, and upload the modified template to Sentinel EMS.
•Use the Sentinel EMS REST API.
When you download an email template, the associated language in which you are downloading the email template appends to the file name. For example, New Entitlement - Notify User_<Language>.emst.
The following table displays the email templates available in Sentinel EMS along with their REST API calls and the attributes of the config object used in email templates:
|
|
Description |
API Calls for Templates (JSON data objects and API calls to retrieve the data objects) |
Config Object Attributes |
|---|---|---|---|
| Batch Creation Failure | Email template for notifying a user that a batch job could not be created. |
>data.entitlements: Search Entitlements Response (/ems/api/v5/entitlements) |
|
| Batch Creation Success | Email template for notifying a user that a batch job was successfully created. |
>data.entitlements: Search Entitlements Response (/ems/api/v5/entitlements) |
>config.batchId: Identifier of the batch job. >config.entitlementCount: Total number of entitlements in the batch. |
| Batch Entitlement Certificate | Email template that includes details of the entitlement certificate for a batch entitlement. Used for notifying a channel partner that a batch entitlement certificate was generated. |
>data.entitlements: Search Entitlements Response (/ems/api/v5/entitlements) |
>config.supportContactNo: Telephone number of technical support specified in the Administration Console. >config.supportEmailId: Email of the technical support specified in the Administration Console. >config.supportTeamName: Name of the technical support team specified in the Administration Console. >config.batchId: Identifier of the batch job. >config.entitlementCount: Total number of entitlements in the batch. |
| Entitlements - Expired | Email template for notifying a user about entitlements that have recently expired. Lists the relevant entitlements. |
>data.entitlement: Get Entitlement Response (/ems/api/v5/entitlements/entitlementId) > data.contact: Get User Response (/ems/api/v5/contacts/contactId) |
|
| Entitlements - Expiring Soon | Email template for notifying a user about entitlements that are about to expire. Specifies the number of days remaining. |
>data.entitlement: Get Entitlement Response (/ems/api/v5/entitlements/entitlementId) > data.contact: Get User Response (/ems/api/v5/contacts/contactId) |
|
| Entitlements - Never Activated | Email template for notifying a user about entitlements that have never been activated. |
>data.entitlement: Get Entitlement Response (/ems/api/v5/entitlements/entitlementId) > data.contact: Get User Response (/ems/api/v5/contacts/contactId) |
|
| File Upload | Email template for notifying a user about a file uploaded for an entity along with information about the data imported. |
The following are the static references used: >data.userName >data.uploadDate >data.fileType >data.fileStatus > data.fileName > data.totalRecords > data.recordsProcessed |
>config.supportContactNo: Telephone number of technical support specified in the Administration Console. >config.supportEmailId: Email of the technical support specified in the Administration Console. >config.supportTeamName: Name of the technical support team specified in the Administration Console. |
| License Certificate | Email template that includes details of a license certificate. Used for notifying a user that a license was generated. |
>data.activation: Get Activation Response (/ems/api/v5/activations/activationId) The following are the static references used: >data.activation.licenseKeyData >data.activation.suite > data.activation.product |
> config.contactUser: User name, user email, or customer name (in the specified order of preference). >config.contactName: Name of the customer. >config.supportContactNo: Telephone number of technical support specified in the Administration Console. >config.supportEmailId: Email of the technical support specified in the Administration Console. >config.supportTeamName: Name of the technical support team specified in the Administration Console. >config.downloadShow: The value of a property in the Administration Console that specifies whether downloads are visible or hidden in the Sentinel EMS portal. >config.deviceName: Device name, which is a friendly representation of the locking information of a device. NOTE You can add feature description to the license certificate by using the following syntax: >config.productKey.customAttributes.customAttribute: Custom Attributes associated with the Product Key (Line Item). NOTE It is recommended to modify the license certificate's config object using the following syntax:
|
| New Entitlement - Notify User |
Email template that includes details of an entitlement certificate. Used for notifying a user that an entitlement was generated. |
>data.entitlement: Get Entitlement Response (/ems/api/v5/entitlements/entitlementId) |
>config.contactName: User name, user email, or customer name (in the specified order of preference). >config.emailURL: URL of the customer portal specified in the Administration Console. >config.supportContactNo: Telephone number of technical support specified in the Administration Console. >config.supportEmailId: Email of the technical support specified in the Administration Console. >config.supportTeamName: Name of the technical support team specified in the Administration Console. >config.downloadShow: The value of a property in the Administration Console that specifies whether downloads are visible or hidden in the Sentinel EMS portal. NOTE You can add feature description to the entitlement certificate by using the following syntax: |
| Password Reset | Email template for notifying a user to reset the password. |
>data.password (static reference) |
|
| Product Upgrade | Email template for notifying users about a product upgrade. Sent after a product upgrade. |
>data.entitlement: Get Entitlement Response (/ems/api/v5/entitlements/entitlementId) >data.contact: Get User Response (/ems/api/v5/contacts/contactId) |
|
| Reprint License Certificate | Email template that includes details of license certificates for reprinting multiple activations. Used for notifying all specified users about the reprint. |
>data.activations: Search Activations Response (/ems/api/v5/activations) |
config.contactUser: User name, user email, or customer name (in the specified order of preference). |
|
Revocation Recredited - Confirmation for Vendor (Not supported for SCL Add-On) |
Email template for notifying a software vendor that the entitlement quantity was recredited after a successful revocation. |
>data.activation: Get Activation Response (/ems/api/v5/activations/activationId) >data.embed.entitlement: Get Entitlement Response (/ems/api/v5/entitlements/entitlementId) |
config.contactEmailId: Email address of the activatee. An activatee is the user who performs the activation. |
|
Manual Revocation Confirmation (Not supported for SCL Add-On) |
Email template that includes details of a license certificate. Used for notifying a user that a license was generated using Sentinel Fit enforcement. |
>data.activation: Get Activation Response (/ems/api/v5/activations/activationId) The following are the static references used: >data.activation.licenseKeyData >data.activation.suite > data.activation.product |
>config.contactUser: User name, user email, or customer name (in the specified order of preference). >config.contactName: Name of the customer. >config.contactEmail: Email address of the user. |
|
Relevant only for cloud licensing. Email template that includes details of a machine account certificate. Used for notifying a user that a machine account was generated using Sentinel LDK enforcement. The email instructs the end user to install the license for the service or application by clicking the link from the email in a browser on the device on which the user plans to use the service or application. We recommend that you customize this template by adding your name and any other pertinent information. |
>data.account: Get Machine Account Response (/ldk/api/v5/accounts/accountId) >data.account.name: Name of the machine account specified by the user when the machine account was created. |
||
| User Creation Confirmation |
Email template for notifying a user that a user was created by registering on the customer portal. See also: >Assign Customers, Users, Channel Partners, and Market Groups |
>data.contact: Get User Response (/ems/api/v5/contacts/contactId) |
>config.customerName: Customer name for a user. >config.emailURL: URL of the customer portal specified in the Administration Console. >config.supportContactNo: Telephone number of technical support specified in the Administration Console. >config.supportEmailId: Email of the technical support specified in the Administration Console. >config.supportTeamName: Name of the technical support team specified in the Administration Console. |
Actions for Email Templates
The following table lists the actions available for email templates. For email templates in multiple languages, some of the following actions are available only by expanding the specific template or clicking Show All for that template.
| Action | Description | |
|---|---|---|
|
|
New |
Creates a new email template. To create an email template. 1.Click the New action to open the Add Email Template page. 2.Start typing to select the Template Language from the list of languages specified. 3.In the Configure Email Template Language Attributes section, use the available tools to modify the template. See Editing Email Templates for details of these tools. 4.Click Save. |
|
|
Edit |
Updates existing email template. See Editing Email Templates to understand how to edit an email template. See also Adding Dynamic Content to Email Templates to understand how to add dynamic content to email templates. |
|
|
Download |
Downloads the email template. |
|
|
Delete | Deletes the email template. This option is available only for custom templates in languages other than English. |
Editing Email Templates
The Edit action opens an email template in the email template editor. You can use the tools available in the editor to modify and format the email template as required. The following table describes the email template editor tools:
| Tools | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
Undo | Erases the last change done to revert the email template to its previous state. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
Redo | Restores the actions that have been previously undone using the Undo action. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
Style | Various formatting styles defined by your theme. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
Bold | Bolds the selected text. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
Italic | Italicizes the selected text. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
Underline | Underlines the selected text. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
Text Color | Specifies or changes the font color. Click the arrow next to this tool and select a font color. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
Background Color | Specifies or changes the background color. Click the arrow next to this tool and select a background color. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
Align Left | Aligns the text to the left side of the page or the containing element. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
Align Center | Aligns the text to the center of the page or the containing element. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
Align Right | Aligns the text to the right side of the page or the containing element. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
Justify | Alignment can only be applied to text and will align both sides of the text. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
Bulleted List | Creates bullet points or bullet lists. Click the arrow next to this tool and specify the type of bullet. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
Numbered List | Creates numbered points or numbered lists. Click the arrow next to this tool and select the numbering style. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
Decrease Indent | Decreases the indentation space of the text or cursor from the margin on the left side of the page. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
Increase Indent | Increases the indentation space of the text or cursor from the margin on the left side of the page. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
Insert / Edit Link |
Inserts or modifies a hyperlink. To insert a hyperlink: 1.Click Insert / Edit Link to open the Insert / Edit Link dialog box. 2.Enter the URL, Text to Display, and Title. 3.Select Current Window or New Window to specify the window to open the target. 4.Click Save. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
Insert / Edit Image |
Inserts or modifies an image To insert an image: 1.Click Insert / Edit Image to open the Insert / Edit Image dialog box. 2.Enter the Source, Image Description, Width, and Height of the image. 3.Click Save. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
Table |
Inserts a table. Also contains the tools that help to work with cells, rows, and columns in a table. The options in the table menu can also be accessed by right-clicking a selected table. Details of the tools to work with a table are as follows:
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
Source Code | Displays the HTML source code for the email template in the Source Code window. You can use this window to modify or format the email template using HTML elements. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
Upload Template | Uploads an existing email template. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
Save Template | Saves the changes made to the uploaded email template. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
Adding Dynamic Content to Email Templates
The Sentinel EMS email templates include a combination of both static and dynamic data. The dynamic data is the information that changes and can be customized as required. You can use the JSON response of the Sentinel EMS REST APIs and basic knowledge of FreeMarker syntax to build dynamic content in the email templates. Examples of dynamic data are placeholders, which are similar to variables that are part of your email template. You can also use conditional statements and list constructs to build your dynamic text.
NOTE Sentinel EMS email templates use the FreeMarker framework to include dynamic content into email messages. This enables customization based on context and real-time data.
Refer to the FreeMarker documentation for supported functions:
Adding a Placeholder
Placeholders are variables that are part of your email templates. A placeholder is enclosed in curly brackets and preceded by the $ symbol. For example:
${name}
Within the curly brackets, you can enclose the placeholder name in parentheses followed by an ! symbol. This ensures that a null pointer exception is not thrown if the value for the placeholder variable is not found.
${(name)!}
Referencing the Data Object
The JSON response of the Sentinel EMS REST APIs is stored in the data object. You can create placeholders in an email template by using the Sentinel EMS REST API JSON response structures to reference the data object. For example:
${(data.entitlement.eid)!}
In the preceding example, the placeholder displays the value of the entitlement ID in an entitlement.
Referencing the Config Object
All Sentinel EMS configuration-related information is available in the config object. You can reference the config object to create placeholders in the email template. For example:
${(config.supportEmailId)!}
In the preceding example, the placeholder displays the technical support email from the Administration Console. For more information on the config object, see Config Object Attributes.
Evaluating the Value of a Custom Attribute
You can also evaluate the value of a custom attribute by name using the following format:
${(attributeValue("ATTRIBUTE_NAME", data.entitlement.customAttributes.customAttribute))!}
In the preceding example, the placeholder displays the custom attribute name of the entitlement using the JSON response stored in data object.
The following example illustrates how to insert a product-related custom attribute in an email template:
${(customAttributeValue("cust_name", productKey.item.itemProduct.product.customAttributes.customAttribute))!}
You can also use the following logic to check for custom attributes that do not exist:
<#if (productKey.item.itemProduct.product.customAttributes.customAttribute)?has_content && (productKey.item.itemProduct.product.customAttributes.customAttribute)??> ${(customAttributeValue("NewCustomAttribute", productKey.item.itemProduct.product.customAttributes.customAttribute))!} </#if>
In the preceding example, the placeholder "NewCustomAttribute" is the custom attribute name of a product which is verified. You can verify the name of any custom attribute entity such as, entitlement, product, or product key.
Adding Conditional Constructs
You can use the if else conditional constructs to specify conditions for Sentinel EMS. Following is the syntax that is used to specify the if conditions:
<#if condition> ... <#else> ... </#if>
You can also use the elseif construct with the if condition. The syntax for using elseif within the if condition is:
<#if condition> ... <#elseif> ... <#elseif> ... </#if>
The elseif and the else constructs are optional.
In the following example of conditions in Sentinel EMS email templates, the if condition is used to display the text "No Expiration Date" if the entitlement end date is set as "Never Expires". The else construct displays the entitlement expiration date if the condition specified is false.
<#if (data.entitlement.expiry.neverExpires)!false>
No Expiration Date
<#else>
${(data.entitlement.expiry.endDate)!}
</#if>
Working with Lists
You can also list a sequence in email templates. The following syntax is used for listing a sequence:
<#list Sequence as Item>
Part repeated for each Item
</#list>
The terms used in the preceding syntax are explained as follows:
>Sequence: Sequence or collection of the items that you want to iterate through
>Item: Name of the loop variable (not an expression)
In the following example, data.entitlement.productKeys.productKey is the sequence, where the list condition is used to display all product names and versions in an entitlement.
<#list (data.entitlement.productKeys.productKey)! as productKey>
${(productKey.item.itemProduct.product .nameVersion.name)!}
${(productKey.item.itemProduct.product .nameVersion.version)!}
</#list>
