Webhook 集成

    将捕获的潜在客户和事件实时推送到任何外部系统。把 PilotAgent 连接到您的 CRM、通知工具或自定义端点。适用于 Enterprise 和 Enterprise+。

    使用经销商 CRM?在“潜在客户设置”中添加 CRM 的线索邮箱,新线索就会以 ADF/XML 格式直接发送过去。

    Webhook 如何工作

    Webhook 是一个在 PilotAgent 中发生事件时自动接收数据的 URL。当捕获潜在客户或发送消息时,PilotAgent 会立即将详细信息发送到您的 webhook URL。

    POST https://your-api.com/webhook Content-Type: application/json X-Webhook-Event: message.sent { "event": "message.sent", "timestamp": "2026-09-30T10:00:31.000Z", "conversation": { "id": "5b0e8f7a-2c1d-4e4b-9a57-3f1c2d8e6a10", "threadId": "1953209448598174", "url": "https://www.facebook.com/messages/t/1953209448598174", "buyerName": "Sarah", "listing": { "title": "4 bed house, Northwest Hills", "id": "1829285625158180", "url": "https://www.facebook.com/marketplace/item/1829285625158180/" }, "startedAt": "2026-09-30T09:58:12.000Z" }, "buyerMessage": { "text": "Can I view it on Saturday?", "readAt": "2026-09-30T10:00:05.000Z" }, "reply": { "text": "Yes, Saturday works. Is 10am good for you?", "writtenAt": "2026-09-30T10:00:05.000Z", "sentAt": "2026-09-30T10:00:31.000Z", "confirmed": true }, "transcript": [ { "from": "buyer", "name": "Sarah", "text": "Is this still available?" }, { "from": "pilotagent", "text": "Hi Sarah, yes it is. Would you like to view it?" }, { "from": "buyer", "name": "Sarah", "text": "Can I view it on Saturday?" }, { "from": "pilotagent", "text": "Yes, Saturday works. Is 10am good for you?" } ], "lead": null, "agent": { "id": "c2f4a9d1-7e3b-4a8c-b6d5-1e9f0a2b3c4d", "name": "Main account" }, "user": { "id": "9d8c7b6a-5f4e-4d3c-2b1a-0f9e8d7c6b5a", "email": "you@yourcompany.com" } }

    设置 Webhook

    1. 1在仪表板中打开“潜在客户”,然后打开“潜在客户设置”
    2. 2粘贴您的 webhook URL(来自 Zapier、Make、n8n 或您自己的服务器)
    3. 3勾选要发送的事件:新线索、新对话、每条已发送的回复
    4. 4点击「发送测试事件」确认您的 URL 能收到,然后保存

    支持的事件

    lead.captured

    买家留下联系方式时:姓名、邮箱、电话和地址

    message.sent

    PilotAgent 发送的每条回复:买家的消息、回复、完整聊天记录和联系方式

    conversation.started

    PilotAgent 第一次回复某位买家时:买家的第一条消息、商品和聊天记录

    每个事件都有 event 字段和 X-Webhook-Event 请求头。对话事件带有 PilotAgent 读取到的完整聊天记录,因此您的系统随时可以还原整段对话。Facebook 不显示每条消息的时间,所以聊天记录中的各行没有时间;事件和回复有时间。在 message.sent 中,当 PilotAgent 看到回复出现在聊天中时(扩展程序 2.0 及以上),reply.confirmed 为 true。旧版本在回复写好后立即发送,confirmed 为 false。

    常见集成

    HubSpot / Salesforce

    从捕获的潜在客户自动创建联系人

    Google Sheets

    通过 Zapier 为每个捕获的潜在客户添加新行

    Slack / 电子邮件提醒

    在高价值潜在客户进入时获得实时通知

    重试逻辑

    如果您的服务器没有返回 2xx 状态,PilotAgent 最多再尝试 3 次:分别在 1、5 和 15 秒后。