Incoming email looks new but is actually a reply - how to add to existing case?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2017 11:26 AM
Hi
Forgive my lack of technical skills here - I normally do low-level SysAdmin activities, but have no-one to escalate this to.
My scenario is this:
- we deal with a third party service centre that has a similar system to ServiceNow
- we email requests to a common address - payrolladmin@c***.co.uk
- the outgoing email subject line says something like "HRC0012345 - Joe Soap - Reference Request"
- A standard reply comes back from them, appending their case number to the above string
- BUT the subject line as configured by our 3rd Party is not prefixed with "RE: "
- it comes back as something like "HRC0012345 - Joe Soap - Reference Request 10011-54654333"
This means that ServiceNow thinks it is a new email and ignores the HR Case ref no. in the subject line, this creating a new case.
I've seen this behaviour detailed in the Wiki - http://wiki.servicenow.com/index.php?title=Inbound_Email_Actions#Matching_Incoming_Email_to_an_Inbou... (section 3.4.1)
Basically, I'm not sure exactly what to do next.
I suspect I need a copy of the existing "Update HR Case" inbound action, but filtered to one specific sender AND I need something that will still get the HR Case number from the subject line in order to post an update. But I know nothing about JavaScript and I've spent hours fruitlessly Googling for someone with a similar issue.
Can someone help me out? Any assistance gratefully received.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2017 11:40 AM
By default, if there is no MSG: watermark on the message, the incoming email processor next checks to see if there is a Number value in the subject. It doesn't matter if it has a Re: prefix or not. The last thing it checks is the In-Reply-To: mail header, but I don't suspect your 3rd party app is going to supply that.
If it is not recognizing that this is an update based off the HRC number in the subject, then something sounds amiss and it might be time to reach out to support. I'll be interested to hear what they have to say.
HI Service Portal - ServiceNow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2017 12:19 PM
Chuck
I am massively honoured that you responded to my message so quickly! I've watched your videos and I look forward to trying to apply some of what you've discussed.
Whilst I don't want to doubt you, the Wiki does seem to detail the behaviour I am experiencing. The email I'm getting back doesn't contain any of the original body so there's no watermark in there, so the subject line is the only way to link back. If I look at the table for section 3.4.2 (snippet below)
Subject Line Column | Matching Results |
---|---|
... | ... |
FW: Example INC0005574 | ServiceNow recognizes this subject line as a forward because of the FW: prefix and uses the inbound action for forwarded emails to create a new incident, and associates the new incident with the email. |
Example INC0005574 | ServiceNow recognizes this subject as a new email because it does not contain a matching reply or forward prefix. It uses the inbound action for new emails to create a new incident, and associates the new incident with the email. |
then what's in the last row is more applicable to my particular circumstance (albeit I don't have "Example " as the prefix).
Is approaching Support still the best course of action?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2017 06:52 AM
Hi Martin,
Thank you for the compliment and source info. I didn't realize FW and Re had such an impact on the processing logic, but it kind of makes sense now that I think about it.
You might still want to take this to support to see if there is something you can do to get the system to recognize your emails and updates rather than new record creations - unless someone else in the community has ideas beyond my imagination.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2017 05:41 PM
Hi Martin,
An inbound action to update a record is often configured to only be used if the email being received is of type "reply" so you are correct with your thoughts that this is the reason the email is creating a new ticket.
- an email is defined as a "reply" based on the following:
The email contains one of the following conditions and the table specified in the email matches the table of the inbound action:
- A valid watermark that matches an existing record.
- An In-Reply-To email header (when no watermark is present) that matches an existing record.
- A subject line starting with a recognized reply prefix (when neither a watermark nor an In-Reply-To header is present) and a valid record number that matches an existing record.
You could ask the 3rd party to format the email for it to be detected as a "reply" in ServiceNow. The easiest way would be to prefix the subject line with "Re:". Another way is for them to include the the watermark from the email they have received from ServiceNow in either the subject line or body of their reply.
If the 3rd party is not able to modify their email, you can alternatively create a new Inbound Action that is applied to "New" emails sent from the 3rd party email address. Using the From field requires that the 3rd party be configured as a user. The below wiki entry has good information around these fields.
http://wiki.servicenow.com/index.php?title=Inbound_Email_Actions#gsc.tab=0
I have tested this in my own instance successfully, but for either option I would recommend you also test the option you select in a non-production instance first.
Cheers
Sam