From Bright Pattern Documentation
• 5.19
getAgentState
Gets an agent’s current state
Request
Syntax
getAgentState(): Promise<OperationResult<AgentStateData>> |
Where:
type AgentStateData = {
state: AgentState notReadyReason?: string } type AgentState = "ready" | "not_ready" | "busy" | "after_call_work" |
Parameters
(None)
Example Request
getAgentStateButton.onclick = () => {
adApi.getAgentState()
}
Return Value
Object | Object Values | Data Type | Optional?
(Y/N) |
Return Value Description |
AgentStateData | ||||
state | String | N | Returns the following state values:
| |
notReadyReason | String | Y | Returns the reason why the agent is in the not_ready state. |