What OData Is
यह कंटेंट अभी तक आपकी भाषा में उपलब्ध नहीं है।
Module 2 of 6 in the chapter Data Connectivity and Virtualization, chapter 19 of the Integration Architect course. Each module stands on its own. Previous: What Salesforce Connect Is · Next: Reaching a Database, and Everything Else
The question this module answers: Salesforce Connect’s most common adapters speak OData. What is it, what does Salesforce actually ask the other system for, and what does that system have to do well?
Tell Me What You’ve Got
Section titled “Tell Me What You’ve Got”When I introduce external objects in class, I say the OData protocol is almost like an open API spec. It’s a specification that defines how you interact with the data, and Salesforce can reach out to an endpoint and say: tell me what you’ve got. What are your objects? What can I do?
And I’ll be honest with you, the way I am with the class. When OData first came out, I thought, I’m going to go read everything there is to know about it. So I went to odata.org and started going through the spec. I spent a few hours, and my head hurt. I said, all right, I’ll just trust that it works.
You don’t need the whole spec either. You need four things: what OData is, the two documents that describe a service, the handful of questions Salesforce actually asks, and what that means for the system on the other end.
A Standard Way to Ask for Data
Section titled “A Standard Way to Ask for Data”OData is REST with conventions (chapter 3). Plain REST tells you to use HTTP’s verbs and addresses, but every API still invents its own way to filter, sort and page through results. OData agrees on those ways, so a client that speaks OData can query any service that speaks it, without being written for that service.
It’s an open standard, now kept by OASIS, the same kind of body that keeps many web standards. There are three versions you’ll meet with Salesforce Connect:
- OData 2.0, the older version, still published by plenty of systems. The OData site itself now says “OData Version 4.0 is the current recommended version” (OData Version 2.0 (opens in a new tab), odata.org, checked 2026-11-21).
- OData 4.0, an OASIS Standard since February 24, 2014.
- OData 4.01, an OASIS Standard since April 23, 2020 (OData Version 4.01, Part 1: Protocol (opens in a new tab), OASIS, checked 2026-11-21).
Salesforce Connect has an adapter for each (module 1). When you set up a data source, you pick the version the other system speaks.
Two Documents Describe Everything
Section titled “Two Documents Describe Everything”Here’s the part that makes Salesforce Connect feel like magic, and it’s simple once you see it. In the standard’s words, “An OData service exposes two well-defined resources that describe its data model; a service document and a metadata document” (OData Version 4.0, Part 1: Protocol (opens in a new tab), OASIS, checked 2026-11-21).
- The service document is the table of contents. It “lists entity sets, functions, and singletons that can be retrieved.” Entity sets are the tables: orders, order details, payments.
- The metadata document is the contract. It “describes the types, sets, functions and actions understood by the OData service”, so clients “can use the metadata document to understand how to query and interact with entities in the service.” Every field, its type, its key, and how the tables relate.
So when you press Validate and Sync on a data source (module 1), Salesforce reads those documents. That’s the “tell me what you’ve got” in my class, done by a machine. It finds orders and order details, you tick the ones you want, and Salesforce creates an external object for each, with a field for each column.
You’ve seen this idea before. It’s the same idea as the WSDL (chapter 17 module 4) and the OpenAPI file (chapter 3 module 2): a contract a machine can read, so the other side can build itself from it.
What Salesforce Asks For
Section titled “What Salesforce Asks For”Now the useful part for troubleshooting. When a user opens a list view of external orders, or the order details related list on an account, Salesforce turns that into an OData request. In Salesforce’s words: “Salesforce automatically creates the OData queries so that you, as an administrator or developer, don’t have to.” And it uses only a few of the standard’s options. “Salesforce Connect supports only the following OData system query options. All other options in the OData 2.0, 4.0, and 4.01 specifications are unused” (OData Query String Options (opens in a new tab), Salesforce Help, checked 2026-11-21).
| Option | What it asks for |
|---|---|
$filter | Only the rows that match: the order details for this one order |
$select | Only these columns: the fields on the page, not all of them |
$orderby | Sorted this way |
$top and $skip | One page of rows at a time |
$count (4.0 and 4.01) or $inlinecount (2.0 only) | How many rows there are in all |
$search (4.0 and 4.01) | A text search, when the user searches |
So the related list for one order becomes, roughly, a request like this to the order details table: only the rows for that order, only the columns on the layout, sorted, the first page, and a count. One page view, one request, every time someone looks.
Salesforce gives the reason to know this: “understanding how OData queries are generated–or even attempting manual OData queries–can help you troubleshoot issues with the external system’s OData producer.” When an external object is slow or wrong, that request is the first thing to look at.
What the Other System Has to Do Well
Section titled “What the Other System Has to Do Well”The system that answers is called the OData producer. Salesforce names SAP and Microsoft systems among them, and says “The external data must be exposed via OData producers” (module 1). If your system doesn’t speak OData, something has to publish an OData service for it, and that’s module 3.
Look back at the table and you can see what the producer has to do well.
- Filter fast on the fields you relate by. Every related list is a filter on a key. If that column isn’t indexed in the source, every page view is a slow scan.
- Page properly. Answer
$topand$skipwithout reading the whole table each time. - Count cheaply, or the count becomes the slow part.
- Answer in time. A person is waiting. If the producer takes thirty seconds, the page waits thirty seconds. Data Architect chapter 14 calls it right: every virtual read is a dependency.
- Handle being asked often. Every user, every page view, every list. Size it for Salesforce’s busiest hour, not for one test.
None of that is Salesforce’s work. It’s the producer’s, so it’s a conversation with the team that owns it, early, with the expected number of page views a day.
Test knowledge. Know that Salesforce Connect’s OData adapters (2.0, 4.0 and 4.01) reach any system that publishes an OData service, that Salesforce reads the service’s metadata to create external objects, and that Salesforce builds the OData queries itself. Expect a scenario where external data is needed in real time without copying it, from a system that exposes OData: the answer is Salesforce Connect with an OData adapter.
Beyond the exam: what AI changes. The metadata document is a contract a machine can read, so an AI can read it too. Give it the metadata document and your object model, and it will draft the map: this OData entity is that external object, this property relates to that field, this key should become an external lookup. That saves real time on a large service. But someone who owns the mapping still checks it, the way chapter 3 module 5 asks for, against real rows.
What an Architect Decides Here
Section titled “What an Architect Decides Here”- Which OData version the other system speaks, and whether it can move to 4.01.
- Which entity sets become external objects, and which fields.
- What the producer must do well: indexed keys, paging, counts, speed, and the number of requests at the busiest hour, agreed with its owner.
- How you’ll troubleshoot it: the OData request Salesforce sends, and who on the other side can read it.
Explore
Section titled “Explore”- OData Query String Options (opens in a new tab), Salesforce Help (checked 2026-11-26): the options Salesforce Connect sends.
- OData Version 4.01, Part 1: Protocol (opens in a new tab), OASIS (checked 2026-11-26): the standard, if your head can take it.
- OData Version 2.0 (opens in a new tab), OData.org (checked 2026-11-26): the version the Trailhead quick start uses.
- OData Version 4.0, Part 1: Protocol (opens in a new tab), OASIS Standard, Errata 03, 2016-06-02 (checked 2026-11-26).
- What Salesforce Connect Is: module 1, the data source, the adapter and the external object.
