Email Notifications - Incident and Requests Links to Agent Workspace

TStark
Kilo Sage

Currently I have email notifications setup to include links to Incidents (i.e. ${mail_script:incident_take_me_to_the_incident} ) and requests which open in the Default view. Is there a way to link incidents and request to open in Agent Workspace instead?

Thanks,
AJ

1 ACCEPTED SOLUTION

Chander Bhusha1
Tera Guru

Hi AJ,

Use this script in the notification email script:

Create a notification email script and crate a dynamic url using this and use this link to navigate to workspace.

  var agentURL = '<a href="' + gs.getProperty('glide.servlet.uri') + '/now/workspace/agent/record/'+ current.getTableName() + '/' + current.sys_id + '">' + current.number + '</a>';
  template.print(agentURL + "<br />");

Once Done add that mail script to the notification using ${mail_script:take_me_workspace}

 

Servicenow Docs Link:

https://docs.servicenow.com/bundle/orlando-servicenow-platform/page/administer/notification/concept/...

 

Community Article Link:

https://community.servicenow.com/community?id=community_question&sys_id=88e6a0411bca1c10305fea89bd4b...

 

Mark helpful and correct if it helps.

Thanks,

CB

View solution in original post

3 REPLIES 3

Chander Bhusha1
Tera Guru

Hi AJ,

Use this script in the notification email script:

Create a notification email script and crate a dynamic url using this and use this link to navigate to workspace.

  var agentURL = '<a href="' + gs.getProperty('glide.servlet.uri') + '/now/workspace/agent/record/'+ current.getTableName() + '/' + current.sys_id + '">' + current.number + '</a>';
  template.print(agentURL + "<br />");

Once Done add that mail script to the notification using ${mail_script:take_me_workspace}

 

Servicenow Docs Link:

https://docs.servicenow.com/bundle/orlando-servicenow-platform/page/administer/notification/concept/...

 

Community Article Link:

https://community.servicenow.com/community?id=community_question&sys_id=88e6a0411bca1c10305fea89bd4b...

 

Mark helpful and correct if it helps.

Thanks,

CB

Thanks CB!

HI 

 

Thanks for the solution, it works with gs.getProperty('glide.sys.servlet_path') instead of 

gs.getProperty('glide.servlet.uri')

 

I have a question I am trying to user this for my email notification for SLA, but is returning undefined, but the link actually works and it  open in the Agent Workspace. 

The email notification for SLA is using the task_sla table that's the only difference between the incidents notification and SLA notifications. 

 

Any suggestions?