The Zurich release has arrived! Interested in new features and functionalities? Click here for more

if sender is abel tuter@service now.com, create the incident ticket with contents of the email. create incident ticket to technical group with short description software issue and create another incident ticket for cmdb group with short description w

Mandhula Harish
Kilo Contributor

For example:-

if sender is abel tuter@service now.com, create two incident tickets with contents of the email and assign to two different assignment groups.

create incident ticket to

1. Technical group with short description as "software issue"     and

2. create another incident ticket for cmdb group with short description as "windows server".

1 ACCEPTED SOLUTION

Imran Ahmad1
Kilo Guru

 

find_real_file.png

find_real_file.png

 

find_real_file.png

 

 

Hii @Mandhula Harish,
 

You can also try this code to achieve your requirement, It's easy to understand the logic and Tested by me:-

create Inbound Email Action

In Action tab copy and paste below code and change sys id as per your business requirement.

 

(function runAction(/*GlideRecord*/ current, /*GlideRecord*/ event, /*EmailWrapper*/ email, /*ScopedEmailLogger*/ logger, /*EmailClassifier*/ classifier) {
    
    
var group = ["019ad92ec7230010393d265c95c260dd","0a52d3dcd7011200f2d224837e6103f2"]; // Instead of passing sys_id in code try to create system properties and call it in array name is group its good pratice and recommended by servicenow.
    
    var short_description = ["software issue","windows server"];
    var j = 0;
    for(var i = 0 ; i<= group.length-1;i++){        
        
    var gr = new GlideRecord("incident");
    gr.intialize();
    gr.assignment_group = group[i];
    gr.short_description = short_description[j];
        gr.description = email.body_text;
            gr.insert();
        j=j+1;
    
        }
    

})(current, event, email, logger, classifier);

 

 

 

Regards,

Imran Ahmad

 

 

Please send your feedback

Please Mark helpful below:-

View solution in original post

11 REPLIES 11

ersureshbe
Giga Sage
Giga Sage

Hi,

You have OOB Business rule to create a single incident. As per your requirement, you should write the business rule and validate as per your scenario and create another incident.

Please mark as correct answer if it helped

 Regards,

Suresh.

Regards,
Suresh.

if sender is abel tuter@service now.com

By using inbound email actions can we create two incidents at a time.

By using inbound email actions can we create incident tickets.

Yes you can do. You should add this condition in Script using if statement else you can add this email address in condition field.

Please mark as correct answer if it helped

Regards,

Suresh

Regards,
Suresh.