Merge Similar Requests

Merge Similar Requests

Requirement:
In an organization, multiple requests being created for the same issue.  So we will have to merge all the similar requests.

UseCase:
Assume there is a printer issue in an organization, and a request has already been registered for the same.  If another employee notices the same issue and reports it again, we will have to merge these two tickets.

For retrieving a similar request, we can use either search_criteria or search_condition. The only difference is that we can search for exact keywork with search_condition.
Using search_criteria, we can retrieve all requests that contain the search text. 

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

2.  Goto Admin > Change 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 related 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 mergingSimilarRequest.txt content and save it with a name
Update the global function count according to your instance

4.  Configure a custom trigger to get invoked for every request being created.

Note: Both search_criteria sample and search_condition samples are attached.

                  New to ADSelfService Plus?

                    • Related Articles

                    • Merge Similar Requests

                      Requirement: In an organization, multiple requests being created for the same issue. So we will have to merge all the similar requests. UseCase: Assume there is a printer issue in an organization, and a request has already been registered for the ...
                    • Script: Auto merge tickets of similar subject and auto closes the ticket--> Used V1 API dont use

                      Use case:   Too many alerts for the same reason from a machine keeps generating multiple tickets in SDP MSP.  You can use the below script to auto-merge the requests and auto close the ticket. What does this script do ? The Merged tickets description ...
                    • Request Merge API using Postman.

                      Currently, the Merge API is not included in our documentation. However, I have tested the following API in Postman, and it is working fine on our end. API used: /api/v3/requests/<request_id>/merge_requests {"merge_requests":[{"id":"1"},{"id":"2"}]} ...
                    • Script to Auto merge requests with exact same subject

                      Use case: Too many alerts for the same reason from a machine keeps generating multiple tickets in SDP MSP. You can use the below script to auto-merge the requests in the application. The Merged tickets description will be added as a note to the ...
                    • Unable to merge or delete requests/ Unable to take a backup in new instance

                      Issue: Cannot merge or delete requests. Also, cannot take backup in a new instance with data. Cause: Any of these issues may occur due to orphan entries present in DB. i.e. when we delete a service category in CMDB, it actually gets removed from UI ...