- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2018 04:57 AM
Hi,
We have been asked by one of our internal teams using ServiceNow if there is a possibility that the email client can "pickup" previously sent emails on the incident record so that it continues as an email chain (ie. similar to outlook)
At the moment creating a new email in the email client only creates a blank email with some fields pulled in e.g. subject includes numbers and 'To' includes the caller.
Is there some clever way of it being able to read previously sent emails/replies from the same record and insert this into a new email so that it continues on the thread of email exchanges?
Many thanks,
James
Solved! Go to Solution.
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-19-2020 05:17 AM
I eventually found a solution to this which was pretty simple after searching more of the community.
If you navigate to sys_properties.list and add the glide.ui16.emailStreamResponseActions and set the value true you should see the Reply, Reply All and Forward button for every email sent out and received in the record.
I had a follow on issue where the insert date/time stamp was not in native timezone.
To resolve this I had to edit the email script "insert_original_email_message" and replace this line:
(template.print("On " + cdate.toLocaleString() + ", '" + uname + "' wrote:\n\n");)
with:
var gdt = new GlideDateTime(cdate);
var curr_date = gdt.getDisplayValue();
template.print("On " + curr_date + ", '" + uname + "' wrote:\n\n");
Hopefully this will be useful for others.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2018 07:02 PM
The notion of email threads, as you might see them in Outlook or Gmail, is not really native to ServiceNow. Typically, an email application compares an email's message-id and in-reply-to headers, and the email's subject and body, and compares to other emails in the inbox to reconstruct the conversation relationship between those emails.
In ServiceNow, the real center of conversation is not the emails; it is the target record of the email. This is why the target record has the activity stream. All conversation - email-related and user-entered - is centered around that target record and it forms the basis for the interactions.
Throughout the life of a record, a number of notification- or email client-generated records might be sent. Each of those outbound emails could be considered as forming the beginning of an email chain as replies to it come back.
In the example 'activity stream' below, the top item is most recent, and the bottom item is oldest. You can see that if you only consider email, there are three separate email threads possible - one for Email Client C, Notification B and one for Notification A. The main connection between all of the emails is the target record itself. Other activity, such as comments don't really fit into the notion of an email thread.
Target Record
Reply to C
Comment entered
Email Client C
Reply to B
Reply to B
Notification B
Comment entered
Reply to A
Reply to A
Notification A
So you need to decide what a 'thread' is for you. Do you want to try to relate all the emails together in a hierarchical relationship, or is each outbound email the start of a thread? Or is the fact all of the emails might contain a subject with certain wording sufficient to relate as a thread? You could probably can script something that queries the sys_email table for all records associated to the current record, then try to reconstruct each email's thread by using the message-id and in-reply-to headers. But how you want to relate the A, B, and C conversations, if not by target record, would be up to your use case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-22-2018 07:27 AM
Hi d-mile,
Apologies it has taken me a long time to come back to you.
Thank you for taking the time to write such a lengthy detailed response.
I would consider a thread as any (user initiated) outbound or returned email sent during the life cycle of the incident record. We have the benefit that we already have a script that updates any record that matches the incident reference number and short_description (in the subject).
I'm certainly no scripting god and generally out of my depth with anything that comes to scripting.
Thanks,
James
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2018 04:59 PM
Also - This may not be exactly what you are looking for, but when you enable email buttons in the activity formatter/activity stream, the email client will prepopulate with content from the email you are replying to in the message body. It is not more than just that specific email but may provide some of the context you are trying to get.
See the docs for how to enable the email buttons in the activity formatter in UI15 and UI16.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2019 01:19 PM
This is exactly what I wanted to. Has there been any success/workaround for you?
Thanks for reading!