Auto-create a change via a service request

Auto-create a change via a service request

Requirement:
When a request for change is submitted by a user via a service request with resource answers, then a change should be auto-created, resource answers copied to its description, and the change should be associated with the service request

Usecase:
Service requests are often used to allow the requester to log a request for change. The details for the change are captured using the resource questions section and FAFR is used to make the resource questions interactive. Therefore, when a request for a change-service request is submitted by a requester, it has to create a change with all the details and resource answers in its description and be associated with the service request.

Steps to configure:
1.  Download the attached scripts.  Copy the contents into Request custom functions.

2.  Goto Admin > Request Custom Function > Global Function > New > Paste the global function contents and save it with a name.
Update the URL and integration/technician key in the script. 
  1. For builds over 11300, you can get the integration key under Admin > Integrations > Integration Key > New
  2. Please use an integration key with admin privilege, as there wont be any role based permission issues. 

  3. For builds prior to 11300, refer https://help.servicedeskplus.com/api/rest-api.html$key and update the technician key.

3.  Goto Admin > Request Custom Function > Custom Function > New > Paste the addChangeWithResourceInfoInDesc.txt content and save it with a name
  1. Update the global function count according to your instance

  2. Update the Change template name as per your instance.  In my case its "Additional Field" template.

4.  Configure the created custom function in a trigger to get executed every time a request is approved.


                  New to ADSelfService Plus?

                    • Related Articles

                    • How to auto-create change request(s) for unplanned changes on Assets

                      This post describes the use of a python script to auto-create change requests for unplanned modifications on Assets using Custom Schedules. This script is applicable only for builds prior to 11138. UseCase: Multiple assets are inventoried in ...
                    • Change Auto closure

                      This will be helpful in auto closing change request after X days it is in review stage. This use case is more suitable in environments where ONLY Requesters (customers) are the Change Reviewers and they want the Change to be closed if no review is ...
                    • How to create a new change request automatically from a request.

                      This script is applicable only for builds prior to 11138. This is a sample python script that triggers the creation of a Change Request in ServiceDesk Plus using the Change API.The request ID of the parent request is appended  to the subject line of ...
                    • Auto-create problem request based on certain criteria.

                      This is a sample script that triggers the creation of a Problem Request in ServiceDesk Plus using the Problem API.  Use Case:  ​ All incident requests with Priority = High will create a problem ticket with the request's default field values. ...
                    • How to automatically create a task in a Change Request.

                      This is a sample script to create a task in a Change Request based on the values given in certain fields. This is done by using an API call to create  a task in ServiceDesk Plus. The task can also be created in a request, problem, project or a ...