---
schema_version: "1"
id: 468dacdd35f15e3ea46709b4eee67abe60b7ea857aaf6235fcf3654eb0b3be7b
title: Salesforce Connect
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexcode/apex_connector_top.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_connector_top.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: abbb7d8591c6d4fc96aa5052175312e7dc30c85aa05f9e99de21e4c978258c05
description: Apex code can access external object data via any Salesforce Connect adapter. Use the Apex Connector Framework to develop a custom adapter for Salesforce Connect. The custom adapter can retrieve data from external systems and synthesize data locally. Salesforce Connect represents that data in Salesforce external objects, enabling users and the Lightning Platform to seamlessly interact with data that’s stored outside the Salesforce org.
---
# Salesforce Connect

Apex code can access external object data via any Salesforce Connect adapter. Use the Apex Connector Framework to develop a custom adapter for Salesforce Connect. The custom adapter can retrieve data from external systems and synthesize data locally. Salesforce Connect represents that data in Salesforce external objects, enabling users and the Lightning Platform to seamlessly interact with data that’s stored outside the Salesforce org.

- **[Apex Considerations for Salesforce Connect External Objects](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_external_objects_considerations.htm)**  
    Apex code can access external object data via any Salesforce Connect adapter, but some requirements and limitations apply.
- **[Writable External Objects](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_connector_external_objects_writeable.htm)**  
    By default, external objects are read only, but you can make them writable. Doing so lets Salesforce users and APIs create, update, and delete data that’s stored outside the org by interacting with external objects within the org. For example, users can see all the orders that reside in an SAP system that are associated with an account in Salesforce. Then, without leaving the Salesforce user interface, they can place a new order or route an existing order. The relevant data is automatically created or updated in the SAP system.
- **[External Change Data Capture Packaging and Testing](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_connector_external_tracking_package_and_test.htm)**  
    You can distribute External Change Data Capture components in managed packages, including a framework for testing your Apex triggers. Special behaviors and limitations apply to packaging and package installation.
- **[Mock SOQL Tests for External Objects](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_connector_external_objects_mock_soql_tests.htm)**  
    You can mock SOQL query responses for external objects in Apex testing by using SOQL stub methods and a new test class. Use basic and joined SOQL queries against external objects and return mock records in a testing context.
- **[Get Started with the Apex Connector Framework](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_connector_start.htm)**  
    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.
- **[Key Concepts About the Apex Connector Framework](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_connector_concepts.htm)**  
    The DataSource namespace provides the classes for the Apex Connector Framework. Use the Apex Connector Framework to develop a custom adapter for Salesforce Connect. Then connect your Salesforce org to any data anywhere via the Salesforce Connect custom adapter.
- **[Considerations for the Apex Connector Framework](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_connector_considerations.htm)**  
    Understand the limits and considerations for creating Salesforce Connect custom adapters with the Apex Connector Framework.
- **[Apex Connector Framework Examples](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_connector_examples.htm)**  
    These examples illustrate how to use the Apex Connector Framework to create custom adapters for Salesforce Connect.

#### See Also

- [_Salesforce Help_: Access External Data With Salesforce Connect](https://help.salesforce.com/s/articleView?id=platform.salesforce_connect.htm&type=5&language=en_US "Salesforce Help: Access External Data With Salesforce
    Connect - HTML (New Window)")
- [Salesforce Connect Learning Map](https://salesforceconnect-learningmap.herokuapp.com/ "Salesforce Connect Learning Map - HTML (New Window)")