
Sf Datacloud Segment
- 934 installs
- 423 repo stars
- Updated April 27, 2026
- jaganpro/sf-skills
sf-datacloud-segment is a Claude Code skill that connects AI agents to Salesforce Data Cloud for audience segmentation and insight retrieval for developers building CRM-integrated agent features.
About
sf-datacloud-segment is a skill from jaganpro/sf-skills in the sf-datacloud-* family that enables AI agents to query Salesforce Data Cloud for audience segmentation and customer insight retrieval. The skill shares attribution and upstream maintenance notes with sibling sf-datacloud skills via CREDITS.md and UPSTREAM.md, with primary contributor Gnanasekaran Thoppae and MIT License copyright 2024-2025 Jag Valaiyapathy. Reach for sf-datacloud-segment when building agents that need Data Cloud segment definitions, audience filters, or insight queries inside Salesforce-connected workflows rather than generic CRM CRUD or unrelated Salesforce modules.
- Connects directly to Salesforce Data Cloud APIs for real-time audience and insight data
- Provides structured workflows for segmentation and customer data activation
- Enables AI agents to query and act on unified customer profiles
- Part of the sf-datacloud family with shared upstream maintenance
- MIT licensed with full source transparency
Sf Datacloud Segment by the numbers
- 934 all-time installs (skills.sh)
- +4 installs in the week ending Aug 4, 2026 (Skillselion tracking)
- Ranked #419 of 4,347 Backend & APIs skills by installs in the Skillselion catalog
- Security screen: LOW risk (skills.sh audit)
- Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/jaganpro/sf-skills --skill sf-datacloud-segmentAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 934 |
|---|---|
| repo stars | ★ 423 |
| Security audit | 2 / 3 scanners passed |
| Last updated | April 27, 2026 |
| Repository | jaganpro/sf-skills ↗ |
How do you connect agents to Salesforce Data Cloud segments?
Connect their AI agent to Salesforce Data Cloud for audience segmentation and insight retrieval.
Who is it for?
Developers building Salesforce-integrated AI agents who need Data Cloud audience segmentation and insight retrieval APIs.
Skip if: Non-Salesforce CRM integrations, Salesforce modules outside Data Cloud, or teams without Data Cloud licensing and access.
When should I use this skill?
The user connects an AI agent to Salesforce Data Cloud, queries audience segments, retrieves customer insights, or works within the sf-datacloud-* skill family.
What you get
Salesforce Data Cloud segment queries, audience filter results, and customer insight data wired into agent workflows.
- segment query results
- audience insight data
- agent-to-Data Cloud integration
By the numbers
- Part of the sf-datacloud-* skill family in jaganpro/sf-skills
- MIT License copyright 2024-2025 Jag Valaiyapathy
Files
sf-datacloud-segment: 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 sf-datacloud-segment 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 DMOs, mappings, or identity resolution → sf-datacloud-harmonize
- activating a segment downstream → sf-datacloud-act
- writing read-only SQL or search-index queries → sf-datacloud-retrieve
---
Required Context to Gather First
Ask for or infer:
- target org alias
- unified DMO 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 before mutating audience assets:
node ~/.claude/skills/sf-datacloud/scripts/diagnose-org.mjs -o <org> --phase segment --json. - Prefer reusable JSON definitions for repeatable segment and CI creation.
- Use
--api-version 64.0when 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 memberswhen readable member details are needed.
---
Recommended Workflow
1. Classify readiness for segment work
node ~/.claude/skills/sf-datacloud/scripts/diagnose-org.mjs -o <org> --phase segment --json2. Inspect current state
sf data360 segment list -o <org> 2>/dev/null
sf data360 calculated-insight list -o <org> 2>/dev/null3. 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/null4. 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/null5. 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 membersreturns 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
- ../sf-datacloud/assets/definitions/calculated-insight.template.json
- ../sf-datacloud/assets/definitions/segment.template.json
- ../sf-datacloud/references/feature-readiness.md
- ../sf-datacloud/UPSTREAM.md
Credits & Acknowledgments
Primary contributor: Gnanasekaran Thoppae
This skill is part of the sf-datacloud-* family. Shared attribution, upstream source mapping, and maintenance notes live in:
- ../sf-datacloud/CREDITS.md
- ../sf-datacloud/UPSTREAM.md
MIT License
Copyright (c) 2024-2025 Jag Valaiyapathy
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
sf-datacloud-segment
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
"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
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/nullReferences
- SKILL.md
- ../sf-datacloud/assets/definitions/calculated-insight.template.json
- ../sf-datacloud/assets/definitions/segment.template.json
- CREDITS.md
License
MIT License - See LICENSE.
Related skills
How it compares
Use sf-datacloud-segment for Data Cloud audience queries; use other sf-skills modules for Salesforce objects outside the Data Cloud segment domain.
FAQ
What does sf-datacloud-segment integrate with?
sf-datacloud-segment connects AI agents to Salesforce Data Cloud for audience segmentation and insight retrieval. Developers use it when agent workflows need segment definitions, audience filters, or customer data from Data Cloud APIs.
How does sf-datacloud-segment relate to other sf-skills?
sf-datacloud-segment is part of the sf-datacloud-* family in jaganpro/sf-skills. Shared attribution and upstream source mapping live in sibling CREDITS.md and UPSTREAM.md files maintained across the Data Cloud skill set.
Is Sf Datacloud Segment safe to install?
skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.