网淘吧来吧,欢迎您!

Campaign Orchestrator

2026-03-30 新闻来源:网淘吧 围观:21
电脑广告
手机广告

营销活动编排技能

用于ShapeScale销售的多渠道跟进营销活动编排器。执行预定的短信+邮件序列,集成CRM,并在收到回复时自动终止。

概述

一个营销活动是一系列预先定义、随时间执行的步骤(短信/邮件)。当潜在客户回复任何消息时,营销活动将自动终止。

Campaign Orchestrator

主要特性

  • 多渠道:短信(通过Dialpad)+ 邮件(通过Gmail)
  • 预定执行:基于Cron的执行计划,可配置延迟时间
  • 个性化:模板内容从Attio CRM数据中自动填充
  • 自动终止:收到回复后,所有未来预定步骤将停止
  • 记录日志:所有活动均记录在Attio中

设置

需要设置的环境变量:

DIALPAD_API_KEY=your_dialpad_api_key
ATTIO_API_KEY=your_attio_api_key
GOG_KEYRING_PASSWORD=your_google_password  # For Gmail access

同时请确保:

  • Dialpad 网络钩子已配置指向此服务器
  • Attio 为潜在客户设有公司/联系人记录
  • 销售邮箱已启用 Gmail API 访问权限

使用说明

启动一项营销活动

# Start primary follow-up campaign for a lead
python3 campaign.py start "primary" --lead "Apex Fitness"

# Start with custom delay override (hours)
python3 campaign.py start "primary" --lead "Apex Fitness" --delay 2

# Start with Attio deal/company ID
python3 campaign.py start "post-demo" --lead "Apex Fitness" --attio-id "deal-uuid"

营销活动前检查清单(强制要求)

启动任何营销活动前,请核实:

  1. 客户状态检查

    • 在记忆库/CRM中搜索"已是客户"或"已购买"标记
    • 检查 campaigns.json 中的排除列表
    • 确认邮箱域名不在客户数据库中
  2. 邮件格式检查(针对邮件步骤)

    • 预览模板应呈现为正常段落
    • 每段落2-4句话,段落间空一行
    • 无单句孤立段落
    • 段落内无硬换行
  3. 语气检查

    • 避免道歉性语言(如"没关系"、"抱歉打扰")
    • 避免提供轻易退出的选项(如"如不相关,无需回复")
    • 专业,不纠缠

除非客户明确要求追加销售,否则绝不对现有客户进行营销推广。

检查营销活动状态

# Status for specific lead
python3 campaign.py status "Apex Fitness"

# All active campaigns
python3 campaign.py list

停止营销活动

# Manual termination (lead replied, not interested, etc.)
python3 campaign.py stop "Apex Fitness" --reason "replied_interested"

移除潜在客户

# Remove lead from campaigns (opted out, not interested)
python3 campaign.py remove "Apex Fitness"

检查回复

# Check if lead has responded to any prior messages
python3 campaign.py check "Apex Fitness"
# Shows response status for each completed step
# Warns if responses detected (safe to proceed or terminate)

查看待处理步骤

# Show all pending campaign steps sorted by time
python3 campaign.py pending
# Useful for seeing what's due soon across all campaigns

模板管理

# List available templates
python3 campaign.py templates

# Preview a template
python3 campaign.py preview "primary"

营销活动模板

模板时间安排渠道目的
主要+4小时短信总结演示,分享录像
次要+1天电子邮件价格,详细投资回报率
第三级+4天短信快速跟进
第四阶段+7天电子邮件最终跟进,案例研究
演示后+0小时短信即时感谢

模板变量

模板支持变量替换:

{name}      - Lead first name
{company}   - Company name
{deal_value} - Deal value from Attio
{owner}     - Sales owner name
{demo_notes} - Notes from demo conversation
{checkout_link} - Personalized checkout URL

架构

campaign-orchestrator/
├── SKILL.md              # This file
├── campaign.py           # Main CLI (start, stop, status, list)
├── webhook_handler.py    # Processes reply → termination
├── primary.md            # SMS follow-up template
├── secondary.md          # Email template
├── post-demo.md          # Immediate follow-up template
└── state/
    └── campaigns.json    # Campaign state persistence

状态管理

活动状态存储在<工作空间>/state/campaigns.json

{
  "campaigns": {
    "Apex Fitness": {
      "template": "primary",
      "attio_id": "deal-uuid",
      "started": "2026-01-27T13:00:00Z",
      "steps_completed": ["sms_primary"],
      "next_step": "email_secondary",
      "next_scheduled": "2026-01-28T13:00:00Z",
      "status": "active"
    }
  },
  "templates": {
    "primary": {...},
    "secondary": {...}
  }
}

Cron集成

活动步骤通过Clawdbot的cron系统执行:

  • 执行器任务:每5分钟运行一次以检查到期步骤
  • 每活动任务:为每个预定步骤创建

调度脚本自动创建并管理这些任务。

Webhook处理

当Dialpad收到对营销活动消息的回复时:

  1. Dialpad向服务器发送网络钩子
  2. webhook_handler.py解析回复
  3. 查找原始消息属于哪个营销活动
  4. 将营销活动标记为已终止
  5. 将回复记录到Attio

集成点

Dialpad短信

python3 /home/art/niemand/skills/dialpad/send_sms.py --to "+14155551234" --message "..."

Gmail(通过gog)

gog-shapescale --account martin@shapescale.com send-email --to "lead@company.com" --subject "..." --body "..."

Attio客户关系管理系统

attio note companies "company-uuid" "Campaign message sent: {message}"

示例

完整营销活动工作流程

# 1. After demo, start campaign
/campaign start "post-demo" --lead "Dr. Smith's Clinic"

# 2. Check status next day
/campaign status "Dr. Smith's Clinic"
# Output: Step 1 sent, Step 2 scheduled for tomorrow

# 3. Lead replies "interested"
# Webhook automatically terminates campaign
# Logs reply to Attio

# 4. Manual follow-up if needed
/campaign start "secondary" --lead "Dr. Smith's Clinic" --delay 0

监控活跃的营销活动

# List all active
/campaign list

# Output:
# Active Campaigns:
# - Apex Fitness (primary) - Step 2/4, next: email
# - Dr. Smith's Clinic (post-demo) - Complete
# - Wellness Center (tertiary) - Step 1/3, next: sms

故障排除

营销活动未发送:

  • 检查cron是否在运行:crontab -l
  • 检查日志:journalctl -u moltbot或营销活动日志
  • 验证API密钥:echo $DIALPAD_API_KEY

Webhook未终止:

  • 验证Dialpad Webhook URL是否已配置
  • 检查Webhook处理器是否正在运行
  • 检查campaigns.json以匹配潜在客户

模板变量未填充:

  • 验证潜在客户是否存在于Attio中且包含必填字段
  • 检查模板语法:{变量}而非{ 变量 }

许可证

属于shapescale-moltbot-skills的一部分。请参阅父仓库。

免责申明
部分文章来自各大搜索引擎,如有侵权,请与我联系删除。
打赏
文章底部电脑广告
手机广告位-内容正文底部

相关文章

您是本站第349244名访客 今日有175篇新文章/评论