Custom functions allow extending Zoho Desk to handle scenarios that are more complex. They help automate custom actions and implement business-specific logic based on requirements. For example, if tickets need to be prioritized based on sales data from Zoho CRM, custom functions can be used to build this logic and update tickets accordingly.
Custom functions are written using Deluge script and run within Zoho Desk, without the need to manage servers or infrastructure. This makes it easier to create custom automations and handle complex workflows.
By using custom functions, businesses can automate processes, reduce manual effort, and adapt the help desk to match their exact business needs.
Viewing Execution logs
Execution logs provide a detailed record of custom function executions, including both successful and failed runs. These logs are generated when a function is triggered through an automation, such as a workflow rule, and executed on records like tickets based on defined criteria.
The following details can be viewed in execution logs:
- Execution status and details
- Argument values passed to the function
- Output from print statements
Execution logs help in monitoring how custom functions behave during execution and provide better visibility into automated processes.
Execution logs help to:
- Debug issues when a function fails.
- Identify the root cause of errors.
- Review successful executions to understand expected behavior.
Note:
- Execution logs are available for both successful and failed function executions.
- Logs are generated only after a function is executed and are accessible to users with Helpdesk Automation permissions.
- Logs for successful executions are retained for 24 hours.
- Logs for failed executions are retained for 30 days.
To view execution logs for a custom function:
- Navigate to Setup (
) > Automation > Workflows. - Click Custom Functions under the Workflows.
- Click Execution Log.
- In the Execution Log list page, scroll to the bottom to find the Execution logs section.
If execution logs are not being generated:
- Execution logs will not be available if no custom function has been executed.
- Manually refresh the page to see the newly added log data.
While working with execution logs:
- When the custom function execution limit is reached, log generation pauses and resumes the next day.
- There is no limit on the number of logs that can be displayed.
- Refresh the page to view logs for recently executed custom functions.
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 custom functions of Deluge Script. It contains the following components:
- Deluge Script Code
- Deluge Tasks
- Conditions
- Miscellaneous
- Debug
- List Manipulation
- Map Manipulation
- Web Data
- XML Manipulation
- Code Execution
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 execute the command in the Deluge editor:
Using adminUserId in CF Scripts
When adminUserId is used in custom function scripts, such as setting the From address in a send mail Deluge task, the recipient will see the email as sent from the current DRE admin’s username.
Updating adminUserId in CF Scripts
The adminUserId cannot be modified directly within the Deluge editor. If it needs to be updated to another portal user, a request must be raised with the support team along with the required 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 | - info
|
|
List Manipulation | |
|
Map Manipulation | |
|
Web Data | |
XML Manipulation | - executeXPath
|