用户 自定义机器人 配置页面自定义填写application/jsonpost| 参数 | 类型 | 说明 |
|---|---|---|
| project_id | int | 项目ID |
| chat_user_id | string | 用户ID |
| message | string | 消息内容(如文本消息直接返回,其他消息则以url格式返回) |
| message_type | int | 消息类型(0-未定义消息、1-文本、2-图片、4-文件、6-视频、12-音频、20-艾特消息、22-贴纸、23-位置、28-通话记录、29-联系人名片、31-产品目录、35-无法解密消息。) |
| robot_id | int | 机器人ID |
| robot_name | string | 机器人名称 |
| channel | int | 渠道类型 |
| channel_id | int | 渠道账号ID |
| module | string | 推送场景(online-正常用户 preview-机器人预览) |
{
"project_id": 1,
"chat_user_id": "aa123456",
"message": "https://assets-cdn.salesmartly.com/%A3.md",
"message_type": "4",
"robot_id": 1,
"robot_name": "自定义机器人",
"channel": 1,
"channel_id": 1,
"module": "online",
}
| 参数 | 是否必传 | 类型 | 说明 |
|---|---|---|---|
| project_id | 是 | int | 项目ID |
| chat_user_id | 是 | string | 用户ID |
| message | 是 | string | 消息内容(如文本消息直接返回,WhatsappApp自定义链接卡片消息返回详细的链接和文本,其他消息则以url格式返回) |
| message_type | 是 | int | 消息类型(1-文本 2-图片 4-文件 6-视频 12-音频 40-图文消息 47-WhatsappApp自定义链接卡片消息) |
| robot_id | 是 | int | 机器人ID |
| robot_name | 是 | string | 机器人名称 |
| channel | 是 | int | 渠道类型 |
| channel_id | 是 | int | 渠道账号ID |
| module | 是 | string | 推送场景(online-正常用户 preview-机器人预览) |
| duration | 否 | int | 音频类型必传(秒) |
| caption_type | 否 | string | 图文消息类型必传(图的类型('image', 'video', 'document')) |
| description | 否 | string | 图文消息和WhatsappApp自定义链接卡片消息类型必传,描述 |
| image_url | 否 | string | WhatsappApp自定义链接卡片消息类型必传,卡片展示的图片 |
| match_text | 否 | string | WhatsappApp自定义链接卡片消息类型必传,message参数中的链接,必须携带http或https |
| title | 否 | string | WhatsappApp自定义链接卡片消息类型必传,卡片展示的标题 |
{
"project_id": 1,
"chat_user_id": "aa123456",
"message": "test",
"message_type": "1",
"robot_id": 1,
"robot_name": "自定义机器人",
"channel": 1,
"channel_id": 1,
"module": "online"
}
{
"project_id": 1,
"chat_user_id": "aa123456",
"message": "https://test.jpg",
"message_type": "2",
"robot_id": 1,
"robot_name": "自定义机器人",
"channel": 1,
"channel_id": 1,
"module": "online"
}
{
"project_id": 1,
"chat_user_id": "aa123456",
"message": "https://test.jpg",
"message_type": "4",
"robot_id": 1,
"robot_name": "自定义机器人",
"channel": 1,
"channel_id": 1,
"module": "online"
}
{
"project_id": 1,
"chat_user_id": "aa123456",
"message": "https://test.mp4",
"message_type": "6",
"robot_id": 1,
"robot_name": "自定义机器人",
"channel": 1,
"channel_id": 1,
"module": "online"
}
{
"project_id": 1,
"chat_user_id": "aa123456",
"message": "https://test.mp3",
"message_type": "12",
"robot_id": 1,
"robot_name": "自定义机器人",
"channel": 1,
"channel_id": 1,
"module": "online",
"duration": 10
}
{
"project_id": 1,
"chat_user_id": "aa123456",
"message": "https://test.jpg",
"message_type": "40",
"robot_id": 1,
"robot_name": "自定义机器人",
"channel": 1,
"channel_id": 1,
"module": "online",
"caption_type": "image",
"description": "这是一张图片"
}
{
"project_id": 1,
"chat_user_id": "aa123456",
"message": "这个是我们的链接https://www.salesmartly.com",
"message_type": "47",
"robot_id": 1,
"robot_name": "自定义机器人",
"channel": 1,
"channel_id": 1,
"module": "online",
"description": "SaleSmartly专注于智能客服",
"image_url": "https://salesmartly.jpg",
"match_text": "https://www.salesmartly.com",
"title": "SaleSmartly智能客服官网"
}
{
"project_id": 1,
"chat_user_id": "aa123456",
"message": {
"type": "call_log",
"subtype": "answered" // subtype 不限于 answered,也可以是 miss、miss_video、completed 或渠道后续提供的其他状态。
},
"message_type": "28",
"robot_id": 1,
"robot_name": "自定义机器人",
"channel": 1,
"channel_id": 1,
"module": "online",
"caption_type": "call_log",
"description": "WhatsApp 通话记录:已接听"
}{
"project_id": 1,
"chat_user_id": "aa123456",
"message": {
"type": "whatsapp_catalog", // WhatsApp 产品目录对象,包含 sub_type、products、sections、interactive 等字段。
"sub_type": "product_list",
"catalog_id": "catalog-001",
"header": "本周推荐",
"body": "请选择感兴趣的商品",
"footer": "SaleSmartly",
"products": [
{
"product_id": "product-001",
"title": "Canvas Bag",
"price": 19.9,
"currency_code": "USD",
"product_image": "https://test.jpg"
}
],
"sections": [],
"interactive": {}
},
"message_type": "31",
"robot_id": 1,
"robot_name": "自定义机器人",
"channel": 1,
"channel_id": 1,
"module": "online",
"caption_type": "product_catalog",
"description": "WhatsApp 产品目录消息"
}