Tracking the progress of business processes with Process Management is one of Kintone's strongest features. To add on to that, it would help even more to be able to see how long certain stages of a business process are taking so that bottlenecks can be fixed and to optimize overall process time from start to finish. This customization introduces how to track the amount of time taken between process management statuses to visualize which sections are taking the longest or shortest and assist with business optimization and decision making.
The below image shows a table with Status Name, Status Datetime, and Status Days. The current status is "Collect provider responses and summarize".
Clicking the "Provider Responses Summarized" action shows the confirmation for proceeding the status to "Review provider options with client".
Clicking Confirm proceeds the status and adds a new row to the table with the new current status, the current datetime, and how many days were in between now and the last status change.
Set Up the App
In terms of App set up, this customization only requires a table to input the process management information into. Therefore, it is very easy to implement into any App that would benefit from a visualization of the process management. The field settings are as follows.
|Field Type||Field Name||Field Code||Notes|
|Text||Status Name||Status_Name||Part of Log Table table|
|Datetime||Status Datetime||Status_Datetime||Part of Log Table table|
|Number||Status Days||Status_Days||Part of Log Table table|
The completed table should look like the following.
The uploaded files should look as follows within the App. Make sure that the Luxon link is positioned above the customization file.
This section will explain the sample code.
The defaultRow variable specifies a blank row in the process management table. This variable is used in the functions declared afterward.
The handleAddProcessLog function retrieves the next status and calculates the time in days that it took to get from the previous status to the current status. The information is then added as a new row to the table.
The resetTableRow function is used in the case that a record is reused that already has process management information in the table. It will reset the table information using the defaultRow variable information.
The handleInitialLog function is used to input the initial row in the process management table containing the Not started status when the record is initially created.
Finally, the applicable Kintone events are declared and each function is assigned to the Kintone events they should be executed at. In this case, handleAddProcessLog is executed when the process management is proceeded. resetTableRow is executed at the create record and edit record events. Finally, handleInitialLog is executed when a new record is created.
This customization can be further improved by making the process management table uneditable through the GUI. An example of the uneditable table is shown below.
The edited code is shown below.
The main change to the code is the addition of the disableTableEdits function. This function goes through each row in the table and sets the disabled property of each field to true.
The other change is in the events declarations. disableTableEdits is added to the three events that resetTableRow is executed at, and the event is returned within the event declaration instead of within each individual function.
Customizations can build upon native Kintone features to create a solution that is specific to the company. In this case, the created process management logging solution can help with analysis of bottlenecks and improve efficiency. When a problem in a business process arises, it may be worthwhile to see if a Kintone customization would help solve or recognize the problem.