OBLYTECH Logo
OBLYTECH Logo

How ServiceNow Inbound Email Processing Works

ServiceNow inbound email processing is the sequence the platform runs when a message arrives in an instance mailbox and has to become something useful: a new record, a comment or work note on an existing record, or nothing at all. The decision rests mainly on three things the platform can read: the sender, the subject line and a token it placed in an earlier outbound notification. When an email creates a duplicate ticket or does not reach the right record, the cause is usually one of those three signals being read differently from what the person expected.

Walking one reply through each decision

Take a common case, and treat the order of steps below as typical rather than guaranteed. A support agent sends a notification about incident INC0010045 to a customer. The customer replies with two lines of text. The reply reaches the inbound mailbox with a subject that starts with a reply prefix and still contains the record number. The platform first checks the prefix, which says this is an answer to something already sent. It then reads the number, which points at the same incident. Next it compares the sender’s address with the user table and finds one active user, so the comment is attributed to that person. Last, the matching action can check that the record is still open and then write the body as a comment. Change one fact, such as the customer forwarding the message to a colleague, and the prefix changes, the sender changes, and the outcome changes with them.

How reply and forward prefixes change the outcome

A reply prefix such as Re: tells the platform that the sender is answering something it already holds. A forward prefix such as Fw: or Fwd: usually signals that someone passed the message along, and whether the original writer gets credit for a new comment depends on how the action is written. Prefix handling depends on how the inbound settings are configured on your instance, so test each prefix on a non-production instance before relying on any default. Mail clients also localize their prefixes, and any reply prefix the reply property does not list will not be recognized as a reply, whatever the language. If prefix rules alone cannot separate the cases you care about, free-text classification is a different job, and our natural language processing work page covers that kind of approach.

Reply and forward prefix properties and their defaults

The subject line prefix is one of the signals that marks an email as a reply or a forward. The default reply prefixes are re:, aw:, r:, Accepted:, Tentative: and Declined:, and the default forward prefixes are fw: and fwd:. Both lists sit in system properties, so a prefix they omit is fixed by adding it there.

Reply prefixes are case sensitive, so Re: is missed when only RE: is listed. List each form you expect, such as RE:, Re: and re:. Forward prefixes should get the same treatment, so list FWD:, Fwd: and fwd: where your mail system uses them.

Forwards can also be processed as replies. Add the forward prefixes to the reply property and give the forward property text that is not a forward prefix. The Update Incident action then handles all forwarded and replied-to messages, so compare that result with the default forward action before going live.

Watermarks and record numbers

Matching a reply to a record uses two signals. The record number in the subject is the one people can see and edit. The watermark is a token the platform adds to outgoing notifications, so a reply can be tied back to the right record even when the number has been removed from the subject. Whether a watermark is still present in a reply depends on how the sender’s mail client composed it, so test with a real reply from a real client instead of assuming. The exact format of both the token and the number varies with release and notification settings, so inspect an outbound email from your own instance before writing any matching logic that depends on it.

Which default action handles each type of email

On a default instance each inbound message is classed as a reply, a forward or new, and each class has one default action. Replies update an existing record, while forwards and new messages create one. The class is the first thing to check when a record was created or updated unexpectedly.

On the Incident table the defaults are Update Incident (BP) for replies, Create Incident (Forwarded) for forwards and Create Incident for new email. A reply is matched through a watermark, a reply prefix with a record number, or an In-Reply-To header, and the match must point at an existing record in the action’s table. A forward needs a forward prefix and the sender’s address somewhere in the body. Thread-index matching is a fallback for messages that meet none of those conditions, and it needs the system property glide.inbound.email.classify.by.thread_index created and set to true. The inbound email action guide covers setup, action types and order.

Sender matching and the shared-address problem

The sender’s address is compared with the email field on user records. One active match means the email is attributed to that user. Problems start in three situations: the address belongs to no user, the address is shared by several people or a group mailbox, or the matched user is inactive. Each of these can end in a different result, from an ignored message to a record created with Guest as the Caller, and the result depends on how the action is written. Group mailboxes can cause confusion, so decide before go-live who a message from a shared address should be attributed to. Then build that rule into the action instead of leaving it to whichever user the address happens to match first.

The order of inbound actions and flows

Inbound email can be handled by classic inbound actions and, on newer releases, by flows that start from an email trigger. On releases that support inbound email triggers, flows with those triggers take priority over inbound email actions, because the message is processed by the triggers first. When two handlers can act on one message, the usual symptom is a record created and then immediately updated, or a comment that appears twice. Run one test email, check which inbound action ran and which state the email record ended in, and assign each type of message to a single owner. Many of the failures described here repeat the patterns in our guide to common notification and email handling mistakes, and the wider notifications and email handling section covers the outbound side that produces the tokens this process depends on.

Frequently asked questions about inbound email processing

Why did an email create a new record instead of updating an existing one?

The most likely reason is that the subject did not carry a record number the action could match, or the reply’s subject began with a prefix the reply property does not list. Default reply matching does not use the sender’s address, which decides who the comment is attributed to. Check the subject as it arrived, not as it appears in your own sent folder, because mail clients sometimes rewrite it. If the number is present and still no match occurs, look at the action’s conditions for the state of the target record.

Can I stop a reply from being attributed to the wrong person?

Yes, but the fix belongs in the action’s logic, not in the mail client. Add a clear rule for shared or group addresses, decide whether a forwarded message is attributed to the forwarder or to nobody, and test both cases with real messages. A rule that is written down and tested is far easier to defend than one that depends on which user the address matched first.

Does the watermark replace the record number?

No. The record number is the human-visible identifier and remains useful for people and for search. The platform checks the watermark first and falls back to a reply prefix with the record number when no watermark is present or the watermark matches no record. When one signal fails, look at the other before deciding the email is unmatched.

Where should I look first when an email is ignored?

Start with the action’s type, its target table and its conditions, because those decide whether an inbound action runs on the message. Then check whether another handler, such as a flow, claimed the message first. The inbound action that ran and the state the email record ended in can show which step made the decision, and that step is where the fix goes. If you are still deciding whether email should open work at all, the case for that is set out in our piece on how ServiceNow enhances enterprise workflow automation.