Incident created from Inbound email is truncating the Short Description


Description

When the email is received, it creates an incident where the short description was truncated.

Short Description when the ticket got created was:

"I have an issue where my emails are not being processed since "

while it should be

"I have an issue where my emails are not being processed since May 20, 2020"

Cause

When the instance parses each line of the email MIME data to check for name:value pairs, this must be on its own line. Note that most email clients limit the number of characters allowed per line and may move excessively long lines of characters into 2 lines.

Resolution

End user email client is placing a line break at some point in the "Short Description" line within the email body. ServiceNow function for name:value pair must be on its own line.


As per the documentation - "The name:value pair must be on its own line. Note that most email clients limit the number of characters allowed per line and may truncate excessively long name:value pairs."
(Doc link : https://docs.servicenow.com/csh?topicname=r_SetFieldValsFromTheEmailBody.html&version=latest)


The following script can be ran under "Scripts - Background" to find the difference in the body_text (emailSysID is the sys ID of the email record


var emailSysId = "17fbde0bdb7b8490b1d5d48a48961984"; //this sys ID is for the original email
var emailGr = new GlideRecord('sys_email');
emailGr.get(emailSysId);
var buf = emailGr.getValue('body_text').split("\n");
for(var i in buf){
gs.print(buf[i]);
}


Result of executing the script provided:

*** Script: Template Name: XX Generic Create Incident
*** Script: Point of Contact: XXInboundEmail-compliance@company.com
*** Script: Request For: user@company.com
*** Script: Short Description: I have an issue where my emails are not being processed since
*** Script: May 20, 2020
*** Script: Impact: 4-Minor/Localized
*** Script: Urgency: 4-Low
*** Script: Assignment Group: Help_group_IT
*** Script: Description: Home, City State

 

In the output the line where "Short Description:" is within the body you can see that it is split between line 4 & 5

This information proves that the issue is with the email application used to send the message to the instance and how it parses the allowed characters per line.