grzmol/vibe-force/sf-data-cloud
Claude Code and agent skill by grzmol/vibe-force
- community
Checking that the SKILL.md file is still in the repository.
Salesforce Data Cloud (rebranded Data 360) from a developer's seat - deciding whether a story belongs in Data Cloud at all, modelling data lake objects (DLO) and data model objects (DMO) and the DLO-to-DMO mapping, choosing a primary key and an extract method, ingesting through the Ingestion API in streaming or bulk mode, understanding what identity resolution produces and how to query a unified profile, consuming calculated insights and data graphs, querying with Data 360 SQL through the Query API or with the sfsqlquery Apex namespace and ConnectApi.CdpQuery, the SOQL subset that works against DMOs, surfacing Data Cloud data in LWC through an Apex bridge and in Flow through the cdp invocable actions, source-tracking Data Cloud metadata types (DataStreamDefinition, ObjectSourceTargetMap, DataSrcDataModelFieldMap, MktCalcInsightObjectDef, DataConnectorIngestApi) in an SFDX project, and the ingestion and query limits that bite. Use when a story mentions Data Cloud, Data 360, a data stream, a DLO or DMO, unified profiles, calculated insights, data graphs, segments, the Ingestion API, or grounding an agent in customer data.
Install
npx vskill@latest install grzmol/vibe-force/sf-data-cloudSKILL.md
The same SKILL.md was published earlier as grzmol/vibe-force/sf-data-cloud.
Salesforce Data Cloud
Data Cloud is a lakehouse bolted to the Salesforce Platform, not another sObject. It ingests, harmonises and unifies data, then exposes it read-only through SQL, a restricted SOQL subset, and Connect API resources. Everything a developer does here is schema, mapping, ingest, query - never DML. Salesforce rebranded Data Cloud to Data 360 on 14 October 2025; both names appear in the product and the documentation, and the API names still say cdp and ssot.
Agent grounding built on top of this data is skill sf-agentforce-development. Record loading into CRM objects is skill sf-data-management. Callout mechanics and named credentials are skill sf-integration-patterns.
When to use
| The story says | Right home | Why | |
|---|---|---|---|
| "Unify customers across 4 source systems and give one profile" | Data Cloud | Identity resolution, link tables and unified DMOs exist for exactly this | |
| "Aggregate 400M engagement rows into a lifetime-value metric" | Data Cloud calculated insight | OLAP store; a CRM rollup would blow every governor limit | |
| "Ground an agent or a personalisation rule in behavioural data" | Data Cloud + skill sf-agentforce-development | Data graphs and unified profiles are the documented grounding surface | |
| "Users must edit these records in the UI" | Custom object | DMOs are read-only from Apex; no DML, no FLS, no record-level sharing | |
| "A handful of rows, read live from an ERP, never stored" | External objects (Salesforce Connect) | Data virtualisation - skill sf-integration-patterns, pattern 6 | |
| "Push 5,000 orders a night into Salesforce records" | Bulk API 2.0 | Skill sf-data-management; Data Cloud does not create CRM records | |
| "Call a partner API and show the response on a page" | Plain integration | No storage, no unification - skill sf-integration-patterns | |
| "Trigger logic when a field changes" | Flow / Apex trigger on the CRM object | Data Cloud has no triggers; it emits DataObjectDataChgEvent on data actions only |
Data Cloud is the wrong answer when the data is small, must be writable, must be shared by role hierarchy, or must participate in a CRM transaction. Its object-level access is coarse: DMOs in every data space are reachable from Apex in system mode, and there is no field-level security and no record-level access control for them. If a story needs those controls, model it as a custom object and read skill sf-security-model.
Vocabulary and suffixes
| Term | Suffix | What it is | |
|---|---|---|---|
| Data lake object (DLO) | __dlo | Landing table holding ingested data in the source system's own schema | |
| Data model object (DMO) | __dlm | C360 Data Model view over one or more DLOs. Stores no data, only references. Field API names always end __c | |
| Unified DMO | __dlm | Output of identity resolution, for example UnifiedIndividual__dlm | |
| Unstructured DLO / DMO | __dlo / __dlm | Chunking, indexing and embedding targets for RAG | |
| Calculated insight object (CIO) | - | Aggregated or calculated metric derived from DMOs | |
| Data graph (DG) | - | Precalculated JSON materialisation of several DMOs for real-time lookups | |
| Data space | - | Partition of the tenant; most APIs take a dataspace argument, default default | |
| Data kit | - | Packaging container for Data Cloud components |
In SQL and SOQL statements, data lake objects appear with a __dll suffix (sfmc_email_engagement_click_{EID}__dll) while the object reference documents the DLO object suffix as __dlo. Standard DMOs carry the ssot__ namespace on both object and fields (ssot__Individual__dlm.ssot__Id__c); some REST samples show the unprefixed alias. Resolve the exact name from the org before hardcoding it - see the metadata call in references/query-reference.md.
Core patterns
1. Decide the primary key before anything else
A DLO's primary key is declared per field with primaryIndexOrder on the transport field: an integer starting at 1 that also orders a compound key; a missing value means the field is not part of the key. Ingested rows upsert on that key, and updates are a full replace - patch semantics are not supported. A key that is not stable in the source system produces duplicate rows that identity resolution then has to clean up.
primaryIndexOrder carries the same meaning on MktDataTranField under MktDataTranObject. Pick whichever transport type the connector produced and set it there.
2. Map DLO to DMO in source-tracked metadata
Object-level mapping is ObjectSourceTargetMap (objectSourceTargetMaps/, API 51.0+); field-level mapping is either the nested FieldSourceTargetMap or the standalone DataSrcDataModelFieldMap (dataSrcDataModelFieldMaps/, API 53.0+). Both are retrievable and deployable.
Map a record-modified field into the DMO. Without it, the model cannot tell which copy of a duplicated record is newest, and reconciliation rules have nothing to rank on.
3. Ingest: streaming for events, bulk for files
One data stream accepts both interaction patterns. Pick per payload, not per project.
| Streaming | Bulk | ||
|---|---|---|---|
| Shape | JSON micro-batch to an object endpoint | CSV uploaded to a job | |
| Latency | Processed asynchronously about every 3 minutes | Job queue; depends on volume | |
| Size cap | 200 KB body per request | 150 MB per CSV, 100 files per job | |
| Throughput cap | 250 requests/second across all Ingestion API object endpoints | 20 jobs per hour, 5 concurrent | |
| Deletes | Up to 200 records per request | operation: delete job |
Ingestion is eventually consistent: allow at least 30 seconds after ingest before the rows are queryable. Request shapes, job states and the CSV contract are in references/ingestion-reference.md.
4. Query from Apex with the sfsqlquery namespace
sfsqlquery is the recommended Apex surface. ConnectApi.CdpQuery remains as a lower-level interface that mirrors the Connect REST endpoints.
The iterator is single-use and submits nothing until iteration begins. withWorkloadName tags the query so Salesforce Support can trace it; without it the framework uses dcsql_row_iterator_workload.
create(sql, dataspace) takes a SQL string and nothing else, so never build a filter by concatenating caller input into it. When the query needs a user-supplied value, a server-side row limit or custom query settings, use the create(ConnectApi.QuerySqlInput, dataspace) overload, which is the documented home for parameterised queries.
5. Page large result sets asynchronously
A synchronous iterator is bounded by the Apex transaction. For anything large, extend sfsqlquery.SqlQueueable; the framework handles submission, status polling, pagination and chaining.
cancel() inside processDataChunk() stops the chain. getQueryId() returns the server-assigned id; persist it to resume later through sfsqlquery.QueryHandle. Async limits: skill sf-async-apex-patterns and skill sf-governor-limits.
6. Use SOQL only where the subset covers you
SOQL against DMOs, DLOs and the unified profile is supported from API 51.0. It is a subset: no subqueries, no aggregate functions, no date functions, no HAVING. LIMIT defaults to 100 and caps at 2,000 records per call. Relationship traversal is not supported - joins go through SQL.
Because it is a callout, pending DML in the same transaction throws UnexpectedException: A callout was unsuccessful because of pending uncommitted work.... Query first, write second, or move the query into a Queueable. Query locators and for loops over DMOs work from API 61.0 (earlier versions returned only the first 201 records); Batch Apex is blocked with QueryLocator but supported with Iterable. Selectivity rules are the same discipline as skill sf-soql-sosl-optimization.
7. Resolve a source record to its unified profile
Identity resolution applies match rules to group records and reconciliation rules to pick the best value per attribute, writing link tables that leave the source rows intact. Three hops get you from a source id to unified contact points.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/sf-data-cloud/SKILL.md
Popularity
- Repository stars
- 3
- 7-day trend score
- 7
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/grzmol/vibe-force/sf-data-cloud)