Forward inbound action script to search previous sender
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-20-2015 10:48 AM
I'm looking to see if anyone has already created an inbound action (forward) script that will search for the previous sender and not the sender found in the header. I know it can be done, I just don't have the scripting to make it work. A company I used to work for had this in their instance.
The reason for this is that support staff have a tenancy to forward emails to ServiceNow to create incidents. But instead of the caller being the one selected, it's the tech that becomes the caller. The original caller never gets the incident notification when it's created. I've looked around and I haven't come across anyone who's implemented this on the community.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-20-2015 02:11 PM
You can use email.origemail to get the original sender. The forwarding address will come in as email.recipients. So if John Smith sent an email to support@yourcompany.com, you could set the following to get John Smith as the caller, assuming that John Smith is already in the system otherwise you'll need to allow email user creation.
current.caller_id = email.origemail
current.u_forwarding_address = email.recipients
To avoid having to add external users to the user table, we just set email.origemail to a custom string field and grab that value for the notification.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-20-2015 02:29 PM
I don't think that's that I'm looking to do. I wouldn't want Joe Smith to be the caller. I'd want to have Jane Smith be the caller even if Joe Smith was the person forwarding the email in.
The email.origemail only grabs the address in the header information. In a forward, the information would be in the body of the message after the first instance of "From:" In this case, the line would be, "From: Jane Smith"
ServiceNow would then generate an incident from Jane Smith instead.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-20-2015 03:26 PM
Try this email.body.from
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2018 10:21 PM
Hi uluerje
did you get this issue solved if yes can u share the script