Have you heard? Open CTI and all its awesomeness is now available in Lightning Experience! We’ve put together a demo adapter package that 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.
For detailed information about Open CTI for Lightning Experience, including details about how it’s different from Open CTI for Salesforce Classic, see the Open CTI Developer Guide.
You can also check out the demo adapter code on GitHub.
Important: You can only use this demo adapter in Lightning Experience.
Contents |
Install and Configure the Demo Adapter
To install the demo adapter, 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.
-
Download the package from: https://login.salesforce.com/packaging/installPackage.apexp?p0=04t41000000bSXh
-
Note: This package can be installed on: Enterprise, Performance, Unlimited, and Developer Editions.
-
Note: This package can be installed on: Enterprise, Performance, Unlimited, and Developer Editions.
-
Add a user to the Call Center.
-
On the Demo Call Center Adapter page, click Manage Call Center Users and add any additional users that you want to use this demo adapter.
-
On the Demo Call Center Adapter page, click Manage Call Center Users and add any additional users that you want to use this demo adapter.
-
Create a Lightning Experience app.
-
You must be in Lightning Experience to create Lightning apps.
- From Setup, use the App Manager to create a new Lightning app that uses Console Navigation.
- Optionally, you also choose to enable Service Setup.
- Add the Open CTI Softphone to your utility bar.
- Add the navigation items you want.
- Assign the app to the user profiles you want to access the app.
-
You must be in Lightning Experience to create Lightning apps.
When you launch your new Lightning app, here’s what the softphone looks like:
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 relative or absolute path of the Visualforce page called managedPage. For example, the following URLs are valid:
- /apex/demoAdapterPage
- /apex/namespace__demoAdapterPage (when using a managed package)
- https://<myDomain>.my.salesforce.com/apex/demoAdapterPage (when using My Domain)
- https://<namespace-dev-ed>.my.salesforce.com/apex/namespace_demoAdapterPage (when using a managed package and My Domain)
- If your Adapter URL doesn’t work, use the Chrome Inspector tool to troubleshoot the problem. You might see this error: “Blocked a frame with origin “https://<myDomain>.my.salesforce.com” from accessing a cross-origin fame.” This error lets you know that you need to use an absolute URL that starts with “https://<myDomain>.my.salesforce.com” instead of a relative one.
-
Click Save. You may have to log out and log back in, in order for these changes to be applied.
Get Started with the Demo Adapter
After installation you can simulate incoming and outgoing calls to get to know the features of Open CTI for Lightning Experience. These simulations don’t make real calls.
Important: The demo adapter is supported on Chrome, Firefox, and Safari.
- Log in with your Salesforce credentials, or click Log In.
-
To simulate an incoming call, click
in the softphone header. You can accept or decline the call, enter notes, transfer a call, and end a call.
- To simulate an outbound call, click any number in Salesforce, type a number, or use the dialpad.
- To update the target for the screen pop of the simulated incoming call, go to the Call Centers page in Setup and edit the demo adapter. Then update the Simulated Incoming Phone Number field.
Customize the Demo Adapter
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:
- CTI Provider—The name of the internal Apex class that implements SoftphoneProviderHelper.SoftphoneProvider, and has the code implementing makeCall(), such as DummyProvider, TwilioProvider or your own provider implementation.
- Provider Account—Provider account ID.
- Provider Auth Token—Provider authorization token.
-
Provider Caller Number—The phone number from where the call originated. This is the From number. By default, this is 415-555-5555.
-
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.
License Agreement
Use of the Open CTI demo adapter is subject to the following license:
- Copyright 2016 salesforce.com, inc. All rights reserved.
- Use of this software is subject to the salesforce.com Developerforce Terms of Use and other applicable terms that salesforce.com may make available, as may be amended from time to time. You may not decompile, reverse engineer, disassemble, attempt to derive the source code of, decrypt, modify, or create derivative works of this software, updates thereto, or any part thereof. You may not use the software to engage in any development activity that infringes the rights of a third party, including that which interferes with, damages, or accesses in an unauthorized manner the servers, networks, or other properties or services of salesforce.com or any third party.
- WITHOUT LIMITING THE GENERALITY OF THE FOREGOING, THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED. IN NO EVENT SHALL SALESFORCE.COM HAVE ANY LIABILITY FOR ANY DAMAGES, INCLUDING BUT NOT LIMITED TO, DIRECT, INDIRECT, SPECIAL, INCIDENTAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES, OR DAMAGES BASED ON LOST PROFITS, DATA OR USE, IN CONNECTION WITH THE SOFTWARE, HOWEVER CAUSED AND, WHETHER IN CONTRACT, TORT OR UNDER ANY OTHER THEORY OF LIABILITY, WHETHER OR NOT YOU HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.