← Back to Platform & Technical
PLAT-008 Platform & Technical 18 min read For: Architects

Salesforce Connect: Federated Data Without Migration

What Salesforce Connect actually does under the hood, when it is the right architectural choice versus when data replication wins, how to build and configure External Objects, and how Connect handles queries, SOQL, and governor limits.

VS

Vishal Sharma

Salesforce Architecture Specialist · Updated May 2026

What You'll Learn

What Salesforce Connect actually does under the hood, when it is the right architectural choice versus when data replication wins, how to build and configure External Objects, and how Connect handles queries, SOQL, and governor limits.

The Case for Federated Data

Every enterprise has systems of record that predate Salesforce — an ERP, a legacy CRM, a data warehouse. The classic integration choice is: replicate the data into Salesforce or query it live. Replication is reliable and fast but creates a second copy that can drift out of sync. Live query is always current but adds latency and creates a dependency on the remote system's availability.

Salesforce Connect is the native mechanism for live query. It surfaces external data inside Salesforce as External Objects — metadata constructs that behave like Salesforce objects (standard fields, relationships, SOQL support) but store nothing. Every record lookup hits the remote source in real time.

Insight Connect is often misunderstood as "integration." It is not — it is virtualisation. The data lives elsewhere, and Salesforce is merely rendering a window into it. This distinction matters because every UI interaction triggers a live API call to the external system.

Connect Architecture: How It Works

The architectural components of Salesforce Connect are:

  • External Data Source: The configuration record that defines the remote system — its URL, auth type (OAuth, Named Credentials, Basic), protocol (OData 2.0, OData 4.0, Apex custom adapter, AWS, Google BigQuery).
  • External Object: A Salesforce metadata object (suffix __x) that maps to a table or entity in the external system. Fields map to columns.
  • External Lookup Relationship: A special relationship field that links a standard/custom Salesforce object to an External Object. Unlike a standard lookup, it uses the ExternalId field as the join key.
  • Indirect Lookup Relationship: Links an External Object to a Salesforce object using any uniquely indexed external ID field — useful when the external system has its own identifier.
-- External Object field naming conventions
Orders__x          (External Object for Orders entity)
OrderId__c         (external ID field on Opportunity — join key)
Order__r           (relationship field name on Opportunity)

-- SOQL to query external data
SELECT Id, Name, OrderDate__c, TotalAmount__c
FROM Orders__x
WHERE AccountExternalId__c = 'ACC-12345'

-- Joining via lookup (from Opportunity)
SELECT Id, Name, Order__r.TotalAmount__c
FROM Opportunity
WHERE AccountId = '001...'
Key Point SOQL against External Objects does not run against Salesforce's database engine. It is translated into OData queries (or custom adapter calls) and dispatched to the remote system. The results come back as Salesforce records. This means query complexity is limited — no aggregates, no subqueries in most adapters.

Adapter Types and When to Use Each

Salesforce Connect ships with three built-in adapter types plus a custom Apex adapter framework:

  • OData 2.0 / 4.0: The default for REST APIs that support the OData standard. SAP, Microsoft Dynamics, and many other enterprise systems expose OData endpoints. Choose OData 4.0 when available — it supports more data types and has better error handling.
  • Cross-Org Adapter: Connects one Salesforce org to another. Useful for shared data across org splits — a parent company org and subsidiary orgs can share Account data without replication. Authentication uses the same org's OAuth flow.
  • Amazon DynamoDB / Google BigQuery: Direct connectors for cloud data stores. Useful for analytics-adjacent use cases where large datasets need to be surfaced contextually.
  • Custom Apex Adapter: Implement DataSource.Connection and DataSource.Provider interfaces. Full control over the HTTP call, field mapping, and query translation. Required when the remote system does not expose OData.
