Agent Skillsforcedotcom/sf-skills › data360-segment

data360-segment

GitHub

用于Salesforce Data Cloud的受众细分与洞察管理。涵盖创建、发布Segment及计算洞察,检查成员数,排查SQL问题。不处理数据映射、激活或只读查询等任务。

skills/data360-segment/SKILL.md forcedotcom/sf-skills

Trigger Scenarios

创建或发布Data Cloud Segment 管理计算洞察(Calculated Insights) 检查Segment成员数量 排查受众SQL问题

Install

npx skills add forcedotcom/sf-skills --skill data360-segment -g -y
More Options

Use without installing

npx skills use forcedotcom/sf-skills@data360-segment

指定 Agent (Claude Code)

npx skills add forcedotcom/sf-skills --skill data360-segment -a claude-code -g -y

安装 repo 全部 skill

npx skills add forcedotcom/sf-skills --all -g -y

预览 repo 内 skill

npx skills add forcedotcom/sf-skills --list

SKILL.md

Frontmatter
{
    "name": "data360-segment",
    "metadata": {
        "version": "1.0"
    },
    "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 data360-harmonize), activation work (use data360-activate), query\/search-index work (use data360-query), or Standard Data Model (STDM)\/session tracing (use agentforce-observe).",
    "compatibility": "Requires an external community sf data360 CLI plugin and a Data Cloud-enabled org"
}

data360-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 data360-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:


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 data360-orchestrate skill before mutating audience assets: node ../data360-orchestrate/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 ../data360-orchestrate/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

Version History

  • 1.29.0 Current 2026-07-05 18:48

Same Skill Collection

skills/automation-flow-generate/SKILL.md
skills/commerce-b2b-open-code-components-integrate/SKILL.md
skills/commerce-b2b-store-create/SKILL.md
skills/data360-activate/SKILL.md
skills/data360-code-extension-generate/SKILL.md
skills/data360-prepare/SKILL.md
skills/data360-schema-get/SKILL.md
skills/design-systems-slds-apply/SKILL.md
skills/dx-org-permission-set-assign/SKILL.md
skills/dx-org-switch/SKILL.md
skills/experience-lwc-generate/SKILL.md
skills/experience-ui-bundle-features-generate/SKILL.md
skills/experience-ui-bundle-file-upload-generate/SKILL.md
skills/experience-ui-bundle-metadata-generate/SKILL.md
skills/experience-ui-bundle-site-generate/SKILL.md
skills/external-diagram-visual-generate/SKILL.md
skills/platform-apex-logs-debug/SKILL.md
skills/platform-custom-application-generate/SKILL.md
skills/platform-custom-tab-generate/SKILL.md
skills/platform-lightning-app-coordinate/SKILL.md
skills/platform-list-view-generate/SKILL.md
skills/platform-metadata-deploy/SKILL.md
skills/platform-permission-set-generate/SKILL.md
skills/platform-validation-rule-generate/SKILL.md
skills/agentforce-architecture-analyze/SKILL.md
skills/agentforce-d360-analyze/SKILL.md
skills/agentforce-generate/SKILL.md
skills/agentforce-observe/SKILL.md
skills/agentforce-test/SKILL.md
skills/commerce-b2b-open-code-components-replace/SKILL.md
skills/data360-connect/SKILL.md
skills/data360-harmonize/SKILL.md
skills/data360-orchestrate/SKILL.md
skills/data360-query/SKILL.md
skills/design-systems-slds-validate/SKILL.md
skills/design-systems-slds2-migrate/SKILL.md
skills/dx-app-analytics-query/SKILL.md
skills/dx-code-analyzer-configure/SKILL.md
skills/dx-code-analyzer-custom-rule-create/SKILL.md
skills/dx-code-analyzer-run/SKILL.md
skills/dx-devops-test-failures-analyze/SKILL.md
skills/dx-devops-test-pipeline-configure/SKILL.md
skills/dx-devops-test-suite-assignments-configure/SKILL.md
skills/dx-devops-test-suite-run/SKILL.md
skills/dx-org-manage/SKILL.md
skills/experience-cms-brand-apply/SKILL.md
skills/experience-content-media-search/SKILL.md
skills/experience-ui-bundle-agentforce-client-generate/SKILL.md
skills/experience-ui-bundle-app-coordinate/SKILL.md
skills/experience-ui-bundle-custom-app-generate/SKILL.md
skills/experience-ui-bundle-deploy/SKILL.md
skills/experience-ui-bundle-frontend-generate/SKILL.md
skills/experience-ui-bundle-salesforce-data-access/SKILL.md
skills/external-diagram-mermaid-generate/SKILL.md
skills/integration-connectivity-connected-app-configure/SKILL.md
skills/integration-connectivity-generate/SKILL.md
skills/integration-eventing-cdc-configure/SKILL.md
skills/integration-eventing-subscription-configure/SKILL.md
skills/mobile-apps-create/SKILL.md
skills/mobile-platform-native-capabilities-integrate/SKILL.md
skills/mobile-platform-offline-validate/SKILL.md
skills/omnistudio-callable-apex-generate/SKILL.md
skills/omnistudio-datamapper-generate/SKILL.md
skills/omnistudio-datapacks-deploy/SKILL.md
skills/omnistudio-dependencies-analyze/SKILL.md
skills/omnistudio-epc-catalog-generate/SKILL.md
skills/omnistudio-flexcard-generate/SKILL.md
skills/omnistudio-integration-procedure-generate/SKILL.md
skills/omnistudio-omniscript-generate/SKILL.md
skills/platform-agentexchange-partner-offers-configure/SKILL.md
skills/platform-agentsetup-categories-fetch/SKILL.md
skills/platform-apex-generate/SKILL.md
skills/platform-apex-test-generate/SKILL.md
skills/platform-apex-test-run/SKILL.md
skills/platform-custom-field-generate/SKILL.md
skills/platform-custom-lightning-type-generate/SKILL.md
skills/platform-custom-object-generate/SKILL.md
skills/platform-data-manage/SKILL.md
skills/platform-docs-get/SKILL.md
skills/platform-flexipage-generate/SKILL.md
skills/platform-metadata-api-context-get/SKILL.md
skills/platform-metadata-retrieve/SKILL.md
skills/platform-sharing-rules-generate/SKILL.md
skills/platform-soql-query/SKILL.md
skills/platform-tracing-agentforce-configure/SKILL.md
skills/platform-tracing-configure/SKILL.md
skills/platform-trust-archive-manage/SKILL.md
skills/platform-value-set-generate/SKILL.md

Metadata

Files
0
Version
1.29.0
Hash
72594cc0
Indexed
2026-07-05 18:48

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-07-09 08:05
浙ICP备14020137号-1 $Гость$