From Bright Pattern Documentation
Jump to: navigation, search
(Created page with "<translate> = getAgentState = Gets an agent’s current state == Request == === Syntax === {| class="wikitable" |getAgentState(): Promise<OperationResult<AgentStateData>> |...")
 
(No difference)

Latest revision as of 13:38, 16 September 2022

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