<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">Here’s a scrip I use for assigning queue depending on requestor email address. </div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">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.</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">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.</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">Custom action preparation code:</div><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;"><br></div><div id="bloop_customfont" style="color: rgb(0, 0, 0); margin: 0px;"><div id="bloop_customfont" style="margin: 0px;"><font face="Courier"># initialize vars</font></div><div id="bloop_customfont" style="margin: 0px;"><font face="Courier">my $DestinationQueue;</font></div><div id="bloop_customfont" style="margin: 0px;"><font face="Courier">my $RequestorEmail = $self->TicketObj->RequestorAddresses;</font></div><div id="bloop_customfont" style="margin: 0px;"><font face="Courier"><br></font></div><div id="bloop_customfont" style="margin: 0px;"><font face="Courier"># map domains to queue name</font></div><div id="bloop_customfont" style="margin: 0px;"><font face="Courier">my %DomainToQueueName = (</font></div><div id="bloop_customfont" style="margin: 0px;"><font face="Courier"><span class="Apple-tab-span" style="white-space:pre"> </span>'example.com' <span class="Apple-tab-span" style="white-space:pre"> </span>=> 'Example Queue',</font></div><div id="bloop_customfont" style="margin: 0px;"><font face="Courier"><span class="Apple-tab-span" style="white-space:pre"> </span>'example2.com' <span class="Apple-tab-span" style="white-space:pre"> </span>=> 'Example Queue #2',</font></div><div id="bloop_customfont" style="margin: 0px;"><font face="Courier"><span class="Apple-tab-span" style="white-space:pre"> </span>);</font></div><div id="bloop_customfont" style="margin: 0px;"><font face="Courier"><br></font></div><div id="bloop_customfont" style="margin: 0px;"><font face="Courier"># iterate through dealership list and set the value to put in the CF</font></div><div id="bloop_customfont" style="margin: 0px;"><font face="Courier">while ( my $Key = each %DomainToQueueName )</font></div><div id="bloop_customfont" style="margin: 0px;"><font face="Courier">{</font></div><div id="bloop_customfont" style="margin: 0px;"><font face="Courier"><span class="Apple-tab-span" style="white-space:pre"> </span>if( $RequestorEmail=~ /\Q$Key/ ) {</font></div><div id="bloop_customfont" style="margin: 0px;"><font face="Courier"><span class="Apple-tab-span" style="white-space:pre"> </span>$DestinationQueue = $DomainToQueueName{$Key};</font></div><div id="bloop_customfont" style="margin: 0px;"><font face="Courier"><span class="Apple-tab-span" style="white-space:pre"> </span>}<span class="Apple-tab-span" style="white-space:pre"> </span></font></div><div id="bloop_customfont" style="margin: 0px;"><font face="Courier">}</font></div><div id="bloop_customfont" style="margin: 0px;"><font face="Courier"><br></font></div><div id="bloop_customfont" style="margin: 0px;"><font face="Courier">#set the queue</font></div><div id="bloop_customfont" style="margin: 0px;"><font face="Courier">if($DestinationQueue) {</font></div><div id="bloop_customfont" style="margin: 0px;"><font face="Courier"><span class="Apple-tab-span" style="white-space:pre"> </span>my( $st, $msg ) = $self->TicketObj->SetQueue($DestinationQueue);</font></div><div id="bloop_customfont" style="margin: 0px;"><font face="Courier">}</font></div><div id="bloop_customfont" style="margin: 0px;"><font face="Courier"><br></font></div><div id="bloop_customfont" style="margin: 0px;"><font face="Courier">return 1;</font></div><div id="bloop_customfont" style="font-family: Helvetica, Arial; font-size: 13px; margin: 0px;"><br></div><div id="bloop_customfont" style="font-family: Helvetica, Arial; font-size: 13px; margin: 0px;"><br></div><div id="bloop_customfont" style="font-family: Helvetica, Arial; font-size: 13px; margin: 0px;"><br></div></div> <br> <div id="bloop_sign_1437078817629353984" class="bloop_sign"><div style="font-family:helvetica,arial;font-size:13px">-- <br>Roman Massey<br></div></div> <br><p class="airmail_on" style="color:#000;">On July 15, 2015 at 5:50:27 PM, Aaron McCormack (<a href="mailto:aaron@backblaze.com">aaron@backblaze.com</a>) wrote:</p> <blockquote type="cite" class="clean_bq"><span><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div></div><div>
<title></title>
Hi Boris,
<div class=""><br class=""></div>
<div class="">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.</div>
<div class=""><br class=""></div>
<div class=""><a href="http://requesttracker.wikia.com/wiki/SetOwnerAndQueueBySubject" class="">http://requesttracker.wikia.com/wiki/SetOwnerAndQueueBySubject</a></div>
<div class=""><a href="http://requesttracker.wikia.com/wiki/AutomaticCustomFieldValue" class="">http://requesttracker.wikia.com/wiki/AutomaticCustomFieldValue</a></div>
<div class=""><br class=""></div>
<div class="">Aaron</div>
<div class=""><br class=""></div>
<div class=""><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Jul 14, 2015, at 2:18 PM, Boris Epstein
<<a href="mailto:borepstein@gmail.com" class="">borepstein@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">Hello listmates,
<div class=""><br class=""></div>
<div class="">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 <a href="mailto:jsmith@abc.com" class="">jsmith@abc.com</a>. How do I make
it so that every ticket by email coming from <a href="mailto:jsmith@abc.com" class="">jsmith@abc.com</a> goes into a
certain queue.</div>
<div class=""><br class=""></div>
<div class="">Thanks.</div>
<div class=""><br class=""></div>
<div class="">Boris.</div>
</div>
</div>
</blockquote>
</div>
<br class=""></div>
</div></div></span></blockquote></body></html>