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 accomplished in Zoho Desk. So how do you do it? Your solution: Functions!
All about functions
Functions are an implementation of serverless architectures where Zoho Desk dynamically manages the provisioning of servers. You can write functions using the Deluge script and run the code (proprietary within Zoho Desk) without worrying about deploying it in servers. This provides you with ideal business implementations, which sounds quite pleasant to the ears and probably light on the budget as well.
Why functions?
- Provides immense flexibility of accomplishing tasks when met with specific criteria or automatically on a daily, weekly, monthly, or yearly intervals.
- Empowers you to explore alternative ways of solving a help desk problem.
- Eliminates the need to wait for a feature to be built into the product. You have more control over what you want to get done. After all, requirements differ from business to business.
Using functions
Functions can be used in 3 places, namely:
- Workflow rules
- Blueprints
- Schedules
In workflow rules, you can set up functions such that when it matches certain criteria, Zoho Desk automatically triggers the function and updates the corresponding record. Similarly, when used in blueprints, functions can be triggered by completing a transition. In schedules, functions can be triggered either at a particular time or on a recurring basis.
Creating functions
Functions can be created using the Deluge Script builder that provides a drag-and-drop user interface to add Deluge scripts without the need to learn or remember the Deluge syntax and functions.
Steps to create a function
- Click the Setup icon (
) in the top bar.
- Click Functions under Developer Space.
- Click New Function in the upper-right corner.

- In the New Function page, do the following:
- Give a Name and Description (optional) for the function.
- Choose the Category where the function is meant to be added.
If the function is going to be added in workflows or blueprints, choose Automation; otherwise, choose Schedules. - Select the Module for which you want to trigger the function.
This option is available only when you select Automation in Step 6.

- Click the Edit Arguments icon (
).
This option is available only when you select Automation in Step 6. - In the Edit Arguments window, set the arguments to be used in the script, with field name or custom value in the respective module.
- Write your required function in the Deluge Script Editor.
- Click Save & Execute Script to validate your code.
- Click Save.
The function gets listed in the List View of the Functions page.
The functions specified to be used at a particular location cannot be used elsewhere. For example: a function configured for automation cannot be used in Schedules.Deploying functions in workflow rules
As a Zoho Desk administrator, you can deploy thoroughly tested custom functions in workflow rules.
Steps to associate a custom function to a workflow rule
- Click the Setup icon (
) in the top bar. - Click Workflows under Automation.
- Click Create Rule on the Workflow Rules page.
- Enter the basic information about the workflow and then click Next.
- In the following page, specify the action for execution and rule criteria.
- Under Actions, click the Add icon (
) and then select Existing corresponding to Custom Functions.
- Select an existing custom function.
- Click Save.
Deploying functions in schedules
As a Zoho Desk administrator, you can deploy thoroughly tested custom functions in schedules. To learn more about this, click here. Execution logs for custom functions
The execution log feature provides a detailed record of both failed and successful executed custom functions. It operates as an action linked to an automation rule, applying the rule to entities like 'Tickets' based on predefined criteria.
The following details can be viewed:

Execution logs can be viewed for both successful and failed custom function executions.
Why use execution logs in custom functions?
Execution logs provide valuable data that can be used to:
Debug issues related to custom function execution failures.
Identify the root cause of the said failures.
Analyze successful executions to understand what works.

Execution logs will be available once the custom function is executed, provided the user has Helpdesk Automation permissions.
Steps to view execution logs for a custom function
1. Click the Setup icon (
) in the top bar. 2. Click Workflows under the Automation menu.
3. Click Custom Functions under the Workflows sub-menu.
4. In the Custom Functions page, click the Execution Log subtab.
5. In the Execution Log list page, scroll to the bottom to find the Execution logs section.

- The execution logs for 'success' cases will be available for 24 hours.
- The execution logs for 'failure' cases will be available for 30 days.

Points to note if execution logs are not being generated:
- There has been no custom function execution made.
- Make sure to manually refresh the page to see the newly added log data.

Points to be noted while working with execution logs:
- Once the custom function execution limit is reached, execution logs will also pause and will resume the next day when execution restarts.
- There is no limit on the number of execution logs that can be displayed at a time.
- Refresh the page to view logs for newly executed custom functions.