Get Started with the Service Connector API

The Connector API is the interface between your Contact Center as a Service (CCaaS) or telephony system and your Salesforce org. This API allows you to pass information to Salesforce and receive events back from Salesforce.

The Connector API is for partners who are implementing Bring Your Own Channel for CCaaS or Salesforce Voice with Partner Telephony.

To use the Connector API, you must call initializeConnector() (imported from Github) as the first step during the window load process. This function is part of the Base Connector API and ensures that Salesforce can reliably establish two-way communication with the connector without any timing issues.

The initializeConnector() function takes your Connector API interface implementation as a parameter. Salesforce holds onto the connector implementation object during the entire session and this object must implement the required Connector API Methods. If the connector requires loading any resources, we recommend that you do this outside of the connector object, so that they can be loaded asynchronously without delaying the call to initializeConnector(). After you call initializeConnector(), Salesforce calls the init() method on the Connector API interface with call center configuration information. This method returns a promise and can asynchronously load any resources before resolving the promise.

Returning JavaScript promises in the connector greatly reduces the need to produce events or errors. Instead, the connector simply returns a resolved or rejected promise. A Connector API interface implementation must return a promise that resolves to a value of a specific type.

Here are some sample promises along with type checking.

For telephony systems, if you’re using callbacks, you can convert them to promises as shown here:

See Also