Deluge Script to share Request to a department

Deluge Script to share Request to a department

Hi
I‘d like to do a Deluge script to create a „Request Custom Function“, so I can use it in a „Custom Trigger“ to share special new Requests to a Department „9020“. Like I can do manually in the GUI.
I‘m beginner in creating custom functions. I‘m very thankful for any advice.

Regards
Markus

I started my script like this:

requestID = requestObj.get("id");

url = "https://servicedesk.xxxxx.ch:8443/api/v3/requests/" + requestID + "/share";

headers = {"authtoken":"xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"};

input_data = {

  { ???????? }

};

params = {"input_data": input_data};

response = invokeurl

[

                url: url

                type: PUT

                parameters: params

                headers: headers

];

info response;

return map();

 



                New to ADSelfService Plus?