- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-21-2016 03:23 PM
I currently use an inbound email action that captures the email in a web form outside of ServiceNow, but if the email isn't in a certain format it won't recognize who the caller is and will leave as blank. To avoid this I am trying to find a way to add to the script so it can capture the information using the username field. Is there any way to do this?
Thanks again!
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-17-2017 01:57 PM
Caller field is captured now. Had to add value pairs and then add that to the inbound action for Create Incident.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-22-2016 10:30 AM
I understand that. But the only key here is email address. If you want to get the user name of that user, we need to query sys_user table based on a key. The key here is email. DO you have any other keys on which we can query and get that user's user name when email match is not found?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-22-2016 10:27 AM
Hi Grace - I don't see "username" in your script. How are you capturing it? If the email.from doesn't match anyone, I'm not sure how you can get their username. Please let me know how you know their username and I'll be happy to help with the next steps.
I'm sure you're already familiar with this section, but it shows how the email is matched with the user: Inbound Email Actions - ServiceNow Wiki
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-22-2016 10:53 AM
It is being captured through the email address in the inbound script since all our users have an account in ServiceNow, it recognizes the email and completes all other fields. Sorry I'm a newbie so a bit confused on explaining all of this. Right now the script is working properly and all fields are being populated, we are just thinking outside of the box in case someone misspells their email or types in their personal email instead of the university one (all our users have an account using their campus email), the incident is still opened using the username. Hope this makes sense!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-22-2016 10:58 AM
Understood. If someone's using their personal email address, for instance, there'll be no easy to identify that user. As Abhinay and I mentioned, the sender's email address is the "key" for identifying the user. Without that resolving reliably, there'll be no easy way to get around it.
If you have specific issues you're having today, it might be easier to address them, like the other post I mentioned where email address wasn't getting recognized correctly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-22-2016 11:36 AM
I see. In that case would you recommend to staying with email as they "key"? If so, is there a way to add a line of code where it can accept various email formats. E.g. blank@calstatela.edu, blank@cslanet.calstatela.edu and blank@exchange.calstatela.edu. The reason I ask is because after testing all three formats I noticed that only the first format is accepted, even though all three are registered into SNOW.