- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-17-2013 01:27 AM
Currently our system sends an email to the customer when their Incident is resolved and another when it is closed . With the Incident management rules we have, once an Incident is closed, it stays closed. The user has 48 hours when it goes to resolved to tell us that it's not fixed, and if they reply it will get set to active, otherwise the system will automatically set it to closed.
I believe most of this is OOTB behaviour.
The "Your incident is resolved" email contains a link for the user to reply that the incident is not fixed.
The problem we have is that the email inbound actions allows the system to process the reply from the user, and it doesn't check what the status of the incident is, so it is re-opening closed incidents. I can fix this by simply adding a condition to the email inbound action. However this has the effect of ignoring the user's email. They have no way to know that the Incident will not be looked at. The technician wouldn't be informed that the user wants the incident looked at again.
I've seen a solution that opens a duplicate incident, but that's not ideal here - out of office replies and people saying "thanks!" would cause duplicate incidents to be created.
What I'd like to do is have Service Now check the status of the Incident on the inbound action. If it's resolved, carry on as normal. If it's closed, then ignore the request to re-open and the email the user telling them that the incident cannot be re-opened, prompting them to contact the service desk again.
Can anyone help?
Solved! Go to Solution.
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-17-2013 07:59 AM
Hi
There is a junk mail plugin you can activate to filter your inbound emails - its handy for stopping out of office messages from opening new tickets.
The simplest condition i can think of for your inbound is:
//where 6 is the value of your resolved state
if (current.state == 6){
//Your inbound code here
}
if (current.active == false) {
//activate a ticket is closed event if active is false (closed)
gs.eventQueue("ticket.closed", current, current.state, previous.state);
}
This will action your inbound code if the status is resolved, and if it is closed it will fire an event, which can send an email.
If you don't know how to build an event in ServiceNow have a look at
http://wiki.servicenow.com/index.php?title=Events_and_Email_Notification
Item 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-17-2013 07:59 AM
Hi
There is a junk mail plugin you can activate to filter your inbound emails - its handy for stopping out of office messages from opening new tickets.
The simplest condition i can think of for your inbound is:
//where 6 is the value of your resolved state
if (current.state == 6){
//Your inbound code here
}
if (current.active == false) {
//activate a ticket is closed event if active is false (closed)
gs.eventQueue("ticket.closed", current, current.state, previous.state);
}
This will action your inbound code if the status is resolved, and if it is closed it will fire an event, which can send an email.
If you don't know how to build an event in ServiceNow have a look at
http://wiki.servicenow.com/index.php?title=Events_and_Email_Notification
Item 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-17-2013 10:39 AM
We use this so that we can process the return emails when users respond to the resolution emails.
//Update incident inbound rule
gs.include('validators');
if (current.getTableName() == "incident") {
//our incident state for resolved is 11 and closed is 12
//catches replies to closed or reolved incidents
if(current.incident_state == 11 || current.incident_state == 12){
//Catches legitimate reopen on a resolved incident
if (email.subject.toLowerCase().indexOf("please reopen") >= 0 && current.incident_state == 11) {
current.incident_state = 2;
current.work_notes = 'The caller did not feel that this issue was resolved.';
current.comments = "Email reply from: " + email.origemail + "\n\n" + email.body_text;
current.close_notes = '';
}
//Catches a attempted re-open of a closed incident
else if (email.subject.toLowerCase().indexOf("please reopen") >= 0 && current.incident_state == 12){
gs.eventQueue("incident.closed.noreopen", current, current.state, previous.state);
current.comments('User attempted to re-open this closed incident. Notification sent to user that closed incidents may not be re-opened');
}
//Catches a closure email for a resolved incident and closes it
else if (email.subject.toLowerCase().indexOf("please close") >= 0) {
current.incident_state = 12;
current.active = false;
current.work_notes = "The caller agreed that this issue was resolved";
}
//Catches direct replies to closed or resolved incidents - which we don't allow
else{
gs.eventQueue("incident.closed.nodirectreply", current, current.state, previous.state);
current.comments('User replied directly to a closure email on this closed or resolved incident. Notification sent to user that emails on closed or resolved incidents may not be directly replied to.');
}
current.update();
}
else{
current.comments = "Email reply from: " + email.origemail + "\n\n" + email.body_text;
current.update();
}
}
...From mid air somewhere over the US between Vegas and home...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-02-2014 06:24 AM
Hi to all
I'm testing the following script in order to close an incident sending an email to "xxx@service-now.com" with the subject and body "please close INCxxx", but it's not working.
Can anyone help me with this code?
Thank you
gs.include('validators'); | ||||
if (current.getTableName() == "incident") { | ||||
if (email.subject.toLowerCase().indexOf("please close") >= 0) { | ||||
current.incident_state = 7; | ||||
current.incident_state.setValue(7); | ||||
current.active = false; | ||||
current.work_notes = "The caller agreed that this issue was resolved"; | ||||
} | ||||
current.update(); | ||||
} |
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-25-2016 08:53 AM
Can you please guide me, how can I generate a link of "Please Reopen" / "Please Close" in the outbound mail that notifies the caller on resolution of incidents?