Part of Incoming email missing on incident

Pam Walker1
Tera Contributor

We have an email that comes from Salesforce into ServiceNow but one line is missing from the details.

 

When you view the email on the incident the line is there but missing from the incident. If the same incident is forwarded in from someone who has received the email it processes with all details

 

Details on email attached to incident :-

PamWalker1_0-1712761920566.png

Details that show on incident

PamWalker1_1-1712761946491.png

As you can see the Line Manager does not appear on the incident

 

This is the Inbound Action that processes the email

//Create Incident Leaver


//Get User

current.caller_id = gs.getUserID();

current.description = email.origemail + "\n\n" + email.body_text;

 

//Extract Employee Name from email body

var usname = email.body_text;

gs.info(email.body_text);
var usname = email.body_text;
var indexStart = usname.lastIndexOf("Name:");
usname2 = usname.substring(indexStart + 5, usname.indexOf("\n", indexStart)).trim();
gs.info("myUser = " + usname2);


usenddate = usname.substring(usname.lastIndexOf("Employment End Date:") + 21, usname.lastIndexOf("Basis"));
(usenddate.trim());
current.short_description = email.subject + " - " + usname2 + " / " + usenddate;

 

current.location = current.caller_id.location;
current.incident_state = IncidentState.NEW;
current.notify = 2;
current.contact_type = "email";

if (email.body.assign != undefined)
current.assigned_to = email.body.assign;

if (email.importance != undefined) {
if (email.importance.toLowerCase() == "high") {
current.impact = 1;
current.urgency = 1;
}
}

current.insert();

8 REPLIES 8

AshishKM
Kilo Patron
Kilo Patron

Hi @Pam Walker1 , 

Check that inbound email record in Emails [ sys_email ] and open as Preview Email. Lets see if this line manager is showing there or not, the incident form activity log is showing the email actually referece of that email log record.

 

AshishKMishra_0-1712762617395.png

 

-Thanks,

AshishKM


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution

Yes checked these and Line does exist but when ServiceNow processes it the Line Manager does not show in incident

Can you share the notification definition part. Need to check if Line Manager field is configured with that notification.

 

Is there line manager field on incident form ( or table ) ?

 

AshishKMishra_0-1712925236545.png

 

 


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution

The issue is not regarding a notification. It is an inbound action for an email that should add the body of the email to the description field

PamWalker1_0-1712929618947.png

As above the Line Manager line appears on the incoming email in the Mailbox