AgentList
![]() |
Returns all agents assigned to the business unit (unless a specific AgentID is input 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:
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. |
Supported Script Types
Properties
Property | Details |
---|---|
SecurityUser | The output value of the SetSecurityUser action which authenticates a selected agent based on their permissions in the security profile. This field accepts {variables}. The default value is SecurityUser (same default output value of SetSecurityUser). |
AgentID | The agent ID variable name. Outbound skills have a custom script assigned, therefore when the Runapp fires in the outbound custom script, it uses the Begin action since it already "knows" who the agent is (the one making the outbound call). Therefore, a screen pop will only work if {__agentID} is used as the variable name. For inbound scripts, the script does not "know" who the agent is until Onanswer fires, which sets the agent ID variable to AGENTID. When blank, all users associated to the business unit will be returned in an array. This field accepts variables. |
ListVar (out) | The output variable name used with the returned data. The contents of this variable are stored as an array. The default value is Agents, but can be modified to whatever value desired. |
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. |
OnSuccess | Path taken if the action completes without errors, and any API calls or data return were successful. |
Tips & Tricks
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.
Other Options
Depending on the data you want to obtain, additional Framework/API actions exist such as All Agent Skill Assignments, Agent States V4, Get Agents List, Get Agent Details by Agent ID, and so forth.