2 minute read BPS Version: 2021.1.2.101

Overview

In this post I will explain an option how to create a reusable feedback button. A click on the button will open a prepopulated mail.

Clicking the feedback button opens the default mail program and prepopulates the mail.
Clicking the feedback button opens the default mail program and prepopulates the mail.

Providing information for the user

There are quite a lot of options to provide information to the user. These can be

  • tooltips for fields
  • step description
  • task description
  • tooltips for paths
  • linked documentation

Explanations can be found in these knowledge base posts:

Regardless how useful provided information are, there will be cases when the user will have questions or encountered an error. So, we should make it easy for him to contact the correct person. In addition, we should make it easy for us and provide all information which we need to help him. I can’t count the times were the feedback/support mails I received didn’t contain the basic information like user, time and URL.

Adding the feedback mail button

The feedback mail button is added as a menu button on the Global actions tab, so that it is available in all steps. It uses a default icon: /_layouts/15/images/webcon/attrSendEmail.png

Feedback button uses a default icon.
Feedback button uses a default icon.

Info: Since there aren’t any other which requires the workflow to be saved, the button is available in view and edit mode.

Info: The visibility of the icon depends on the selected theme.

The button itself executes a hyperlink action. We could create here a mailto link but instead of doing this in a lot of places, we will create a global business rule instead.

Hyperlink action definition.
Hyperlink action definition.

Creating the business rule

The referenced business rule returns an URI using the mailto: protocol.

Info: Information regarding the mailto protocol can be found here

The first part of the SQL command retrieves the recipient of the mail. The rule looks for the supervisor of the current process (1). If this doesn’t exist, or doesn’t have a mail address, it checks whether a custom application supervisor has been defined (2). If this isn’t the case either it takes the application supervisor (3). If this one doesn’t have a mail address, Undefined (4) is returned as the final fall back.

First part of the feedback mail business rule.
First part of the feedback mail business rule.

The remaining part of the business rule populates the subject and body of the mail. Some hints:

  • Line breaks are represented by %0D
  • The Instance link uses a custom constant in which the BPS Portal URL is stored
  • Database ID is a new system field in WEBCON BPS 2021. If you have an older version, you have to create constant which stores the value.
Second part of the feedback mail business rule
Second part of the feedback mail business rule

Download of business rule definition

The business rule can be downloaded from here. It’s a global business rule, which uses mostly global variables and not process variables at all. Therefore, it should be usable in every environment.

Remark: Remember to change the BPS Portal URL constant and the database Id, if you have an older WEBCON BPS version.

Enhancements

This is the simplest version of gathering and streamlining feedback. Slightly more advanced scenarios are to send the mail to a watched mailbox which starts a ticketing workflow or to start a ‘ticketing’ process directly. You could still use the script to gather the details and populate some fields of the ticking process. The biggest difference here is, that the user needs to have a license to start the ticketing process, which isn’t the case when he only sends a mail.

Comments