Approval templates
You can build approval templates in both plain text and HTML to use them in a workflow or approval cycle.
- Open tab.
- Select Add Template.
- Enter a name for the template.
- Select a language.
- Enter a subject. The subject can contain dynamic content.
- Select Save.
- Select the template.
- Select Edit.
- Enter or edit the email body. The email body can use dynamic content.
- Select HTML if you want to use HTML syntax.
- Select Save.
Dynamic content
Dynamic content is content that will be substituted during processing. The content is derived from information found in the workable, notes, approvals...
Dynamic content in email templates needs to start with ${
and end with
}
(for example: ${variable.var1}
). During processing, the
system will look for the information and replace the content between ${
and
}
.
You can use different data types of dynamic content:
Variables
Keyword: variable
This data type will insert the value of a specified variable into the text. To select the
actual variable you need to use a dot notation. For example,
variable.var1
will select the variable
var1.
You can also use sub elements of a variable. For example, if your variable
object is {'element1': 'value1', 'element2': 'value2'}, you can
select the first element by using variable.object.element1
.
- If the selected variable is a simple string or value, the resulting value will also be a simple string or value.
- If the selected variable is an array or object, the complete object will first be stringified as a JSON object and then inserted.
Examples
${variable.var1}
${variable.var1.subvar}
A warning will be generated if the selected variable cannot be found in the workable.
- PreEncoded: in case you want to allow to insert data directly into the HTML stream
and you want to make sure that the inserted data is correct HTML, you can use the
PreEncoded option:
${variable.var1 PreEncoded}
- IsPreflightData: output from the PACKZ Analyze node and from the PitStop
Preflight node generate a well structured JSON variable. The IsPreflightData
option allows you to include that data in an email and the results will be formatted into a
table:
${variable.var1 IsPreflightData}
Workable Messages
Keyword: workable_messages
This data type will insert the messages that were generated during processing of a workable in the text.
- In case of a plain text email, the messages will be generated as a list of entries.
- In case of an HTML email, the messages will be placed in a table consisting of three columns.
Example
${workable_messages}
An empty string will be generated if there are no messages in the workable.
Approval Overview
Keyword: approval_overview
This data type will insert an overview of the approval in the text. It will add the approval name and the assessment for each participant and/or sub-approval.
- In case of a plain text email, the overview will be generated as a sequence of the name and assessment, and then a list of participants and assessments.
- In case of an HTML email, the overview will be generated as a sequence of the name and assessment, and then either a table with the participants, or a table with sub approvals, with a nested table for the participants examples.
Example
${approval_overview}
Notes Overview
Keyword: notes_overview
This data type will insert the notes into the text. It will add the user and the content of each comment.
- In case of a plain text email, the overview will generated as a list of users and comments.
- In case of an HTML email, the overview will be generated as a table with the users and comments.
Example
${notes_overview}