// Custom Apex Adapter skeleton
global class MyERPAdapter extends DataSource.Connection {
  override global List<DataSource.Table> sync() {
    List<DataSource.Column> cols = new List<DataSource.Column>{
      DataSource.Column.text('ExternalId', 255),
      DataSource.Column.text('Name', 255),
      DataSource.Column.number('TotalAmount', 18, 2)
    };
    return new List<DataSource.Table>{
      DataSource.Table.get('Orders', 'ExternalId', cols)
    };
  }

  override global DataSource.TableResult query(DataSource.QueryContext ctx) {
    // Build HTTP request to external ERP
    // Transform response to DataSource.Row list
    List<Map<String,Object>> rows = callExternalERP(ctx);
    return DataSource.TableResult.get(ctx, rows);
  }
}

Governor Limits and Performance Reality

Connect calls count against Salesforce callout limits, not query limits. Each External Object query generates one or more callouts to the external system:

  • Max 100 callouts per Apex transaction
  • Callout timeout limit: 120 seconds
  • No async callout support — Connect queries are synchronous
  • External Object row limit per query: 2,000 rows

The 2,000 row limit is a hard ceiling. If the external system has 50,000 orders, a Connect query can only ever show the first 2,000 (ordered by the default sort). This makes Connect unsuitable for bulk data analysis — it is designed for contextual, record-level lookups, not reporting.

Warning If your use case involves users running list views, reports, or SOQL with no WHERE clause against an External Object, Connect is the wrong tool. The 2,000 row cap and live-query latency will frustrate users. Replicate the data into Salesforce using ETL or platform events instead.

When Connect Is the Right Choice

Connect excels in three scenarios:

  1. Contextual data access: A sales rep opens an Account and needs to see the last three ERP orders without IT building a full sync pipeline. One External Object with an Account relationship delivers this in a single afternoon.
  2. Cross-org data visibility: A service team org needs read access to Account data owned by the sales org. The Cross-Org adapter provides this without a full merge or complex middleware.
  3. Compliance-constrained data: Data that legally cannot be replicated (GDPR-sensitive PII, regulated financial records) can be surfaced via Connect without being stored in Salesforce storage.
Tip Use Connect as a prototyping layer. Before committing to a full ETL pipeline, stand up an External Object in a day to validate which fields users actually need. Once the field set is known, build the real integration. This avoids over-engineering the data model before requirements are clear.

Security and Caching Considerations

External Objects honour Salesforce object-level and field-level security. FLS and object permissions apply as expected. However, row-level security (record ownership, sharing rules, territory management) does not apply to External Objects — all users with object access can see all returned rows unless the external system enforces row-level filtering.

For caching, OData adapters have no built-in cache. Each page load triggers a fresh callout. If the external system's API has strict rate limits, Connect can inadvertently exhaust them during peak Salesforce usage. Co-ordinate with the external system's team before production deployment.

Key Takeaways

  • Salesforce Connect virtualises external data — no storage, always live, always current.
  • External Objects behave like Salesforce objects but every access triggers a callout to the remote system.
  • The 2,000-row query limit makes Connect unsuitable for reporting — use it for contextual, record-level lookups only.
  • Custom Apex Adapters extend Connect to any REST API that does not expose OData.
  • Row-level security does not apply to External Objects — the remote system controls what rows are accessible.
  • Use Connect as a rapid prototyping layer to validate field requirements before building a full integration pipeline.

Check Your Understanding

1. What is the hard row limit for a single Salesforce Connect query against an External Object?

A. 10,000 rows
B. 2,000 rows
C. 500 rows

2. A compliance requirement says customer PII cannot be stored in Salesforce. Which Connect feature directly addresses this?

A. External Lookup Relationships encrypt data at rest
B. Connect virtualises data — nothing is replicated to Salesforce storage
C. Salesforce Shield encrypts External Object fields automatically

3. Which adapter type would you use to connect a Salesforce org to data in a separate Salesforce org?

A. OData 4.0 Adapter
B. Cross-Org Adapter
C. Custom Apex Adapter

Discussion & Feedback