We have a requirement to auto reject email with the subject line “Bulk” for the queue name “Incident report”. I have written the scrip for it … Please find the scrip below.
Custom condition:
my $match = “Bulk”;
my $t_subject = $self->TicketObj->Subject;
my $matchqueue = “Incident Reports”;
my $t_queue = $self->TicketObj->queue;
if ( $t_subject =~ /$match/i && $t_queue =~ /$matchqueue/i ) {
return 1;
}
else {
return 0;
}
You could avoid the queue check and only apply the scrip to your incident reports queue. Also I’d add a check in the condition for the transaction type being the create transaction: