- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-12-2021 12:16 PM
When an Agent clicks the workspace application link, I want to automatically set their availability to Available so the agents do not have to set this themselves. Anyone have any ideas if this possible?
Solved! Go to Solution.
- Labels:
-
Agent Workspace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-12-2021 08:54 PM
Hi
each time a user logs in an event is fired. With the help of a script action you can react on that event and set the availability.
And for an easy copy and paste of the code:
var gr = new GlideRecord("awa_agent_presence");
gr.addQuery("agent", event.user_id.toString());
gr.query();
if (gr.next()) {
gr.setDisplayValue("current_presence_state", "Available");
gr.update();
}
Kind regards
Maik
If my answer replied your question please mark appropriate response as correct so that the question will appear as resolved for other users who may have a similar question in the future.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2021 10:27 AM
Hi
you have to create the Script Action in Global scope, but you created it in "x_g_irmc_dos_agent" scope. So the error is not a bug but the expected behavior of ServiceNow.
And no, there is not an event for opening the Agent Workspace.
Kind regards
Maik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2021 12:57 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2021 08:49 PM
Hi
No, you in your case you could insert above code in a new UI Action and at the end of the UI Action you redirect the user to Agent Workspace.
Kind regards
Maik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-14-2021 06:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-14-2021 08:50 PM
Hi
You got that exactly right, and I'm sorry there's no better solution. In ServiceNow thinking the legacy Agent Workspace is not a full replacement of the classic UI but a tool for a dedicated group of users (Agents), who would use it the complete day. Therefore, my approach with the login event.
Kind regards
Maik
