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?

                    • Related Articles

                    • How to auto share requests to groups specified in the request tasks.

                      This post described the use of a python script to share requests to groups specified in the tasks that are associated with a request.This script can be configured under Request custom triggers and you will find more information about this here. This ...
                    • Script to Auto share request

                      1. Download MSP_share_Request.zip from the attachment, extract it, and paste the same under ManageEngine\ServiceDesk Plus MSP\integrations\Custom_scripts.          # auto_share_MSP.py      # functions.py      # configuration.json 2. ...
                    • How to Auto Share Request Upon Creation to All/Selected Technicians

                      NOTE:  This script is supported only for builds below 11.3 This post describes the use of a python script to share requests to technicians specified in a list variable in the script, which can be generated from an SQL query. This script can be ...
                    • Script to AutoShare Request to Groups

                      Please follow the below link to setup python on the server ​ https://pitstop.manageengine.com/portal/en/kb/articles/how-to-setup-python-on-the-server-11-11-2019 Steps to configure 1.  Extract the attached zip file in <Home>/integration/custom_scripts ...
                    • How to automatically create multiple child requests from a parent request with a configurable JSON file (V3)

                      This is a sample Python script to automatically trigger the creation of multiple child requests from a parent request, based on the request template chosen. The request ID of the child requests will be added as a Note in the parent request. This is ...