Inbound action processing

The system determines which inbound actions to run by comparing the inbound action type and conditions of the inbound action to the incoming email message.

The system follows this processing flow to determine whether to run an inbound action.

Figure 1. Inbound action processing work flow
The system only runs an inbound action when:
  • 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, then the system updates the State of the email record to Processed after running the inbound action Script.

The following video shows how an inbound action condition prevents an incident from being created.

Recognized reply prefixes

Emails with certain prefixes trigger inbound email actions of the type reply.

When no watermark or 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. When this property is set, your email system uses non-standard reply prefixes.

Table 1. Specifying recognized reply prefixes
Property Description
glide.email.reply_subject_prefix Specifies the list of prefixes (comma-separated) in the subject line that identify an email reply.
  • Type: string
  • Default value: re:,aw:,r:
  • Location: Add to the System Properties [sys_properties] table
Note: Prefixes are case insensitive.

Recognized forward prefixes

Emails with certain prefixes trigger inbound email actions of the type forward.

The instance recognizes any email whose subject line contains a prefix from the glide.email.reply_subject_prefix property as forwarded email. Emails with these prefixes trigger inbound email actions of the type forward. When this property is set, your email system uses non-standard forward prefixes or you want forwards to behave like replies.

Table 2. Specifying recognized forward prefixes
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.

Table 3. Properties that process forwards as replies
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]
This causes all forwarded and replied to mail to be processed by the Update Incident inbound action.
Note: The glide.email.forward_subject_prefix property must contain some text in order for the forwarded email to 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.

Note: The Email Automatic User Creation plugin must be active. For details, see Enable automatic user creation.

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 incident's caller_id 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.

Note: Each user record must have a unique email address so that the instance can reliably match the email to the correct user.
If providing a unique email address to each user is not possible, assign a shared email address to only one active user so that the instance always matches incoming email from that address to the active user.

Examples of matching watermarks in the Subject line or Body

The following examples illustrate how the instance matches watermarks in an email's subject line or body.

Table 4. Examples of matching watermarks in the Subject line or body
Subject Line or Body Contents Matching Results
Ref:MSG0000008 The instance recognizes this as a watermark and searches the Email Watermarks [sys_watermarks] table for a record with the number MSG0000008. If this watermark exists, the instance matches the email to the associated record. If this watermark does not exist, the instance uses the inbound action for new emails to create an incident, and associates the new incident with the email.
Ref:MSGWTR0000008 The instance recognizes this as a watermark and searches the Email Watermarks [sys_watermarks] table for a record with the number MSGWTR0000008. If this watermark exists, the instance matches the email to the associated record. If this watermark does not exist, the instance uses the inbound action for new emails to create an incident, and associates the new incident with the email.
Ref:WTR0000008 The instance recognizes this as a watermark and searches the Email Watermarks [sys_watermarks] table for a record with the number WTR0000008. If this watermark exists, the instance matches the email to the associated record. If this watermark does not exist, the instance uses the inbound action for new emails to create an incident, and associates the new incident with the email.
MSG0000008 The instance does not recognize this as a watermark because it does not start with the Ref: prefix. It uses the inbound action for new emails to create an incident, and associates the new incident with the email.

Examples of matching record numbers in the Subject line

The following examples illustrate how the instance matches record numbers in an email's subject line to an existing record when no watermark is present.

Table 5. Examples of matching record numbers in the Subject line
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 recognizes 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 will not 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 will match 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 will match first. For this reason, the instance does not recommend creating notifications that include more than one $number variable.
FW: Example INC0005574 The instance recognizes this subject line as a forward because of the FW: prefix and 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.