grzmol/vibe-force/sf-data-cloud

Claude Code and agent skill by grzmol/vibe-force

Trust tier 3
  • community
Source check pending

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-cloud

SKILL.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 saysRight homeWhy
"Unify customers across 4 source systems and give one profile"Data CloudIdentity resolution, link tables and unified DMOs exist for exactly this
"Aggregate 400M engagement rows into a lifetime-value metric"Data Cloud calculated insightOLAP store; a CRM rollup would blow every governor limit
"Ground an agent or a personalisation rule in behavioural data"Data Cloud + skill sf-agentforce-developmentData graphs and unified profiles are the documented grounding surface
"Users must edit these records in the UI"Custom objectDMOs 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.0Skill sf-data-management; Data Cloud does not create CRM records
"Call a partner API and show the response on a page"Plain integrationNo storage, no unification - skill sf-integration-patterns
"Trigger logic when a field changes"Flow / Apex trigger on the CRM objectData 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

TermSuffixWhat it is
Data lake object (DLO)__dloLanding table holding ingested data in the source system's own schema
Data model object (DMO)__dlmC360 Data Model view over one or more DLOs. Stores no data, only references. Field API names always end __c
Unified DMO__dlmOutput of identity resolution, for example UnifiedIndividual__dlm
Unstructured DLO / DMO__dlo / __dlmChunking, 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.

xml
<!-- externalDataTranObjects/Ecom_Order.externalDataTranObject-meta.xml (excerpt) -->
<ExternalDataTranObject xmlns="http://soap.sforce.com/2006/04/metadata">
<availabilityStatus>Available</availabilityStatus>
<creationType>Custom</creationType>
<masterLabel>Ecommerce Order</masterLabel>
<objectCategory>Engagement</objectCategory>
<externalDataTranFields>
<masterLabel>Order Id</masterLabel>
<creationType>Custom</creationType>
<datatype>text</datatype>
<isDataRequired>true</isDataRequired>
<primaryIndexOrder>1</primaryIndexOrder>
</externalDataTranFields>
</ExternalDataTranObject>

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.

xml
<?xml version="1.0" encoding="UTF-8"?>
<DataSrcDataModelFieldMap xmlns="http://soap.sforce.com/2006/04/metadata">
<filterApplied>true</filterApplied>
<filterOperationType>equals</filterOperationType>
<filterValue>Active</filterValue>
<masterLabel>DataSrcDataModel26</masterLabel>
<sourceField>Account1.LastModifiedDate__c</sourceField>
<targetField>ssot__Account__dlm.ssot__LastModifiedDate__c</targetField>
<versionNumber>1.0</versionNumber>
</DataSrcDataModelFieldMap>

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.

StreamingBulk
ShapeJSON micro-batch to an object endpointCSV uploaded to a job
LatencyProcessed asynchronously about every 3 minutesJob queue; depends on volume
Size cap200 KB body per request150 MB per CSV, 100 files per job
Throughput cap250 requests/second across all Ingestion API object endpoints20 jobs per hour, 5 concurrent
DeletesUp to 200 records per requestoperation: delete job
bash
# Bulk: create, upload, close. {instance_url} is the Data Cloud token-exchange instance URL.
curl -X POST "$DC_INSTANCE/api/v1/ingest/jobs" \
-H "Authorization: Bearer $DC_TOKEN" -H 'Content-Type: application/json' \
-d '{"object":"Ecom_Order","sourceName":"Ecom_Connector","operation":"upsert"}'
curl -X PUT "$DC_INSTANCE/api/v1/ingest/jobs/$JOB_ID/batches" \
-H "Authorization: Bearer $DC_TOKEN" -H 'Content-Type: text/csv' --data-binary @orders.csv
curl -X PATCH "$DC_INSTANCE/api/v1/ingest/jobs/$JOB_ID" \
-H "Authorization: Bearer $DC_TOKEN" -H 'Content-Type: application/json' \
-d '{"state":"UploadComplete"}'

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.

apex
public with sharing class LoyaltyLookup {
public static List<String> topAccountNames() {
sfsqlquery.SqlRowIterator rows = sfsqlquery.SqlStatement.create(
'SELECT Id__c, Name__c FROM accounts__dlm LIMIT 200', 'default')
.withWorkloadName('loyalty-userdashboard')
.execute();
List<String> names = new List<String>();
for (sfsqlquery.Row row : rows) {
names.add(row.getString('Name__c'));
}
return names;
}
}

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.

apex
public with sharing class OrderRollupJob extends sfsqlquery.SqlQueueable {
public OrderRollupJob(sfsqlquery.SqlStatement stmt) { super(stmt); }
public OrderRollupJob(sfsqlquery.QueryHandle handle) { super(handle); }
public override void processDataChunk() {
for (sfsqlquery.Row row : getRows()) {
OrderRollup.accumulate(row.getString('Id__c'), row.getDecimal('Amount__c'));
}
}
public override void chainNextJob(sfsqlquery.QueryHandle handle) {
System.enqueueJob(new OrderRollupJob(handle));
}
}

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.

apex
// A static SOQL query against a DMO is treated as a callout.
List<UnifiedIndividual__dlm> members = [
SELECT Id, ssot__FirstName__c, ssot__LastName__c, ssot__Email__c
FROM UnifiedIndividual__dlm
WHERE ssot__CompanyId__c = :companyId
];

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.

sql
-- 1. source record id -> unified record id
SELECT UnifiedRecordId__c FROM IndividualIdentityLink__dlm WHERE SourceRecordID__c = '{sourceId}' LIMIT 100
-- 2. unified individual
SELECT FirstName__c, LastName__c FROM UnifiedIndividual__dlm WHERE Id__c = '{unifiedId}' LIMIT 100
-- 3. unified contact point
SELECT EmailAddress__c FROM UnifiedContactPointEmail__dlm WHERE PartyId__c = '{unifiedId}' LIMIT 100

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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/grzmol/vibe-force/sf-data-cloud/badge)](https://verified-skill.com/skills/grzmol/vibe-force/sf-data-cloud)

Something wrong with this skill or its page? Tell us.