Keep Subject from incoming Email to existing Ticket

Hi,

i want to couple 2 ticket systems. My is RT and a customers helpd desk also working with ticket numbers parsed via subject.

Workflow:

  • Ticket is initiated and sends mail to a dedicated email address of the customers helps desk
  • Help desk of the customer initiate a new ticket with a) rt ticket numer and b) its own number
  • Answer is sent by the customers ticketsystem - i see both numbers in the subject
  • When i reply on the ticket, the subject is equal to the original subject (without customers ticket id) - so customers ticket system opens a new ticket

I can set the subject manually on replay but this is not acceptable. How can i keep the customers id in the subject?

Thanks in advance,

Maurice

How about an “On Correspondence” scrip that looks to see if the message has come from the customer’s system and if the ticket subject in RT doesn’t have their ID number in it, and if not, updates the RT ticket subject appropriately?

Sounds good and should solve the problem but i am not able to write this script. :-/

Isn’t this what the $ExtractSubjectTagMatch setting is for in the RT config?

To the OP: what does the ticket id number from the external helpdesk look like in the message subject?

1 Like

The subject contains: “Ticket-Nr. SU2309-0298” followed by some text and the rt ticket no. Here the complete subject from a test ticket:
RĂĽckfrage zu Ticket-Nr. SU2309-0298 zum Thema: [Extern] [RT #1907] Test Ticketsystem
The part including [Extern] is set by the customers system, the rest by rt

Thx in advance!

Hi @MuckiSG

There is the point in the workflow as @GreenJimll mentioned:
If your system is the first that opens the ticket you have to update the tickets subject if the answer is received. You see the external number in transaction-subject, only.

Step 1: Test
Update tickets subject manually. (“The Basics”->“Subject” or “Grundlagen”->“Betreff”)
I would do this at least to proof the conept. So make sure it works after that.

In daily work it can be done by staff, too. Depends on the count of tickets. A few a week is ok. More than that or less than two a month needs automation.
We do it still manually.
Additional we put the external Ticket-ID in a CustomField (one for all) to search for this ID.

Optional: Automate
I see no other way than coding as Scrip.

  • Condition: On Correspond
  • Custom preparation code: Test if sender is other ticket-system, continue or quit
  • Custom commit code: Set tickets subject to the value of transactions subject

I do not have this code, yet an I am too bad to code this on the fly. So I cannot share code.

Step 2:
Prevent email-loops!!!
You have to care for automatic answers of the systems. Each external system is different an needs to be analyzed for this.
Often the “On Resolve” leads to reopen the ticket in the other system.

Regards, Andre.

Thanks @rubberduck,

i am not sure what $ExtractSubjectTagMatch exactly does but i going to figure that out today. Just an regex to filter the subject.

Scripting in RT is not my world, so i have to hire somebody. Not easy in Germany but i know somebody who might help me.

Email-looping is well known as a problem and in our case it works fine but always a good point in connecting different ticket systems.

I will publish the solution when it is working, hope next week.

Thanks and have a nice weekend,

Maurice

Ok, I did not know this Scrip-Action and cannot find it in 4.4.6 actions. I’ll look on rt5 test-system.
So it seems to do what one need to do, change the subject.

https://docs.bestpractical.com/rt/5.0.4/RT/Action/ExtractSubjectTag.html

Viele GrĂĽĂźe, Andre.

So, long time ago i worked on it but it is solved by now. I was a bit on the wrong way. For everybody who has problems with “ExtractSubjectTag” here some hints:

  • Your regex only searches for the ID of the other Ticketsystem. in my case: qr/([A-Z]{2}\d{4}-\d{4})/)
    2 large characters follwowed by 4 numbers followed by “-” followed by four numbers.
  • RT then keeps the original subject and the matching part of the subject
  • There might be problems within teh workflow like closing/resoving tickets with reply. That will always open the ticket on the other side.
  • From my point of view it shoulkd work fine if every e.g. customer has its own queue. So you the email adress and the regex which should not interfer with other customers thought it is a global setting.

Hope it helps some one out there,

Maurice

Thank you for sharing your experience @MuckiSG

I did a little of research myself past days and I do not think this is meant to cooperate with several customer- or supplier- ticketsystems. It es meant to bond two or three well known systems preverably in the same organisation. So because of the global setting you have to cover all possible regexes.

But anyway it is a solution!

The third bulletpoint is what I mean if I said “prevent mail loops” :wink:
We discard this reopening emails on delivery to RT before calling the rt-mailgate. It is handled for each partner individually.

regards, Andre.

1 Like