Skip to content
Release: Australia · Updated: 2026-03-12 · Official documentation · View source

Agent- Global

The Agent API provides methods for getting or setting agent presence and channel availability.

The Agent API is provided within the sn_awa namespace.

Requires the following:

  • Advanced Work Assignment plugin (com.glide.awa)
  • Role: awa_integration_user or admin

Parent Topic:Server API reference

Agent - get(String user_sys_id)

Gets an agent by sys_id.

NameTypeDescription
user_sys_idStringThe sys_id of the user listed in sys_user table.
TypeDescription
BooleanTrue if the user exists, false otherwise.
var agent = sn_awa.Agent.get("<user_sys_id>");
var presence  = agent.getPresence();

Agent – getPresence()

Gets the current presence state and channel availability of a provided agent.

NameTypeDescription
None  
TypeDescription
ObjectPresence state sys_id, presence state name, and channel information. Error message otherwise.
var agent = sn_awa.Agent.get("<user_sys_id>");
        var presence  = agent.getPresence();

Agent – setPresence(Object setRequest)

Sets the state of a provided agent's presence and sets the agent's channel availability for that state.

NameTypeDescription
setRequestObjectThe setRequest.sys\_id and setRequest.channels.
setRequest.sys\_idStringThe presence\_sys\_id from the AWA Presence State \[awa\_presence\_state\] table.
setRequest.channelsname/value pairOptional.- sys\_id: Channel\_sys\_id from the awa\_service\_channel table. - available: Agent availability to receive work for this channel \(true or false\).
TypeDescription
BooleanTrue if successful, false otherwise.
var agent = sn_awa.Agent.get("<user_sys_id>");
var presence = agent.setPresence({
    sys_id: <presence_sys_id>,
    channels: [{
        sys_id: "<channel_sys_id>",
        available: true // or false
    }]
});