We have a 3rd party system that emails us alerts. The 3rd party recently had an issue which meant that alerts for one of our customers didn’t come through.
We want to put in a scheduled with the following logic.
Find all x Contracts in AutoTask which include this 3rd Party system
For each contract search for when the last ticket has come in.
Fire a ticket if there have been no alerts when it reaches 7 days
Fire a ticket if there have been no alerts when it reaches 14 days
Fire a ticket if there have been no alerts when it reaches 21 days
Any ideas how I can work out the date between the last ticket that came in and the current days to give a number of days?
Instead of querying Autotask for the most recent ticket and comparing its timestamp, you can query Autotask for a ticket that was created within the timeframe. If none are returned, then you know it’s missing.
is there a way to compare the date a ticket was created with todays date and work out the number of days that have elapsed? As I dont want the same rule firing on day 8, 9, 10 etc
By default, you will receive the first ticket that was created (the oldest ticket). To retrieve the most recent ticket, you should configure the query action to sort the returned tickets by date:
It’s also important to note that the sort is done after the tickets are retrieved from Autotask, and the query can only retrieve 500 tickets at once. You should be sure to limit the query so that it never retrieves more than 500 tickets, or else MSPintegrations will only ever retrieve the 500 oldest tickets and then sort those to find the newest of those oldest tickets.
MSPintegrations doesn’t have any math functions, which would be required for this logic. There is currently no way to compare two dates to calculate the difference.