From Bright Pattern Documentation

Revision as of 20:40, 3 April 2026 by Laura.donovan (talk | contribs) (Updated via BpClonePage extension. Source page: draft:Embedded-agent-desktop-api-specification/Events/onAgentLoginCallback)

< Previous | Next >
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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 this method request is completed


Response

The response object may contain the following fields.

Name Data Type Description Example
agent_id string agent username "john.smith"
login boolean Whether agent is logged in (true) or not (false) false


Example

 {
  "command": "LOGIN_CHANGED",
  "data": {
    "agent_id": "christy.borden",
    "login": false
  }
 }
< Previous | Next >