How can I copy the email sent/received from the activity log on the RITM to the sctask

Cindyco
Tera Contributor

I have read all of the posts I could find where this is asked but have not seen any answers.  When someone replies to an email it is attached to the RITM activity log as email received.  I would like to know how to copy this to the sctask activity log?

Has anyone had any success doing this?

Thanks in advance

10 REPLIES 10

what is your exact test case?

above will run only when email received at RITM level and do you have tasks present when such email is received ?

 

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Regards,Sushant Malsure

Hi, if it is a 'reply' email then the inbound email message is mapped to a 'target' record and this is the record referenced as 'current' in the inbound action script.

If you want to update a related task\record (IE child task), then you need to add additional script to lookup\find the related record and updated it. Perhaps something like this

var subTask = new GlideRecord('sc_task');
subTask.addQuery('parent', current.sys_id);
subTask.query();

while(subTask.next()){
    var myString = '';
    myString = 'Email from: ' + email.from + '\n';
    myString = myString + 'Subject: ' + email.subject + '\n';
    myString = myString + email.body_text;

    subTask.work_notes = myString();
    subTask.update();
}

 

Thanks, unfortunately it did not add anything to the sc_task.  Do you have any other ideas?

Without full details of your inbound action configuration or the content of the email message and how the message is mapped to target task when it is received, the community can only guess at what's going on.
Perhaps you could share details so that your configuration is better understood.
Plain text\xml export of bother records would be the preferred. way to share this detail - you can always sanitize the xmls to remove specific email address (if necessary)

Thanks Tony,

Currently when a fulfiller adds an additional comment to the RITM ticket a notification is sent to the caller and the assigned to.  You can see a copy of the email in the activity stream of the RITM ticket.  

email sent.PNG

 

When the caller responds via email I would like the email received to be included in the activity log on the sc_task ticket as well.  Currently you can only see it in the RITM ticket.

The inbound action that is called "Update request item" is OOB and includes the following:

update email action.PNG

 

I have tried both suggestions on this thread but I am not seeing the email post in the activity feed of the related sc_task yet in comments or work notes.