This CTI demo adapter package lets you test drive Open CTI for Lightning Experience. The package provides a demo softphone that highlights and demonstrates the main features of Open CTI for Lightning Experience without even connecting to a phone system.
If you encounter any issues with this package, please file a New Issue. You may also contact David Louvton, at dlouvton@salesforce.com.
To deploy, you need ANT. To contribute to this project, you need Eclipse version 4.3 or higher, with the Force.com IDE plug-in.
You can also download and install this app as a package from: https://login.salesforce.com/packaging/installPackage.apexp?p0=04t41000000bSXh
ant deployAll -lib ant-salesforce.jar
If you don't have Ant, you can install it on Mac using the command:
brew install antTo deploy the code using ANT, you must add a custom domain to your Salesforce org URL. To set one up, see My Domain in the Salesforce help.
Log in to your Salesforce org.
Add a user to the Call Center.
Create a Lightning Experience app.
To use the demo adapter softphone, launch your new Lightning app and then click the phone icon in the utility bar.
For the demo adapter to work properly, you might need to update some settings.
If you don’t see the softphone in your app or the softphone doesn’t launch, verify the CTI adapter URL is correct. To edit the CTI Adapter URL:
In your Salesforce org, go to Setup and enter Call Centers in the Quick Find box, then click Call Centers.
Click Edit next to the Demo Call Center Adapter and make sure that the CTI Adapter URL points to the absolute path of the Visualforce page called demoAdapterPage. The URL must include the Lightning path and your domain. For example, both of the following URLs are valid:
Note that if you are using a page from a managed package, the url will look like https://namespace-dev-ed.my.salesforce.com/apex/namespace__page
When the absolute URL doesn't work, open the chrome inspector look for an error like: 'Blocked a frame with origin "https://myDomain.my.salesforce.com" from accessing a cross-origin frame'. This is a clue that your CTI Adapter URL must start with https://myDomain.my.salesforce.com or whatever the error said that is blocked.
To change the phone number used to simulate incoming calls, edit the Simulated Incoming Phone Number field on the Demo Call Center Adapter page in Setup. The default phone number used to simulate incoming calls is 415-555-1212.
Want to make real calls with this demo adapter? We’ve made this super easy to do with Twilio. To integrate with Twilio, complete the following steps:
Install the Twilio Salesforce Helper Library in your org. You’ll need the following information:
In your Salesforce org, edit the Apex class SoftphoneProviderHelper. In the inner class TwilioProvider, uncomment the code related to Twilio.
Optionally, modify the default task page layout for your call center users. For every call made with the demo adapter, the call log creates a task. To see the call-related fields on these tasks, assign the page layout Demo Call Task Layout to your call center users. For more information, see Assigning Page Layouts in the Salesforce Help.