Implementing a process to count the number of repeat alerts is possible. This post outlines one of several approaches.
Add a Ticket UDF named Alert Count of type number. We will use this to count how many times the alert happens. But only up to a set max, I chose up to 5 times.
When a new alert is received you want to search for an existing ticket for that alert, in either an open or closed status. But you probably only want to find an alert ticket that was active within a set time-period. Let’s assume <= 24 hours. The statement below gives us that date and time:
{{date subtract="24 hours" to_tz="Autotask"}}
We store that into a variable named NowLess24Hours and use the variable in the query for the existing ticket.
In addition to any logic to find the proper alert ticket add this additional query condition:
Last Activity Date >= {{NowLess24Hours}}
By looking at Last Activity Date you will get any alert ticket created, updated, or closed in the last 24 hours. I would use the query for one object command and sort descending on the Last Activity Date. This ensures that you will get the newest ticket.
Then we will reopen this ticket and update it rather than create a new alert ticket. But if all prior alert tickets are inactive for more than 24 hours, we will not find a ticket and will need to create a new one.
If we found a ticket we now need to update the ticket status to make sure it is open and increment and update the Alert Count UDF. We do not have math operations at this time to do the counting, so I use the brute force method shown below.
Get the current count from the ticket and move it to variable custom.AlertCount.
Now we work backwards from our max count value (5 here) and update the variable:
We do this for each possible value from 4 down to 1. I dont show all steps…
The last statement handles the empty or 0 value.
Finally we update the ticket with the value new value.
You can add a test for any trigger value for Alert Count that you want to bring to someones attention. Maybe sending an email or moving the ticket to a new queue or new status.