sf-data-cloud

Implements Salesforce Data Cloud ingestion, DLO-to-DMO mapping, querying, and source-tracked metadata deployment.

2|Updated Sep 12, 2026
One-click install
npx skills add https://github.com/grzmol/vibe-force --skill sf-data-cloud-grzmol
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sf-data-cloud
Source: https://github.com/grzmol/vibe-force/tree/main/skills/sf-data-cloud
Command: npx skills add https://github.com/grzmol/vibe-force --skill sf-data-cloud-grzmol

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Salesforce Data Cloud (Data 360) development is full of traps: DMOs are read-only, SOQL against them is a restricted subset treated as a callout, ingestion is eventually consistent, and metadata lives in unfamiliar types like DataStreamDefinition and ObjectSourceTargetMap. This Skill gives an agent the decision rules, API surfaces, limits, and anti-patterns needed to build Data Cloud features correctly the first time. ## Core Features & Use Cases - Architecture decisions: Decide whether a story belongs in Data Cloud at all versus custom objects, external objects, or Bulk API, and model DLOs, DMOs, primary keys, and DLO-to-DMO mappings in source-tracked metadata. - Ingestion and querying: Ingest through the Ingestion API in streaming or bulk mode, then query with Data 360 SQL, the sfsqlquery Apex namespace, ConnectApi.CdpQuery, or the SOQL subset, including async pagination via SqlQueueable. - Surfacing and testing: Expose Data Cloud data in LWC through an Apex bridge and in Flow through cdp invocable actions, and test offline with SqlTester, SoqlStubProvider, and ConnectApi setTest methods. - Use Case: A story asks to unify customers from four source systems into one profile. The Skill guides choosing a stable primary key, mapping to standard C360 DMOs, resolving identity through IndividualIdentityLink__dlm, and verifying with sf CLI queries. ## Quick Start Ask the agent to design a Data Cloud data stream and mapping for a new source object, or to write an Apex class that queries a unified profile using sfsqlquery.

Frequently Asked Questions about sf-data-cloud

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I query Salesforce Data Cloud from Apex?

Use the sfsqlquery namespace: create a SqlStatement with SQL and a data space, then execute it to get a SqlRowIterator. For large result sets, extend sfsqlquery.SqlQueueable, which handles submission, polling, pagination, and chaining automatically.

How do I ingest data into Data Cloud with the Ingestion API?

Use streaming for JSON micro-batches up to 200 KB per request, or bulk for CSV files up to 150 MB via a create-upload-close job lifecycle. Both upsert on the DLO primary key, and bulk updates are full replaces with no patch semantics.

Can I use SOQL against Data Cloud DMOs?

Yes, from API 51.0, but only a subset: no subqueries, aggregates, date functions, or HAVING, with LIMIT capped at 2,000. A static SOQL query against a DMO is treated as a callout, so it fails if pending DML exists in the same transaction.

Why does my Data Cloud query fail after an insert in Apex?

A DMO query counts as a callout, so pending uncommitted DML throws an UnexpectedException about uncommitted work. Query first and write second, or move the query into a Queueable job.

When should I not use Data Cloud for a Salesforce feature?

Avoid Data Cloud when data must be writable, small, shared by role hierarchy, or part of a CRM transaction. DMOs are read-only with no field-level security or record-level access, so use a custom object, external objects, or Bulk API instead.

How do I test Data Cloud Apex code without an org?

Use sfsqlquery.SqlTester with setMockMetadata and setMockRows for SQL queries, System.SoqlStubProvider with Test.createSoqlStub for SOQL against DMOs, and the ConnectApi setTest-prefixed methods for CdpQuery calls.