Cora Knowledge Center

Support

Create a Message Template

V8.6 or earlier

Overview

The message template is an HTML-based message that enables you to create reusable, dynamic messages. The template can include free text, HTML content, as well as message parameters. You select a message template and define the parameter values in the Message Activity wizard or the Task Activity wizard. The 

Message Template Table

You manage all message templates from the Message Template table. Navigate to Administration > Global Settings > Message Templates.

Default Message Template

There is an out-of-the-box default message template that you can use, or you can copy the default template to use as the basis for a new message template.

Message Template parameters

Message parameters are enclosed in double curly brackets, which are also highlighted in yellow. You select parameters from the right panel. 

Use a Message Template in the Message Activity or Task Activity

To use a message template in the Message Activity or Task Activity, you need to select an HTML message format, either Html or Html (Markup only).

Following are message settings that affect the message template selection.

Message Tab

Where you define the Subject, Body, Message Template, and message format.

Recipients Tab

The users you define as recipients are plugged in to the corresponding @recipient parameter in the message template.

Properties Tab


Important Notes

HTML Encoding for Expressions

You can encode or unencode HTML content (such as form data, HTML forms, HTML controls, rich text editors) for expressions in the body section of a Message Activity or Task Activity.

To unencode the HTML content, you need to wrap the expression inside {{= }}, which evaluates the expression in HTML format. For example, {{: {Form1}.Query("Form1")["Editor1"] }}

To encode the HTML content, you need to wrap the expression in {{: }}. For example, {{= {Form1}.Query("Form1")["Editor1"] }}.

Include HTML Content in the Message Template

Some characters used in expressions are also used in HTML. In order to maintain HTML content in a message, meaning that it is not evaluated as an expression, you need to wrap the content in {{#text}} {{#endtext}}.

Use Encoded Attributes in HTML Tags

You can use an expression as an encoded attribute within an HTML tag.  To use an expression as an encoded attribute, you need to wrap the expression in {{:: }}. For example, <a href="{{:: @actionUrl}}" >.

V8.7 and later

Overview

The message template is an HTML-based message that enables you to create reusable, dynamic messages. The template can include free text, HTML content, as well as message parameters. You select a message template and define the parameter values in the Message Activity wizard or the Task Activity wizard.  

Manage message templates

You manage message templates from the Message Templates page, at Administration > Global Settings > Message Templates.

Default Message Template

There is an out-of-the-box message template in each language supported by the system. You cannot delete the default template, but you can edit it according to your needs, or copy it to use it as a basis for new templates. 

Create a message template

  1. To create a new message template, go to Administration > Global Settings > Message Templates, and select Add New Record.
  2. Define the following settings:
  • Name: Enter a significant name for the message template. This is the name that displays in the list of available templates in the Message activity or Task activity wizard.   
  • Culture: List of languages supported by Cora SeQuence. Select the relevant language for the template that you are creating. 
  • Template
    • Add the HTML code for your template. You can copy the provided default template and edit it for your needs.
    • Select parameters from the right panel. Message parameters are enclosed within double curly brackets, which are also highlighted in yellow.

The message templates that you create are available in the App Studio when you set up a Message activity or Task activity.

Set up Message or Task activities with the relevant message template 

  1. On the Message tab, select the message template that is most relevant for the activity. The message template will define the look and feel of the sent message.
    Note that if you select the Plain Text format, your message loses the design definitions of the message template.
  2. The values you define as recipients are plugged in to the corresponding@recipientparameter in the message template.

Recipient selection determines the language used for the selected message template, as follows:

  • For Group, Group Expression, User, User Expression, Process Role, Employee Role:
    • First the system looks for the language defined for the recipient.
    • If it does not find a definition, it looks for the default English (United States) template.
    • If it doesn't find it, it uses the template defined for the first language in the Culture list.
  • For External User, the system uses the default English (United States) template. 

3. On the More Options tab, select a localization mode:

  • Default: system uses the message template that matches the system’s default culture (language).
  • Inherited: system uses the language defined for the workflow. 
  • Recipient: system uses the culture of the message's recipient. This is the recommended option if you want to match the message template with the language defined to each recipient. 

Notes

HTML encoding for expressions

You can encode or unencode HTML content (such as form data, HTML forms, HTML controls, rich text editors) for expressions in the body section of a Message Activity or Task Activity.

  • To unencode the HTML content, you need to wrap the expression inside{{= }}, which evaluates the expression in HTML format.
    For example, {{: {Form1}.Query("Form1")["Editor1"] }}
  • To encode the HTML content, you need to wrap the expression in{{: }}.
    For example, {{= {Form1}.Query("Form1")["Editor1"] }}.

Include HTML content in the Message Template

Some characters used in expressions are also used in HTML. To ensure that the HTML content is not evaluated as an expression, you need to wrap the content in{{#text}} {{#endtext}}.

Use encoded attributes in HTML tags

You can use an expression as an encoded attribute within an HTML tag.  To use an expression as an encoded attribute, you need to wrap the expression in {{:: }}.
For example, <a href="{{:: @actionUrl}}" >.