Setagent

Programmatically changes an agent's current stateClosed The availability status of an agent..

Supported Script Types

Properties

Property Details
AgentID

The login ID of an active myAgent session.

State

The desired state to which the agent will be set after executing this action successfully. Options include Unavailable or Available and can be consumed as variables.

Reason

This property is used to enter text for the Unavailable Code that also displays on the agent interface Unavailable status bar next to SystemOutstate – {inserted text}. This property is unused when the Agent state is available.

Branches

Branch Details

Default

Path taken unless the script meets a condition that requires it to take one of the other branches. It is also taken if the other branches are not defined.
OnError Path taken when the action fails to execute properly.

Tips & Tricks

  • If an agent is in an Unavailable stateClosed The availability status of an agent., programmatically setting their state to Available can result in refused contacts. For example, the agent may have gone on break and be away from their desk. By setting them to Available, the contacts could be routed to their phone and then refused.
  • When setting the Reason property, if the text description has not been configured in CXone, the database tracking system will not store the reason text. Instead, the agent will see the unavailable description, but the historical record will show Unavailable. The descriptions are case sensitive because there must be an exact match. To add an Unavailable state reason, use CXone.