Representing hierarchy using Databases
Flokzu Databases can be used in many ways: to store valuable information shared by multiple processes (table of products, vendors, etc.), to create your own CRM, to avoid entering repeated information manually (such as list of countries, cities, districts, etc.), and more.
Databases can even be used to represent organizational hierarchy and automate things like assigning a task or sending an email to your boss. These use cases are the focus of this post.
This example will use a database called ‘Hierarchy’ with the following schema:
The idea behind it is to use the database to save the relationship between employees and supervisors.
Example 1: Sending an email to the supervisor
Setting up the Service Task
The Service Task should be set up as follows:
ApiKey should be replaced with the Api Key generated for your organization.
database should be replaced with the exact same name of the database, including uppercase, lowercase and special characters. In our case it’s Hierarchy.
Input: Parameter names should always be paramName and paramValue.
The value of paramName should be the name of your database column where the employee’s email is stored (in our case it’s userEmail).
The value of paramValue is the email that you want to use. It can be the Previous Task Participant, the Process Initiator (only works if it’s not via Public Form) or even an email stored in one of your fields.
Output should be set up as follows:
Parameter name is the name of the column you want to use in your database (in our case bossEmail) and Field is the Email field.
Example 2: Assigning a task to the supervisor
In this case, the supervisor should be a valid user within Flokzu.
Include the task that the supervisor should complete in your workflow and as assignee select the special user [Web Service]. This means that the task assignation will be done dynamically via REST Web Service.
Click the link that reads ‘Set up your Web Service here…‘ and use the configuration described before. The only difference is that in this case the Output should be set up like this:
Databases have a lot of potential and can help you automate your work even more. If a user doesn’t know how to complete a task, he could have a decision that assigns it directly to his supervisor. Or if someone takes too long to complete a task, an automated (and customized) email could be sent to the boss.
The use cases of this feature are endless. It’s just a matter of figuring out what’s the best way to put it in use for your organization.
If you want to discuss your particular use case or get help to set it up, contact us at email@example.com.