From Bright Pattern Documentation
Jump to: navigation, search
• 5.19


onLogin

This handler will be invoked when an agent logs into the Agent Desktop application.

Request

Syntax

on('ON_LOGIN', handler: OnLoginHandler): void


type OnLoginHandler = (loginState: LoginStateData) => void


type LoginStateData = {

    isLoggedIn: boolean

    agentId?: string

    username?: string

    sessionId?: string

}

Parameters

Parameter Parameter Values Data Type Optional/Required Description
loginState
isLoggedIn Boolean Required Always true
agentId String Optional ID of the logged in agent
username String Optional Username of the logged in agent
sessionId String Optional ID of the current login session

Example

function loginCallback(data: LoginStateData) {

// ...

}

adApi.on("ON_LOGIN", loginCallback);

Return Value

(None)

< Previous | Next >