Email Templates

>What Are Email Templates?

>Actions for Email Templates

>Editing Email Templates

>Adding Dynamic Content to Email Templates

New to Sentinel EMS?
See How to Use 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 selecting Configuration > Email Templates and/or using 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:

Name Description

API Calls for Templates

(JSON data objects and API calls to retrieve the data objects)

Config Object Attributes

Sentinel LDK Machine Account Certificate

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.

 
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.

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

 
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.

Reprint License Certificate_<Language>.emst 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).

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.


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

 

Revocation Recredited - Confirmation for Vendor_<Language>.emst

(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.
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)

 
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.

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

>Guide to the Sentinel EMS Customer Portal

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

Password Reset Email template for notifying a user to reset the password.

>data.password (static reference)

 

Actions for Email Templates

The following table lists the actions available for email templates:

Action Description
New button 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 button 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 button Download

Downloads the email template.

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 given below:

Tools Description
Table Inserts a table based on the cell selection from the table grid.
  Table Properties

Displays and allows you to update the following table properties:

General

>Width: The table width.

>Height: The table height.

>Cell Spacing: The distance between two cells.

>Cell Padding: The space between the text and the border of the cell.

>Border Width: The width of the table border.

>Show Caption: Specifies whether to display the table caption.

>Alignment: The alignment of the table as Left, Center, Right, or None.

Advanced

>Border Style: The border style as Solid, Dotted, Dashed, Double, Groove, Ridge, Inset, Outset, None, or Hidden.

>Border Color: The border color of the table.

>Background Color: The background color of the table.

Delete Table Deletes the selected table.
Cell > Cell Properties

Displays and allows you to update the following cell properties:

General

>Width: The cell width.

>Height:The cell height.

>Cell Type: The type of cell as Cell or Header Cell.

>Scope: The scope of elements to which the properties will be applied. The scope can be specified as Row, Column, Row Group, Column Group, or None.

>Horizontal Alignment: The horizontal alignment of the text within the cell as Left, Center, Right, or None.

>Vertical Alignment: The vertical alignment of the text within the cell as Left, Center, Right, or None.

 

Advanced

>Border Style: The border style of the cell as Solid, Dotted, Dashed, Double, Groove, Ridge, Inset, Outset, None, or Hidden.

>Border Color: The border color of the cell.

>Background Color: The background color of the cell.

Cell > Merge Merges the selected cells to one cell.
Cell > Split Splits a single cell into two cells.
Row > Insert Row (Above) Inserts new rows above the selected rows. The number of rows inserted is the same as the number of rows selected.
Row > Insert Row (Below) Inserts new rows below the selected rows. The number of rows inserted is the same as the number of rows selected.
Row > Delete Row Deletes the selected rows.
Row > Row Properties

Displays and allows you to update the following row properties:

General

>Row Type: The type of row as Header, Body, or Footer.

>Alignment: The alignment of the text within the row as Left, Center, Right, or None.

>Height: The height of the row.

 

Advanced

>Border Style: The border style of the row as Solid, Dotted, Dashed, Double, Groove, Ridge, Inset, Outset, None, or Hidden.

>Border Color: The border color of the row.

>Background Color: The background color of the row.

  Row > Cut Cuts the selected row and places it in the clipboard.

 

Row > Copy Copies the selected row and places it in the clipboard.
  Row > Paste (Above) Pastes the content of the clipboard above the selected row.
  Row > Paste (Below) Pastes the content of the clipboard below the selected row.
Column > Insert Column (Left) Inserts new columns to the left of the selected columns. The number of columns inserted is the same as the number of columns selected.
Column > Insert Column (Right) Inserts new columns to the right of the selected columns. The number of columns inserted is the same as the number of columns selected.
Column > Delete Column Deletes the selected column.
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 are 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 place holders, 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.

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)!}


The JSON response of the Sentinel EMS REST APIs is stored in the data object. With the knowledge of Sentinel EMS Rest API JSON response structures, the data object can be referenced to create place holders in the email template. For example:

${(data.entitlement.eid)!} 

In the example above the placeholder will display the value of the entitlement ID in an entitlement.

All Sentinel EMS configuration related information is available in the config object. The config object can be referenced to create place holders in the email template. For example:

${(config.supportEmailId)!} 

In the example above the placeholder will display the technical support email from the Administration Console. For more information on the config object, see Config Object Attributes.

You can also evaluate the value of a custom attribute by name. For example:

${(attributeValue("ATTRIBUTE_NAME", data.entitlement.customAttributes.customAttribute))!}

In the example above the placeholder will display the custom attribute name of entitlement using the JSON response stored in data object.

An example of inserting product custom attribute is given below:

${(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("NewCust", 
productKey.item.itemProduct.product.customAttributes.customAttribute))!} </#if>

In the example above the placeholder "NewCust" 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

The if else conditional constructs can be used 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 syntax above are explained below:

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