[rt-users] Custom scrip to parse new emails and reject them
Steve Hopps
steve.hopps at gmail.com
Tue Nov 25 13:54:52 EST 2008
Okay, I've managed to get this to capture new tickets created via the
helpdesk, but it's still not grabbing tickets created via e-mail. Here's
what I have so far:
----------------------------------------------------
Condition: User Defined
Action: User Defined
Template: Global template: Blank
Stage: TransactionCreate
Custom Condition:
my $Ticket = $self->TicketObj; my $Transaction = $self->TransactionObj; my
$Attachment = $Transaction->Attachments; my $AttFirst = $Attachment->First;
my $Content = $AttFirst->Content; my $test = 0; $test = 1 if (lc($Content)
=~ m/the caller hung up before leaving a message/i); if($test == 1) { return
1; } return;
Custom Action Prep:
$self->TicketObj->SetStatus( "rejected" ); return 1;
Custom Action Cleanup:
return 1;
----------------------------------------------------
So if I create a new ticket using the new ticket function of the helpdesk,
and paste in the line I want to match, the ticket is rejected immediately
upon creation.
However, emails that come from our voicemail system still become tickets
with a status of 'new'
Any suggestions? I appreciate any help, right now we spend way too much time
just clearing out these empty tickets :(
-Steve
On Mon, Nov 10, 2008 at 12:21 PM, Ruslan Zakirov <ruz at bestpractical.com>wrote:
> Clean up this:
> http://wiki.bestpractical.com/view/ReplyBasedUponContent
> Apply this action with obviouse changes:
> http://wiki.bestpractical.com/view/ResolveTicket
>
> On Mon, Nov 10, 2008 at 9:04 PM, Steve Hopps <steve.hopps at gmail.com>
> wrote:
> > Hi, I'm sorry if this is noobish, but I'm having trouble figuring out how
> to
> > do it
> > We use a service called phonetag to take voicemails and transcribe them
> > (with attached .wav files) to emails that reach our helpdesk. The problem
> is
> > about 75% of them are blank, because the caller did not leave a message.
> > When that happens the email comes in saying "We're sorry, the caller hung
> up
> > before leaving a message". I'd like to look for "the caller hung up" and
> > have RT reject any tickets from emails containing that.
> > I tried writing my own conditions based on some samples I found online
> but I
> > can't quite get it working, can anyone recommend some documentation that
> > would get me on the right track, or any other kind of help?
> > -Steve
> > _______________________________________________
> > http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
> >
> > Community help: http://wiki.bestpractical.com
> > Commercial support: sales at bestpractical.com
> >
> >
> > Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> > Buy a copy at http://rtbook.bestpractical.com
> >
>
>
>
> --
> Best regards, Ruslan.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20081125/083ed8ff/attachment.htm>
More information about the rt-users
mailing list