How to auto share request to users specified in a request field (V3)

How to auto share request to users specified in a request field (V3)

Note: ServiceDesk Plus build should be  11.0 and above

This post described the use of a python script to share requests to users specified in a request field. This script can be configured under Request custom triggers and you will find more information about this here. This is achieved using an API call to share a request in ServiceDesk Plus.

Use Case: There may be a scenario where multiple parties like testers and developers might be involved in a request fulfillment. For that, the progress of the request has to be constantly monitored by them. However, they cannot be given full privileges to access all requests associated with a site/group/department. This script will automatically share the request to the users specified in the field 'Email IDs to Notify' or any Additional field in udf_format. 
You can find the udf_field Id from Admin --> Incident Additional fields

The name of the field can be updated based on your requirements in the share_requestV3.py file, A screenshot for a reference





Execution steps:
1. Download the attached zip
2. Move all files to sdp_home/integration/custom_scripts folder
Note: Don't move configuration.json if there is a file with the same name exists
3. Edit configuration.json update url and technicianKey
4. Configure the script and its parameter under the Admin -> Custom Triggers. The script file to run parameter will be set as shown below.
py share_requestV3.py $COMPLETE_V3_JSON_FILE 
I've attached a screenshot showing a sample implementation below.



A short guide on setting up python is available here

                  New to ADSelfService Plus?