Sample HTML Page Using Open CTI

Each implementation of Open CTI can look different. This example shows you how to add CTI functionality to the Salesforce user interface using an HTML page.

This example assumes that you’ve already imported a call center definition file into your Salesforce org. The sample HTML page can be stored on Salesforce as a Visualforce page or on a third-party domain.

  1. Create an HTML page.

  2. Cut and paste the following sample code into your HTML page.

    This code demonstrates various functions of Open CTI. Keep in mind that to make calls in Lightning Experience, you must first create a Lightning app and add the Open CTI Softphone utility.

After you create the HTML page, add the URL to the call center definition file. The softphone is rendered differently depending on your user interface:

  • In Salesforce Classic, on the left of the page
  • In the Salesforce Classic Console App, in a footer
  • In Lightning Experience, in a footer

output of sample HTML page as a softphone in Salesforce

output of sample HTML page as a softphone in the Service Cloud console

Screen capture of a the HTML sample in a Lightning Experience app.