Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to link an email to the appropriate incident

sonita
Giga Guru

If the incident is not resolved or not closed, I need to

  1. link the inbound email to the appropriate incident,
  2. Add the reply email (only) to the work-notes within.

Any help would be appreciated.

16 REPLIES 16

i couldn't access to this :


/nav_to.do?uri=sysevent_in_email_action.do?sys_id=3f789469c0a80064015ad36dc4205a9a



Is it the same as   Update Incident Inbound email action?


Hi Soni,



The link you pointed will point you to the "update incident" record.


so I can have something like this?



if (current.state != "6" && current.state != "7")//incident not resolved or closed


  {


  //Link the inbound email to the appropriate incident.



            //Add the reply email (only) to the work-notes within.



  current.work_notes = "reply from: " + email.origemail + "\n\n" + email.body_text;


  return;


  }


Hi Soni,



Have you gone through the info provided by Mary. That should answer your question.


Please refer the concept of watermark.


Hi,



I am able to access that url in a fresh instance https://{instance}.service-now.com/nav_to.do?uri=sysevent_in_email_action.do?sys_id=3f789469c0a80064...



In case if that action got deleted from your instance, Here is the script from the inbound action



gs.include('validators');


if (current.getTableName() == "incident") {


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



  if (gs.hasRole("itil")) {


  if (email.body.assign != undefined)


  current.assigned_to = email.body.assign;



  if (email.body.priority != undefined && isNumeric(email.body.priority))


  current.priority = email.body.priority;


  }



  current.update();


}