2

I want to write a sample demo using OpenCTI API for Lightning Experience. The URL I mentioned in the CallCenter's Adapter URL refers to a page developed using JSPs and served from a third-party domain. So, based on the documentation below, I connect to the OpenCTI API using the script-Tag.

<script src="https://c.<yourInstance>.visual.force.com/support/api/40.0/lightning/opencti_min.js" type="text/javascript"></script>

N.B. Salesforce documentation: Connect To OpenCTI

The problem is, that at page load, the browser-console logs the following exception message: "uncaught exception: Failed to initialize Open CTI. Ensure that it is loaded from the right frame with correct URL parameters".

As subsequent problem, all OpenCTI functions return with error.

What am I doing wrong?

eouw0o83hf
  • 9,438
  • 5
  • 53
  • 75
Abdelatif
  • 21
  • 6
  • Did you manage to resolve this issue? – pbattisson Sep 28 '17 at 08:52
  • It seemed that loading the OpenCTI API took too long, so that at the moment as I invoked an OpenCTI function, the API was not accessible yet. So, I ensured to dynamically load the API using an AJAX get request. Once the API is loaded, I set a flag to true, and begin my initialization things. – Abdelatif Oct 23 '17 at 21:49

0 Answers0