
Segmenting Datacloud
Create, publish, and debug Salesforce Data Cloud segments and calculated insights with sf data360 CLI patterns.
Overview
Segmenting-datacloud is an agent skill most often used in Grow (also Build integrations, Operate iterate) that manages Data Cloud segments, calculated insights, and member-count troubleshooting.
Install
npx skills add https://github.com/forcedotcom/sf-skills --skill segmenting-datacloudWhat is this skill?
- Segment create, list, publish via sf data360 segment commands
- Calculated insight list/run workflows with shared family templates
- Troubleshooting empty or oversized segments and segment SQL
- Part of the *-datacloud skill family with definitions in orchestrating-datacloud
- Documents sf data360 segment and calculated-insight CLI with API version 64.0 on create example
Adoption & trust: 594 installs on skills.sh; 513 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your Data Cloud segment publishes but returns zero members—or you cannot verify calculated insights before activation.
Who is it for?
Salesforce teams with Data Cloud wired up who need segment and calculated-insight ops plus empty-segment debugging.
Skip if: Greenfield ingestion-only projects with no unified profiles yet—start with orchestrating-datacloud readiness and mapping skills first.
When should I use this skill?
You need to create, publish, or troubleshoot Salesforce Data Cloud segments and calculated insights, including empty or unexpected member counts.
What do I get? / Deliverables
You get CLI-backed create/publish/list steps, insight verification patterns, and SQL troubleshooting so segments are trustworthy before downstream activation.
- Segment definition aligned to family JSON template
- Published segment and verified calculated insight outputs
- Diagnosis notes for segment SQL and member-count issues
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Segments and calculated insights primarily power activation and measurement after you have data in Cloud—canonical shelf is Grow analytics. Audience counts, insight SQL, and publish workflows are analytics operations on unified profiles, not infra deploy or landing-page validation.
Where it fits
Publish a high-value customer segment and confirm member counts before a lifecycle email journey.
Author segment.json from the family template and create the segment via sf data360 against your target org.
Debug segment SQL when counts spike or drop after a data model change.
Estimate addressable audience size from an early segment definition before committing campaign scope.
How it compares
Data Cloud segment and insight operator—not a generic SQL analytics workbook or a non-Salesforce CDP.
Common Questions / FAQ
Who is segmenting-datacloud for?
Solo builders, admins, and small teams running Salesforce Data Cloud who own audiences, insights, and activation prep.
When should I use segmenting-datacloud?
In grow when you publish segments and validate counts; in build when you configure integrations-backed audiences; in operate when you iterate on SQL after drift or empty results.
Is segmenting-datacloud safe to install?
Use the Security Audits panel on this page; sf data360 commands run against live org data—test in sandbox and review segment SQL before mass publish.
Workflow Chain
Requires first: orchestrating datacloud
SKILL.md
READMESKILL.md - Segmenting Datacloud
# Credits & Acknowledgments This skill is part of the `*-datacloud` family of skills covering the Salesforce Data Cloud workflow phases. Shared definitions, templates, and readiness scripts for this family live in the `orchestrating-datacloud` skill directory. # segmenting-datacloud Audience and insight workflows for Salesforce Data Cloud. ## Use this skill for - creating and publishing segments - managing calculated insights - checking segment counts - troubleshooting segment SQL - understanding why a segment is empty or unexpectedly large ## Example requests ```text "Create a high-value customer segment in Data Cloud" "Why is my segment returning zero members?" "Run this calculated insight and help me verify it" "Show me how to get member counts for this segment" ``` ## Common commands ```bash sf data360 segment list -o myorg 2>/dev/null sf data360 segment create -o myorg -f segment.json --api-version 64.0 2>/dev/null sf data360 segment publish -o myorg --name High_Value_Customers 2>/dev/null sf data360 calculated-insight list -o myorg 2>/dev/null ``` ## References - [SKILL.md](SKILL.md) - [../orchestrating-datacloud/assets/definitions/calculated-insight.template.json](../orchestrating-datacloud/assets/definitions/calculated-insight.template.json) - [../orchestrating-datacloud/assets/definitions/segment.template.json](../orchestrating-datacloud/assets/definitions/segment.template.json) - [CREDITS.md](CREDITS.md) --- name: segmenting-datacloud description: "Salesforce Data Cloud Segment phase. Use this skill when the user creates or publishes segments, manages calculated insights, or troubleshoots audience SQL in Data Cloud. TRIGGER when: user creates or publishes segments, manages calculated insights, inspects segment counts or membership, or troubleshoots audience SQL in Data Cloud. DO NOT TRIGGER when: the task is DMO/mapping/identity-resolution work (use harmonizing-datacloud), activation work (use activating-datacloud), query/search-index work (use retrieving-datacloud), or Standard Data Model (STDM)/session tracing (use observing-agentforce)." license: MIT compatibility: "Requires an external community sf data360 CLI plugin and a Data Cloud-enabled org" metadata: version: "1.0" --- # segmenting-datacloud: Data Cloud Segment Phase Use this skill when the user needs **audience and insight work**: segments, calculated insights, publish workflows, member counts, or troubleshooting Data Cloud segment SQL. ## When This Skill Owns the Task Use `segmenting-datacloud` when the work involves: - `sf data360 segment *` - `sf data360 calculated-insight *` - segment publish workflows - member counts and segment troubleshooting - calculated insight execution and verification Delegate elsewhere when the user is: - still building Data Model Objects (DMOs), mappings, or identity resolution → [harmonizing-datacloud](../harmonizing-datacloud/SKILL.md) - activating a segment downstream → [activating-datacloud](../activating-datacloud/SKILL.md) - writing read-only SQL or search-index queries → [retrieving-datacloud](../retrieving-datacloud/SKILL.md) --- ## Required Context to Gather First Ask for or infer: - target org alias - unified DMO (Data Model Object) or base entity name - whether the user wants create, publish, inspect, or troubleshoot - whether the asset is a segment or calculated insight - expected success metric: member count, aggregate value, or publish status --- ## Core Operating Rules - Treat Data Cloud segment SQL as distinct from CRM SOQL. - Run the shared readiness classifier from the `orchestrating-datacloud` skill before mutating audience assets: `node ../orchestrating-datacloud/scripts/diagnose-org.mjs -o <org> --phase segment --json`. - Prefer reusable JSON definitions for repeatable segment and CI creation. - Use `--api-version 64.0` when segment creation behavior is unstable on newer defaults. - Verify with counts or SQL after publish/run steps instead of assuming success. - Use SQL joins ra