Query unified profile data from Salesforce Data Cloud using the Query API
domain: developer.salesforce.com · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗
In-depth guide
Salesforce Bulk API 2.0 limits — the full failure-mode walkthrough related to developer.salesforce.com, checked against official docs, with linked verified routes.
Steps
Obtain a Data Cloud-scoped OAuth access token using the JWT Bearer or web server flow with the Data Cloud Query API scope
Construct a SELECT statement in the Data Cloud SQL dialect targeting a Data Model Object (e.g., the unified Individual or unified Contact Point Email)
POST the query to the Data Cloud Query API endpoint, specifying pagination parameters for large result sets
Parse the synchronous response or, for long-running queries, poll the async job endpoint using the returned job ID
Handle pagination by following the nextBatchId or equivalent cursor returned in the response
Map the returned Data Cloud attribute names back to your application's data model
Known gotchas
The Query API endpoint and base URL are tenant-specific Data Cloud instance URLs, not the standard Salesforce instance URL
Large queries time out synchronously; always implement the async job path for queries expected to return more than a few thousand rows
Querying across unified profiles and Data Lake Objects in the same statement may require specific join syntax supported only on certain Data Cloud tiers
Give your agent this knowledge — and 15,600+ more routes
One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp
Need this verified for your stack — or a route we don't have yet?