Using Custom Function in Zoho Desk
Custom functions are easy to program scripts, which helps you to update the data in related help desk modules or other third-party applications. When a record matches the workflow criteria, workflow engine automatically triggers the custom function and update the records. With custom functions, you can program custom scripts using the Deluge Script (powered by Zoho Creator), associate them to workflow rules, and automate the business process. See Also Deluge Script - Reference Guide
Business Scenarios
- Add a new contact or update an existing one in Zoho CRM, when a contact is created or modified in Zoho Desk. This way you can keep the contacts database in perfect sync between the apps.
- Add a new account or update an existing one in Zoho CRM, when an account is created or modified in Zoho Desk. This way you can keep the accounts database in perfect sync between the apps.
- Add a new contact or update an existing one in Zoho CRM, for every new ticket created in Zoho Desk. This allows your sales team to stay abreast of the support requirements of their leads, contacts and accounts from within the Zoho CRM account.
- Add a new account or update an existing one in Zoho CRM, for every new ticket created in Zoho Desk. This allows your sales team to stay abreast of the support requirements of their leads, contacts and accounts from within the Zoho CRM account.
Target Audience
- Helpdesk Administrators who will configure workflow automation rules
- Programmers with REST API and Deluge Script skills
Note:
- Profile Permission Required: Users with Helpdesk Automation permission can access this feature.
Set Up Custom Functions
Custom functions can be set up in three simple steps:
- Create a custom function.
- Associate custom function to a workflow rule.
- Test custom functions integration.
To create a custom function:
- Click the Setup icon (
) in the top bar. - In the Setup Landing page, click Workflows under Automation.
- In the Workflow Rules page, click Custom Functions from the left panel.
- In the Custom Functions page, click New Custom Function in the upper right area.
- In the Configure Custom Function page, you can select a function from the Gallery, pick an existing function or write a new one using Deluge Script.
- Click Save.

To associate custom function to a workflow rule:
- Click the Setup icon (
) in the top bar. - In the Setup Landing page, click Workflows under Automation.
- 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 page, specify the action for execution and the workflow rule parameters.
- Under Actions, click the Add Function icon (
) and select an existing custom function.

- Click Associate Custom Function and then click Save.
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.
- Continue this test until you obtain the required data 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 will 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 Creator 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 theFailures 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.
- Limits for Custom Functions:
- Calls per Day - 10000 calls/day.
- Integration Tasks - 5000 Zoho API calls/day using deluge.
- Get Data - 500 calls/day
- Post Data - 500 calls/day
- Send Email - 1000 emails/day
Error Messages and Details
Here are a couple of failure messages you might encounter while using custom functions:
- Error executing email task - A 'send mail' task could not be executed.
- Error evaluating invoke api task : {0} - API calls could not be executed.
- Wrong DataType specified. The Template Variable {0} should be of type {1} - You had mentioned a data type as string but had provided an integer value in the 'set variable' task.
- Error in executing {0} task - An integration task could not be called under the 'call function'.
- Unable to update template variable {0} - An expression could not be executed.
- Error evaluating GET URL Function - Either the configured parameters are wrong or there is no proper response from the URL.
- Error evaluating POST URL Function - Either the configured parameters are wrong or there is no proper response from the URL.
Related Articles
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 ...
Why Zoho Desk?
On-demand & Web-Based Zoho Desk, an on-demand, web-based help desk software allows your agents to engage with customers and deliver satisfaction in the fastest and easiest way. And because it's all on the cloud, lesser the cost of installation and ...
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 Creator. With this script, you can add different types of business logic to the custom functions. The ...
Using Predefined Reports in Zoho Desk
Zoho Desk provides a collection of predefined reports that are designed to offer instant, out-of-the-box customer support insights. Each report provides access to relevant data required for various purposes. The reports can be further tailored to ...
Integrating Zoho Desk with Zoho CRM
Zoho CRM integration gives your sales and support teams a holistic view of your customers by maintaining a single customer and product database which is always in sync. For the integration, you must have Administrator privileges in Zoho Desk. Also, ...