<div dir="ltr"><div><div><div><div><div><div><div><div><div><div>Greetings<br><br></div>I'm using RT 4.0.10 and am trying to create a scrip to accomplish this.  If the subject contains the word urgent (not case senstive, thus the /urgent/i), I want it to send me an SMS.<br>
<br>The portion of sending the SMS message itself I figured out so that's less of a concern - in the template, I just CC the sms address (if Action=Notify AdminCCs', this works), though I am open to other suggestions.  It's the scrip itself that I'm really having issues with.<br>
<br></div><br>What I have so far:<br><br>Description: On create URGENT, notify SMS<br></div>Condition: On Transaction<br></div>Action: User Defined<br></div>Template: On Create Urgent ticket, notify SMS<br></div>Stage: TransactionCreate<br>
<br><br></div>===Custom condition:  n/a<br><br></div><div>===Custom action prep code:<br>my $txn = $self->TransactionObj;<br>my $type = $txn->Type;<br>return 0 unless $type eq "Status"<br>    || ( $type eq 'Set' && $txn->Field eq 'Status');<br>
<br>return 0 unless $txn->NewValue eq "new";<br><br></div><div>===Custom action cleanup code:<br><br></div>my $subject = $self->TicketObj->Subject; <br><br>if ($subject =~ /urgent/i) {<br>return 1;<br>}<br>
else {<br>return 0;<br>}<br><br><br></div></div>I found some decent references out there, but this isn't sending the notification and I'm stumped.  I know there are many people out there who have done the equivalent of what I'm trying to accomplish.<br>
<br><br><br>Thanks<br><div><div><div><br></div></div></div></div>