Send auto-response to user replying to closed incident notification

Staxed
Giga Guru

I am trying to send a notification to a user the replies to a closed incident.  I've been reading a lot of threads and finally though I got it figured out, but the reply is not sending.  Would love another set of eyes to see if they can spot what I might have done wrong?

I'm using an inbound email action, an event, and a notification.

Before I start, I also edited the "Update Incident (BP)" inbound action to prevent the inbound reply from adding a comment to the incident if it's closed by adding an if statement for gr.state != 7.  The full code for that inbound action is below.  However, in spite of this, the reply from the user is still added as a comment on the incident.

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;
	
	if (gr.state != 7) { 
		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 used this thread as a guide for the solution I am trying: https://community.servicenow.com/community?id=community_question&sys_id=c507f3c11be98098ada243f6fe4bcbd5

Inbound Email Action

find_real_file.png

Event

find_real_file.png

Notification

find_real_file.png

find_real_file.png

1 ACCEPTED SOLUTION

Staxed
Giga Guru

The solution to my issue ended up being as simple as checking the "send to event creator" tickbox in the notification.

View solution in original post

6 REPLIES 6

Deepika Gangra1
Tera Expert

Hi Staxed,

I have same requirement and did all the mentioned steps of yours, but no luck.

Can you please help?

 

Thanks

Deepika 

All I did to solve my issue is stated in the solution post, I just checked the "send to event creator" checkbox in the notification.  For more help than that you might want to create your own post with more details so people can provide specific responses to your issue.