Data Federation API FAQ

Learn the answers to frequently asked questions about the Data Federation API.

What Is the Data Federation API (DF API)?

The Data Federation API is an OData REST API that enables clients to execute federated queries against queryable data models. The DF API reduces the complexity of retrieving data across clouds and orgs, as one query can return data from all of your data sources. Data Federation API queries are written against the Cloud Information Model (CIM) that all data sources are mapped to.

What Do I Use the Data Federation API For?

Use the DF API to build reports and components with easy access to data across multiple data sources in a single federated query.

What Do I Need to Do to Make a Data Federation API Query?

Create the DFS named credential and call it using an Apex callout. Consult your Customer 360 Admin to make sure they have completed the other tasks required for the integration experience you want to enable. These include connecting data sources and mapping entities. See the Multi-Org Checklist and the examples for more information.

How Do I Discover Valid Query Parameter Values?

The DF API has multiple resources to help you discover valid values for URI parameters. Basic query operations are documented in the Query resource. Any OData syntax not documented is not supported.

How Do I Filter on Query Parameters and What Are the Limitations on Query Filters?

Basic OData 4.0 filters are supported for any data source. Some data sources allow nested $expand query filters.

What Information Does Data Federation API Retrieve?

It returns 25 records from the full data set, in undetermined order. If you have many results, Salesforce recommends querying on global profile ID, as it significantly filters and improves the quality of results.

Do I Have to Use the Global Party ID in My Query?

When you want to query across relationships, both entities in the relationship need a global profile ID. If you are directly querying an entity, then a global profile ID is not required for a query to be successful.

How Do I Control How the Query Results Are Returned and Paginate Through Them?

You can use the query parameters to sort or limit results. Since DF API returns a maximum of 25 records, pagination features are not needed.

How Do I Query Across Objects?

If you use the Global Party ID (GPID) as a filter parameter, DF API queries account, contact, and lead objects mapped to the Individual entity.

Does DF API Provide Canonical IDs

The DF API automatically prefixes the data source ID to the primary key of any records that are returned from a Salesforce Org.

No key is prefixed for records returned from B2C Commerce instances. Parse the primary key to remove the prefixed data source ID. Then display the primary key for a record or use it to create a record in your org.

You can use the prefixed data source ID to display information about the origin of the record. Record origin can be useful if your orgs are separated geographically or by business unit.

If My External Object Validation Fails, Will My Queries Work?

Yes! External objects that are associated with DFS external data sources can’t be validated via the standard external object validation process. Run a simple query to test it if you want to check that the objects are available to query.