Completing tasks via Email

<< Click to Display Table of Contents >>

Navigation:  Low-code Process Automation > Studio Cloud - Authoring environment > Bizagi Studio > Process wizard > Define Forms >

Completing tasks via Email

Overview

Bizagi makes it easy to configure manual tasks to be completed by the allocated user via email—a feature referred to as Email integration.

 

note_pin

You can configure your email server's authentication through the Management Console. This setup enables the sending of automated notifications triggered by Bizagi Studio processes. For detailed instructions, see Email Configuration.

 

Changes made to the email server authentication are automatically reflected in both Bizagi Studio and the Management Console for Development environments. For Test or Production environments, a deployment is required to synchronize these changes between Bizagi Studio and the Management Console.

 

When Email Integration is enabled for a specific Task, the allocated user will receive an email. By clicking one of the buttons included in the email and optionally adding comments, the user can determine the next step in the workflow. These buttons typically enable the user to approve or reject a request, guiding the case through its defined path in Bizagi.

 

Emailintegration7

 

How does Email integration work with Bizagi?

With Email integration, Tasks can be completed directly from the user’s email, eliminating the need to access the Work Portal for that specific Task. Bizagi provides this feature by default (see Mailbox integration to complete Tasks via email for details).

 

To set it up, you need to configure how Bizagi processes "Approve" or "Reject" responses, which are triggered when the user clicks one of the email options.

 

note_pin

Bizagi verifies that the response was sent from the allocated user’s email address.

Once validated, Bizagi processes the response, updates the Task with any comments, and moves the workflow to the next step according to the decision.

 

The following diagram outlines the Email integration process and the protocols involved:

 

Email_integration

 

1.SMTP Notification: A Bizagi process sends an email notification, allowing the Task to be completed via email.

2.New Email: The allocated user receives the email (retrieved by their email client). They click one of the options in the email, selecting the next step in the process.

3.Approve/Reject response: The user's response is sent to a dedicated mailbox configured for Bizagi.

4.Response processing: Bizagi monitors incoming messages in the mailbox via Exchange connections. It retrieves and processes the response, storing comments and advancing the workflow.

 

When should I use this feature?

It is essential to carefully select Tasks that are well-suited for Email integration. This feature is not ideal for all Tasks, and its use should align with the following criteria:

Manual Tasks: Tasks requiring user intervention are eligible.

Decision-Making Tasks: These Tasks should offer distinct choices that determine the next step in the workflow. They are typically followed by a gateway evaluating the user's decision, and the Task must use the Form Buttons feature.

Minimal interaction required: Tasks should involve simple decisions like Approve or Reject without requiring complex validations or behaviors. The email will only include essential information and decision options as defined in the task template.

 

note_pin

The email WILL NOT include any Controls designed for the Task's user interface. It is strictly an email, not a replacement for the full user interface.

 

Limited user input: Tasks should not require extensive input, such as file attachments or table entries. Through the Email execution feature, users can add general comments, which Bizagi stores in a predefined attribute within the data model.

Single user assignation: Tasks must be assigned to a specific user. If a Task can be performed by any user (e.g., with the Everyone configuration for Performers), no email notifications will be sent.

 

What you need to do in Bizagi

Once prerequisites are met, you can enable the Email integration feature for specific Tasks by following these steps:

 

1. Define or prepare the Tasks for Email integration

Recall that not all Tasks are immediately eligible for Email integration. Carefully evaluate which tasks are suitable candidates and ensure they meet the required configurations.

 

2. Enable Email integration for the Task

Activate the Email integration feature for the specific Task.

 

3. Define the Email template for the Task

Configure the subject and body of the email notification to include relevant information for the user.

 

4. Configure additional parameters for responses

Set parameters for handling user responses such as where to store comments, treatment for failed responses, etc.

 

Example

To illustrate the required configuration, we will use a Vacation Request process as an example.

In such process, the requester's boss or overseer must make a decision regarding if the vacation leave request is approved, rejected, or if additional information and changes are needed.

As the requester submits their request, that requester's boss is allocated with the following task (called Approve Vacation Leave request), where the decision is made.

 

Emailintegration_process

 

Considering this example's process, three different paths are enabled. This means that the e-mail sent to the requester's boss should present three buttons:

Approve, allowing the workflow to continue with the Send Approval Message Task.

Reject, allowing the workflow to continue with the Send Rejection Message Task.

Request changes, allowing the workflow to go back to the Register Vacation leave request Task.

 

To enable Email integration for this example, follow the guided steps.

 

