Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

Email to Incident Creation Using Keyword Matching – How to Handle Misspelled Keywords?

SivaPrasadR3900
Giga Contributor

Hi Community,

I have implemented an Email-to-Incident creation solution in ServiceNow. Based on keywords configured in a system property, the inbound email action checks the email subject and body content and creates an Incident when a matching keyword is found.

For example, keywords such as:

  • issue
  • error
  • failure
  • unable to
  • not working
  • outage
  • login issue
  • access issue
  • VPN issue
  • email not working

are configured in a JSON property and the Incident is created successfully when any of these exact keywords are present in the email.

However, the challenge I am facing is that if the sender makes a spelling mistake in the keyword, the Incident is not created because the current logic relies on exact string matching.

Examples:

  • "login issue" → Incident created
  • "logn issue" → Incident not created
  • "error" → Incident created
  • "eror" → Incident not created
  • "unable to login" → Incident created
  • "unabel to login" → Incident not created

I would like to know the best approach in ServiceNow to handle such scenarios.

Questions:

  1. Is there any out-of-the-box capability in ServiceNow for fuzzy keyword matching or spell-tolerant matching in inbound emails?
  2. Has anyone implemented Levenshtein Distance, Soundex, AI Search, or any other approach for similar requirements?
  3. What would be the recommended and most performant solution when validating keywords against email subjects and bodies?
  4. Are there any best practices for handling spelling mistakes while classifying incoming emails and creating incidents automatically?

Any suggestions or implementation examples would be greatly appreciated.

0 REPLIES 0