On reply to notification Additional comment/work notes should get posted

Balaraju K B
Tera Expert

Hi Team,

When a case is assigned to a Group/User (Assigned To) notification will be triggered.

If the user just replies to that email triggered then whatever he replies that should get updated in the Additional Comments/Work Notes.

@Ankur Bawiskar Is this available OOB? if not can you help me with the script

 

Thanks in Advance,

Balaraju

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

yes check this OOB Inbound action on Approval table

Whatever comments approver mention will be added to comments

Name: Update Approval Request

URL: https://instanceName.service-now.com/nav_to.do?uri=sysevent_in_email_action.do?sys_id=b43ef438c611227100a9aa83fe121dda

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

View solution in original post

4 REPLIES 4

Sam Ogden
Tera Guru

Hi Balaraju,

If you look at the OOB 'Update Incident (BP)' on inbound actions you can see details of how to put the email body to the comments:

gs.include('validators');

if (current.getTableName() == "incident") {
	
	var gr = current;
	
	if (email.subject.toLowerCase().indexOf("please reopen") >= 0)
		gr = new Incident().reopen(gr, email) || gr;
	
	gr.comments = "reply from: " + email.origemail + "\n\n" + email.body_text;
	
	if (gs.hasRole("itil")) {
		if (email.body.assign != undefined)
			gr.assigned_to = email.body.assign;
		
		if (email.body.priority != undefined && isNumeric(email.body.priority))
			gr.priority = email.body.priority;
	}
	
	gr.update();
}

I had a look and couldn't see an OOB action that was updating the comments on a case record.

You would just need to create something similar to above but for the case table.

Hope this helps

Thanks

Sam

Slava Savitsky
Giga Sage

What table are you referring to? For example, for incidents by default this is not done for replies, only for new messages, but you can easily achieve this by adding the following code to your inbound email action:

current.comments = "received from: " + email.origemail + "\n\n" + email.body_text;

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

yes check this OOB Inbound action on Approval table

Whatever comments approver mention will be added to comments

Name: Update Approval Request

URL: https://instanceName.service-now.com/nav_to.do?uri=sysevent_in_email_action.do?sys_id=b43ef438c611227100a9aa83fe121dda

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@Balaraju K B 

Hope you are doing good.

Did my reply answer your question?

If so, please mark appropriate response as correct & helpful so that the question will appear as resolved for others who may have a similar question in the future.

Thanks!
Ankur

 

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader