Inbound email action processing
Summarize
Summary of Inbound Email Action Processing
Inbound email action processing in ServiceNow Australia release enables automated handling of incoming emails based on the email type, subject prefixes, and content. The system evaluates inbound email actions in a specific order and only executes actions that meet defined criteria, such as matching email type, watermark, or record number and satisfying condition scripts. This process is essential for creating, updating, or routing records like incidents automatically from inbound emails.
Show less
Key Features
- Email Type Matching: The system processes inbound actions only if the incoming email type matches the inbound action's defined type (e.g., new, reply, forward).
- Watermark and Record Number Recognition: Emails containing watermarks or record numbers in the subject or body are matched to existing records for accurate association.
- Subject Line Prefixes:
- Reply Prefixes: Controlled by the
glide.email.replysubjectprefixproperty, which lists subject prefixes that identify replies (e.g., re:, aw:, r:). Case sensitivity requires multiple case variations to be defined for reliability. - Forward Prefixes: Controlled by the
glide.email.forwardsubjectprefixproperty, which lists prefixes identifying forwarded emails (default: fw:, fwd:). These prefixes trigger forward-type inbound actions. - Forward as Reply Processing: Properties can be configured to treat forwarded emails as replies, facilitating consistent processing.
- Reply Prefixes: Controlled by the
- User Matching: The system matches the sender's email address to an active user in the User [sysuser] table to set the current user context for inbound actions, ensuring proper assignment and context. Unique email addresses are recommended for accurate matching.
- Processing Order and Control: Inbound actions are processed from lowest to highest order value. Actions with "Stop processing" enabled halt further processing and mark the email as processed.
- Priority of Email Flows: Inbound email flows take precedence over inbound email actions, meaning emails are first processed by flows with inbound email triggers before any inbound email actions run.
Practical Guidelines for Customers
- Configure
glide.email.replysubjectprefixandglide.email.forwardsubjectprefixproperties to align with your organization's email subject conventions, ensuring proper recognition of replies and forwards. - Ensure each user has a unique email address in the User table to guarantee correct sender matching and user context in inbound email actions.
- Avoid including multiple record numbers in email subject lines, as the system cannot reliably determine which record to associate.
- Use watermarks embedded in email subjects or bodies to reliably link emails to existing records during processing.
- Leverage inbound email actions’ order and stop processing settings to control the sequence and exclusivity of email processing.
- Be aware that inbound email flows override inbound email actions, so configure flows carefully if both are used.
Expected Outcomes
By properly configuring inbound email action processing, ServiceNow customers can automate incident and record creation or updates from emails reliably, ensuring that replies, forwards, and new emails are correctly identified and routed. This results in efficient email-driven service management, accurate user association, and streamlined workflow automation aligned with organizational email practices.
The system determines which inbound actions to run by comparing the inbound email type and inbound action conditions to the incoming email message. Certain properties are available to set the reply and forwarding prefixes in the email subject lines that your instance recognizes when processing inbound emails.
The system follows this processing flow to determine whether to run an inbound action.
- The incoming email type matches the inbound action Type.
- If present, the watermark or record number refers to a record in the Target table.
- The inbound action Conditions evaluates to true.
If any of these criteria are not met, the system skips the current inbound action and evaluates the next active inbound action. The system processes inbound actions from the lowest to highest Order value. If the inbound action has Stop processing enabled, the system updates the State of the email record to Processed after running the inbound action Script.
Prefixes recognized in email subject lines
- Email reply prefixes
- When no watermark is present or the In-Reply-To email header is present, the instance
recognizes email containing a prefix from the
glide.email.reply_subject_prefix property as reply email. You can use
this property to set non-standard reply prefixes in your email system.
Property Description glide.email.reply_subject_prefix Specifies the comma-separated list of prefixes in the subject line that identify an email reply. - Type: string
- Default value: re:,aw:,r:,Accepted:,Tentative:,Declined:
Note:The case of the reply prefix in the email, for example RE:, must exactly match the case of the prefixes defined in this property. If, for example, an email contains the Re: prefix and only RE: is defined in the property, the email will not be recognized as a reply. Therefore, it is a best practice to define multiple versions of the prefix, including mixed-case versions, such as RE:, Re:, and so on. - Email forward prefixes
- Emails with certain prefixes trigger the forward type of inbound email action. The instance
recognizes any email whose subject line contains a prefix from the
glide.email.forward_subject_prefix property as forwarded email. Emails
with these prefixes trigger inbound email actions of the type forward. Use this property to
set non-standard forward prefixes in your email system or you want email forwards to behave
like replies. If the value of the system property is empty, then the system reverts to using
the values fw: and fwd:.
Property Description glide.email.forward_subject_prefix Specifies the list of prefixes (comma-separated) in the subject line that identify a forwarded email. - Type: string
- Default value: fw:,fwd:
- Location: Add to the System Properties [sys_properties] table
Note:Prefixes are case insensitive. - Email forwards as replies
- Properties are available to force inbound actions to process forwarded mail as replied
mail. These properties control the subject prefix that the inbound actions use.
These properties cause the Update Incident inbound action to process all forwarded and replied-to mail.Property Value needed glide.email.reply_subject_prefix re:,Re:,RE:,aw:,r:,fw:,fwd:,Fwd:,FWD: glide.email.forward_subject_prefix [any text that is not a forward prefix] Note:The glide.email.forward_subject_prefix property must contain some text so that the forwarded email can be processed as a Reply. It can be any text except a forward prefix (that is, fw:,fwd:,Fwd:,FWD:).
Matching a sender email address to a user
The instance matches a senders email address to an active user in the User [sys_user] table using inbound actions.
When processing an email, the instance sets the current user to the user whose email address
matches email.from. Inbound actions can then reference that current user.
For example, the base system inbound action Create Incident sets the
caller_id of the incident to the value returned by
gs.getUserID().
If multiple users have the same email address, the instance first searches for an active user with the email address. The instance does not match inactive users.
Matching watermarks in the Subject line or Body
The following examples illustrate how the instance matches randomized watermarks in an email subject line or body.
| Subject Line or Body Contents | Matching Results |
|---|---|
| Ref:MSG0000008_ aLJc130zDhCVuh3spXmt | The instance recognizes this string as a watermark and searches the Email Watermarks [sys_watermark] table for a record with the number MSG0000008_ aLJc130zDhCVuh3spXmt. If this watermark exists, the instance matches the email to the associated record. If this watermark does not exist, the system processes inbound email messages as described in Criteria for matching email to inbound actions. |
| Ref:MSGWTR0000008_wfLLz42IxCgUvG2JlYnh | The instance recognizes this string as a watermark and searches the Email Watermarks [sys_watermark] table for a record with the number MSGWTR0000008_wfLLz42IxCgUvG2JlYnh. If this watermark exists, the instance matches the email to the associated record. If this watermark does not exist, the system processes inbound email messages as described in Criteria for matching email to inbound actions. |
Matching record numbers in the Subject line or Body
The following examples illustrate how the instance matches record numbers in the subject line of an email to an existing record when no watermark is present.
| Subject line contents | Matching results |
|---|---|
| RE: Example INC0005574 | The instance recognizes this subject line as a reply and recognizes the INC prefix as
belonging to the Incident table. The instance searches the Incident table for an existing
record INC0005574. If this incident exists, the email is associated with
this incident. If this incident record does not exist, the instance uses the inbound action
for new emails to create an incident and associates the new incident with the
email. |
RE: Example "INC0005574" RE: Example *INC0005574 |
The instance recognizes this subject line as a reply but does not recognize the
"INC prefix as belonging to the Incident table because of the quotation
mark. The same error occurs for any character other than a space before the record number.
The instance instead uses the inbound action for new emails to create an incident and
associates the new incident with the email. |
RE: "Example INC0005574" RE: Example INC0005574* |
The instance recognizes this subject line as a reply and recognizes the
INC prefix as belonging to the Incident table. The instance searches the
Incident table for an existing record INC0005574", which it cannot find
because of the quotation mark. The same error occurs for any character other than a space
at the end of the record number. The instance instead uses the inbound action for new
emails to create an incident and associates the new incident with the email. |
| RE: CHG0008593 and INC000576 | The instance recognizes this subject line as a reply and recognizes one, but not
both, of the number prefixes. There is no way to predict which prefix the instance matches
first. Whichever prefix it matches, it searches the corresponding table for a matching
record. If the record exists, the email is associated with the table. If the record does
not exist, the instance uses the inbound action for new emails to create an incident and
associates the new incident with the email. Note: The instance does not support processing
email with multiple numbers in the subject line because there is no way to predict which
record the instance matches first. For this reason, do not include more than one $number
variable in your notifications. |
| FW: Example INC0005574 | The instance recognizes this subject line as a forward because of the
FW: prefix. It uses the inbound action for forwarded emails to create an
incident and associates the new incident with the email. |
| Example INC0005574 | The instance 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 an incident and associates the new incident with the email. |