Setagent

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, 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.
  • 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

The icon for a Generic script type - a rectangle with < and > symbols inside it.

The icon for the Email script type - a large @ symbol in a diamond.

The icon for the Chat script type - a chat bubble with an ellipsis inside (...), in a diamond shape.

The icon for the Phone script type - an old-style phone handset with curved lines indicating sound coming out of it.

The icon for the Voicemail script type - a symbol that looks like a cassette tape - two circles sitting on a horizontal line.

The icon for the Work Item script type-a piece of paper with one corner folded down and a bullet list on it.

The icon for the SMS script type - a smart phone with a chat bubble coming out of it.

The icon for the Digital script type - a computer monitor with a smartphone next to it.

Generic

Email Chat Phone Voicemail Work Item SMS Digital

Input Properties

These properties define data that the action uses when executing.

Property

Description

Caption

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

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.

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.