Email ticket updates

Hello all,

I am feeling quite dumb today (that’s just an FYI) and am not sure what I
might need to do to implement updating tickets via email, but there are some
caveats to that.

The workflow is as follows (on a typical ticket)

Customer calls into after-hours support
Ticket is created and given an ID in their proprietary ticketing system
Ticket is sent via email to my RT installation and created in the queue for
our after-hours group and assigned a ticket number

This is working properly, the issue comes up when the following happens

Customer calls into after-hours support
Ticket is created and given an ID in their proprietary ticketing system
(Let’s say ticket #GX-9943-Y)
Ticket is sent via email to my RT installation and created in the queue for
our after-hours group and assigned a ticket number (HCC #56093)
Customer calls back to after-hours support regarding the same ticket
Ticket is updated in their proprietary system
Ticket is sent via email to my RT installation and created in the queue for
our after-hours group and assigned a ticket number (HCC #56095)

What I would like to have happen is that when they are doing an update on
their end, it will also update on my end. So I don’t (sometimes) have 10
open tickets for 1 customer with a single issue.

In thinking about this so far, it would seem that the only thing that could
be common between the two tickets would be some information in the subject
line such as the ticket number from their system (because if we did it by
name, we’d get only one long ticket over the course of time.

Is there a way that when a ticket comes in via email I can look to see if it
has some information in the subject so it will just update the already
created ticket? They have access to our system and can
look/create/update/whatever any ticket they choose, but we are trying to
avoid the techs having to do double entry.

Any insight is appreciated.

Greg Evans
Hood Canal Communications
(360) 898-2481 ext.212

Is there a way that when a ticket comes in via email I can look to see if it
has some information in the subject so it will just update the already
created ticket?

Create a custom field called something like “external ticket id”.

Add an “On Create” scrip such that when email comes in from the
proprietary ticket system:

(a) The scrip extracts the ticket id from the email.

(b) The script searches for a ticket that has the same value in the
"external ticket id" field.

© If it finds a matching ticket, the email is appended to the ticket, or

(d) If it does not find a matching ticket, a new ticket is created
with the “external ticket id” field appropriately populated.

Having not actually tried to implement this, I’m a little uncertain
about the specifics of ©. You may find that this step means “copy
the email content to the target ticket, and then mark the current
ticket resolved/deleted/etc”.

Lars Kellogg-Stedman lars@oddbit.com

Is there a way that when a ticket comes in via email I can look to see
if it
has some information in the subject so it will just update the already
created ticket?

Create a custom field called something like “external ticket id”.

Add an “On Create” scrip such that when email comes in from the
proprietary ticket system:

(a) The scrip extracts the ticket id from the email.

(b) The script searches for a ticket that has the same value in the
"external ticket id" field.

© If it finds a matching ticket, the email is appended to the ticket,
or

(d) If it does not find a matching ticket, a new ticket is created
with the “external ticket id” field appropriately populated.

Having not actually tried to implement this, I’m a little uncertain
about the specifics of ©. You may find that this step means “copy
the email content to the target ticket, and then mark the current
ticket resolved/deleted/etc”.

This could work - although be aware that this will always create a new
ticket in your RT. If you delete it in the scrip as Lars suggests, that
may not be an issue for you. Appending to the other ticket would mean
calling the Correspond method on that ticket using the incoming email data.

A possible problem here is that the functionality is obscure - it’s buried
in the scrip code, and an admin in the future may not be aware that it’s
there. If someone adds a new ‘on create’ scrip to autoreply to requestors
for example, you’d have notifications being sent to customers from a
deleted ticket, which may be confusing.

An alternative approach might be to modify the code in
lib/RT/Interface/Email.pm (Gateway method). This is where RT examines
incoming mail to decide whether to create a new ticket or append to an
existing one. You can add code here to examine the incoming subject line
and see if it matches an existing RT ticket or not.

Steve

Stephen Turner
Senior Programmer/Analyst - SAIS
MIT IS&T

Is there a way that when a ticket comes in via email I can look to see
if it
has some information in the subject so it will just update the already
created ticket?

One thing to add - try to come up with a subject line syntax that is
unlikely to appear in emails coming in from other sources, or you’ll get
replies attached to wrong tickets (speaking from experience!).

Steve

Stephen Turner
Senior Programmer/Analyst - SAIS
MIT IS&T