Custom Functions
Custom Functions allows you to simply drag and drop code to automate your business processes. Using custom 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 Custom Functions
To associate custom functions with workflow rules, you must first create them. Here’s how you can create custom functions:
- Go to Settings in the top right corner of the page.
- Click Workflow Actions under Automation.
- Click Custom Functions in the Workflow Actions pane.
- Click + New Custom 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 custom 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 Custom Functions With Workflow Rules
The custom 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 Webhookss 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 Custom Functions
If you want to update the details of custom function, you can edit them. Here’s how:
- Go to Settings in the top right corner of the page.
- Click Workflow Actions under Automation.
- Click Custom Functions in the Workflow Actions pane.
- Hover over the custom function you want to edit.
- Click the Dropdown icon and select Edit.
- Make the necessary changes and click Save.
Filter Custom Functions
You can find custom functions easily by filtering them by the module for which they were created. To filter custom functions:
- Go to Settings in the top right corner of the page.
- Click Workflow Actions under Automation.
- Click Custom Function 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 Custom Functions
Warning: Deleting a custom function is permanent and cannot be undone. If the custom function you’re deleting is associated with a workflow rule, the workflow rule will not be executed.
If you no longer require certain custom 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 Custom Functions in the Workflow Actions pane.
- Hover over the custom function you want to delete.
- Click the Dropdown icon and select Delete.
- Confirm your action by clicking Delete again in the pop-up.