Data Cloud Grounding For Agentforce
Purpose
Agentforce answers are only as good as the data they can reach. Grounding with
Data Cloud lets an agent retrieve context from unified customer profiles,
engagement events, knowledge articles, and structured or unstructured sources,
then cite them in the answer. Without a deliberate grounding design the agent
either hallucinates (too little context), over-retrieves (latency and cost
spike), or leaks data the calling user should not see (sharing ignored at the
retriever level).
This skill covers picking the right DMOs and data graphs, chunking and
filtering for relevance, enforcing field-level and record-level visibility at
query time, setting a freshness SLA that fits the use case, and returning
answers that cite their sources.
Terminology. Agentforce topics were renamed subagents in April 2026.
This skill leads with subagent. The older term still appears in metadata and
API names, in older Help articles, and in many orgs; nothing about behaviour
changed with the rename.
Recommended Workflow
- List the questions the agent must answer. Work backwards from real user
utterances. If you cannot list 10 sample questions, grounding is premature.
- Map questions to DMOs and data graphs. For each question, identify the
DMO(s) and fields required. Promote gaps into Data Cloud ingestion work
before wiring a retriever.
- Pick retriever type per question bucket. Structured retriever for
records (account, contact, case). Vector/unstructured retriever for
Knowledge, call transcripts, documents. Hybrid when both are needed.
- Decide chunking. For unstructured, chunk by semantic boundary (article
section, call segment) not fixed token count when possible. Preserve a
stable doc_id + section_id in metadata for citation.
- Enforce sharing at retrieval time. Apply user-context filters so the
retriever never returns rows the running user cannot see. Never rely on the
LLM to redact.
- Set a freshness SLA. State how stale data can be before the answer is
wrong. Align Data Cloud refresh cadence to that SLA, not vice versa.
- Return citations. Every grounded answer should include source doc_ids
or record Ids the user can open.
Retriever Selection
| Question Type |
Retriever |
Notes |
| "What is this customer's status?" |
Structured (DMO) |
Filter by UnifiedIndividualId |
| "What did we tell the customer last?" |
Structured (Engagement DMO) |
Order by timestamp DESC limit 5 |
| "How do I handle policy X?" |
Vector (Knowledge) |
Chunk by section |
| "What does the transcript of the last call say?" |
Vector + metadata filter |
Filter by call_id |
| Blend ("account summary + last case note") |
Hybrid |
Two retrievers, ranked and fused |
Grounding Strategy Per Subagent
For each subagent, classify each fact you want the agent to use:
- Instructional (in subagent prompt): unchanging, short, domain rules.
- Grounded (retriever): account- or case-specific, volatile, or too big
for a prompt.
- Action-derived (from an action call): live data that must be fetched at
answer time (balance, entitlement, real-time inventory).
Over-packing the subagent prompt with facts is the #1 token waste.
Sharing Enforcement
Three layers:
- Data Cloud data space / sharing rules — baseline visibility.
- Retriever filter — always pass the calling user's identifiers so the
retriever limits to rows they are allowed to see.
- Agent response scrubbing — last line of defense, not primary.
If the retriever returns data the user should not see, you have a compliance
incident, not a UX bug.
Freshness
Ingestion latency + retriever cache TTL = worst-case staleness. State this
number explicitly in the subagent design. Examples:
- Subagent for "what's my order status" — SLA = 5 min; Data Cloud stream
job must run ≤ 3 min.
- Subagent for "what did we email last week" — SLA = 24h; daily batch is
fine.
Citation Pattern
Every retriever must emit stable ids back to the agent. The agent's response
template then includes "Source: ()". This enables:
- Transparency for the user.
- Debugging for the designer.
- Measurable retrieval quality (did the cited doc actually contain the fact?).
Anti-Patterns (see references/llm-anti-patterns.md)
- Stuffing facts into subagent instructions that belong in a retriever.
- Returning answers with no citations.
- Filtering sharing in the agent response instead of at retrieval.
- Setting retriever k to 20+ "just in case."
- Vectorizing everything, including structured data.
Official Sources Used
1---2name: data-cloud-grounding-for-agentforce3description: "Grounding an Agentforce agent with Data Cloud retrievers, DMO selection, chunking, and freshness windows. Triggers: agent grounding, retriever, DMO, data graph, RAG, vector index, citations. NOT for building or tuning the vector index itself — chunk size, embedding model, Query API — use agentforce/data-cloud-vector-search-dev. NOT for the end-to-end Knowledge-article RAG build — use agentforce/rag-patterns-in-salesforce. NOT for Data Cloud ingestion pipelines — use data/data-cloud-data-streams. NOT for identity resolution ruleset tuning — use admin/data-cloud-identity-resolution."4category: agentforce5salesforce-version: "Spring '25+"6well-architected-pillars:7 - Security8 - Reliability9 - User Experience10triggers:11 - "ground agentforce with data cloud"12 - "data cloud retriever for agent"13 - "rag pattern agentforce"14 - "citations in agent response"15 - "freshness sla for retrievers"16tags:17 - agentforce18 - data-cloud19 - grounding20 - retrieval21 - rag22inputs:23 - Use case + expected user questions24 - Data Cloud DMOs and data graphs already in place25 - Field-level sharing requirements26outputs:27 - Retriever design (DMO selection, filters, chunking)28 - Grounding strategy per topic (what retrieves, what is instructional)29 - Freshness SLA and refresh plan30 - Citation / transparency pattern31dependencies: []32version: 1.0.133author: Pranav Nagrecha34updated: 2026-08-1435metadata:36 source: https://skillmd.com/skills/pranavnagrecha/data-cloud-grounding-for-agentforce37---3839# Data Cloud Grounding For Agentforce4041## Purpose4243Agentforce answers are only as good as the data they can reach. Grounding with44Data Cloud lets an agent retrieve context from unified customer profiles,45engagement events, knowledge articles, and structured or unstructured sources,46then cite them in the answer. Without a deliberate grounding design the agent47either hallucinates (too little context), over-retrieves (latency and cost48spike), or leaks data the calling user should not see (sharing ignored at the49retriever level).5051This skill covers picking the right DMOs and data graphs, chunking and52filtering for relevance, enforcing field-level and record-level visibility at53query time, setting a freshness SLA that fits the use case, and returning54answers that cite their sources.5556> **Terminology.** Agentforce *topics* were renamed **subagents** in April 2026.57> This skill leads with *subagent*. The older term still appears in metadata and58> API names, in older Help articles, and in many orgs; nothing about behaviour59> changed with the rename.6061## Recommended Workflow62631. **List the questions the agent must answer.** Work backwards from real user64 utterances. If you cannot list 10 sample questions, grounding is premature.652. **Map questions to DMOs and data graphs.** For each question, identify the66 DMO(s) and fields required. Promote gaps into Data Cloud ingestion work67 before wiring a retriever.683. **Pick retriever type per question bucket.** Structured retriever for69 records (account, contact, case). Vector/unstructured retriever for70 Knowledge, call transcripts, documents. Hybrid when both are needed.714. **Decide chunking.** For unstructured, chunk by semantic boundary (article72 section, call segment) not fixed token count when possible. Preserve a73 stable doc_id + section_id in metadata for citation.745. **Enforce sharing at retrieval time.** Apply user-context filters so the75 retriever never returns rows the running user cannot see. Never rely on the76 LLM to redact.776. **Set a freshness SLA.** State how stale data can be before the answer is78 wrong. Align Data Cloud refresh cadence to that SLA, not vice versa.797. **Return citations.** Every grounded answer should include source doc_ids80 or record Ids the user can open.8182## Retriever Selection8384| Question Type | Retriever | Notes |85|---|---|---|86| "What is this customer's status?" | Structured (DMO) | Filter by UnifiedIndividualId |87| "What did we tell the customer last?" | Structured (Engagement DMO) | Order by timestamp DESC limit 5 |88| "How do I handle policy X?" | Vector (Knowledge) | Chunk by section |89| "What does the transcript of the last call say?" | Vector + metadata filter | Filter by call_id |90| Blend ("account summary + last case note") | Hybrid | Two retrievers, ranked and fused |9192## Grounding Strategy Per Subagent9394For each subagent, classify each fact you want the agent to use:9596- **Instructional (in subagent prompt):** unchanging, short, domain rules.97- **Grounded (retriever):** account- or case-specific, volatile, or too big98 for a prompt. 99- **Action-derived (from an action call):** live data that must be fetched at100 answer time (balance, entitlement, real-time inventory).101102Over-packing the subagent prompt with facts is the #1 token waste.103104## Sharing Enforcement105106Three layers:1071081. **Data Cloud data space / sharing rules** — baseline visibility.1092. **Retriever filter** — always pass the calling user's identifiers so the110 retriever limits to rows they are allowed to see.1113. **Agent response scrubbing** — last line of defense, not primary.112113If the retriever returns data the user should not see, you have a compliance114incident, not a UX bug.115116## Freshness117118Ingestion latency + retriever cache TTL = worst-case staleness. State this119number explicitly in the subagent design. Examples:120121- Subagent for "what's my order status" — SLA = 5 min; Data Cloud stream122 job must run ≤ 3 min.123- Subagent for "what did we email last week" — SLA = 24h; daily batch is124 fine.125126## Citation Pattern127128Every retriever must emit stable ids back to the agent. The agent's response129template then includes "Source: <title> (<id>)". This enables:130131- Transparency for the user.132- Debugging for the designer.133- Measurable retrieval quality (did the cited doc actually contain the fact?).134135## Anti-Patterns (see references/llm-anti-patterns.md)136137- Stuffing facts into subagent instructions that belong in a retriever.138- Returning answers with no citations.139- Filtering sharing in the agent response instead of at retrieval.140- Setting retriever k to 20+ "just in case."141- Vectorizing everything, including structured data.142143## Official Sources Used144145- Agentforce — Ground Your Agent — https://help.salesforce.com/s/articleView?id=sf.agentforce_grounding.htm146- Data Cloud retriever — https://help.salesforce.com/s/articleView?id=sf.c360_a_data_cloud_retriever.htm147- Data Cloud DMOs — https://help.salesforce.com/s/articleView?id=sf.c360_a_data_model_objects.htm148- Salesforce Architects — Data Cloud guidance — https://architect.salesforce.com/