Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
forcedotcom avatar

Segmenting Datacloud

  • 518 installs
  • 787 repo stars
  • Updated August 5, 2026
  • forcedotcom/afv-library

This is a copy of segmenting-datacloud by forcedotcom - installs and ranking accrue to the original listing.

Segmenting Data Cloud is a Salesforce Agentforce skill that creates and publishes Data Cloud audience segments, calculated insights, and segment SQL troubleshooting workflows for developers working in the Segment phase.

About

Segmenting Data Cloud is the Segment-phase skill in forcedotcom/afv-library for Salesforce Data Cloud. It guides creation and publishing of audience segments, calculated insights management, segment count inspection, and natural-language-assisted audience SQL troubleshooting. Developers use Segmenting Data Cloud when building audiences inside Data Cloud, not for DMO mapping, activation exports, or search-index retrieval tasks. The skill requires the external community sf data360 CLI plugin and a Data Cloud-enabled org. It complements harmonizing-datacloud for identity work and activating-datacloud for downstream activation while keeping segment SQL and publish workflows in one focused skill.

  • Owns all `sf data360 segment *` and `sf data360 calculated-insight *` commands
  • Manages segment publish workflows and verifies member counts
  • Troubleshoots audience SQL and calculated insight execution
  • Delegates DMO, mapping, identity, activation, and query work to sibling skills
  • Requires the community sf data360 CLI plugin and a Data Cloud-enabled org

Segmenting Datacloud by the numbers

  • 518 all-time installs (skills.sh)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/forcedotcom/afv-library --skill segmenting-datacloud

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs518
repo stars787
Last updatedAugust 5, 2026
Repositoryforcedotcom/afv-library

How do you publish and troubleshoot Data Cloud audience segments?

Handle Salesforce Data Cloud audience segmentation, calculated insights, publish workflows, and segment SQL troubleshooting using natural language.

Who is it for?

Salesforce developers building Data Cloud audiences who need guided segment creation, calculated insights, and SQL troubleshooting.

Skip if: Developers working on DMO harmonization, activation exports, search-index retrieval, or STDM session tracing instead of segment SQL.

When should I use this skill?

The user creates or publishes segments, manages calculated insights, inspects segment counts, or troubleshoots audience SQL in Data Cloud.

What you get

Published audience segments, calculated insight definitions, membership counts, and debugged segment SQL queries.

  • published audience segments
  • calculated insight definitions

Files

SKILL.mdMarkdownGitHub ↗

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
  • activating a segment downstream → activating-datacloud
  • writing read-only SQL or search-index queries → retrieving-datacloud

---

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 rather than segment members when readable member details are needed.

---

Recommended Workflow

1. Classify readiness for segment work

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

2. Inspect current state

sf data360 segment list -o <org> 2>/dev/null
sf data360 calculated-insight list -o <org> 2>/dev/null

3. Create with reusable JSON definitions

sf data360 segment create -o <org> -f segment.json --api-version 64.0 2>/dev/null
sf data360 calculated-insight create -o <org> -f ci.json 2>/dev/null

4. Publish or run explicitly

sf data360 segment publish -o <org> --name My_Segment 2>/dev/null
sf data360 calculated-insight run -o <org> --name Lifetime_Value 2>/dev/null

5. Verify with counts or SQL

sf data360 segment count -o <org> --name My_Segment 2>/dev/null
sf data360 query sql -o <org> --sql 'SELECT COUNT(*) FROM "UnifiedssotIndividualMain__dlm"' 2>/dev/null

---

High-Signal Gotchas

  • Segment creation can require --api-version 64.0.
  • segment members returns opaque IDs; use SQL joins when human-readable member details are needed.
  • Segment SQL is not SOQL.
  • Calculated insight assets and segment SQL have different limitations.
  • Publish/run steps may kick off asynchronous work even when the command returns quickly.
  • An empty segment or calculated-insight list usually means the module is reachable but unconfigured, not unavailable.

---

Output Format

Segment task: <segment / calculated-insight>
Action: <create / publish / inspect / troubleshoot>
Target org: <alias>
Artifacts: <definition files / commands>
Verification: <member count / query result / publish state>
Next step: <act / retrieve / follow-up>

---

References

  • README.md
  • ../orchestrating-datacloud/assets/definitions/calculated-insight.template.json
  • ../orchestrating-datacloud/assets/definitions/segment.template.json
  • ../orchestrating-datacloud/references/feature-readiness.md
  • ../orchestrating-datacloud/UPSTREAM.md

Related skills

How it compares

Use Segmenting Data Cloud for audience SQL and publish workflows; use harmonizing-datacloud when identity resolution and DMO mapping are the focus.

FAQ

What tasks does Segmenting Data Cloud handle?

Segmenting Data Cloud covers the Segment phase: creating and publishing audience segments, managing calculated insights, inspecting segment counts, and troubleshooting audience SQL in Salesforce Data Cloud via sf data360 workflows.

When should Segmenting Data Cloud not be used?

Segmenting Data Cloud excludes DMO mapping and identity resolution, activation exports, search-index retrieval, and STDM session tracing. Use harmonizing-datacloud, activating-datacloud, or observing-agentforce for those tasks.

AI & Agent Buildingagentsautomation

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.