Add copy of email notification (from additional comments) to Activity Log on RITM

Chris Dea1
Tera Contributor

Hi all,

Newbie ServiceNow admin here :).  I hope someone can tell me how this can be done... Recently I received a request to improve what IT staff see in Activities in relation to email notifications when working on Tasks.    Currently, when an additional comment is added to an Incident, "System" adds a copy of the email to "Activity", see screenshot below.  Our ITIL users have grown accustomed to seeing that on incidents and they like it since it assures them that an email was sent to the customer after the comment was added...

find_real_file.png

Now they would like to see the same thing for "Activity" area on the "Requested Item Notes" tab we have on Tasks.  See screenshot below.  You can see a "Test" comment was added but there is no "log" from "System" added showing a copy of the email send to the customer.  What IT staff want to see if the comment and then a log from "System" showing a copy of the email notification - like what is currently setup with incidents.  I have verified in the system logs that email notifications are indeed sent out, the need is for the "log" or copy of the email notification to show on the Requested Items Notes....

 

find_real_file.png

Since our instance is pretty close to OOTB I assume this is the default way things are set up.  If someone could tell me how I would have the "system" log of the email notification after an additional comment is added to Requested Item Notes I would greatly appreciate it!

Thanks in advance!

-Chris

1 ACCEPTED SOLUTION

If you want to use a related list for showing email please follow this - 

The sys_email table uses a Document ID field(s) to relate back to records, not a direct relationship.   So you will need to create a user defined related list:

 

Creating Defined Related Lists - ServiceNow Wiki

 

1. Go to System Definition\Relationships and click New

2. Name what you want to call this related list in the Name field- example "Email Log"

3. In applies to table choose Catalog Task 

4. In queries from table choose Email

5. In the query with script field, paste in:

(function refineQuery(current, parent) {

current.addQuery("target_table", parent.request_item.sys_class_name);

current.addQuery("instance", parent.request_item.sys_id);

})(current, parent);

6. Click Submit.

 

7. Go to your Catalog Task form, configure related lists, and add "Email Log" or whatever you called the relationship in step 2 above.

find_real_file.png

 

If this has answered your question please Mark Answer/Helpful.

 

Thanks

Sonali

View solution in original post

10 REPLIES 10

sonali panda1
Kilo Sage

Can you configure the activity log and check the sent and received mails. If emails are sent out then just configuring this should help you see it on activity log.

There will be a funnel beside the Activity section. Click on that and configure available fields and check the Sent Received email checkbox. Let me know if this don't work for you.

 

This link should help you with the configuration of activity log-https://community.servicenow.com/community?id=community_question&sys_id=3ee86cbedb97c850d82ffb2439961905

Chris Dea1
Tera Contributor

Thanks for the reply Sonali.   I noticed no "activities" was showing on the Requested Items notes tab (section).  So I added it....

find_real_file.png

...but the same issue happens (no entries from system about email notifications from comments).  See below.  There are only entries from assignment of the task.  Does the issue have something to do with the comments being made on RITM level but the section is displayed on Task?

find_real_file.png

As a side note, a new issue appears after I added the "activities" to the "Requested Item Notes" section on Task now the "Task Notes" section went blank! :(. 

find_real_file.png

 

I will change it back for now...since people will need to be able to add work notes there :).  Here's what "Task Notes" looks like before I added the "activities" to show on the Requested Item Notes section...

find_real_file.png

 

Please let me know if you have any other guidance.


Thanks.

Hi Chris, Can you check whether the emails are in sent status in the email log or in send ready state. For emails to be showing on the activity log it should be in Sent status. I hope the lower instance has a dummy email id added for the emails to be sent ? Please check the status of the email and do let me know.

Hi Sonali, I am going to rephrase the post.  Since I was working on a dev instance, the outgoing emails where turned off so it would not show in activity.  I looked at our production instance and here's my rephrased question...

 

I checked on the RITM, and it is showing the email notification on the activity  there.  Example below.  You will see a comment was added on 4/15 and 4/18 (it's blurred but an ITIL person made the comment). And it shows "System" and "Email sent" on 4/15 and 4/18 after each comment was added....

 

find_real_file.png

What has been requested is that we somehow have it so each time those "System" "Email sent" are logged in the activity on the RITM, the same entries from email notifications (from RITM) are copied to the "Requested Item Notes" section/tab we have added on the Task.  (Note: In this "Requested Item Notes" section we have configured to show Request Item.Additional comments, Request item.Work notes, and Request item.Commments and Work notes fields.)   

Here's what it looks like now.  You can see it shows the comments that were added to RITM but not the "System" email notifications from RITM....

 

find_real_file.png

Is this possible?  If so, would appreciate tips and or script to get this done.

 

Thank you!