Gurpreet07
Mega Sage

Try this with only one inbound action . Code something like below


  1. // Define Caller Details  
  2. var callerID = gs.getUser().getRecord();  
  3. var sEmailAddress = email.origemail.toLowerCase();  
  4.   if (sEmailAddress.indexOf("ithelpdesk@conns.com") != -1) {  
  5.   current.assignment_group.setDisplayValue("IT Helpdesk");  
  6.   }
  7. else if(sEmailAddress.indexOf("security@conns.com") != -1){
  8. current.assignment_group.setDisplayValue("IT Securities");  
  9. }
  10. current.caller_id = callerID.getValue('sys_id');  
  11. current.location = callerID.getValue('location');  
  12. current.u_phone_number = callerID.getValue('phone');  
  13. current.contact_type = 'email';  
  14.    
  15. // Define Incident Details  
  16. current.status = 1;  
  17. current.short_description = email.subject;  
  18. current.description = email.body_text;  
  19.    
  20. current.insert();