AgentList

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

Returns all agents assigned to the business unit (unless a specific agent ID is inputted into the properties) in an array containing each agent’s profile information with the following fields returned in the variable specified in the ListVar parameter:

• BusinessUnitID • UserName
• MiddleName • Email
• TeamId • ReportToId
• ReportToMiddleName • IsSupervisor
• LastModified • Custom1
• Custom3 • Custom5
• AgentID • FirstName
• LastName • IsActive
• TeamName • ReportToFirstName
• ReportToLastName • LastLogin
• Location • Custom2
• Custom4 • InternalId

You might use this action to check if a specific agent is active, find the agent’s email address, check which team they belong to, or a variety of other custom options. Agent List is one of the available APIs you can use within Studio. You must have Framework actions and permissions enabled on your business unit in order to leverage this action.

Dependencies

Always make sure that the SetSecurityUser action precedes this action and the output variable of that action matches the SecurityUser input variable of the Agent List action properties.

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.

Generic

Email Chat Phone Voicemail Work Item SMS

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.

SecurityUser The output value of the SetSecurityUser action which authenticates a selected agent based on their permissions in the security profile. This field accepts variable formatted with curly braces ( { } ). The default value is SecurityUser (same default output value of SetSecurityUser).
AgentID The agent ID. You can use a variable for this field, such as {agentId}. When blank, all users associated to the business unit will be returned in an array. This field accepts variables.

Output Properties

These properties contain variables that hold data returned from executing the action. They're available for reference and use when the action completes.

Property

Description

ListVar (out) Holds the returned data. The contents of this variable are stored as an array. The default variable is Agents.

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.

OnError

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.

Other Options

Depending on the data you want to obtain, additional Framework API actions may be helpful. For example, All Agent Skill Assignments, Agent States V4, Get Agents List, Get Agent Details by Agent ID, and so on.