Auto merge & Auto close alerting tool tickets

Auto merge & Auto close alerting tool tickets


In large IT environments, alerting tools like
Dynatrace, SolarWinds, OpManager etc play a critical role in proactively detecting issues. But when each alert ends up creating a new ticket in ServiceDesk Plus (SDP), your help desk can quickly get overwhelmed — especially when the same issue keeps firing repeated alerts.

(A ticket gets created either through alert emails sent to the configured SDP mailbox or via webhook-based API calls)

To help teams manage this better, we’ve built a custom function-based solution that works like magic:

Auto-Merge:  

When an alert fires repeatedly (e.g., “Machine XYZ is down” or “CPU usage crossed 80%”), our script detects that the alert is for the same device, and auto-merges the newly created request into the existing open ticket in SDP.

Auto-Close:  

Once the recovery email is received (e.g., “Machine XYZ is up” or “CPU usage is normal”), the same open ticket is automatically updated and closed based on the defined conditions.

To auto-close tickets, the script depends on clear co-relational keywords present in the subject line between the trigger and recovery alerts.
These directional keyword pairs help the script recognize that the problem has been resolved.

Examples of matched keyword pairs:

  • DownUp

  • OpenResolved

  • CriticalNormal

  • High CPU UsageCPU Usage Normal

  • Memory Usage High → Memory Usage Normal

  • Connection lost → Connection restored

  • Service unavailable → Service restored


⚠️ Limitation: No Matching Keywords = No Auto-Close  

Steps to configure:

1. Download the attached files
2. Open merge_similar_alerting_tool_tickets.txt file and copy the content
3. Go to SDP Admin --> Request custom function --> New custom function and create the custom function as per the screenshot



4. Open close_alerting_tool_ticket.txt and copy the content
5. Go to SDP Admin --> Request custom function --> New custom function and create the custom function as per the screenshot



Creating the custom functions is done. Time to create custom triggers
Go to SDP Admin --> Request custom trigger --> New custom trigger and custom triggers (2 custom triggers) as per the screenshots