SETAGENT

This help page is for Studio. This information is also available for Desktop Studio.

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

Dependencies

  • If an agent is in an UnavailablestateClosed 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 Mpower, 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 Mpower.
  • For organizations that use Supervisor and a Agent application: You can use the Set Agent action to set agent states to Available. However, for supervising agents, you must configure your script to prevent issues when the supervising agent receives a call in Agent while they're monitoring another agent in Supervisor. There are two possible solutions: 

    • Use the AgentState action to check the supervising agent's state. If the agent's state is Unavailable or a similar state, such as Unavailable Monitoring, your script must bypass the Set Agent action. This prevents the agent's state from being changed to Available. Additionally, the script must handle the incoming interaction in some other way. For example, it could go to voicemail, or route to another ACD skill or agent.
    • Connect the Set Agent action's On Error branch. When a supervisor is monitoring an agent, the system doesn't allow the supervisor's state to be set to Available. It takes the On Error branch if it's connected. If it's not connected, it takes the Default branch. You must ensure that your script handles the incoming interaction in some other way.

Supported Script Types

A square with a line branching from it that goes to three other squares.

Generic

Email Chat Phone Voicemail Work Item SMS

Input Properties

These properties define data that the action uses when executing.

Property

Description

Add Caption

Enter a short phrase that uniquely identifies this action in the script. The caption appears on the script canvas under the action icon.

Agent ID

The login ID of an active session in the agent application.

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.

Result Branch Conditions

Result branch conditions allow you to create branches in your script to handle different outcomes when an action executes.

Condition

Description

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 action's other branches are not defined.

Error

Path taken when the action fails to execute properly. For example, when there is an unexpected problem such as poor connectivity, syntax errors, and so on. The _ERR variable, with a single underscore character, should be populated with a condensed explanation of the problem.