Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
Ensuring that Inbound Email Actions always work regardless of text case sensitivity - Support and Troubleshooting
  • >
  • Knowledge Base
  • >
  • Support and Troubleshooting (Knowledge Base)
  • >
  • Ensuring that Inbound Email Actions always work regardless of text case sensitivity
KB0535584

Ensuring that Inbound Email Actions always work regardless of text case sensitivity


5753 Views Last updated : May 5, 2023 public Copy Permalink
KB Summary by Now Assist

Issue

Ensuring that Inbound Email actions always work, regardless of text case sensitivity


Overview


Sometimes an Inbound Email action will not behave as expected, because the string comparisons it uses are case-sensitive, and the incoming email's text does not match upper- and lower-case characters exactly. There are two places where case-sensitive string comparisons are important:

  1. For early product families, Inbound Email Configuration properties that determine when an email should be treated as a Reply or a Forward.
  2. Custom scripts that you write, which contain case-sensitive string comparisons.

 

Procedure for Ensuring Inbound Email Configuration Matches Upper- and Lower-case


This procedure does not apply to:

  • Calgary Patch 6 and later
  • Dublin Patch 2 and later

In later releases, the reply and forward prefixes perform case-insensitive comparisons.

To ensure that the correct inbound action is triggered for emails classified as type Reply or Forward:

  1. Log in to your instance.
     
  2. Navigate to System Properties > Email.
     
  3. In the Inbound Mail Configuration section, verify that the Identify mail as a reply by these subject prefixes property contains a complete list of prefixes that identify that an email is a reply in your company's mail systems. Separate each prefix with a comma. See wiki article Inbound Mail Configuration for more information.
    1. Define multiple versions of the prefix, including mixed-case versions such as FWD:, Fwd:, etc. 
  4. Click Save.
  5. Repeat the procedure for the Identify mail as a forward by these subject prefixes property.

 

Procedure for Ensuring Your Custom Scripts Work with Case-Insensitive Text


If your Inbound Email action scripts contain Javascript patterns similar to the following, then it is best practice to review your code for possible case-sensitivity issues. An example of case-sensitive Javascript looks like this:

Bad practice, because indexOf() requires perfect case-sensitive comparison:

if (yourVariable.indexOf("Incident Opened") != -1) {
   // Do something important here, based on text "Incident Opened"
   // The problem is that "Incident Opened" will not match
}

Best practice:

if (yourVariable.toLowerCase().indexOf("incident opened") != -1) {
   // This will match "Incident Opened", "incident Opened", "Incident opened", etc.
}

The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.