Two watermarks in incoming Email messages
Lets talk about:
- Watermarks
- Two watermarks on the incoming emails
- Testing two watermarks on the incoming emails
Watermarks
By default, the system generates a watermark label at the bottom of each notification email to allow matching incoming email to existing records.
The watermark always includes "Ref:" and a customizable prefix (default MSG), followed by the auto-numbered identifier of the source record (such as incident, problem, or change request). For example, Ref:MSG3846157.
Inbound email actions might not work properly if watermarks are omitted from email notifications.
Two watermarks on the incoming emails
Sometimes, inbound actions can have more than one watermark added by mistake. It could be caused by comments appended from other incoming records, text matching Ref:, etc.
If two watermarks are found on an email, the incoming email will use the first watermark, ignoring the second.
To resolve this problem, you need to ensure the first watermark is the one wanted or add it to the subject of the incoming email.
Testing two watermarks on an incoming emails
I've sent to my instance 8 emails based on 4 existing watermarks:
- OK1: Watermark 1: Ref:MSG0000330 (valid) - Incident: INC0000055
- OK2: Watermark 2: Ref:MSG0000331 (valid) - Incident: INC0010009
- NO1: Watermark 3: Ref:MSG0XXXXX1 (invalid)
- NO2: Watermark 4: Ref:MSG0XXXXX2 (invalid)
Here is the watermark matching result of incoming emails with two watermarks:
| Cases | Email 1 | Email 2 | Email 3 | Email 4 | Email 5 | Email 6 | Email 7 | Email 8 |
|---|---|---|---|---|---|---|---|---|
| Subject | - | - | - | - | OK1 | OK1 | NO1 | NO1 |
| Body | OK1 | OK1 | NO1 | NO1 | OK2 | NO1 | OK2 | NO2 |
| Including watermarks | OK2 | NO1 | OK2 | NO2 | ||||
| Result | OK1 | OK1 | No match | No match | OK1 | OK1 | OK2 | No match |
As you can see, it will search on the subject, then the first watermark on the body even if the second is valid.
Also notice that even if the subject watermark is invalid, we later try to find it on the body.
NOTE: Please note the syslog table hold the information on troubleshooting on watermark matching.
Search with /syslog_list.do?sysparm_query=sourceLIKE
Conclusion
You need to ensure the first watermark is the one wanted or add the watermark to the subject of the incoming email.
The email process will search on the subject, then the first watermark on the body.
Review what you have learn
After reading this blog you should be able to understand
- How valid watermarks can be ignored
- Watermarks on the subject
- Where in the logs you can see the watermark matching to a target record.
More information here:
Note: Tested on Fuji, with Chrome
https://www.servicenow.com/community/developer-blog/two-watermarks-in-incoming-email-messages/ba-p/2287073