Life Cycles in ServiceDesk Plus MSP Cloud allow admins to formulate a resolution process with built-in guidance for the help desk technician. A life cycle ensures efficient process adherence; you can establish a directional flow, minimize the scope for human errors, and provide privileged (role-based) access to status transitions. You can also configure life cycle for requests, problems, and assets.
To automate processes through request life cycle, you define actions that will be executed under pre-specified conditions. Custom function execution is one of the many different types of actions in life cycles.
Supported Modules
| Role Required
|
Requests
| SDAdmin, SDSiteAdmin, HelpDeskConfig
|
Problems, Changes, Projects, Releases, Solutions, Assets, CMDB, Purchase, Contracts, and Custom Modules
| SDAdmin
|
- Go to Setup > Developer Space > Custom Functions.
- In the module drop-down, select Trigger (or) Life Cycle (or) Actions.
- Click New Custom Function. You can alternately write the custom function while creating/editing a life cycle.
- Fill out the necessary information as described in the 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.
|
Deluge Script Editor
| Compile the custom function in the Deluge Script Editor using a simple drag-and-drop motion. To learn more about Deluge and how to write custom functions, click here. Depending on the module selected, the following arguments will be passed in the custom function.
- Requests - 'requestObj' and 'context'
- Problems - 'problemObj' and 'context'
- Changes - ' changeObj ' and 'context'
- Projects - 'projectObj' and 'context'
- Releases - 'releaseObj' and 'context'
- Solutions - 'solutionObj' and 'context'
- Assets - 'assetObj' and 'context'
- CMDB - 'ciObj' and 'context'
- Purchase - 'purchaseorderObj' and 'context'
- Contracts - 'contractObj' and 'context'
Custom Module - 'cm[custommodulename]Obj' and 'context'
'[module]Obj' - Stores the details of the request on which the life cycle must act.
'context' - Stores the current instance and the logged-in user details.
 If the custom function is configured for a module sub-entity, the respective sub-entity object will be passed in the parameter. |
*mandatory fields
- After compiling the custom function, click Save or Save & Execute Script.
Points to remember:
Ensure custom function returns "void" value.
You cannot return any object from the custom function to modify the request. You can, however, modify the request by making API calls.
Test Execution of Scripts
After writing the custom function, you can test it by following the steps given below:
- Click Save & Execute Script.
- Choose a sample record from the list of records displayed and click Next.
- The data that will be passed to the custom function will be displayed under the parameter '[module]Obj'. Optionally, you can modify the '[moduleObj' values.
- Click Execute.
If you make any API calls by using zoho.sdp.invokeurl or invokeurl while testing the custom function, the API will be invoked. Make sure you don't invoke an API that might result in unintended consequences.
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 requestObj and context, you can simply run the following script and study the response.
- info requestObj;
- info context;
For a quick summary of how to use custom functions across different features in ServiceDesk Plus MSP Cloud,
visit this link.
Related Articles
Life Cycles
A life cycle is a built-in guidance system that establishes a directional flow for managing requests, problems, or assets in a help desk. Life cycles minimize human errors and provide privileged (role-based) at every transition. Supported Modules: ...
Assets List View
Assets List View All Assets list view is a consolidated view that lists all assets and components. To access the list view, go to Assets and click All Assets on the left pane. To view customer-specific assets, use the customer drop-down in the ...
Custom Functions
Overview Custom functions allow you to manipulate data within ServiceDesk Plus MSP Cloud and external applications. You can use custom functions to configure complex conditions or define multiple actions. For example, data under any module can be ...
Asset FAQs
Asset Management License Consumption and Asset States Will an asset be included in license consumption if it is moved to a disposed or expired state? No, Disposed or Expired assets do not consume license. How to create an asset state similar to ...
Closure
The life cycle of any release process, be it a completed or a canceled one, ends with the closure stage. In this stage, the release coordinator associates a closure code for the release. The closure code provides details on whether the release is ...