Auto assigning ticket to particular group based on email subject line.

Community Alums
Not applicable

Hi ,

we have configured to auto create ticket based on email subject line through inbound action.

Now our requirement is like base on subject line auto created request should assign to particular group.

could some help us how to achieve this.

regards,

roopa

21 REPLIES 21

Community Alums
Not applicable

Hi,



i have to write new action or have modify existing one..?


bcz automation already there.. and its like user will send mail to HR group id..then request is creating..



Regards,


roopa


modify the existing one or create new and set active false to existing one.


Community Alums
Not applicable

hi,




here is   inbound action view..






condition : (email.direct.toLowerCase().indexOf("askhr@xxx.com") > -1 || email.direct.toLowerCase().indexOf("ask.hr@xxx.com") > -1)||




This is the Action..


================


var cond = email.from;


gs.log("The AskHR Index Of Condition = " + cond);






current.description = email.body_text;


current.short_description = email.subject;






var sid = gs.createUser(email.from);






current.caller_id = sid;


current.opened_by = sid;






current.category='General HR';


current.u_request='General or Other HR Question';






if (email.subject.indexOf("SGP Medical Claims Supporting Document Submission &   SGP Leave Application") >= 0)


{


current.assignment_group = 'sys_id';


}










if(email.from.indexOf("@xxx.com") > -1)


    {current.contact_type ='Email';}


else


    {current.contact_type='External Email';


          //----- 2/5/2013 rohana - added to control generic email address


          var newwatchlist;


          var askhr = 'askhr@xxx.com';


          var askhrU = askhr.toLowerCase();


          var askhr2 = 'ask.hr@xxx.com';


          var askhr2U = askhr2.toLowerCase();


          var xxxemail = 'xxx@service-now.com';


          var xxxemailU = xxxemail.toLowerCase();


         


          var wList = email.origemail;


          wList = wList.toLowerCase();   //   3/29/2013 rohaNa added


         


          if ((wList == askhrU) || (wList == askhr2U) || (wList == xxxemailU))


          {


                current.watch_list = "";


          }  


          else


          {


                current.watch_list = email.origemail;    


          }      


        //-------------------------------------------------------------------






    //current.watch_list = email.origemail; // 2/5/2013 rohana - commented






    }










current.insert();






===============




i added one more condition like || (email.direct.toLowerCase().indexOf("xxxtraining@service-now.com")






its not creating any request.. in logs i can see..Skipping 'AskHR Inbound(FW)', email is type 'new', which does not match Inbound Email Action's type 'forward'


Where is the group sys_id??


Make sure you have chosen the type field as "new" while creating the inbound email action.


For auto populating assignment group , the subject line of email should exactly match with if condition specified ie. SGP Medical Claims Supporting Document Submission &   SGP Leave Application.