Incoming emails to map to existing ticket if available

We have our UPS and Generator devices sending emails to Autotask for incidents such as power outage, power restored, battery tests, etc. They are all coming from different email addresses (ups01, ups02, etc).

I’m looking to find a way to have email2at scan for existing tickets based on the incoming email address if there is no existing ticket, create one but if the contact has an open ticket than add the new ticket as a note but if power is restored use that ticket to close the power failed ticket.

Thanks for posting!

Since each device has a unique from-address, you can use the rule we publish in our library called Support - Create a single ticket per sender as a great starting place:

CleanShot 2023-10-30 at 15.04.32

The rule is designed to create a new ticket for each email sender, and to then add all emails for that sender to this one ticket. Here is that rule by default:

There are a few things you might want to change for your workflow. You may want to modify step 3 to require that the ticket Status != Complete. This will ensure that closed tickets are not reopened. Instead, a new ticket will be created if there are no open tickets for the email sender. You can also delete step 6 in this case.

You also asked about tracking UPS power failures and closing tickets when the UPS power is back online. Can you send a screenshot or copy/paste text showing the emails for losing power and also getting it back?

Hi @Travis and @Boockenstock

I hope you don’t mind me providing my 2 cents. I recently worked on something similar as we have a tool that monitors WAN links and will email us when a link is down and when it comes back up. I was able to accomplish what the OP is requiring in terms of opening and auto closing tickets by creating the following 3 rules (which contain multiple steps within):

Query for open Down Alert – This rule will add a note to an open Down alert ticket if one exists. If there isn’t an open ticket, then it will ignore this rule and move on to the next rule. The idea is to prevent multiple down alert emails for the same link creating multiple tickets.

Create ticket when line is Down – Once the email passes the above rule. Email2AT will query the email for the AT client ID, match it against the company in AT and log the ticket under the correct account.

Resolve ticket when link is up – This will extract the unique link name from the UP email alert and query for an open ticket with the link name. IF found it will close the open ticket and create a ticket note.

In order for this to work, we ensured that each WAN link contained the unique AT ID of the customer. Using Email2AT we extracted the ID from the email alert and matched it against the company in AT so that the ticket was logged under the correct account. All links have a unique name as well. In my scenario, all email alerts come from a single address as well.

Might I suggest ensuring that each UPS or generator is captured in AT as an installed product. If you can embed the AT product link in the email that it generates, you can then log tickets against the product itself which will be useful for reporting, you can see which device/s are ticketing more than others.

Thank you both @travis and @Kalin for the assist and the great idea. We do not currently have products setup but I will take a look at doing so.

The subject is =
usa-ups-xx: Cleared:Message: Battery to utility transition

The email body =
“*********************************************
IP Address: xx.xx.xx.xx
Event: Cleared:Message: Battery to utility transition [ Mon Oct 30 11:13:40 2023(UTC-04:00) ]
*********************************************”

You will need to add one more step that only fires if the subject line contains Battery to utility transition. The action step should be an “API: Update Object” to update the ticket status to Complete.

Here’s what the step would look like:

And here are the contents of the “Only perform this action if…” field:

Let us know how it goes!!

1 Like