Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Implementing the logout function

Updated on January 10, 2022

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.

To enable sending logout requests to the CTI server, implement the logout JavaScript function in your implementation layer.

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

ParameterDescription
agentIDThe agent ID on the Automatic Call Distributor (ACD) that is populated during the login request.
reasonCodeThe reason code (string) value that is used when the agent logs out of the queue.
optionsThe parameter that holds optional properties that are implementation-specific.
successThe callback function that is invoked on success.
failureThe callback function that is invoked on failure.
  1. For new implementations, copy the function from the OpenCTI interface JavaScript pega_cti_desktopAPI.js file into your implementation JavaScript file.
  2. 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.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us