How to set Agent availability to "Available" every time they open the workspace application?

Mitchell Moses
Mega Expert

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?

1 ACCEPTED SOLUTION

Hi @Mitchell Moses ,

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. 

find_real_file.png

 

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.

View solution in original post

11 REPLIES 11

Hi @Maik Skoddow , I followed the same solution, which was given by you, created a script action and used OOTB event "login" on sys_user table. activated the script action tested but not working. Any solution?

Hi @Maik Skoddow , I followed the same solution, which was given by you, created a script action and used OOTB event "login" on sys_user table. activated the script action tested but not working. Any solution?