Applies to version 2021.1.1; author: Kinga Bożęcka
This article presents an auxiliary process for creating tags that consists of only 3 steps - registration, modification, and final step. The tags specified in it can be used in other processes, e.g., to tag individual promotions when planning a promotional campaign or to create a report where you group promotions by tags used in them. You can also search for workflow instances using tags and find them faster.
In this article, we will show you: 1) how to configure the tagging process, 2) an example of its use to tag planned promotions, and 3) the opportunities related to it.
In our example, each customer will have a separate set of tags that can be used when planning promotions. For this process, we need the following form fields:
Below there is a description of each of the form fields:
Initially, the tags that are already registered will be locked for editing. However, we cannot make the “Tag’s name” column read-only in the Field matrix because we will still need to add new tags. Therefore, the list in the Modification step should look like in figure 3 below. The first two lines have been added earlier, and because of that, they are locked. Nevertheless, the last line is being added at the moment, so it must be unlocked.
To achieve the results shown in figure 3, go to the Field matrix and set the Tag’s name to be editable. Then, restrict its editing by using Editability restriction on the form field.
To do so, set a condition for the Tag’s name form field in the Permissions tab. It is shown in the figure below in the “Column edit restrictions.” This function disables editing for the fields that already contain the tag’s name. It happens at the “Modification” step.
The promotion process should be configured adequately to the business needs, which involves creating appropriate steps, paths, and form fields. In our example, we will need to create the Client form field so that the system knows from which instance it should download the tags used in the process. The next thing we should do is configuring the tag-related form fields.
First, create the “Tag” choice field. Configure its Data source so that only active tags for that client can be selected. See how in figure 6 below.
Thus, the following tags should be available on the selection form (“Cosmetics campaign”, the first tag on the list in figure 5, is not here because it has been marked inactive):
Now, you can create a report with promotions and group them by tags.
The next thing we can do in this process is creating two links in promotions. One will link to an instance of an existing Tagging process so that you can quickly navigate to it and add new tags. The second one will be a link to create a new instance and will only be displayed if no tags have been created for the customer yet.
First, you need to create a BPS source containing the Tagging process instances, which can be found in the Archives step (Data sources -> BPS internal view tab). Select appropriate columns (one of them has to be the column Client) and save.
Then, create a new data row named “Edit tags” and set the newly created BPS source as the source. Next, you need to set the filter so that the system takes into account only the tags of the selected client.
In the advanced configuration, in the Instance number row, check the options “Show column” and “Instance hyperlink”; then, click on the 3 dots (fig. 12) and configure the instance hyperlink as in figure 13.
This creates a link to an existing instance. If the instance has not yet been created, the link will not be visible. If you need a hyperlink creating a new instance instead, add a new data row “Create tags.” As the data source, indicate the current database and fill in the SQL query as shown in figure 14:
In the advanced configuration, select Show column and Instance hyperlink and click on the 3 dots. As shown below, add the Client field from the database in the “Parameter” column and the Client form field (ID and name) in the Value column.
The last thing that needs to be done is setting the instance hyperlink visibility to hidden if there is already an existing instance, as shown in figure 16. To do this, in the Promotion process, create a business rule that will check this (in Returned value type, select Boolean).
Then, a form rule will be created that will use the business rule.
Finally, you need to add the created rule to “Form rule to be executed on page load” (fig.18) and set it to be performed on value change for the “Client” field.
In order not to have to deactivate tags manually, you can set it to happen automatically, e.g., after the promotion enters the final step. In this case, when a promotion goes to Archives, the tag used in it is set to be inactive. Let us show you how to configure it this way. The necessary technical field has already been created in the tagging process - “_tag id to deactivate.”
We will create the Move workflow (SQL) action at the entrance to the final step of the promotion and configure it as shown in figures 20 and 21. The action will find the appropriate tagging process instance and move it along the path “_deactivate” (in the Archives step). It will also pass the DET_ID of the selected tag to the technical form field “_tag id to deactivate.”
On the “_deactivate” path, set the action to change the item list's value (figure 22 below).
Now, when the promotion of a given customer goes to the final step, the tag selected in that promotion will be marked as inactive.
This article presents a convenient solution for tagging promotions with WEBCON BPS. For this purpose, two processes have been created: the tagging process and the promotion process. The first process was used as a dictionary to define tags assigned to a given customer. Then, they were used in the promotion registration process. These processes were partially automated by using actions to move workflows, technical fields, and paths.