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.
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.
Note:
- 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.
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.