Inbound Action - Create Incident

Pam Walker1
Tera Contributor

Hi 

 

Does anyone have the OOB script for Inbound Action - Create Incident

 

Thanks

3 REPLIES 3

Juhi Poddar
Kilo Patron

Hello @Pam Walker1 

Here is the OOB script for Inbound Action - Create Incident

//	Note: current.opened_by is already set to the first UserID that matches the From: email address

current.caller_id = gs.getUserID();
current.comments = "received from: " + email.origemail + "\n\n" + email.body_text;
current.short_description = email.subject;

current.category = "inquiry";
current.incident_state = IncidentState.NEW;
current.notify = 2;
current.contact_type = "email";

if (email.body.assign != undefined)
   current.assigned_to = email.body.assign;

if (email.importance != undefined) {
   if (email.importance.toLowerCase() == "high") {
		current.impact = 1;
		current.urgency = 1;
   }
}

if (current.canCreate())
	current.insert();

"If you found my answer helpful, please give it a like and mark it as the accepted solution. It helps others find the solution more easily and supports the community!"

 

Thank You

Juhi Poddar

Pam Walker1
Tera Contributor

Thanks @Juhi Poddar 

Hello @Pam Walker1 

 

If you found my answer helpful, please give it a like and mark it as the accepted solution. It helps others find the solution more easily and supports the community!

 

Thank You

Juhi Poddar