Trying to to update ticket with Out of Office replies but not create a new ticket
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2014 08:24 AM
Hi folks,
We have a rule in the Mail Settings where any email wth the subject line containing: "AUTO:" or 'out of office' will be ignored. This is to prevent new tickets being automatically created by an out office. However, if we are updating an Incident for an end-user, we would want to know if they are out of the office, therefore we would want that Out of Office response to come in to ServiceNow and update their Incident. We dont want the out of offices to create new incidents (which is why we have them set to be ignored) However, we would like them to update tickets if its a response to a notification.
Ive done a lot of work on this and updated the Inbound action 'Update Incident (BP)':
I added the following:
if (email.subject.toLowerCase().indexOf("out of the office") >= 0) {
current.incident_state = "2";
current.work_notes = "This user is out of the office";
}
That did not work so I commented it out and created a new inbound action called 'out of office update'
gs.include('validators');
if (current.getTableName() == "incident") {
current.comments = "reply from: " + email.origemail + "\n\n" + email.body_text;
if (email.subject.toLowerCase().indexOf("out of the office") >= 0) {
current.work_notes = "This user is out of the office";
}
current.update();
}
However, Im not sure to set the 'Type' as New or Reply.. I have tried both but it does not work.
Would anyone know what 'Type' would an out of office fall under or if Im close with the script above?
Thanks a million
- Labels:
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2014 05:06 AM
Hi,
Unfortunately I have not found a solution for this one.
We have decided to park it for now and concentrate on other functionality..
If we revisit this in future I will definately post an answer.
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2014 07:40 AM
Sorry,
I get an error when I try to post my full response for some reason...please see the screenshot for more detail.
Here is the error I got...
-Robert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2014 11:32 AM
Hello Robert,
Thanks for the information.
In your organization servicenow instance, OOO auto replies are getting properly updated to the ticket?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-25-2014 11:35 AM
This is not a feature that my organization requires. Instead we do not want to note OOO auto replies into our tickets and as such have added the text that our exchange system uses to the list of ignored subject lines.
Thanks,
-Robert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2014 03:14 PM
Thank you for sharing Robert! I will pass on your issue posting with our community team