Setup Forward Email Inbound Action to update existing Incident ticket else create New ticket

Anuran Sen
Kilo Contributor

Forward Email Inbound Action to update existing Incident ticket else create New ticket if water mark does not exist (example Ref:MSG0770942_4Ju0hb8cK71qaxkpHUb4 )

Below is our configuration setup. Currently it is creating new Incident for all Forwarded email which contains Incident number and watermark.

find_real_file.png

Action

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

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

current.category = "inquiry";
current.incident_state = IncidentState.NEW;
current.notify = 2;
current.contact_type = "email";
current.assignment_group = 'd5f7451fdb4fb30085393aac7c9619e0'; // TCS Automation Engine

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

current.insert();

1 REPLY 1

Himanshu Dubey
Giga Guru

Hi Anuran

Please refer below thread it might help you

https://community.servicenow.com/community?id=community_question&sys_id=7e37cb29db1cdbc01dcaf3231f96...

 

Mark Correct if my answer solves your issue and also mark 👍 Helpful if you find my response worthy.

Thanks & Regards

Himanshu Dubey