Custom functions are programs that allow you to manipulate data within ServiceDesk Plus Cloud. Custom functions enable you to perform operations that cannot be executed via standard UI configurations.
Administrators can use custom functions to perform automations and integrations that can be contextually invoked via triggers, business rules, and timers, or via life cycles with minimal programming.
Custom functions can be written in one of the following scripting languages:
Deluge is Zoho's proprietary scripting language. To learn more about Deluge and how to write custom functions in Deluge, click here.
|
Supported Modules |
Role Required |
|
|
Requests |
SDAdmin, SDSiteAdmin, HelpDeskConfig |
Requests, Tasks, Approval Levels, Approvals, Notes, Email responses (for users), Work logs (requests and tasks), Work log timer |
|
Problems |
SDAdmin |
Problems, Tasks, Notes, Email responses (for users), Work logs (problems and tasks) |
|
Changes |
SDAdmin |
Changes, Tasks, Approval Levels, Approvals, Notes, Email responses (for users), Work logs (changes and tasks), Downtimes |
|
Projects |
SDAdmin |
Projects, Milestones, Tasks (projects and tasks), Work logs (tasks. projects, and milestones), Project Members, Comments (tasks, projects, and milestones) |
|
Releases |
SDAdmin |
Releases, Tasks, Approval Levels, Approvals, Notes, Email responses (for users), Work logs (releases and tasks), Downtimes |
|
Solutions |
SDAdmin |
Solutions, Comments |
|
Assets |
SDAdmin, AssetConfig |
All Assets, Each product types |
|
CMDB |
SDAdmin, SDCMDBAdmin |
All CIs, Each CI Type |
|
Purchase |
SDAdmin |
Purchases, Approval Levels, Approvals, Payments, Invoices |
|
Contracts |
SDAdmin |
Contracts |
|
Custom Modules |
SDAdmin |
Custom modules |
In the Custom Functions tab, choose your preferred module from the drop-down.
Click New Custom Function and fill out the necessary information as described below:
|
Field |
Description |
|
Custom Function Name* |
Provide a unique name for the custom function. |
|
Description |
Describe the objective and usage of the custom function. |
|
Applies to |
Choose the sub-entities within the module where the custom function is applied. |
|
Use this custom function as a |
Select the automation rule where the custom function is used. Ensure custom function returns the following values based on the automation rule where it is configured:
|
| Language | Select the language to compile the custom function - Deluge, Java, or NodeJS |
|
Script Editor |
If the custom function is configured for a request or change sub-entity, the respective sub-entity object will be passed in the parameter.
|
After compiling the custom function, click Save or Save & Execute Script.

After the custom functions are created, they are available on the list view page where you can perform the following actions:
icon to edit any custom function.
icon to enable or disable custom functions. You can also use the toggle on the Status column. To enable/disable in bulk, select the custom functions and use the Actions menu on the toolbar.
icon to delete custom functions. To delete custom functions in bulk, select the custom functions and use the Actions menu on the toolbar.
icon to search through custom functions using criteria. Add the criteria, value and click Enter. You can add multiple search criteria using the
icon. After the results are displayed, click on the existing criteria to edit it.
icon to limit the number of custom functions listed and to define the sort order.When you execute a custom function, an API call is placed to ServiceDesk Plus Cloud. This is called an InvokeURL call.
By default, you are allowed only 200,000 executions per month and 10,000 InvokeURL calls per day from Custom Functions. You can track the executions and InvokeURL calls usage by clicking the Check Usage Stats button. In the Usage Stats pop-up, a colored progress bar is used to indicate the percentage of executions and InvokeURL calls remaining.

Business rules help you automate various request-related tasks such as assigning a technician, status, or priority to a request; or even sending email notifications. Business rules are site-based, run on all incoming requests, and can be applied to requests when they are created, edited, or deleted.
If an incoming request matches specific conditions, business rules execute actions automatically. You can define complex conditions and actions by using custom functions.
Business Rule Conditions: In some scenarios, requesters accidentally raise several incident requests for a single issue. You can define a custom function in a business rule condition to check for and stop the creation of such duplicate requests.
Business Rule Actions: Whenever a VIP user logs a request, you can notify the support team over Cliq (a business communication app) by using a business rule action.
Click here to learn more about Business Rules with samples.
Triggers allow you to automate actions when an incoming request matches specific conditions. You can define complex actions in a trigger by using custom functions and execute them on other modules or third-party applications.
For example, you can define a trigger action to record leave on your internal HR Management app (like Zoho People), whenever a technician marks leave inside ServiceDesk Plus Cloud.
Click here to learn more about Trigger Actions with samples.
Life Cycle allows administrators to formulate a resolution process with built-in guidance for the help desk technician. A life cycle ensures efficient process adherence, establishes a directional flow, minimizes the scope for human errors, and provides privileged (role-based) access to status transitions.
To automate processes through life cycle, you can define actions using custom functions that will be executed under pre-specified conditions.
Click here to learn more about Life Cycle Actions.
Scheduled functions allow you to automate the execution of custom functions at regular intervals. For example, you can schedule a webhook with appropriate data to send requests periodically to an external application, which will then create an entry or perform other operations in the external application.
For each scheduled function, you can define one or more schedules under Setup > Automation > Schedules. You can also create and schedule a custom function directly under Schedules.
The Scheduled Functions tab lists the custom functions available to schedule as well as the already scheduled custom functions.
Click here to learn how to schedule a custom function.
You can manipulate data within ServiceDesk Plus Cloud whenever an event occurs in an external application using callback functions. For example, you can write a callback function to notify ServiceDesk Plus Cloud whenever a ticket is added in your bug tracking software, such as Backlog and update the necessary information in ServiceDesk Plus Cloud. A callback function is the same as a webhook, only triggered from an external application to perform a task within ServiceDesk Plus Cloud.
Callback functions are internally executed through custom scripts, which allow you to perform all types of actions including API calls to external applications.
Callback functions can be written in one of the following scripting languages:
Deluge
Java
NodeJS
Role Required: SDAdmin and HelpDeskConfig can define callback functions. SDSiteAdmin can only view them.
Go to Setup > Developer Space > Custom Function and select Callback Functions from the drop-down.

Click New Custom Function. Alternatively, you can use the pre-built custom functions written in Deluge by clicking Import Sample Functions.
Provide a unique name to the callback function and enter a description.
Provide a unique API name. A URL that is auto-generated using the API name will be displayed in the corresponding field.
Select Publish to allow users to invoke the URL from external applications.
Optionally, you can type in the parameters as raw data or form data.
Form Data: The Request body must be passed as a key-value pair. If you are going with this data format, you need to enter the parameter key along with its data type.
Raw Data: The Request body must be passed as raw data. Data of any Content-Type, such as application/json and application/xml, will be treated as plain text and passed to the custom function as a string under the 'body' parameter.

Select your preferred language from the Language drop-down - Deluge, Java, NodeJS.
Click Save. To test the script, click Save & Execute Script.
At any time you want to suspend the access of the custom function by external users, you can unpublish the callback function.
Click here to learn how to define a callback function.
Custom menu actions execute custom functions to perform a variety of user-defined actions within ServiceDesk Plus Cloud and external applications.
Click here to learn more about Custom Menu Actions.