From Bright Pattern Documentation
< 5.8:Embedded-agent-desktop-sdk-specification | Events
Revision as of 04:13, 29 May 2024 by BpDeeplTranslateMaintenance (talk | contribs) (Updated via BpDeleteTranslateTags script)
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 |
data.status | string | agent state | "Not Ready" |
data.reason | string | Not ready reason | "Break" |
Example
{ data.status: "Not Ready"; data.reason: "Lunch";
}