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.
You can get the integration key under Admin >> Integration Key >> New
Please use an integration key with admin privilege, as there wont be any role related permission issues.
3. Goto Admin >> Request Custom Function >> Custom Function >> New >> Paste the mergingSimilarRequest.txt content and save it with a name and 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.