Learning Objectives
By completing this lesson, you will be able to:
-
Select and configure appropriate workflow triggers based on different business requirements.
-
Master how to configure Custom Actions to manually trigger workflows.
-
Proficiently use key data processing nodes such as Get Single Data, Create Record, and Update Record to build complete business workflows.
-
Understand and master the use of approval processes, including setting visible, editable, and required fields for different roles in each approval stage, as well as configuring automatic data updates within the workflow.
Scenario Case
After experiencing the significant efficiency improvements brought by workflows, the HR team at MEGA Technology Ltd. is excited about further digital transformation. They now aim to automate the Employee Regularization Request process to reduce manual operations, improve approval efficiency, and ensure process compliance and traceability. The requirements are as follows:
-
Add a Regularization Reminder Workflow: One week before the employee’s expected regularization date, remind both HR and the employee and automatically create a draft regularization request.
-
Add a Regularization Request & Approval Workflow: The employee fills in a summary of their probation work and submits it for approval to their department manager. Upon approval, the system should automatically update their employment status from "Probation" to "Regular".
Steps
Regularization Reminder
Automatically remind HR and the employee one week before the expected regularization date and create a draft regularization request.
-
Add a “Expected Regularization Date” field to the Employee Directory worksheet. And set the Expected Regularization Date for employees who are not regular.
-
Create a Regularization Request worksheet with the following fields:
|
Field Name
|
Field Type
|
Description
|
|
Regularizing Employee
|
Relationship
|
Associate with Employee Directory; single row
|
|
Department
|
Relationship
|
Associate with Department table; single row.
Default value: department from the associated Employee Directory
|
|
Employee Account
|
Member
|
Default value: account from the associated Employee Directory
|
|
Approval Status
|
Single Select
|
Options: Draft, In Approval, Approved, Rejected.
Default value: Draft
|
|
Probation Summary
|
Text
|
|
|
Regularization Date
|
Date
|
Default value: expected regularization date from the associated Employee Directory
|
|
Department Manager
|
Member
|
Default value: department manager from the associated Department table
|
|
Manager Comments
|
Text
|
|
|
Summary
|
Concat
|
Concatenate: Regularizing Employee + fixed text “'s Regularization Request”. Used as title.
Example: Tom's Regularization Request, Bob's Regularization Request
|
-
The default value for the Department field is set as follows:
Use dynamic values – Other field values – select the department from the associated Employee.
-
The field settings for Summary are as follows:
Use a Concat field to combine the Regularizing Employee and fixed text " 's Regularization Request ".
-
Create a workflow Triggered by Date Field.
-
Set the trigger field as Expected Regularization Date in the Employee Directory.
-
Configure it to execute 7 days before the Expected Regularization Date.
-
Trigger Condition: Employment Status = Probation.
-
Select Get Single Data - Get the Associated Records to retrieve the department associated with the Employee Directory.
-
Add a "Add Record" node, select the "Regularization Request" worksheet, and choose to Add a new record. When creating the Regularization Request, the Approval Status should be Draft, and fields such as Employee Account and Department Manager can be referenced from previous workflow node objects.
-
Add a CC node to forward the newly created Regularization Request in draft status to both HR and the employee.
-
Once the workflow is configured, name it as Regularization Reminder and publish.The result : seven days before the expected regularization date,HR and the employee will receive a message.
Regularization Request and Approval
After the employee fills in the probation summary in the regularization Request and submits it for approval by the department manager, the App should automatically update the employment status from "Probation" to "Regular" once approved.
-
On the Regularization Request worksheet, click "…"—Set Worksheet— Custom Action to add a Custom Action.
-
Set the Button Label to "Submit Regularization Request", set the icon and color.
-
Choose the action "Fill in the form fields", in the current record, fill in the "Probation Summary" field, and check "Continue executing workflow after submission".
-
In the Active Button, choose "Conditional", and set the condition to "Approval Status is Draft". This means the button can only be clicked when the Approval Status of the record is "Draft".
-
After clicking "Add Button ," you'll enter the workflow editing page. Add an Initiate Approval Flow node and select Create New Process. Once selected, an Approval Block will appear on the workflow canvas. Name it as Regularization Approval .
-
Add an Approve node and name it “Department Manager Approval”. Click “Add an approver” and select the Department Manager from the data object of the Initiate Approval Flow node (that is, the Regularization request).
-
In the Data Update tab of the Department Manager Approval node, configure the following:
-
When the node starts, set the Approval Status to “In Approval”
-
When the node is approved, set the Approval Status to “Approved”
-
When the node is rejected, set the Approval Status to “Rejected”
-
In the Field Settings tab, configure the Department Manager Approval to require the following fields as mandatory:
-
Regularization Date
-
Manager Comments
-
Add a Branch node outside the Approval Block.
-
Set the branch conditions as follows:
-
Under the branch where the approval result is “Approve,” add a Get Single Data node. Select Get the associated records, and retrieve the Employee Directory associated with the Regularization Request.
-
Add an Update Record node. Set the update target as the Employee Directory retrieved from the Get the associated records node, and update the Employment Status field to Regular.
-
After the configuration, publish the workflow, and enable "Show approval system fields in View" and"Show approval details when opening a record"
-
Results are as follows:
Hands-on Practice
Now, click the "Open the Practice App" button in the upper right corner of the page to access the hands-on application designed for this course, and start practicing!