Here’s a scrip I use for assigning queue depending on requestor email address. 

I stripped it down for you so this code is not tested. It runs through a hash 
so you can put multiple addresses corresponding to multiple queues. If you only 
need to do it for one address then you can eliminate the hash and while loop. 
The regex checks if the requestor email address contains the hash key. So you 
can put a full email address instead of just the domain.


Create a new scrip (condition: On Create, Action: User defined, Template: 
blank) and I applied it to our “INCOMING” queue which all tickets created by 
email go into.

Custom action preparation code:

# initialize vars
my $DestinationQueue;
my $RequestorEmail = $self->TicketObj->RequestorAddresses;

# map domains to queue name
my %DomainToQueueName = (
        'example.com'   => 'Example Queue',
        'example2.com'  => 'Example Queue #2',
        );

# iterate through dealership list and set the value to put in the CF
while ( my $Key = each %DomainToQueueName )
{
        if( $RequestorEmail=~ /\Q$Key/ ) {
                $DestinationQueue = $DomainToQueueName{$Key};
        }               
}

#set the queue
if($DestinationQueue) {
        my( $st, $msg ) = $self->TicketObj->SetQueue($DestinationQueue);
}

return 1;




-- 
Roman Massey

On July 15, 2015 at 5:50:27 PM, Aaron McCormack (aa...@backblaze.com) wrote:

Hi Boris,

Mixing bits of these two might get you on the right track with a scrip 
processing the ticket upon creation, I use something similar for regex matching 
patterns in subject lines and assigning to a specific queue.

http://requesttracker.wikia.com/wiki/SetOwnerAndQueueBySubject
http://requesttracker.wikia.com/wiki/AutomaticCustomFieldValue

Aaron


On Jul 14, 2015, at 2:18 PM, Boris Epstein <borepst...@gmail.com> wrote:

Hello listmates,

If I as an admin need to set a certain queue for requests originating from a 
user - how do I do that? Let us say I have a user John Smith, with an email of 
jsm...@abc.com. How do I make it so that every ticket by email coming from 
jsm...@abc.com goes into a certain queue.

Thanks.

Boris.

Reply via email to