- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2015 09:49 AM
When an incident has more than one customer involved, each person that is replying to the emails is having a ticket created. Need to know the rule that is updating incidents when emails come in and figure out why they are creating new incidents instead of updating an existing one. Ideally all the customer involved with an incident, their replies should be update the same incident but here it is creating new tickets for all the users except the original user.
Please help me with this.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2015 10:05 AM
Thanks Pradeep,
I believe this is the inbound email action which deals with the email replies to the incident:
Name: Update Incident (BP)
Target Table: Incident
Type: Reply
This is the script being used:
gs.include('validators');
if (current.getTableName() == "incident") {
//current.comments = "reply from: " + email.origemail + "\n\n" + email.body_text;
var body = email.body_text;
var ref = body.match(/Ref:.*[0-9]/);
var index = body.indexOf(ref) + ref.toString().length;
var extract = body.substring(0, index);
current.comments = "reply from: " + email.origemail + "\n\n" + extract;
if (email.subject.toLowerCase().indexOf("please reopen") >= 0) {
current.state = "2";
current.work_notes = "The caller did not feel that this issue was resolved";
}
if (email.subject.toLowerCase().indexOf("please close") >= 0) {
current.state = "7";
current.work_notes = "The caller has reported the incident has been resolved";
}
if (gs.hasRole("itil")) {
if (email.body.assign != undefined)
current.assigned_to = email.body.assign;
if (email.body.priority != undefined && isNumeric(email.body.priority))
current.priority = email.body.priority;
}
current.update();
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2015 09:58 AM
Hi Job,
Check for the inbound email actions i.e system policy->Inbound email actions. Here have the filter target table as incident and check for inbound email actions created on your incident.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2015 10:05 AM
Thanks Pradeep,
I believe this is the inbound email action which deals with the email replies to the incident:
Name: Update Incident (BP)
Target Table: Incident
Type: Reply
This is the script being used:
gs.include('validators');
if (current.getTableName() == "incident") {
//current.comments = "reply from: " + email.origemail + "\n\n" + email.body_text;
var body = email.body_text;
var ref = body.match(/Ref:.*[0-9]/);
var index = body.indexOf(ref) + ref.toString().length;
var extract = body.substring(0, index);
current.comments = "reply from: " + email.origemail + "\n\n" + extract;
if (email.subject.toLowerCase().indexOf("please reopen") >= 0) {
current.state = "2";
current.work_notes = "The caller did not feel that this issue was resolved";
}
if (email.subject.toLowerCase().indexOf("please close") >= 0) {
current.state = "7";
current.work_notes = "The caller has reported the incident has been resolved";
}
if (gs.hasRole("itil")) {
if (email.body.assign != undefined)
current.assigned_to = email.body.assign;
if (email.body.priority != undefined && isNumeric(email.body.priority))
current.priority = email.body.priority;
}
current.update();
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2015 10:26 AM
Hi,
Thanks for the update. You may find the below thread helpful.
https://community.servicenow.com/thread/161858
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2015 10:11 AM
If email being replied is being generated by ServiceNow, it should have a watermark. If watermark is present while replying to incident, it should update incident rather than creating it.