Implementing the logout function
Pega Call uses this function to set the agent state to Log out. When a CSR initiates a logout request in the Call Control Panel, the logout function unsubscribes the CSR device from the Computer Telephony Integration (CTI) events.
As a result of this function, the CSR cannot take calls from the call queue set their agent state. The CSR must be logged in to at least one queue before invoking this function.
This function uses the following parameters:
Parameters of the logout function
Parameter | Description |
agentID | The agent ID on the Automatic Call Distributor (ACD) that is populated during the login request. |
reasonCode | The reason code (string) value that is used when the agent logs out of the queue. |
options | The parameter that holds optional properties that are implementation-specific. |
success | The callback function that is invoked on success. |
failure | The callback function that is invoked on failure. |
- For new implementations, copy the function from the OpenCTI interface
JavaScript
pega_cti_desktopAPI.js
file into your implementation JavaScript file. - When the logout request is successful, generate a snapshot event, and then move
the event to the Pega Call layer by using the
fowardEvent parameter for the
login function.The snapshot event synchronizes the Pega Call state with the CTI platform for an extension. The event typically occurs after a CSR logs in to Pega Call or when Pega Call reconnects to the CTI platform after a disruption.
Previous topic Implementing the login function Next topic Configuring events receipt from the CTI server