Get Started with the Apex Connector Framework
To get started with your first custom adapter for Salesforce Connect, create two Apex classes: one that extends the DataSource.Connection class, and one that extends the DataSource.Provider class.
The DataSource.Connection class requires a Salesforce Connect add-on license. For more information, see Salesforce Connect Adapters Included per Add-On License.
Let’s step through the code of a sample custom adapter.
-
Create a Sample DataSource.Connection Class
First, create a
DataSource.Connectionclass to enable Salesforce to obtain the external system’s schema and to handle queries and searches of the external data. -
Create a Sample DataSource.Provider Class
Now you need a class that extends and overrides a few methods in
DataSource.Provider. -
Set Up Salesforce Connect to Use Your Custom Adapter
After you create your
DataSource.ConnectionandDataSource.Providerclasses, the Salesforce Connect custom adapter becomes available in Setup.