Ssa Customer Segmentation
Skill by cjboy007
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/cjboy007/ssa-customer-segmentationCustomer Segmentation — 客户分层
自动客户标签 + 生命周期管理 + 价值分析。基于 OKKI CRM 数据,5 级客户分层(VIP/活跃/普通/休眠/流失),自动评分+标签同步。
模块
| 脚本 | 大小 | 功能 |
|---|---|---|
customer-data-collector.js | — | OKKI API 增量采集客户数据 |
scoring-engine.js | — | 加权评分 + 自动分层(5 级) |
tag-sync.js | 16KB | OKKI 标签同步(⚠️ 安全机制齐全) |
strategy-output.js | 13KB | 策略建议输出 + 升级机会识别 |
配置
config/segmentation-rules.json— 5 级分层规则 + 评分权重 + 阈值
使用
cd /Users/wilson/.openclaw/workspace/skills/customer-segmentation
# 1. 采集客户数据
node scripts/customer-data-collector.js
# 2. 评分 + 分层
node scripts/scoring-engine.js
node scripts/scoring-engine.js --sample # 使用示例数据
# 3. 查看策略建议
node scripts/strategy-output.js
node scripts/strategy-output.js --format summary
# 4. 同步标签到 OKKI(默认 dry-run!)
node scripts/tag-sync.js # dry-run 预览
node scripts/tag-sync.js --confirm # 实际写入
node scripts/tag-sync.js --confirm --limit 5 # 分批写入前 5 个
分层标准
| 等级 | 标签 | 说明 |
|---|---|---|
| VIP | SEG:VIP | 高价值客户 |
| 活跃 | SEG:活跃 | 定期下单 |
| 普通 | SEG:普通 | 偶尔互动 |
| 休眠 | SEG:休眠 | 长期无互动 |
| 流失 | SEG:流失 | 已流失 |
⚠️ Tag-Sync 安全机制
重要: tag-sync.js 会写入 OKKI CRM 标签,内置多重安全保护:
- 默认 dry-run — 不加
--confirm不会写入 - SEG: 前缀白名单 — 只操作
SEG:前缀标签,不影响其他标签 - GET 先合并 — 写入前先获取现有标签,合并后再写入(避免覆盖)
- 写入前备份 — 自动备份当前标签状态
- 配额预估 — >80% 配额自动中止
- 500ms 间隔 — API 调用限速
- --limit 分批 — 支持分批验证
依赖
OKKI CRM— 客户数据 + 标签写入
数据存储
data/customer-scores.json— 评分结果data/strategy-recommendations.json— 策略建议data/metrics-export.json— 看板指标
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-cjboy007-ssa-customer-segmentation": {
"enabled": true,
"auto_update": true
}
}
}Related Skills
logistics
物流管理技能,提供提单生成、报关单据生成、物流跟踪等功能。支持 OKKI 客户数据同步和自动化文档处理。
okki-email-sync
Synchronize email activities and quotation events with OKKI CRM as follow-up trail records. Automatically matches emails to CRM customers via domain lookup and vector search, creates trail records (email type=102, quotation type=101), and deduplicates entries. Requires OKKI CRM API access and optional vector search setup. Use when you need to automatically log email communications and quotation events in your CRM.
follow-up-engine
Automated customer follow-up scheduling and execution engine for B2B sales. Generates personalized follow-up email drafts based on customer stage, last contact date, and follow-up strategy. Integrates with CRM systems (configurable) to sync follow-up records. Use when you need to automate outbound sales follow-ups, schedule reminders, or generate follow-up email content for dormant leads.
报价单工作流
自动化生成报价单(Excel/Word/HTML/PDF),集成数据验证防止示例数据,支持 OKKI CRM
auto-evolution
Multi-agent auto-evolution system — orchestrate review-execute-audit loops with 4 roles (Coordinator, Reviewer, Executor, Auditor). A single coordinator agent drives the loop by spawning sub-agents for review, execution, and audit. Break goals into subtasks, auto-iterate with dual quality gates, and auto-package results. Use when: user wants autonomous task execution with built-in quality assurance.