Functions
Drag and drop code to automate your business processes. Using functions, you can update the data in a related database or a third-party application automatically by executing simple program scripts written using the low-code programming language, Deluge, associate them to workflow rules, and automate processes based on your business requirements.
What is Deluge?
Deluge (Data Enriched Language for the Universal Grid Environment) is an online scripting language integrated with Zoho Creator. It enables users to add logic to the application, incrementally, making it more powerful and robust. To know about Deluge, refer the Deluge Reference Guide.
If you wish to learn Deluge, check out Learn Deluge.
Create Functions
To associate functions with workflow rules, you must first create them. Here’s how:
- Go to Settings in the top right corner of the page.
- Click Workflow Actions under Automation.
- Click Functions in the Workflow Actions pane.
- Click + New Function in the top right corner of the page.
- Enter the Function Name
- Provide Description if necessary.
- Select the Module for which you want to trigger the function.
- Drag and drop the required components from the Elements Menu on the left to the Builder Area in the center to build the Deluge script required for the custom function.
Protip: You can quickly access the support and guide related to Deluge in the top right corner of Deluge Script Editor.
- Click Save.
Associate Functions With Workflow Rules
The functions you create should be associated with workflow rules so that they can triggered automatically when the required conditions are met.
To associate custom functions with workflow rules:
- Go to Settings in the top right corner of the page.
- Click Workflow Rules under Automation.
- Click + New Workflow Rule in the top right corner.
- Enter the necessary details .
- Under Actions, choose Custom Functions as the Type and select the alert you want to associate with the workflow rule.
- Click Save. Now, whenever the criteria is met, the workflow rule will be triggered, which in turn will trigger the custom function.
Edit Functions
If you want to update the details of a function, you can edit it. Here’s how:
- Go to Settings in the top right corner of the page.
- Click Workflow Actions under Automation.
- Click Functions in the Workflow Actions pane.
- Hover over the function you want to edit.
- Click the Dropdown icon and select Edit.
- Make the necessary changes and click Save.
Filter Functions
You can find functions easily by filtering by the module for which they were created. To filter functions:
- Go to Settings in the top right corner of the page.
- Click Workflow Actions under Automation.
- Click Functions in the Workflow Actions pane.
- Click the filter next to Module and select the required option. The custom functions created for the selected module will be displayed.
Delete Functions
Warning: Deleting a function is permanent and cannot be undone. If the function you’re deleting is associated with a workflow rule, the workflow rule will not be executed.
If you no longer need certain functions, you can delete them. Here’s how:
- Go to Settings in the top right corner of the page.
- Click Workflow Actions under Automation.
- Click Functions in the Workflow Actions pane.
- Hover over the function you want to delete.
- Click the Dropdown icon and select Delete.
- Confirm your action by clicking Delete again in the pop-up.