Understand the limits and recommendations for the remote data service that exposes the external data via OData 2.0, 4.0, and 4.01 to your Salesforce org.
Required Editions
| Available in: both Salesforce Classic and Lightning Experience |
|
Available in: Developer Edition Available for an extra cost in: Enterprise, Performance, and Unlimited Editions |
- Validate your OData producer by using the Open Data Protocol Service Validation Tool at services.odata.org/validation. Doing so checks your implementation against the OData specification and identifies potential issues.
- To improve performance over low-bandwidth connections, set up your OData producer to receive gzip-compressed data. Then, in the external data source definition for OData 2.0 or 4.0, select Compress Requests. You can also set up the OData producer to send gzip-compressed data to Salesforce, which automatically accepts gzip-compressed responses.
- By default, Salesforce sends each OData request with one of the following system
query options so that the response includes the total row count of the result set.
$inlinecount=allpagesfor the OData 2.0 adapter$count=truefor the OData 4.0 adapter$count=truehard coded for 4.01 adapter
Some external systems don’t support these system query options. If you receive errors or notice long load times when you try to access their data, deselect Request Row Counts for OData 2.0 or 4.0, on the external data source. If you do so, the external data source and its associated external objects can’t support the following functionality, which requires the total row count.
- SOQL
COUNT()aggregate function - Batch Apex with
Database.QueryLocator
For details about OData URI conventions, go to www.odata.org.
- Configure your OData producer to use a page size that’s large enough to avoid
excessive round trips. Querying a large set of data with a small page size can
take a long time because of network latency. Salesforce pages that display
external data can take a long time to load.
For example, if the query results include 100 records, and the page size holds only 5 records, it takes 20 round trips to retrieve the results. If the network latency is 100 ms per round trip, it takes 2 seconds (20 × 100 ms) to retrieve the results.
In contrast, if the page size holds 20 records, it takes only five round trips to retrieve the 100 records. With the same network latency of 100 ms per round trip, it takes 0.5 seconds (5 × 100 ms) to retrieve the results.
-
If your external data source uses the OData 4.0 adapter and JSON format,
make sure that the OData producer accepts headers that contain the
odata.metadata=fullformat parameter. Other variations, includingodata.metadata=minimal, aren’t supported for OData 4.0 adapter. - If external object records don’t appear in your org, make sure that the OData
producer doesn’t change the values specified in the OData query filters. When
your org sends OData queries that specify field values with the
$filterequals (eq) operator, the OData producer must return those same field values in the resulting data rows.