Workflow Rules
Using this feature, you can create workflow rules that can trigger actions such as email, SMS alert, or custom functions, which will execute functions automatically whenever the transactions satisfy the conditions you’ve configured.
For example, you can set up a workflow rule in such a way that an email notification should be sent to the Finance Head automatically, whenever an expense report exceeds the threshold limit.
Set Up a New Workflow Rule
While setting up a workflow rule, you can configure the conditions based on which actions such as email, SMS alerts, or custom functions should be triggered. You can trigger more than one action in a workflow. To set up a workflow rule:
- Click Admin View.
- Go to Settings on the left sidebar.
(OR)
Click the Gear icon at the top right side. - Navigate to Workflow Rules under Automation.
- Click + New Workflow Rule at the top right corner of the page. You can now create a new workflow rule.
- Enter a Name and Description for your workflow.
- Select a Module for which you want to trigger the workflow.
- Choose the Workflow Type and when you want to trigger the workflow.
- Besides the event and date based triggers, you can optimize the triggers by setting additional filters under Filter the triggers.
- Under Actions, choose the action you want to trigger when the criteria you’ve set gets satisfied.
- You can also add multiple time based actions by marking the Would you like to add time based actions?.
- Click Save to create the workflow rule.
Choose when to Trigger
Event based
Let’s say you are creating a workflow rule for the Reports module.
- If you want to create an Event based workflow, select Event based on the Workflow Type dropdown.
- In the When a Report is dropdown, select when you want to trigger the workflow. For example, select Submitted, if you want the workflow to be triggered when the report is submitted.
Date based
Let’s say you are creating a workflow rule for the Reports module.
- If you want your workflow to be Date based, select Date based on the Workflow Type dropdown. Date of Execution is the date at which the workflow will be triggered. You can choose to trigger the workflow on any number of days before or after the submitted date, the last submitted date and so on.
- In the Execution Time field, choose the exact time at which the workflow rule should be triggered by providing the hour (HH) and the minute (MM).
- In the Execution Cycle field, choose the frequency at which the workflow should be triggered. You can choose to trigger it just Once, Once in a Month (Monthly) or Once in a year (Yearly).
- Click Next.
Filter the triggers
Other than the Event and Date-based triggers, you can optimize the triggers by setting additional filters. These filters are optional and one or more conditions can be set in these filters based on which actions such as email and SMS alerts will be executed.
Multiple conditions can be set by using ‘AND’ (or) ‘OR,’ based on which you can specify whether both the conditions or at least one of the conditions should be satisfied. You can set up to 10 conditions for a workflow.
Let’s say you want to set up a workflow rule such that an email alert is sent to the Admin whenever Mark submits a report greater than $2000, or when Mark submits a report containing “Atrium Solutions’ as a customer. In a similar case, you can set it up as follows:
- When the owner of the report is MARK.
- AND the report total > $2000.
- OR the customer is Atrium Solutions.
According to the criteria, the workflow will be triggered if the first two conditions are satisfied (or) when the third condition alone is satisfied, i.e, the workflow will be triggered if the Owner of the report is Mark and the report total is greater than $2000. Or, it will be triggered when the customer is ‘Atrium Solutions’, irrespective of the owner of the report or the report total.
Since that is not what you were looking for, you can edit the criteria pattern. Click Change Criteria and change it as shown below:
According to the edited criteria, the workflow will be triggered when the owner of the report is Mark AND when the report submitted either has a total greater than $2000 or contains ‘Atrium Solutions’ as its customer. Click Save to save the criteria.
To set additional triggers:
- Under Filter the triggers, select a report field that can be used in the condition. If you want to add more criteria, click + Add Criteria.
- Configure the rules for the selected field.
- Click Next.
Actions
Once you set up the triggers, the next step is to associate actions with the workflow. These include Email Alerts, Webhooks, and so on. You can customise the actions to suit your business needs and choose to trigger the actions immediately when the conditions (Immediate actions) are satisfied or at a particular time (Time-based actions).
Immediate Actions: The actions will occur immediately when the transaction meets the criteria mentioned in the workflow.
Choose the type of action you want to associate with the workflow. The following actions can be triggered by satisfying the conditions in a workflow:
Actions | Description |
---|---|
Email Alerts | An email will be sent to the selected recipients. |
Field Updates | You can select a few fields in a report or a trip form and they will be updated with the values you configure. |
Webhooks | You can communicate with third-party applications by sending instant web notifications from Zoho Expense. |
In-app Notifications | The recipients you select will receive a notification in their Zoho Expense account. |
Custom Functions | Custom functions in Zoho Expense allows you to simply drag and drop code to automate your business processes. |
You can also add multiple actions by clicking + Add New.
Time Based Actions: If you want to schedule actions for a particular time, mark the Would you like to add time-based actions? option.
Execution Time: It will execute the action on any number of days before or after the due date, Rule Trigger Date, Submitted Date, Last Submitted Date, and so on.
Note: You can add a maximum of 5 time based actions for a workflow. Also, each time based action can have a maximum of 5 actions.
Edit a Workflow Rule
You can edit the workflow rules you’ve configured. To edit a workflow rule:
- Click Admin View.
- Go to Settings on the left sidebar.
(OR)
Click the Gear icon at the top right side. - Navigate to Workflow Rules under Automation.
- Hover over the workflow rule you want to edit and click the More icon at the right corner of the workflow rule.
- Select Edit.
- Make the necessary changes and click Save. The workflow rule will be updated.
Note: You cannot change the module for which you’ve configured the workflow rule. Also, you cannot change the workflow type.
Delete a Workflow Rule
You can delete the workflow rules you’ve created. However, if you want to disable it temporarily you can mark the workflow rule as inactive. To delete a workflow rule:
To delete a webhook:
- Click Admin View.
- Go to Settings on the left sidebar.
(OR)
Click the Gear icon at the top right side. - Navigate to Workflow Rules under Automation.
- Hover over the workflow rule you want to delete and click the More icon at the right corner of the workflow rule.
- Select Delete if you want to delete the workflow rule. Select Mark as Inactive if you want to disable it temporarily.
- Click Delete to delete the workflow rule.
View Workflow Logs
You can view logs of the emails alerts, webhooks, and the custom functions that were triggered from the workflows set in your organisation. To do this:
- Click Admin View.
- Go to Settings on the left sidebar.
(OR)
Click the Gear icon at the top right side. - Navigate to Workflow Rules under Automation.
- Click View Workflow Logs on the top right side of the page.
- Navigate to the preferred tab, and click the log to view more details.
- You can also filter the webhook and custom function logs based on their execution status. If you’d like to view only the successfully executed logs, go to Webhooks or Custom Functions tab, click the All dropdown and select Success. Only the successfully executed logs will be displayed.
Note: Zoho Expense displays only the workflow logs of the last three months.