$npx -y skills add forcedotcom/sf-skills --skill data360-prepareSalesforce 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 a
| 1 | # data360-prepare: Data Cloud Prepare Phase |
| 2 | |
| 3 | 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. |
| 4 | |
| 5 | ## When This Skill Owns the Task |
| 6 | |
| 7 | Use `data360-prepare` when the work involves: |
| 8 | - `sf data360 data-stream *` |
| 9 | - `sf data360 dlo *` |
| 10 | - `sf data360 transform *` |
| 11 | - `sf data360 docai *` |
| 12 | - choosing how data should enter Data Cloud |
| 13 | - rerunning or rescanning ingestion after a source update |
| 14 | - preparing Ingestion API-backed streams after connector setup is complete |
| 15 | |
| 16 | Delegate elsewhere when the user is: |
| 17 | - still creating/testing source connections → [data360-connect](../data360-connect/SKILL.md) |
| 18 | - mapping to DMOs or designing IR/data graphs → [data360-harmonize](../data360-harmonize/SKILL.md) |
| 19 | - querying ingested data → [data360-query](../data360-query/SKILL.md) |
| 20 | |
| 21 | --- |
| 22 | |
| 23 | ## Required Context to Gather First |
| 24 | |
| 25 | Ask for or infer: |
| 26 | - target org alias |
| 27 | - source connection name |
| 28 | - source object / dataset / document source |
| 29 | - desired stream type |
| 30 | - DLO naming expectations |
| 31 | - whether the user is creating, updating, running, or deleting a stream |
| 32 | - whether the source is CRM, a database connector, an unstructured file source, or an Ingestion API feed |
| 33 | |
| 34 | --- |
| 35 | |
| 36 | ## Core Operating Rules |
| 37 | |
| 38 | - Verify the external plugin runtime before running Data Cloud commands. |
| 39 | - Run the shared readiness classifier before mutating ingestion assets: `node ../data360-orchestrate/scripts/diagnose-org.mjs -o <org> --phase prepare --json`. |
| 40 | - Prefer inspecting existing streams and DLOs before creating new ingestion assets. |
| 41 | - Suppress linked-plugin warning noise with `2>/dev/null` for normal usage. |
| 42 | - Treat DLO naming and field naming as Data Cloud-specific, not CRM-native. |
| 43 | - Confirm whether each dataset should be treated as `Profile`, `Engagement`, or `Other` before creating the stream. |
| 44 | - Distinguish stream-level refresh from connection-level reruns when working with unstructured sources. |
| 45 | - Use UI setup intentionally when initial stream or unstructured asset creation is platform-gated. |
| 46 | - Hand off to Harmonize only after ingestion assets are clearly healthy. |
| 47 | |
| 48 | --- |
| 49 | |
| 50 | ## Recommended Workflow |
| 51 | |
| 52 | ### 1. Classify readiness for prepare work |
| 53 | ```bash |
| 54 | node ../data360-orchestrate/scripts/diagnose-org.mjs -o <org> --phase prepare --json |
| 55 | ``` |
| 56 | |
| 57 | ### 2. Inspect existing ingestion assets |
| 58 | ```bash |
| 59 | sf data360 data-stream list -o <org> 2>/dev/null |
| 60 | sf data360 dlo list -o <org> 2>/dev/null |
| 61 | ``` |
| 62 | |
| 63 | ### 3. Confirm the stream category before creation |
| 64 | Use these rules when suggesting categories: |
| 65 | |
| 66 | | Category | Use for | Typical requirement | |
| 67 | |---|---|---| |
| 68 | | `Profile` | person/entity records | primary key | |
| 69 | | `Engagement` | time-based events or interactions | primary key + event time field | |
| 70 | | `Other` | reference/configuration/supporting datasets | primary key | |
| 71 | |
| 72 | When the source is ambiguous, ask the user explicitly whether the dataset should be treated as `Profile`, `Engagement`, or `Other`. |
| 73 | |
| 74 | ### 4. Create or inspect streams intentionally |
| 75 | ```bash |
| 76 | sf data360 data-stream get -o <org> --name <stream> 2>/dev/null |
| 77 | sf data360 data-stream create-from-object -o <org> --object Contact --connection SalesforceDotCom_Home 2>/dev/null |
| 78 | sf data360 data-stream create -o <org> -f stream.json 2>/dev/null |
| 79 | sf data360 data-stream run -o <org> --name <stream> 2>/dev/null |
| 80 | ``` |
| 81 | |
| 82 | ### 5. Check DLO shape |
| 83 | ```bash |
| 84 | sf data360 dlo get -o <org> --name Contact_Home__dll 2>/dev/null |
| 85 | ``` |
| 86 | |
| 87 | ### 6. Choose the right refresh mechanism |
| 88 | Use the smaller refresh scope that matches the user goal: |
| 89 | |
| 90 | ```bash |
| 91 | sf data360 data-stream run -o <org> --name <stream> 2>/dev/null |
| 92 | sf data360 connection run-existing -o <org> --name <connection-id> 2>/dev/null |
| 93 | ``` |
| 94 | |
| 95 | - `data-stream run` is the closest match to a stream-level refresh or re-scan. |
| 96 | - `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. |
| 97 | - For unstructured document connectors, prefer `data-stream run` when the goal is to re-scan newly added or changed files. |
| 98 | |
| 99 | ### 7. Handle unstructured sources deliberately |
| 100 | For SharePoint-style document ingestion, a minimal unstructured DLO payload can look like: |
| 101 | |
| 102 | ```json |
| 103 | { |
| 104 | "name": "my_udlo", |
| 105 | "label": "My UDLO", |
| 106 | "category": "Directory_Tab |