1. Define or prepare the Tasks for Email integration

Recall that not all tasks are immediately available for this feature, since you will need to consider which ones are good candidates and have the required configuration.

 

Note that within a Task's form, the Email configuration option will be enabled while having an active Form Buttons configuration:

 

Emailintegration1

 

If your form does not already use Form Buttons, then you may configure them.

To do so, make sure you include one button for each of the possibilities, and use a Next-action configuration for each button.

 

For instance, for the Approve button, we will use a Rule that sets the Approved state to "Approved" (code AP), and executes a Next action in Bizagi that completes the Task.

 

Emailintegration4

 

note_pin

The expression for this rule, for example as needed in the Vacation Leave request process available at the Process Xchange is:

var parameters = new FilterParameters();

parameter.AddParameter("@Code", "AP");

Code = CHelper.getEntityAttrib("RequestState","idRequestState","Code = @Code", parameters);

<VacationRequest.VacationLeaveState> = Code;

 

Similarly, the Reject button will use a Next-action as well though its rule would be slightly different to consider a Rejection reason:

 

Emailintegration5

 

Finally, the Request Changes button is set similarly as the Approve button:

 

Emailintegration6

 

note_pin

The expression for this rule, for example as needed in the Vacation Leave request process available at the Process Xchange is:

var parameters = new FilterParameters();

parameter.AddParameter("@Code", "RC");

Code = CHelper.getEntityAttrib("RequestState","idRequestState","Code = @Code", parameters);

<VacationRequest.VacationLeaveState> = Code;

 

2. Enable Email integration for the Task

Allow the use of Email integration to activate the feature for the specific Task (if deactivated, Bizagi will not send emails for that specific Task).

To do so, click the Email configuration option and check the first property called Enable email execution:

 

Emailintegration2

 

3. Define the Email template for the Task

Explicitly define the subject and body of the email notification, and any relevant fields which are informative for the user making the decision.

To do so, click Edit message to define the Email template.

 

Emailintegration3

 

Do not mind the options presented to the user. Bizagi includes by default the options set on the Form Buttons.

This means that if you choose not to configure an Email template, an email will be sent presenting only in its body the different options.

 

4. Configure additional parameters for responses

Check the check boxes to notify the user if their email's response was successfully processed, or if there were any problems.

Enable the Receive success notification or Receive failure notification accordingly, to be notified about its particular execution.

 

Additionally, define where comments entered by the user will be stored in the data model.

When done, click Save to close the configuration window.

 

Execution

To illustrate how our example works in runtime, assume that a user called Henry Jacobs submits a Vacation request.

His boss, John Peterson will then receive this email:

 

Emailintegration7

 

All John Peterson will do is click any of the options available: Approve, Reject or Request changes.

When doing so, a new email is sent back.

 

Note that the same email above corresponds to the appointed task that John Peterson may locate at the Work Portal as well:

 

Emailintegration8

 

The email sent back will use the appropriate subject to be handled by Bizagi (the choice inside brackets followed by the name of the Activity), along with additional information that should not be modified (the recipient having the account as used by Bizagi).

The user may input additional comments at the beginning of the email:
 

Emailintegration_response

 

Considerations

Recall that Tasks enabled to be completed via email, will still be also available to be completed through the Work Portal.

This means that if Bizagi receives a response via email, then the Task will no longer be available in the Work Portal, and similarly, whenever the user completes a Task through the Work Portal, then any emails already sent will no longer be valid (such email replies will log an error).

If Connection parameters are changed in the Production environment, active Tasks cannot be completed via Email integration. This is because those existing Tasks will try to connect to the prior configuration, which will no longer be valid.

Whenever fields within the Form are required to be filled-in, it is strongly recommend to rely on Rules (as available in the Button's configuration) in order to automatically set those values to these fields.

Note that responses are processed by the Scheduler service in Bizagi.

This feature has been verified with Outlook 365 and Outlook 2013, as well as with Gmail and Yahoo. Other providers or versions have not been officially certified, as well as the use of web clients such as Owa (which is not supported).

For this feature's adequate working, make sure both that the ports that you use for the mailbox have adequate access rights and that this mailbox is not the same one as the one assigned for the user when completing a task via email.

You may not use a same mailbox in for multiple Bizagi projects nor for multiple Bizagi environments of a same project.

The emails sent through this feature use HTML format. If the recipients use plain text format, the Form Buttons are displayed as a link which may make it difficult to recognize them.


Last Updated 11/25/2024 2:10:41 PM