From Bright Pattern Documentation
< 5.3:Embedded-agent-desktop-sdk-specification | Events(Redirected from 5.3:Embedded-agent-desktop-sdk-specification/Events/onAgentLogin)
onAgentLogin(callback)
Shows whether an agent is logged in or out of Agent Desktop.
Request
Syntax
window.bpspat.api.onAgentLogin(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.agent_id | string | agent username | "john.smith" |
data.login | boolean | Whether agent is logged in (true) or not (false) | false |
Example
{ data.agent_id: "john.smith"; data.login: true;
}