From Bright Pattern Documentation
Jump to: navigation, search
• 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:
  • "ready"
  • "not_ready"
  • "busy"
  • "after_call_work"
notReadyReason String Y Returns the reason why the agent is in the not_ready state.
< Previous | Next >