Auto assign to queue based on Subject and/or Body keywords

I apologize if someone has already asked and answered this, but I
couldn’t find anything similar on the lists.

We’re using RT 3.0.7 for tracking trouble tickets in-house. We have
several queues, each corresponding to a support department. I’d like
to auto-assign tickets based on keywords either in the Subject or in
the Body of the incoming ticket. For example, if the Subject contains
the word ‘toilet’, the ticket should be automatically assigned to the
facilities queue. Currently, we have the main queue that every ticket
comes in to (ie. “help”), and people who triage those tickets to other
queues. I’d like to automate it as much as possible, and am seeking
some advice…

Should I write scrips for the “help” queue that parses the Subject
and/or Body for keywords, then changes the queue assignment
appropriately? (And has anyone else already done this?)

Or, would it be better to write a perl wrapper that uses the CLI
tools? This way, any emails to say "help@whatever.com" gets parsed
and assigned to a particular queue before RT even sees it. I’ve seen
some mention of the CLI tools getting lots of improvement, and
wondered if writing wrappers around the CLI tools is the preferred way
of customizing RT? Of course, I’d like to minimize the amount of
tweaking we’d have to do for new RT releases. =)

Thanks in advance for your help!

Greg

Should I write scrips for the “help” queue that parses the Subject
and/or Body for keywords, then changes the queue assignment
appropriately? (And has anyone else already done this?)

This is how I would do it. (I do some similar things for custom fields.)

Or, would it be better to write a perl wrapper that uses the CLI
tools? This way, any emails to say "help@whatever.com" gets parsed
and assigned to a particular queue before RT even sees it. I’ve seen
some mention of the CLI tools getting lots of improvement, and
wondered if writing wrappers around the CLI tools is the preferred way
of customizing RT? Of course, I’d like to minimize the amount of
tweaking we’d have to do for new RT releases. =)

I do this too. :slight_smile:

It’s a three line scrip…

but if you already have something wrapping the mailgate, (as I do for
spam and other filtering) modifying the queue there makes sense too.

-R