Why Your UI Matters—Open CTI for Salesforce Classic vs. Lightning Experience
What’s the difference between the two Open CTI APIs?
- You connect to the API differently.
- In Salesforce Classic
- /support/api/64.0/interaction.js
- In Lightning Experience
- /support/api/64.0/lightning/opencti_min.js
- The input syntax for methods is different.
- In Salesforce Classic
- Input
example:
sampleMethod(var1,var2…)
- In Lightning Experience
- Input
example:
sampleMethod({ arg1 : value1, arg2 : value2, ... })
- The two APIs provide similar methods, but a few methods behave differently. The input and output for methods can be different.
Which Open CTI API do I use?
Remember that the APIs can’t be swapped. If your users plan to switch between user interfaces, make sure that they understand that the CTI system might behave or function differently depending on what user interface they’re working in.
- Use Open CTI for Salesforce Classic if...
-
- You want to make calls using a softphone in Salesforce Classic
- You want to make calls using a softphone in a Salesforce Classic console app
- Use Open CTI for Lightning Experience if...
-
- You want to make calls using a softphone in Lightning Experience
- You want to make calls using a softphone in a Lightning Experience console app
Are there any setup considerations?
To make calls in Lightning Experience, complete the following.
- Create a Lightning app and add the Open CTI Softphone to your utility bar.
- In the call center definition file, the reqSalesforceCompatibilityMode item must be set to Lightning or Classic_and_Lightning.
Open CTI for Lightning Experience works only in Lightning apps—it doesn’t work in Salesforce Classic apps. Even though you can view Salesforce Classic apps in Lightning Experience, those apps are still Classic apps under-the-covers. To check if your app is a Lightning app, use the App Manager in Setup.
If you want your Open CTI implementation to work in Lightning Experience and in a console in Salesforce Classic, develop a unique implementation that uses both Open CTI for Salesforce Classic and Lightning Experience.