Quantcast
Channel: Support Portal
Viewing all articles
Browse latest Browse all 2278

Script Master 6: How to create new requests automatically based on field or resource values in parent requests.

$
0
0

Hello users,

 

Wishing you all a very happy new year 2017.

 

Today's Script Master's post will help you to trigger the creation of a child request in ServiceDesk Plus, based on the values in certain fields of the parent request. The request id of the child request is captured and added as a note to the parent request. Also, the request id of the parent request is appended to the subject line of the child request.

 

This is done by using an API call to create a request in ServiceDesk Plus.To add the note to the existing request, submit the note details in a specific json format. Refer the comments inside the script for more information on the json structure and tips to write the script.The script to do this is available here.

Lets assume a service request is raised for a 'New Hire' process. The answer that is chosen in the resources section of the service request ("Need a VPN Account") is used to trigger the creation of a child request. For creating the child request, a specific template called "Request a VPN account creation" is used.

Execution steps:

1. Copy the script file into the \Manageengine\ServiceDesk\integration directory.

 

2. Update the script with the help of the comments that are provided inside the script.

 

3. Configure the script under the Admin -> Custom Triggers. Provide the path of the request json file as the input to the script.

Below is a screenshot showing a sample custom trigger configuration.



Note:

1. This script was tested on python v3.4.1 - 32 bit.

2. A python library called 'Requests' is necessary to run this script on the application server.

 

To make the best use of this, take a look at the comments in the script and the related post in our resources section.

 

Trust you find this post useful. In case you've missed the previous posts, visit here. Try them and send your feedback to us as comments to the respective posts. See you next Wednesday with another useful script.




Viewing all articles
Browse latest Browse all 2278

Trending Articles