- 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 10:17 AM
Yes, apparently in the inbound email action script, it is using watermark to find the servicenow generated reference number in the email body. However it is still treating email replies from the other users as a new incident.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2015 10:21 AM
The servicenow generated mails in our instance are watermarked with reference number.