E-mails and templates in WEBCON BPS

Facebooktwitterpinterestlinkedinmail
Applies to version: 2020.1.x and above; author: Marcin Pisarek

 

Introduction

Standard e-mail

Global email template

Workflow configuration

E-mail template configuration

Configuration of the “Send a custom e-mail” action

Example


Introduction

WEBCON BPS allows you to send customized e-mails to users. E-mail messages are currently an important method of communication, and the use of electronic mail accompanies us both at work and in private contacts. Very often it facilitates problem solving and speeds up decision making.

There are several actions in WEBCON BPS used to send e-mail notifications:

  • Send a standard e-mail – a standard e-mail, a notification is defined as an action or on a given path, without the ability of individual configuration
  • Send a custom e-mail – an action allows to define recipients, CC recipients, template, content or add the attachments from the workflow instance

E-mail templates allow you to define the appearance of the e-mail sent in WEBCON BPS, both when sending standard notification and configurable messages.

The following article describes the standard e-mail notifications along with the global template and the way of defining the configurable notifications and templates within the process.

Standard e-mail

When creating a task on the transition path, you can set it to send an e-mail to users to whom the task or CC task will be assigned. Such messages do not provide the additional configuration and their content is determined based on the template. To activate the standard notification, go to the configuration of the selected path and then, select the “Create a task” tab.

Fig. 1. The “Send a standard e-mail” action

 

There are two options to enable the standard notification:

  • Send standard e-mail – selecting this option allows you to send e-mail to the users with the assigned task
  • Send standard email to CC users – selecting this option allows you to send e-mail to the users with the CC assigned task

By default, the standard e-mail uses the global e-mail template and can be presented in the following way:

Fig. 2. An example of standard e-mail notification

 

The notification contains information about the current form field values visible on the instance, a link to the workflow instance and a link to the application/portal. The content of such an e-mail can be customized by modifying the global e-mail template or the template defined within the process (information about the template defined to the process is included later in the article).

Global email template

The global e-mail template is defined in the system settings and is used by default in all notifications if the dedicated e-mail template is not created. To configure this option, go to the “System settings” and then, from the drop-down “E-mail notifications” menu select the “Global e-mail template” option.

Fig. 3. The global e-mail template option

 

You can customize the subject of the e-mail, title, content of the header, fragment/content of the message and visibility of the individual areas. Fields in the template that determine the visibility of the elements:

 

Fig. 4. Elements visible in the e-mail

 

  1. Site link – a field defining whether a link to WEBCON BPS website will be inserted in the template. The link is put in place of the „[|WebAddress|]” value.
  2. System fields – a field defining whether system fields will be inserted in the template (instance ID, author, create date). The fields are put in place of the „[|SystemFields|]” value.
  3. Instance link – a field defining whether a link to the workflow instance to which the message applies will be inserted in the template. The link is put in place of the „[|ElementAddress|]” value.
  4. Recipients list – a field defining whether the template contain a list of original e-mail recipients. The list of recipients is put in place of the „[|Recipients|]”value.
  5. Fields list – a field defining whether the template form fields will be inserted in the template. The list of form fields is put in place of the „[|SystemFields|]” value.
  6. Task details – a field defining whether the template will include information about the task details. Information is put in place of the „[|TaskDetails|]” value.

The e-mail content and arrangement of elements can be customized by using the “Message content” tab.

Fig. 5. The global e-mail template – message content

 

Two tabs are used to edit the content:

  • Editor – editing in the WYSIWYG mode
  • HTML – editing the HTML code

The “Message content” tab allows you to use the variable editor during editing, which is available in the right panel of this window. Thanks to this, in the HTML editing mode you can e.g. customize the business rules or embed images.

Fig. 6. The content edition – using the business rules

 

Another tab allows you to preview the message. In this example, the “Image code” rule returns the entire HTML tag along with the image code on the base64 format:

Fig. 7. The message preview

 

You can also change the settings of notifications and templates within the given process which was described in the next parts of this article.

The workflow configuration

A simple “Press release review” workflow was created used to efficiently oversee the creation and publication of various text documents.

Fig. 8. The configuration of the “Press Release Review” workflow

 

The e-mail template configuration

The dedicated e-mail template and e-mail sending action will be created for this process. To add a new template within the process, go to the selected process and from the drop-down “Configuration” menu select the “E-mail notifications” option.

Fig. 9. E-mail templates in the process

 

On the card the “Standard e-mail settings” option is available in which you can select one of the defined global templates and change the subject or content of the message.

To create a new template in the process, click the “New template” icon – the configuration is similar to the configuration of the global template (described in the “Global e-mail template” chapter).

Fig. 10. The configuration of the e-mail template within the process

 

As a part of the new template, two tabs are available:

  • General – allows you to change the message content
  • Advanced – allows you to overwrite the global e-mail template

We prepare a basic “Task assign” template where in the “Part of MessageBody” text information about task assignment was added. The created template was used in the configuration of the “Send a custom e-mail” action.

Configuration of the “Send a custom e-mail” action

The e-mail notifications can be defined on the step as actions of the following types:

  • On path
  • On entry
  • On exit
  • On timeout
  • Upon instance deleting
  • Upon instance saving
  • On browser opening
  • Menu button

The “Send a custom e-mail” action can be assigned as a workflow global action:

  • Upon instance deleting
  • Upon instance saving
  • On browser opening
  • Menu button

The configuration also allows you to modify the e-mail notification content.

We configured the action at the “Assigning” step on the “Assign” transition path. In the first “Recipients” tab the recipients are selected to whom e-mails should be sent.

Fig. 11. The configuration of the “Send a custom e-mail” action

 

In the “Message content” tab you can select the defined template and also, overwrite the notification elements. There is also an option to modify the instances in the “Instance visibility” section which should be founded in the notification.

Fig. 12. The configuration of the “Send a custom e-mail” action – the message content

 

An example

On the form the basic data about the release details are completed.

Fig. 13. The form – calling the “Send a custom e-mail” action on the “Assign” transition path

 

According to the configuration described in the previous chapters, the e-mail is sent on the “Assign” transition path to the selected person from the “Author” field. To do this, after completing all the required data, assign the task by using the transition path.

The following notification has been sent:

Fig. 14. An example of the configured e-mail notification

 

The action of sending e-mails allows you to modify the notifications, both within the entire system and individually within a given process. More information about the practical use of notifications was described in the article -> E-mail and templates in WEBCON BPS.

Leave a Reply

Your email address will not be published. Required fields are marked *