Sub topic 1
Why leave data where it is: virtualization versus copying
Prerequisites
This chapter assumes you understand Salesforce objects, fields, relationships, permission sets, and basic SOQL. Basic REST and OData concepts will help when choosing an adapter.
Virtualization versus copying
Data virtualization means Salesforce displays and queries data that remains in another system. Salesforce Connect provides this access through external objects. Salesforce does not normally store a second copy of each external record.
Copying data uses an integration or data pipeline to load records into Salesforce objects. The copy can be fast to query and available when the source is offline, but it can become stale. It also requires storage, synchronization logic, and conflict handling.
Virtualization keeps the external system as the source of truth. A query can cause a live request, so users see current data. The trade-off is that network latency, external-system limits, and source availability affect Salesforce users.
What Salesforce Connect provides
Salesforce Connect supplies the metadata and runtime features needed to work with external data. You configure an external data source, select an adapter, and use Validate and Sync to generate external objects. These objects can appear in Salesforce pages and can be queried with SOQL.
The external object represents the remote structure. Its records are retrieved when Salesforce needs them. Salesforce Connect can also support relationships and, when the source permits it, writes back to the external system.
Choosing an adapter
An adapter translates Salesforce requests into the protocol or API used by the source.
- Use an OData 2.0 or OData 4.0 adapter when the system exposes a compatible OData service.
- Use a cross-org adapter when connecting Salesforce orgs.
- Use a custom adapter with the Apex Connector Framework when the source needs custom authentication, request handling, or response mapping.
Choose based on the source protocol, supported query operations, write support, authentication model, and expected traffic. Confirm that the adapter can push filters and limits to the source. Otherwise, Salesforce may need to retrieve and process more data than expected.
Authenticating to the external system
Use a named credential to centralize the endpoint and authentication configuration. An external credential stores the authentication details and permissions separately from the endpoint. This avoids placing tokens or passwords in Apex code.
The external data source references the named credential. When Salesforce Connect makes a request, Salesforce applies that configuration to authenticate the call.
Exercise
When is virtualization usually preferable to copying data?
Show answer
When the external system is the source of truth and users need current data without maintaining a synchronization pipeline.