From Bright Pattern Documentation
< 5.19:Embedded-agent-desktop-api-specification‎ | Events
Revision as of 04:02, 29 May 2024 by BpDeeplTranslateMaintenance (talk | contribs) (Updated via BpDeleteTranslateTags script)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
• 5.19 • 5.3 • 5.8


onStatusChange(callback)

Gets an agent's state and "Not ready" reason (if any).

Request

Syntax

window.bpspat.api.onStatusChange(callback)
callback = function(data) {
}

Arguments

Parameter Type Description
callback function JavaScript method executed when API method request is completed


Response

The response object may contain the following fields.

Name Data Type Description Example
status string agent state "ready"
reason string Not ready reason "Break"

Example

 {
  "command": "STATE_CHANGED",
  "data": {
    "status": "ready",
    "reason": ""
  }
 }
< Previous | Next >