
Retrieving Datacloud
- 523 installs
- 787 repo stars
- Updated August 5, 2026
- forcedotcom/afv-library
This is a copy of retrieving-datacloud by forcedotcom - installs and ranking accrue to the original listing.
retrieving-datacloud is a Salesforce AFV skill that queries and introspects Data Cloud via SQL, vector search, async queries, and the sf data360 CLI for developers retrieving Data Cloud objects and search indexes.
About
retrieving-datacloud is a forcedotcom/afv-library skill for the Salesforce Data Cloud Retrieve phase. It guides agents through Data Cloud SQL, describe operations, async queries, vector search, search-index workflows, and metadata introspection using the community sf data360 CLI plugin in a Data Cloud-enabled org. The skill triggers when developers run Data Cloud queries or inspect Data Cloud object metadata, and it explicitly defers standard CRM SOQL to querying-soql, segment creation to segmenting-datacloud, and STDM or parquet tracing to observing-agentforce. Developers reach for retrieving-datacloud when building retrieval pipelines, debugging Data Cloud SQL, or exploring search-index configuration during Agentforce or analytics integrations. The CLI-first workflow keeps agents on supported Data Cloud interfaces instead of guessing REST endpoints or mixing CRM and Data Cloud query languages.
- Handles sync SQL, paginated SQL, async query workflows, and result interpretation
- Supports vector search, hybrid search, and search-index operations
- Performs table describe, profile, and insight metadata introspection
- Requires external community sf data360 CLI plugin and Data Cloud-enabled org
- Explicit routing: delegates standard CRM SOQL to querying-soql and segment design to segmenting-datacloud
Retrieving Datacloud by the numbers
- 523 all-time installs (skills.sh)
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/forcedotcom/afv-library --skill retrieving-datacloudAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 523 |
|---|---|
| repo stars | ★ 787 |
| Last updated | August 5, 2026 |
| Repository | forcedotcom/afv-library ↗ |
How do you query Salesforce Data Cloud with SQL?
Query, search, and introspect Salesforce Data Cloud using SQL, vector search, async queries, and metadata operations via the sf data360 CLI.
Who is it for?
Salesforce developers with a Data Cloud-enabled org who need CLI-guided SQL, vector search, and metadata introspection during retrieval workflows.
Skip if: Developers running standard CRM SOQL or designing calculated insights should use querying-soql or segmenting-datacloud instead of retrieving-datacloud.
When should I use this skill?
A task runs Data Cloud SQL, async queries, vector search, search-index workflows, or metadata introspection for Data Cloud objects.
What you get
Data Cloud SQL result sets, async query handles, vector search responses, and described Data Cloud object metadata.
- Data Cloud query results
- Vector search responses
- Described Data Cloud metadata
By the numbers
- Requires the external community sf data360 CLI plugin for Data Cloud operations
Files
retrieving-datacloud: Data Cloud Retrieve Phase
Use this skill when the user needs query, search, and metadata introspection for Data Cloud: sync SQL, paginated SQL, async query workflows, table describe, vector search, hybrid search, or search index operations.
When This Skill Owns the Task
Use retrieving-datacloud when the work involves:
sf data360 query *sf data360 search-index *sf data360 metadata *sf data360 profile *orsf data360 insight *inspection- understanding Data Cloud SQL results or query shape
Delegate elsewhere when the user is:
- writing standard CRM SOQL only → querying-soql
- designing segment or calculated insight assets → segmenting-datacloud
- analyzing STDM/session tracing/parquet telemetry → observing-agentforce
---
Required Context to Gather First
Ask for or infer:
- target org alias
- whether the user needs quick count, medium result set, large export, schema inspection, or semantic search
- table/index name if known
- whether the task is read-only SQL or search-index lifecycle management
---
Core Operating Rules
- Treat Data Cloud SQL as its own query language, not SOQL.
- Run the shared readiness classifier before relying on query/search surfaces:
node ../orchestrating-datacloud/scripts/diagnose-org.mjs -o <org> --phase retrieve --json. - Use describe before guessing columns.
- Prefer
sqlv2or async query flows for larger result sets. - Use vector search or hybrid search only when the search index lifecycle is healthy.
- Keep STDM/parquet/session-tracing workflows out of this skill family.
---
Recommended Workflow
1. Classify readiness for retrieve work
node ../orchestrating-datacloud/scripts/diagnose-org.mjs -o <org> --phase retrieve --json
# optional query-plane probe, only with a real table name
node ../orchestrating-datacloud/scripts/diagnose-org.mjs -o <org> --phase retrieve --describe-table MyDMO__dlm --json2. Choose the smallest correct query shape
sf data360 query sql -o <org> --sql 'SELECT COUNT(*) FROM "ssot__Individual__dlm"' 2>/dev/null
sf data360 query sqlv2 -o <org> --sql 'SELECT * FROM "ssot__Individual__dlm"' 2>/dev/null
sf data360 query async-create -o <org> --sql 'SELECT * FROM "ssot__Individual__dlm"' 2>/dev/null3. Use describe before guessing fields
sf data360 query describe -o <org> --table ssot__Individual__dlm 2>/dev/null4. Use vector or hybrid search only when an index exists
sf data360 search-index list -o <org> 2>/dev/null
sf data360 query vector -o <org> --index Knowledge_Index --query "reset password" --limit 5 2>/dev/null
sf data360 query hybrid -o <org> --index Knowledge_Index --query "reset password" --limit 5 2>/dev/null
sf data360 query hybrid -o <org> --index Insurance_Index --query "weather damage coverage" --prefilter "Type_of_Insurance__c='Home'" --limit 10 2>/dev/null5. Reuse curated search-index examples when creating indexes
Use the phase-owned examples instead of inventing JSON from scratch:
examples/search-indexes/vector-knowledge.jsonexamples/search-indexes/hybrid-structured.json
---
High-Signal Gotchas
- Data Cloud SQL is not SOQL.
- Table names should be double-quoted in SQL.
sqlv2is better than ad hoc OFFSET paging for medium result sets.- async query is preferable for large results.
- search-index operations and vector/hybrid queries depend on the index lifecycle being healthy.
- Hybrid search can use
--prefilter, but only on fields configured as prefilter-capable when the search index was created. - HNSW index parameters are typically read-only on create; leave
userValues: []unless the platform explicitly documents otherwise. query describeis not a universal tenant probe; only run it with a known DMO or DLO table after broader readiness has been confirmed.
---
Output Format
Retrieve task: <sql / sqlv2 / async / describe / vector / search-index>
Target org: <alias>
Target object: <table or index>
Commands: <key commands run>
Verification: <query rows / schema / status>
Next step: <segment / harmonize / follow-up>---
References
- README.md
- examples/search-indexes/vector-knowledge.json
- examples/search-indexes/hybrid-structured.json
- ../orchestrating-datacloud/assets/definitions/search-index.template.json
- ../orchestrating-datacloud/references/plugin-setup.md
- ../orchestrating-datacloud/references/feature-readiness.md
Credits & Acknowledgments
Primary contributor: Gnanasekaran Thoppae
This skill is part of the *-datacloud family. Shared attribution, upstream source mapping, and maintenance notes live in:
- ../orchestrating-datacloud/CREDITS.md
- ../orchestrating-datacloud/UPSTREAM.md
{
"label": "<INDEX_NAME>",
"developerName": "<INDEX_NAME>",
"description": "Hybrid search index on a structured Data Cloud DMO",
"sourceDmoDeveloperName": "<SOURCE_DMO>__dlm",
"chunkDmoName": "<INDEX_NAME> chunk",
"chunkDmoDeveloperName": "<INDEX_NAME>_chunk",
"vectorDmoName": "<INDEX_NAME> index",
"vectorDmoDeveloperName": "<INDEX_NAME>_index",
"searchType": "HYBRID",
"vectorEmbedding": {
"vectorEmbeddingRelatedFields": []
},
"rankingConfigurations": [],
"chunkingConfiguration": {
"fieldLevelConfigurations": [
{
"sourceDmoDeveloperName": "<SOURCE_DMO>__dlm",
"sourceDmoFieldDeveloperName": "<TEXT_FIELD>__c",
"config": {
"id": "passage_extraction",
"userValues": [
{ "id": "max_tokens", "value": "512" },
{ "id": "strip_html", "value": "true" }
]
}
}
]
},
"vectorEmbeddingConfiguration": {
"embeddingModel": {
"id": "e5_large_v2",
"userValues": [
{ "id": "dimension", "value": "1024" },
{ "id": "max_token_limit", "value": "512" }
]
},
"index": {
"id": "HNSW",
"userValues": []
},
"similarityMetric": "COSINE"
}
}
{
"label": "My_kav",
"developerName": "My_kav",
"sourceDmoDeveloperName": "ssot__KnowledgeArticleVersion__dlm",
"chunkDmoName": "My_kav chunk",
"chunkDmoDeveloperName": "My_kav_chunk",
"vectorDmoName": "My_kav index",
"vectorDmoDeveloperName": "My_kav_index",
"searchType": "VECTOR",
"vectorEmbedding": {
"vectorEmbeddingRelatedFields": []
},
"chunkingConfiguration": {
"fieldLevelConfigurations": [
{
"sourceDmoDeveloperName": "ssot__KnowledgeArticleVersion__dlm",
"sourceDmoFieldDeveloperName": "ssot__Name__c",
"config": {
"id": "passage_extraction",
"userValues": [
{ "id": "strip_html", "value": "true" },
{ "id": "max_tokens", "value": "512" }
]
}
}
]
},
"vectorEmbeddingConfiguration": {
"embeddingModel": {
"id": "e5_large_v2",
"userValues": [
{ "id": "dimension", "value": "1024" },
{ "id": "max_token_limit", "value": "512" }
]
},
"index": {
"id": "HNSW",
"userValues": []
},
"similarityMetric": "COSINE"
},
"rankingConfigurations": []
}
retrieving-datacloud
Query and search workflows for Salesforce Data Cloud.
Use this skill for
- quick SQL counts
- paginated SQL (
sqlv2) - async query lifecycles
- table describe
- vector search
- hybrid search with optional prefilter
- search index inspection and lifecycle work
Example requests
"Run a Data Cloud SQL query against unified profiles"
"Describe this Data Cloud table before I write SQL"
"Help me troubleshoot vector search in Data Cloud"
"Run a hybrid search with a prefilter in Data Cloud"
"Create and inspect a search index"Common commands
sf data360 query sql -o myorg --sql 'SELECT COUNT(*) FROM "ssot__Individual__dlm"' 2>/dev/null
sf data360 query describe -o myorg --table ssot__Individual__dlm 2>/dev/null
sf data360 search-index list -o myorg 2>/dev/null
sf data360 query vector -o myorg --index Knowledge_Index --query "reset password" --limit 5 2>/dev/null
sf data360 query hybrid -o myorg --index Knowledge_Index --query "reset password" --limit 5 2>/dev/nullExample payloads
- examples/search-indexes/vector-knowledge.json
- examples/search-indexes/hybrid-structured.json
References
- SKILL.md
- ../orchestrating-datacloud/assets/definitions/search-index.template.json
- CREDITS.md
Related skills
How it compares
Use retrieving-datacloud for Data Cloud SQL and vector search; use querying-soql for standard Salesforce CRM queries.
FAQ
What CLI does retrieving-datacloud require?
retrieving-datacloud requires the external community sf data360 CLI plugin and a Data Cloud-enabled Salesforce org. Agents use it for SQL, async queries, vector search, and metadata describe operations instead of standard SOQL tooling.
When should retrieving-datacloud not be used?
retrieving-datacloud is only for Data Cloud retrieval. Use querying-soql for standard CRM SOQL, segmenting-datacloud for segment or calculated insight design, and observing-agentforce for STDM, session tracing, or parquet analysis.