How to update a request based on certain values.

How to update a request based on certain values.

This post describes the use of a python script to update requests based on values given in the request_properties.json file. This action can be performed using Custom Triggers.

We have a Service template for account lockout/password reset. We need to add resolution in these requests so that the technician should not manually type the resolution every time while resolving a request. They can predefine resolution template for it but again the technician will have to select it manually.
We can achieve this using the custom trigger. 
For example, If you need to add a resolution automatically as soon as the technician changes the status of the request as 'resolved', we can update the resolution content in the JSON file. When the technician changes the status to resolved, this script invokes and the resolution is added based on the value given in the request_properties.json file. 

Likewise, we can update the other fields by updating the request_properties.json file. 

Execution steps:
1. Download and copy the script file into the \Manageengine\ServiceDesk\integration\custom_scripts directory.
2. Update the application URL, the technician API key in the configuration.json.
3. Configure the script under the  Admin  ->  Request Custom Triggers, like shown below.

py request_properties.json $COMPLETE_V3_JSON_FILE

A short guide on setting up python is available here.

      New to ADSelfService Plus?