- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2014 02:29 AM
Hi
Using an inbound action I am trying to populate the short description with a line from the inbound email but my attempts have failed (again) I have tried using a script provided previously to be used in a record producer however thats failed. The email body will have the following lines, I want to pull the answers and add them to the short description stating New starter request for.....
First Name
Last Name
Any help would be greatly appreciated.
Regards
Solved! Go to Solution.
- Labels:
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2014 05:22 PM
Have you tired using email.body.first_name (in lower case not upper case)
I think they may change the variables to all lower case when setting up the inbound integration.
Cheers,
Cameron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2014 02:58 AM
are you able to use this method?
Inbound Email Actions - ServiceNow Wiki
i.e.
firstname: Donald
lastname: Duck
then in your inbound use email.body.firstname to refer to First name and add to short description?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2014 03:18 AM
Hi
Thanks for the response. I have copied that if statement and changed it to reference the right fields however I am getting a sytnax error stopping me from saving the inbound action. My if statement is below along with the error I am getting
if(email.body.foo != undefined) {
current.short_description = email.body.First Name ;
current.insert();
JavaScript parse error at line (13) column (52) problem = missing ; before statement
Any thoughts would be appreciated
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2014 03:21 AM
Hi Steve,
Try changing First Name to firstname or first_name or anything without a Space.
current.short_description = email.body.First Name ;

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2014 03:22 AM
Hi Steve,
It's the space in the "First Name" that is causing this error.
You could rename it to be FirstName, to avoid this error. However, same should reflect in your email as well.
Also, since, it is FirstName that you're going to assign, change the if condition as
if(email.body.FirstName != undefined) {
current.short_description = email.body.FirstName;
}
Hope that helps.
Mandar