Scope: SHOP_BA_CHAT 需要申请权限 需要用户授权
触发场景#
用户进入对话页
公共参数#
| 参数名称 | 参数类型 | 参数描述 |
|---|---|---|
| event | string | 事件名 |
| timestamp | string | 事件发生时间标签 格式为yyyy-MM-dd HH:mm:ss(UTC+8) |
| content | struct | 具体消息结构体 |
消息字段#
| 参数名 | 类型 | 备注 |
|---|---|---|
| conversation_id | int | 会话id |
| user_open_id | string | 用户open_id |
| user_nick | string | 用户昵称 |
| user_face | string | 用户头像 |
| main_open_id | string | 主账号open_id,即授权账号 |
| msg_content | string | 消息内容 |
| msg_key | string | 消息唯一标识 |
| msg_source | int | 消息来源 |
| msg_status | int | 消息状态-0生效状态 |
| msg_type | int | 消息类型 10023-灰条 |
| send_type | int | 发送方类型:2-人工客服 |
| ts | int | 最新消息时间戳,秒级 |
示例#
text
{
"content": {
"conversation_id": 1111111111,
"extra": "{}",
"msg_content": "{\"message\":\"您已进入在线聊天\",\"type\":1,\"to_sys_note\":[\"「温馨提示」您已进入经营号咨询会话,相关沟通信息将被记录\",\"【昵称】与您沟通中\"]}",
"msg_key": "111111111111",
"msg_source": 7,
"msg_status": 0,
"msg_type": 10023,
"send_type": 2,
"ts": 1733469320000,
"main_open_id": "111111111111111111aaaaaaaaaaaaa",
"user_open_id": "111111111111111111aaaaaaaaaaaaa"
},
"event": "ENTER_DIRECT_MSG",
"timestamp": "2024-12-01 00:00:00"
}