Production sales system. Use when user wants to (1) create product/customer/operator - create records with optional --mock for auto-generation, (2) read/update/delete - manage records, (3) list - view database, (4) call - start sales call with info verification and permission control. Supports cold-start customers. Data stored in .ezagent/database/marketing/.
Production-grade sales response system with:
| Command | Description |
|---|---|
create <type> | Create product/customer/operator (use --mock to auto-generate) |
read <type> | Read a specific record by name or ID |
update <type> | Update an existing record |
delete <type> | Delete a record |
list | View current database |
call |
| Start sales call session |
Types: product, customer, operator
Create a record in the database. Use --mock flag to auto-generate realistic data.
create <type> [--mock]
Required Fields (ask user if not using --mock):
API Interface Example:
{
"prospect_info": {
"description": "查询潜在客户信息",
"endpoint": "/api/crm/prospect/{prospect_id}",
"method": "GET",
"params": ["prospect_id"],
"response_fields": ["company", "contacts", "deal_stage"],
"mock_enabled": true
}
}
Permission Rules Example:
{
"can_approve_immediately": ["试用<30天", "折扣<10%"],
"requires_supervisor": ["试用>=30天", "折扣>=10%"],
"requires_process": ["年度框架协议"],
"forbidden": ["虚假承诺", "承诺未发布功能"]
}
Required Fields (ask user if not using --mock):
Required Fields (ask user if not using --mock):
For SPIN methodology details, see references/spin-selling.md.
When --mock is specified, generate realistic data using templates from references/mock-templates.md.
For mock products, MUST include api_interfaces and operator_permissions fields.
uv run scripts/save_record.py --type <type> --data '<json>'
Read a specific record by name or ID.
uv run scripts/get_record.py --type product --name '云客通智能CRM'
uv run scripts/get_record.py --type customer --id 'abc123'
uv run scripts/get_record.py --type operator --name 'SPIN顾问式销售'
Update an existing record. Provide updates as JSON.
uv run scripts/update_record.py --type customer --name '王建华' --updates '{"phone": "13800138001"}'
uv run scripts/update_record.py --type product --name '云客通智能CRM' --updates '{"price": "9999元/年"}'
uv run scripts/update_record.py --type operator --id 'abc123' --updates '{"methodology": "Challenger"}'
Delete a record from the database.
uv run scripts/delete_record.py --type customer --name '王建华'
uv run scripts/delete_record.py --type product --id 'abc123'
uv run scripts/delete_record.py --type operator --name 'SPIN顾问式销售' --force
uv run scripts/list_records.py # All records
uv run scripts/list_records.py --type product # Products only
uv run scripts/list_records.py --verbose # Detailed view
Start a production sales call session.
Required parameters from user:
If prospect_phone provided, search for existing customer. If not found, create cold-start prospect record.
If no phone provided, ask user to provide customer name OR indicate this is a new prospect.
.ezagent/database/marketing/products/.ezagent/database/marketing/operators/If product or operator NOT found: Stop and report error.
Display session start:
--- 销售通话已开始 ---
联系方式: {phone}
产品: {product_name}
客户: {customer_name} {如果是冷启动: [新潜客]}
策略: {operator_name}
---
You are the sales representative. Use operator strategy to guide your approach.
Before making claims about pricing, availability, or capabilities, verify first:
When discussing pricing or discounts:
【系统查询 - Mock】
接口: GET /api/pricing/{product_id}?customer_tier=enterprise
目的: 确认当前定价和可用折扣
---
Generate mock response, then quote based on result.
When customer asks about specific features:
【系统查询 - Mock】
接口: GET /api/product/{product_id}/features
目的: 确认功能是否已发布
---
When checking prospect history (for returning prospects):
【系统查询 - Mock】
接口: GET /api/crm/prospect/{phone}/interactions
目的: 查看之前的沟通记录
---
Before agreeing to customer requests, check permissions:
When customer requests special terms (extended trial, bigger discount, custom features, etc.):
Check against operator_permissions in product data
Display permission check:
【权限检查结果】
操作: 提供15天试用
状态: ✓ 可立即批准
说明: 在权限范围内(试用<30天)
---
If requires approval:
【权限检查结果】
操作: 提供一年试用
状态: ⚠ 需要主管审批
说明: 超出当前权限(试用>=30天)
流程: 请告知客户需要申请特批,预计1-2个工作日
---
Respond appropriately:
Response pattern:
Example exchange:
客户: 听起来不错!你们能给我申请一年的免费试用吗?
【权限检查结果】
操作: 一年免费试用
状态: ⚠ 需要主管审批
说明: 超出当前权限(试用>=30天)
---
【系统查询 - Mock】
接口: GET /api/pricing/product001?customer_tier=enterprise
响应: {
"trial_policy": {
"standard": "14天",
"extended": "30天(需审批)",
"enterprise": "可商议"
}
}
---
销售: 一年的试用确实需要特别审批。不过我可以先帮您安排30天的深度试用,让您的团队充分体验。同时,我会向我的主管申请更长的试用期——根据我们的政策,企业客户是可以商议的。您觉得这样可以吗?
When user says "结束通话", "end call", or "exit":
Display: --- 销售通话已结束 ---
Collect information learned during call (for cold-start prospects):
Build conversation array:
[
{"role": "salesperson", "content": "..."},
{"role": "customer", "content": "..."}
]
Generate review:
{
"opening_effectiveness": "...",
"discovery_quality": "...",
"objection_handling": "...",
"value_presentation": "...",
"closing_attempt": "...",
"next_steps": ["..."],
"customer_updates": {
"name": "李总",
"company": "XX科技",
"pain_points": ["效率低", "成本高"],
"deal_stage": "demo_scheduled"
}
}
Save session (includes customer info update for cold-start):
uv run .claude/skills/marketing/scripts/save_session.py \
--claude-session "<claude_code_session_id>" \
--product "<product_name>" \
--customer "<customer_name>" \
--operator "<operator_name>" \
--conversation '<json_conversation>' \
--review '<json_review>' \
--update-customer '<customer_updates_json>'
Session ID Format: mk_{YYYYMMDD}_{seq}_{claude_session_id}
mk: marketing 类型前缀YYYYMMDD: 日期seq: 当天序号(3位数字,如 001)claude_session_id: 当前 Claude Code 对话的 session ID示例:mk_20260125_001_abc123
Display review to user with actionable feedback.
.ezagent/database/marketing/
├── products/
│ └── <id>_<name>/
│ ├── info.json # Includes api_interfaces, operator_permissions
│ └── README.md
├── customers/
│ └── <id>_<name>/
│ ├── info.json # Includes interaction_history
│ └── README.md
├── operators/
│ └── <id>_<name>/
│ ├── info.json
│ └── README.md
└── history/
└── mk_{YYYYMMDD}_{seq}_{claude_session_id}/
├── session.json # Includes full conversation
└── README.md
【系统查询结果 - Mock】
接口: {METHOD} {endpoint}
响应: {json_data}
---
【权限检查结果】
操作: {action}
状态: {✓ 可立即批准 | ⚠ 需要主管审批 | ⚠ 需要走流程 | ✗ 禁止操作}
说明: {reason}
---
For detailed guidance, see references/spin-selling.md.