Connect to Open CTI
Demo Adapter
Open CTI and Security
Asynchronous Calls
Sample HTML Page
Sample Code for Using Lightning Message Service with Open CTI
Work with Canvas
Work with Console APIs
Best Practices
Previous Versions
Open CTI lets you issue asynchronous calls. Asynchronous calls allow the client-side process to continue instead of waiting for a callback from the server.
To issue an asynchronous call, you must include an extra parameter with the API call, referred to as a callback function. Once the result is ready, the server invokes the callback method with the result.
Asynchronous syntax:
1method('ARG1','ARG2', ..., CALLBACK_METHOD);1method({callback : FUNCTION})1//Set softphone height
2 sforce.interaction.cti.setSoftphoneHeight(300, callback);1//Disable clickToDial
2 sforce.opencti.disableClickToDial({callback: callback});The call result depends on the execution context. For example, calling setSoftphoneWidth() in the standard Salesforce application has no effect, but calling setSoftphoneWidth() in the Salesforce console resizes the width of the softphone.
Note