Intercept Tickets that are 90 days and older creating a new ticket with previous details attached

Good Evening Team,

I wanted to share a use case we’re currently addressing:

Use Case

We’ve observed that tickets marked as Complete can be unintentionally reopened when a client replies to the original email thread. This happens because the reply is sent to our support address and includes the original ticket number, which causes the system to reopen the closed ticket. This behavior disrupts our reporting, particularly around ticket resolution times.

Proposed Solution

  1. Identify incoming emails with a subject line containing "RE:" and a valid ticket number.
  2. Check the ticket status in Autotask to confirm if it is marked as Completed.
  3. Evaluate the ticket age to ensure it meets our criteria for archival or follow-up.
  4. If conditions are met, append the new email content as a note to the existing (completed) ticket.
  5. Create a new ticket, and include the note with the previous ticket’s details.
  6. Add a reference link in the new ticket pointing back to the original ticket.
  7. Proceed with standard ticket processing for the newly created ticket.

I’ve started building a rule to implement this logic, but as I’m still new to MSPIntegration, I’d appreciate any insights or suggestions on whether this is the most effective approach—or if there are better alternatives we should consider.

Thanks in advance!

Hi @JDCBX

Welcome to the community!

Within the “Autotask Update Existing Ticket” workflow action step is a checkbox to “Filter Tickets”. You can use this to limit what tickets are located when MSPintegrations tries to locate the existing ticket.

Here’s a thread showing how it works:

And here’s a post in another thread showing a more customized approach using that same option:

If you use that check box, you can modify your rule to have just two steps:

Step 1: Update Existing Autotask Ticket, with the filter enabled to only update if the ticket is not old.
Step 2: Create a new Autotask Ticket

Let us know how this works!

Good Morning

So thus far what is working

  1. am able to find the ticket number in the email subject field so the trigger is working

  2. Extract the ticket number from the subject line and pass to variable

  3. Query Autotask based on the ticket number retrieved from the step above also then query the Create date, the ticket number is equal to what was retrieved, query the status of the ticket received this should be equal to complete

What is not working or i am unsure how to achieve
4. Query the the returned ticket details date to see that the date is equal to or older than 90 days

  1. Create a new ticket
  2. Update new ticket with old ticket details either in a note or a hyper link

Hi @JDCBX ,

I recommend you use the query to determine if the ticket is older than 90 days. Instead of querying for the ticket and then checking the date, the query itself would only return the ticket if it’s old.

Your current step 2 already does this. If step 2 returns a ticket, you know the ticket is complete and old. If step 2 does not return a ticket, then either the ticket number wasn’t valid or the ticket is not old, but either way you know that the ticket number doesn’t represent an old ticket.

Your steps would look like this:

  • Step 1. Extract the ticket number from the ticket (done)
  • Step 2. Query for the ticket by ticket number, but only return the ticket if it’s old (done)
  • Step 3. If custom.QueryTicket.id is empty, stop processing this rule
  • Step 4. Create a new ticket
  • Step 5. Add a note to the new ticket with a link to the old ticket (use {{custom.QueryTicket.meta.autotask_url}} and {{custom.QueryTicket.TicketNumber}})
  • Step 6. Stop processing the email completely (so no more rules are executed)

HI Travis my current step two looks like this.

I am Querying the following items

Create Date Less then or == {{date subtract=“90 days” format=“yyyy-MM-dd”}}
is this correct as i am only getting the date string back ?

Ticket Number == {{custom.extractedTicketNumber.TicketNumber}}
This is being extracted

Status == Complete
I do not see this Value

This is the output from my Test

In your results, it shows that the query returned ticket T20170308.0001. Is it safe to assume that’s an old ticket?

That is correct yes that is the value being returned from the initial trigger which looks at the subject of the email to see if the ticket number exists.

The Query then takes the ticket number found and Queries Autotask to match the ticket and i then want to match the Create Date & Status and if i can do the checking of the date n the same Step that would be a bonus

The fact that that the query step returned a ticket is what tells you that the ticket is old. If you test with a recent ticket number, that query step will return nothing because no ticket matches all 3 criteria.

In other words, the query is telling Autotask “Send me a ticket but only if it matches all 3 of these criteria: the ticket number is XYZ, the status is complete, and the create date is older than 90 days ago”.

If Autotask returns a ticket, then you know it’s an old ticket.

If Autotask doesn’t return a ticket, then you know the ticket number does not represent an old ticket.

Thank you I am going to test the theory now with a ticket that is live and not 90 days old

Update so i tested this against a ticket currently being worked on and the rule was skipped

I then tested it against another Ticket that is 90 days or older and the rule was skipped again

If the rule didn’t pick up a ticket you expected to be picked up, send me the URL to that history in your MSPintegrations account so I can review the logs and see exactly what was executed.

Hi here is the link
https://console.mspintegrations.com/#/email2at/advanced/history/17532904838540w

This is the rule that intercepts closed tickets:

https://console.mspintegrations.com/#/email2at/advanced/mailboxes/hosted/164560727202264/rules/172483036205093

It was completely skipped:

The reason it was skipped is because it has an expression that only fires it the email subject line matches “Assigned to you” with a ticket number AND it matches a ticket number:

Did you intend to make the expression “OR” instead of “AND”? That would then match and fire for the example email you sent.

Hi Travis i actually just saw that now let me amend and restest
I have tested the existing ticket and as you said it did not match on the regular expression

I have just completed the second test to test another ticket that is 90 days old and yes as you said it does work.

This is great can i delete all the other steps beneath the Query Autotask step and continue with your suggestion of creating the new ticket and appending the existing one

Thank you for your assistance Travis

Good Afternoon Travis

I am pleased to report the rule is working the core concept is working
I need to clean up some of the bindings in the email that’s just formatting so i am ok with that.

Last Question my rule sits at the top of all the other rules but there is once rule that also checks if a Ticket number is in the subject line and appends a note to the original ticket and this is a problem as it is appending it to the original ticket which is then opening that ticket so i need to create a condition that stops this from happening not so sure what that looks like

Send me the URL to an email that was processed by the wrong rule so I can check the logs and give you an informed answer.

Morning here is the link MSPintegrations