Task Custom Function
Task custom functions are used in task custom triggers. You could execute task custom functions as custom actions and global functions. While custom actions can be directly invoked in task custom triggers, global actions can be called in task custom actions.
To create task custom functions, go to Admin > Helpdesk Customizer > Task Custom Function.
Custom Actions
Custom actions are actionable custom functions that allow users to manipulate data in ServiceDesk Plus MSP and other external applications. Custom functions are built on Deluge, Zoho's propriety scripting language.
Custom actions can be used in Task Custom Triggers to perform actions on tasks, other modules, and external applications.
Use the following pointers to create, enable, disable, and delete custom actions.
-
Use the New button to create a custom action.
-
The Actions button allows you to bulk delete, disable, and enable custom actions. To modify individual custom actions, use the icons displayed next to the custom action. Note that only active custom actions will be available to use in the configurations mentioned above.
-
Use keywords to search for custom actions in the field provided. Use the filters on top to display the custom actions used in specific features.
Add a New Custom Function
-
Click New on the custom action list view page.
-
On the displayed page, provide a name and description for your custom action.
-
Use the simple drag-and-drop interface called the Deluge Script Editor to build your custom action.
As demonstrated in the following screenshot, 'taskObj' and 'context' will be passed as arguments for the custom function:
You must write the custom function with taskObj as the argument.
After executing the custom function, the Map data type will be returned in the following format:
"message":"Executed successfully",
"status":"success/failure"
}
Test Execution of Scripts
After writing the custom function, you can test it by following the steps given below:
-
Click Save and Test.
-
Choose a sample task from the list of tasks displayed.
-
The data that will be passed to the custom function will be displayed under the parameter 'taskObj'.
-
Click Execute.
Debugging Tip
When you test a custom function, you can debug the code and print the output by using a statement called info. For example, to understand the structure of taskObj and context, you can simply run the following script and study the response.
taskObj;
info context;
return true;
For more details on Deluge, visit Deluge help guide.