Programming New Custom Functions
Deluge, an abbreviation formed from - Data Enriched Language for the Universal Grid Environment is an online scripting language integrated with Zoho services. With this script, you can add different types of business logic to the custom functions. The entire database layer is abstracted, and you just have to map the arguments with fields while scripting in Deluge. See Also Deluge Script - Reference Guide
Target Audience
- Helpdesk Administrators who will configure workflow automation rules.
- Programmers with the knowledge of Deluge Script.
Writing a New Function
You can write a new custom function in three simple steps:
- Write a custom function.
- Associate custom function to a workflow rule.
- Test custom functions integration.
To write a custom function:
- Click the Setup icon (
) in the top bar. - Click Workflows under the Automation menu.
- In the Workflow Rules page, click Create Rule in the upper right area.
- In the New Workflow page, provide some basic information about the workflow and click Next.
- In the following pages, specify the action for execution and the workflow rule parameters.
- Under Actions, click the Add Function icon (
) and then click Existing corresponding to Custom Functions. - On the following page, select the custom function you want to associate and then click Save.
Note:
- Alternatively, you can click New (under Actions) corresponding to Custom Functions to program a new function. When you complete, click on Save and Associate to associate the function to the workflow.
To test the custom function integration:
- You must add a record in Zoho Desk according to your workflow rule criteria.
- Check for the record received from Zoho Desk via the custom function, in your application.
- Modify your custom function code in Zoho Desk, if the record wasn't received or there was a mismatch in your application.
- You can continue to test the function until you obtain the required record from Zoho Desk to your application.
Important Notes
- You can associate only one custom function per workflow rule.
- A maximum of 10 support fields (arguments) can be transferred from Zoho Desk to third-party applications.
- Custom functions can be used to retrieve data from your other Apps into Zoho Desk.
- The API ticket must be updated regularly according to limits in third-party applications.
- You would not receive any email notification if the custom function integration stopped working due to any issue in a third-party API.
- When a connection to the Zoho Deluge service couldn't be established, the system will re-attempt thrice before it stops sending notifications for that particular workflow. Errors if any, can be viewed under the Failures section.
- If you exceed the maximum count per day, the system will not send remaining custom function notifications to third-party applications and will notify the failure to Administrator.
- While configuring the "send mail” (under Miscellaneous) deluge task, either the ‘from’ or the ‘to’ address must contain the email of the helpdesk administrator.
- When you create a service specific "integration task" (under Miscellaneous) for the first time, that respective user’s authentication details will be stored in that service.
Working with Deluge Script Builder
The Deluge Script Builder helps you to program the custom functions using drag and drop user interface and execute the function within Zoho Desk. It enables you to convert the complex application logic into simple deluge code, without remembering the syntax and functions of Deluge Script. It contains the following components:
- Deluge Script Code(1)
- Deluge Tasks(2)
- Conditions
- Miscellaneous
- Debug
- List Manipulation
- Map Manipulation
- Web Data
- XML Manipulation
- Code Execution(3)
Predefined credentials in Deluge
The Deluge editor allows users to specify only two predefined credentials:
- loginUserId: Refers to the user currently logged into the portal.
- adminUserId: Refers to the DRE admin.
The portal user who initially creates or executes a custom function or a new connection will be designated as the DRE admin.
To retrieve the details of the DRE admin, execute the following command in the Deluge editor:
(i) Using adminUserId in CF Scripts
When adminUserId is used in CF scripts for tasks such as setting the 'from' address in a send mail Deluge task, the recipient (specified in the 'to' address) will view the email as sent from the current DRE admin's username.

(ii) Updating adminUserId in CF Scripts
The adminUserId cannot be edited directly in the Deluge editor. If there is a need to replace the current adminUserId with another portal user, users must submit a request to the support team by providing the following details:
Current value:
ZUID : 12345
New value:
ZUID : 98765
Once the data provided is validated, the update process will be initiated.
List of Deluge Tasks
| Deluge Task | Purpose |
|---|
| Conditions | |
|---|
| Miscellaneous | |
|---|
| Debug | |
|---|
| List Manipulation | |
|---|
| Map Manipulation | |
|---|
| Web Data | |
|---|
| XML Manipulation | |
|---|
Related Articles
Gallery Functions
Custom functions available in the gallery Create a task due in 3 days for every new ticket Update new and modified accounts from Desk to CRM Create CRM contacts for new tickets in Desk Create CRM accounts for new tickets in Desk Copy field values ...
Creating Functions in Zoho Desk
Functions are pluggable workarounds that let you accomplish tasks that is not doable out-of-the-box. For example, let' s assume that you want to prioritize customer tickets based on their sales probability in Zoho CRM. However, this option cannot be ...
Creating Workflow Rules
Workflow Rules are a set of actions (alerts, tasks, field updates and custom functions) that are executed when certain specified conditions are met. These rules automate the process of sending email alerts, assigning tasks and updating certain fields ...
Using Teams in Help Desk Automations
You can include teams in help desk automations like Workflows, Assignment Rules (both direct and round robin), Time-based rules, etc. This way you can send notifications, auto-assign tickets, and send escalation emails to teams. Let us look into how ...
Zoho Desk
A help desk is a department in an organization that is responsible for providing the support customers need when using a company's product or service. When a customer has a problem or problem, they will contact the help desk and the product expert ...