Query if ticket is closed

Hopefully an easy one but I would like to configure a rule to look to see if an existing ticket is closed but only if it comes from a specific email address.

We have a powerapp that updates AutoTask but it keeps re-opening old tickets so I would like MSP to look for an existing ticket and to also check if its not complete, if it is, move the message to a folder, if its not then update the ticket.

I have tried to use the filter element of the update ticket which again works but all that happens is that it skips the step and moves on and often just passes to the next ruleset which creates a brand new ticket.

Ideally, I would like the following:

  • Run of the email has been sent by a specific email address.
  • If the email contains a ticket reference and is not complete, update the ticket, move the email and stop processing completely.
  • If the email contains a ticket reference and is complete, do not update, move the email and stop processing the email completely.
  • If the email does not contain a ticket reference, log a new ticket and stop processing completely.

I have it partly working by using the filter but all that happens is that the ruleset skips and moves to the next ruleset and a new ticket is created.


I think the logic should be:

  • Extract Ticket Number and store in variable. custom.TicketNumber
  • Query Ticket Number and Store in variable. custom.Ticket

Then create rules to update ticket but make the conditions for them to run

For example if you want it to update ticket if not complete, then query the ticket status and say only do if not equal to complete.

Hope that makes sense

Hi Dale,
Thank you, I was on the right track previously but I was trying to find a way to extract the ticket number from the email and query that but couldnt find a way.

Is there any command or help you can offer to help extract the ticket please?



You could use Update Existing AutoTask ticket which includes that logic


or use a regular expression. When you select this option it gives you the code for the ticket number.

1 Like

yes thank you, pretty much as soon as I sent that, I looked on the MSP website and found the reges detail, just looking at it now…

1 Like

thanks @dale, I have been able to get a fairly comprehensive ruleset to work with all the nuances that business requires.