PluginBench
Skill
Pass
Audit score 90

preparing-datacloud

forcedotcom/sf-skills

Manage Data Cloud data streams, DLOs, transforms, and Document AI ingestion pipelines.

What is preparing-datacloud?

This skill handles the Prepare phase of Salesforce Data Cloud: creating and managing data streams, Data Lake Objects (DLOs), transforms, and Document AI configurations. Use it when ingesting data into Data Cloud or preparing lake assets after connector setup is complete.

  • Create, inspect, and run data streams from CRM, database connectors, and unstructured sources
  • Manage Data Lake Objects (DLOs) and their field mappings
  • Configure Document AI and unstructured document ingestion from SharePoint and file sources
  • Handle Ingestion API-backed streams for external system data pushes
  • Distinguish between stream-level refresh and connection-level reruns for different source types
  • Classify datasets as Profile, Engagement, or Other before stream creation

How to install preparing-datacloud

npx skills add https://github.com/forcedotcom/sf-skills --skill preparing-datacloud
Prerequisites
  • External sf data360 CLI plugin installed
  • Data Cloud-enabled Salesforce org
  • Source connection already created (use connecting-datacloud skill for connection setup)
  • Appropriate permissions for data stream and DLO management
Claude Code
Cursor
Windsurf
Cline

How to use preparing-datacloud

  1. 1.Run the readiness classifier to verify org state: node ../orchestrating-datacloud/scripts/diagnose-org.mjs -o <org> --phase prepare --json
  2. 2.List existing data streams and DLOs to understand current ingestion assets: sf data360 data-stream list and sf data360 dlo list
  3. 3.Determine the stream category (Profile, Engagement, or Other) based on your dataset type
  4. 4.Create or inspect the data stream using sf data360 data-stream create or sf data360 data-stream get
  5. 5.Check the DLO shape and field mappings with sf data360 dlo get
  6. 6.Run the stream or connection to trigger ingestion: sf data360 data-stream run or sf data360 connection run-existing
  7. 7.Verify stream and DLO health before moving to harmonization work

Use cases

Good for
  • Setting up a new data stream from Salesforce CRM objects or external databases into Data Cloud
  • Re-scanning or refreshing document ingestion from SharePoint after new files are added
  • Creating a DLO for unstructured data with custom field mappings
  • Sending external system records via Ingestion API after connector setup is complete
  • Verifying stream and DLO health before handing off to harmonization and identity resolution
Who it's for
  • Data Cloud administrators managing ingestion pipelines
  • Data engineers preparing lake assets for downstream use
  • Integration specialists setting up external data connectors
  • Salesforce developers building custom data ingestion workflows

preparing-datacloud FAQ

When should I use this skill versus connecting-datacloud or harmonizing-datacloud?

Use preparing-datacloud for ingestion and lake preparation: data streams, DLOs, transforms, and Document AI. Use connecting-datacloud only for source connection setup. Use harmonizing-datacloud for DMO mapping and identity resolution. Use retrieving-datacloud for querying ingested data.

What is the difference between sf data360 data-stream run and sf data360 connection run-existing?

data-stream run refreshes at the stream level and is preferred for unstructured source rescans. connection run-existing runs at the connection level and is useful for some connector workflows but not reliable for unstructured document rescans. For most cases, prefer stream-level refresh.

How do I handle unstructured document ingestion from SharePoint?

For initial setup, use the UI when you need the richer end-to-end pipeline with document metadata fields. For CLI-only workflows, create a minimal unstructured DLO with the SF_DRIVE source type pointing to the SharePoint directory. Use data-stream run to re-scan for newly added or changed files.

What should I do if I get a CdpDataStreams permission error?

This error means the stream module is gated for your org or user. Contact your Salesforce administrator to review provisioning and permissions instead of retrying the command.

How do I send data from an external system into Data Cloud?

Create the connector in connecting-datacloud, upload the schema with sf data360 connection schema-upsert, create the stream (often in UI), then send records using the Ingestion API example in examples/ingestion-api/. Auth is a staged flow: JWT → Salesforce token → Data Cloud token. A 202 response means the payload was accepted but records may not be queryable immediately.

Full instructions (SKILL.md)

Source of truth, from forcedotcom/sf-skills.


name: preparing-datacloud description: "Salesforce Data Cloud Prepare phase. Use this skill when the user creates or manages Data Cloud data streams, DLOs, transforms, or Document AI configurations. TRIGGER when: user creates or manages Data Cloud data streams, DLOs, transforms, or Document AI configurations, or asks about ingestion into Data Cloud. DO NOT TRIGGER when: the task is connection setup only (use connecting-datacloud), DMOs and identity resolution (use harmonizing-datacloud), or query/search work (use retrieving-datacloud)." compatibility: "Requires an external community sf data360 CLI plugin and a Data Cloud-enabled org" metadata: version: "1.0"

preparing-datacloud: Data Cloud Prepare Phase

Use this skill when the user needs ingestion and lake preparation work: data streams, Data Lake Objects (DLOs), transforms, Document AI, unstructured ingestion, or the handoff from connector setup into a live stream.

When This Skill Owns the Task

Use preparing-datacloud when the work involves:

  • sf data360 data-stream *
  • sf data360 dlo *
  • sf data360 transform *
  • sf data360 docai *
  • choosing how data should enter Data Cloud
  • rerunning or rescanning ingestion after a source update
  • preparing Ingestion API-backed streams after connector setup is complete

Delegate elsewhere when the user is:

  • still creating/testing source connections → connecting-datacloud
  • mapping to DMOs or designing IR/data graphs → harmonizing-datacloud
  • querying ingested data → retrieving-datacloud

Required Context to Gather First

