Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Inbound action set Priority based in the body of email (Critical-1) (Warning -2)(Info-4)

Xhare
Tera Contributor

Hi Team,

 

How can we set up the Incident Priority created by Inbound actions.

Example:

email body contains Critical set to Priority 1- Critical

email body contains Warning set to Priority 2- High

email body contains Info set to Priority 4 -  Lower

 

1 ACCEPTED SOLUTION

Sarika S Nair1
Kilo Sage

Hi @Xhare 

try below inbound script 

if(email.body_text.indexOf('Critical')!=-1){

current.priority='<choice value of priority 1 - critical>';

}else if(email.body_text.indexOf('Warning')!=-1){

current.priority = '<choicevalueof priority 2 - High>';

}

else if(email.body_text.indexOf('Info')!=-1){

current.priority ='<choicevalueof priority 4 - Low>';

}

current.insert();

View solution in original post

2 REPLIES 2

Himani_14
Mega Sage

Sarika S Nair1
Kilo Sage

Hi @Xhare 

try below inbound script 

if(email.body_text.indexOf('Critical')!=-1){

current.priority='<choice value of priority 1 - critical>';

}else if(email.body_text.indexOf('Warning')!=-1){

current.priority = '<choicevalueof priority 2 - High>';

}

else if(email.body_text.indexOf('Info')!=-1){

current.priority ='<choicevalueof priority 4 - Low>';

}

current.insert();