Business process setup guide (BPMS)
PDF
This documentation is valid for Creatio version 7.13.0. We recommend using the newest version of Creatio documentation.

How to set up custom email templates for approval notifications

Use the [Approval] process element to set up custom logic for approving various bpm’online records (documents, invoices, orders, etc.) by bpm’online users. Both the approver and the user who submits the record for approval will receive email notifications about the approval procedure.

You can set up custom email templates for these notifications. Note that approval notification emails do not require additional [Send email] elements, and are configured in the [Approval] process element.

Example

During a document approval process (Fig. 1), the approver must receive an email notification, containing document type, number and the name of the user who submitted the document for approval. The user who submitted the document for approval, must receive a notification about the approval result.

The instructions below assume that you have enabled approvals in the [Documents] section, added the [Approval] element on the process diagram (Fig. 1) and set up its properties (Fig. 4). More information about the approval process setup is available in a separate article.

Fig. 1 A business process for approving documents

chapter_process_creation_designer_document_approvement00060.png 

Fig. 2 The [Approval] element parameters

chapter_process_creation_designer_visa_settings00061.png 

To set up approval email notification templates:

1.Populate the fields of the [Approval] element setup area. If the [Approval section] field is populated, available email templates for approval notification will be filtered according to the selected section.

Note

More information about setting up the [Approval] element as part of an approval process is available in a separate article.

2.Select the [Notify that approval is required] checkbox. As a result, whenever a record is submitted for approval, a notification will be sent to the “approver” user. If “Role” is selected in the [Approver] field, the notification will be sent to all users with the corresponding role.

3.In the [Email template] field, click btn_com_add_tab00062.png (Fig. 3). A new email template window will open on a new tab.

Fig. 3 Opening the email template of an approval notification

chapter_bpmn_approval_email_add_template.png 

4.In the new template window, populate the [Template name] field. Note that if you populated the [Approval section] field earlier, the [Macro source] field will be already populated with the corresponding approval object (in this case – the “Approvals in section Document” object, (Fig. 4).

Fig. 4 Approval notification template settings

chapter_bpmn_approval_email_template_setup.png 

5.Click the [Edit] button. The template will open in the content designer.

Note

Basic instructions on working with the content designer are available in a separate article.

6.Enter the email subject.

7.Drag&drop a content block (e.g., [Text]) to the template. Replace the text in the [Text] block with your own.

8.Add regular email template macros:

a.Place your cursor in the text block, click btn_email_temlate_macro.png and choose [Basic macro] (Fig. 5). The [Macros selection] window opens.

Fig. 5 Accessing the macros in the content designer

chapter_bpmn_approval_email_add_macro.png 

Note

For users of bpm’online version 7.13.2 and below, the command names are different. The command for selecting standard macros is called [Select macros], and the [Select column] command is used to create a custom macro.

b.In the [Macros selection] window, choose the needed macro and click [Select]. The available macros are divided into several groups.

You can specify data of the email recipient contact ([Recipient] group), information of the user who runs the approval process ([Current user] group) or the owner of the record being approved ([Owner] group). For example, to add the name of the user who submitted the document for approval, select [Current user] –› [Contact name] macro (Fig. 6).

Fig. 6 Adding a macro to the email text

chapter_bpmn_approval_email_select_macro.png 

The corresponding macro will be added to the email text at the insertion point.

9.Add email template macros that are based on the “Macro source” object.

a.Place your cursor in the text block, click btn_email_temlate_macro00063.png and choose [Select column]. The [Select column] window (Fig. 7) opens.

b.In the [Select column] window, choose the column of the object (that you specified in the [Macro source] field) whose values must be added to the notification text. The “approval” object is automatically added once you enable approvals in the section wizard and contains data from the approval itself, e.g., Approval purpose, Approver’s name, etc.

c.You can add macros for columns of any object, provided it is linked to the “approval” object, e.g., you can add columns of the document being approved. To select a column of a linked object, Click [+] next to the “approval” object name in the [Select column] window (Fig. 7). For example, to add the approved document’s type and number, add the [Type] and [Number] columns from the linked [Document] object.

Fig. 7 Selecting columns of a linked object as macros

chapter_bpmn_howto_approval_email_object.gif 

As a result, your template will look like this (Fig. 8):

Fig. 8 Example of approval notification template

chapter_bpmn_approval_email_template_result.png 

10.Save the changes in the content designer and the email template.

11.Select the [Notify about the approval result] checkbox and populate the [Recipient] field. You can specify any bpm’online contact, account or a plain email address. For example, you can send approval result notifications to the user who submitted the record for approval, record owner, etc.

12.Repeat steps 3-10 to create an approval notification email template.

13.Save the process diagram.

As a result, whenever a user submits a record for the approval using this process, email notifications will be sent according to the custom templates.

See also

Process parameters

How to configure a document approval process

[Approval] process element

Content designer

Did you find this information useful?

How can we improve it?