Ask for or infer:

  • target org alias
  • source connection name
  • source object / dataset / document source
  • desired stream type
  • DLO naming expectations
  • whether the user is creating, updating, running, or deleting a stream
  • whether the source is CRM, a database connector, an unstructured file source, or an Ingestion API feed

Core Operating Rules

  • Verify the external plugin runtime before running Data Cloud commands.
  • Run the shared readiness classifier before mutating ingestion assets: node ../orchestrating-datacloud/scripts/diagnose-org.mjs -o <org> --phase prepare --json.
  • Prefer inspecting existing streams and DLOs before creating new ingestion assets.
  • Suppress linked-plugin warning noise with 2>/dev/null for normal usage.
  • Treat DLO naming and field naming as Data Cloud-specific, not CRM-native.
  • Confirm whether each dataset should be treated as Profile, Engagement, or Other before creating the stream.
  • Distinguish stream-level refresh from connection-level reruns when working with unstructured sources.
  • Use UI setup intentionally when initial stream or unstructured asset creation is platform-gated.
  • Hand off to Harmonize only after ingestion assets are clearly healthy.

Recommended Workflow

1. Classify readiness for prepare work

node ../orchestrating-datacloud/scripts/diagnose-org.mjs -o <org> --phase prepare --json

2. Inspect existing ingestion assets

sf data360 data-stream list -o <org> 2>/dev/null
sf data360 dlo list -o <org> 2>/dev/null

3. Confirm the stream category before creation

Use these rules when suggesting categories:

CategoryUse forTypical requirement
Profileperson/entity recordsprimary key
Engagementtime-based events or interactionsprimary key + event time field
Otherreference/configuration/supporting datasetsprimary key

When the source is ambiguous, ask the user explicitly whether the dataset should be treated as Profile, Engagement, or Other.

4. Create or inspect streams intentionally

sf data360 data-stream get -o <org> --name <stream> 2>/dev/null
sf data360 data-stream create-from-object -o <org> --object Contact --connection SalesforceDotCom_Home 2>/dev/null
sf data360 data-stream create -o <org> -f stream.json 2>/dev/null
sf data360 data-stream run -o <org> --name <stream> 2>/dev/null

5. Check DLO shape

sf data360 dlo get -o <org> --name Contact_Home__dll 2>/dev/null

6. Choose the right refresh mechanism

Use the smaller refresh scope that matches the user goal:

sf data360 data-stream run -o <org> --name <stream> 2>/dev/null
sf data360 connection run-existing -o <org> --name <connection-id> 2>/dev/null
  • data-stream run is the closest match to a stream-level refresh or re-scan.
  • connection run-existing runs at the connection level and can be useful for some connector workflows, but it is not a reliable replacement for stream refresh on unstructured sources.
  • For unstructured document connectors, prefer data-stream run when the goal is to re-scan newly added or changed files.

7. Handle unstructured sources deliberately

For SharePoint-style document ingestion, a minimal unstructured DLO payload can look like:

{
  "name": "my_udlo",
  "label": "My UDLO",
  "category": "Directory_Table",
  "dataSource": {
    "sourceType": "SF_DRIVE",
    "directoryAndFilesDetails": [
      {
        "dirName": "SPUnstructuredDocument/<CONNECTION_ID>/<SITE_ID>",
        "fileName": "*"
      }
    ],
    "sourceConfig": {
      "reservedPrefix": "$dcf_content$"
    }
  }
}

Use the UI for the first-time unstructured setup when the user needs the richer end-to-end pipeline. The UI path can seed additional document metadata fields and downstream assets that a bare CLI DLO create flow may not provision automatically.

8. Use the local Ingestion API example for send-data workflows

For external systems pushing records into Data Cloud:

  1. create the connector in connecting-datacloud
  2. upload the schema with sf data360 connection schema-upsert
  3. create the stream in the UI when required
  4. send records with the local example in examples/ingestion-api/
cd examples/ingestion-api
cp .env.example .env
python3 send-data.py

Key details:

  • auth is a staged flow: JWT → Salesforce token → Data Cloud token
  • the ingestion endpoint uses the tenant URL, not the Salesforce instance URL
  • 202 means the payload was accepted for processing, not that records are queryable immediately
  • validation failures often surface in the Problem Records DLO family

9. Only then move into harmonization

Once the stream and DLO are healthy, hand off to harmonizing-datacloud.


High-Signal Gotchas

  • CRM-backed stream behavior is not the same as fully custom connector-framework ingestion.
  • sf data360 data-stream run and sf data360 connection run-existing are not interchangeable; prefer stream-level refresh for unstructured rescans.
  • SFDC streams sync on a platform-managed schedule; data-stream run is not the general control path for CRM connector refresh.
  • Some external database connectors can be created via API while stream creation still requires UI flow or org-specific browser automation. Do not promise a pure CLI stream-creation path for every connector type.
  • Initial SharePoint-style unstructured setup can be richer in the UI than in a minimal CLI DLO create flow.
  • Stream deletion can also delete the associated DLO unless the delete mode says otherwise.
  • DLO field naming differs from CRM field naming, including __c_c transformations.
  • Query DLO record counts with Data Cloud SQL instead of assuming list output is sufficient.
  • CdpDataStreams means the stream module is gated for the current org/user; guide the user to provisioning/permissions review instead of retrying blindly.

Output Format

Prepare task: <stream / dlo / transform / docai>
Source: <connection + object>
Target org: <alias>
Artifacts: <stream names / dlo names / json definitions>
Verification: <passed / partial / blocked>
Next step: <harmonize or retrieve>

References

  • README.md
  • examples/ingestion-api/README.md
  • ../orchestrating-datacloud/assets/definitions/data-stream.template.json
  • ../orchestrating-datacloud/references/plugin-setup.md
  • ../orchestrating-datacloud/references/feature-readiness.md