The logout function
This function is used to set the agent state into a logged out state. When the state is Log out, then the agent no longer receive calls from the queue and is not able to change their statuses to any other states. However, the agent must be logged in to at least one queue before this function is invoked.
When the logout request is successful, a snapshot event must be generated by the OpenCTI developer and forwarded to the Pega Call layer by using the event callback function that is saved as part of the login request. The snapshot event is used to synchronize Pega Call's state with the CTI platform for an extension. It typically occurs after a CSR logs in to Pega Call or when Pega Call reconnects to the CTI platform after a disruption.
If there is an error in the request, handle it as explained in Handling errors.
This function uses the following parameters:
Parameters of the logout function
|agentID||The agent ID on the Automatic Call Distributor (ACD). This is a required parameter and it 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 call back function that is invoked on success.|
|failure||The call back function that is invoked on failure.|
To send the logout request to the CTI server, copy the function from the interface file and implement it.
Previous topic The login function Next topic The agentReady function