环信客服云在使用过程中会生成会话、访客、客服相关的事件,如会话创建、接起、转接、结束,添加/删除访客标签,访客信息变更,新建/修改/删除坐席,坐席状态变更等。
可以通过自定义事件推送功能,将需要的事件以回调方式自动推送到您的服务器(如CRM系统),用于数据存储,或基于这些事件做进一步处理。
注:自定义事件推送为旗舰版功能。
会话、访客、客服相关的这些事件可用于多种应用场景,举例如下:
CRM系统对接后的业务流程示例:
推送自定义事件至第三方服务器:
当前支持以下事件的推送:
平台事件
在线客服事件
视频客服事件
呼叫中心事件
事件名称:AgentUserCreationEvent
触发条件:管理员在“管理员模式 > 成员管理 > 客服”页面创建坐席
消息内容示例:
{
"eventId": "cfb76910-a9fa-11e5-844c-37fa6bbad3ec", //事件ID
"timestamp": 1450933062687, //时间戳
"event": "AgentUserCreationEvent", //事件名称
"payload": {
"agent": {
"id": "614f3fb7-d757-4894-ba17-90a7c1488a59", //坐席ID
"username":"a@qq.com", //坐席登录邮箱地址
"nickname":"agent1", //坐席昵称
"name":"aaaa", //坐席真实姓名
"roles":["admin","agent"], //坐席角色,值为["agent"](普通坐席)、["admin","agent"](管理员)
"business_id":"11111", //坐席工号
"phone":"13311111111", //坐席电话号码
"created_at":1436805675000, //坐席创建时间
"updated_at":1436805675000 //坐席信息更新时间,因是创建事件,和创建时间一致
}
}
}
事件名称:AgentUserChangeEvent
触发条件:坐席/管理员修改个人信息,管理员修改其他坐席的信息
消息内容示例:
{
"eventId": "d0a31dd0-07b7-11e7-b1a7-eb03c0f01476", //事件ID
"timestamp": 1489387172031, //时间戳
"event": "AgentUserChangeEvent", //事件名称
"payload": {
"agent": { //变更后的坐席信息
"id": "eb524dc0-be91-47ac-b6e6-10d013d7d72b", //坐席ID
"username": "713test4@qq.com", //坐席登录邮箱地址
"nickname": "Leoli", //坐席昵称
"name": "leoli", //坐席真实姓名
"roles": [ //坐席角色,值为["agent"](普通坐席)、["agent","admin"](管理员)
"admin",
"agent"
],
"phone": "18612389889", //坐席电话号码
"business_id": "1001", //坐席工号
"created_at": 1453900968000, //坐席创建时间
"updated_at": 1489128601000 //坐席信息更新时间
},
"old_agent": { //变更前的坐席信息
"id": "eb524dc0-be91-47ac-b6e6-10d013d7d72b", //坐席ID
"username": "713test4@qq.com", //坐席登录邮箱地址
"nickname": "Leoli", //坐席昵称
"name": "", //坐席真实姓名
"roles": [ //坐席角色,值为["agent"](普通坐席)、["agent","admin"](管理员)
"admin",
"agent"
],
"phone": "", //坐席电话号码
"created_at": 1453900968000, //坐席创建时间
"updated_at": 1489128601000 //坐席信息更新时间
}
}
}
客服和管理员的登录状态分为五种:空闲(online)、忙碌(busy)、离开(leave)、隐身(hidden)、离线(offline),并且,客服和管理员可以切换自己的空闲/忙碌/离开/隐身状态。关于登录状态的描述,见在线状态。
事件名称:AgentUserStateChangedEvent
触发条件:坐席/管理员修改自己的在线状态
消息内容示例:
{
"eventId": "45114db0-d639-11e5-91c0-a11acb243a77", //事件ID
"timestamp": 1455797716755, //时间戳
"event": "AgentUserStateChangedEvent", //事件名称
"payload": {
"agent": {
"id": "28d0a4aa-bf19-4724-ab9d-3b74afed34a8", //坐席ID
"nickname": "Admin", //坐席昵称
"username": "licx@easemob.com" //坐席登录邮箱地址
},
"status": "Online", //变更后的在线状态
"stateChangeTime": 1455797716491 //坐席状态变更时间
}
}
事件名称:AgentUserLogoutEvent
触发条件:坐席/管理员点击“退出”按钮,退出登录
消息内容示例:
{
"eventId": "a9928560-d639-11e5-8447-854851e278ee", //事件ID
"timestamp": 1455797885117, //时间戳
"event": "AgentUserLogoutEvent", //事件名称
"payload": {
"agent": {
"id": "28d0a4aa-bf19-4724-ab9d-3b74afed34a8", //坐席ID
"nickname": "Admin", //坐席昵称
"username": "licx@easemob.com" //坐席登录邮箱地址
},
"logoutTime": 1455797885109 //坐席登出时间
}
}
事件名称:AgentUserDeletedEvent
触发条件:管理员在“管理员模式 > 成员管理 > 客服”页面删除坐席
消息内容示例:
{
"eventId": "07ffc670-ce74-11e6-a4aa-e9370bc22534", //事件ID
"timestamp": 1483090934322, //时间戳
"event": "AgentUserDeletedEvent", //事件名称
"payload": {
"agent": {
"id": "4b4f0f36-8286-4ccd-8e99-50b33cfdf958", //坐席ID
"username": "713test10@qq.com", //坐席登录邮箱地址
"nickname": "10", //坐席昵称
"name": "", //坐席真实姓名
"roles": [ //坐席角色,值为["agent"](普通坐席)、["agent","admin"](管理员)
"agent"
],
"phone": "", //坐席电话号码
"created_at": 1483090749000, //坐席创建时间
"updated_at": 1483090749000 //坐席信息更新时间
}
}
}
事件名称:VisitorTagAddedEvent
触发条件:会话进行中、结束后,坐席/管理员为访客添加访客标签
消息内容示例:
{
"eventId": "9f727ee0-07b7-11e7-b77f-3b3c6fac2bb4", //事件ID
"timestamp": 1489387089477, //时间戳
"event": "VisitorTagAddedEvent", //事件名称
"payload": {
"visitorUserTag": {
"visitorUserId": "2ad4af98-903a-4050-9cea-2d5807c85002", //访客ID
"userTagId": 5596, //访客标签ID
"tag": {
"tagName": "普通客户", //访客标签名称
"created_at": 1436805675000 //访客标签创建时间
}
}
}
}
事件名称:VisitorTagRemovedEvent
触发条件:会话进行中、结束后,坐席/管理员删除访客标签
消息内容示例:
{
"eventId": "a7364210-07b7-11e7-9a61-dbd5753351ee", //事件ID
"timestamp": 1489387102520, //时间戳
"event": "VisitorTagRemovedEvent", //事件名称
"payload": {
"visitorUserTag": {
"visitorUserId": "2ad4af98-903a-4050-9cea-2d5807c85002", //访客ID
"userTagId": 5596, //访客标签ID
"tag": {
"tagName": "普通客户", //访客标签名称
"created_at": 1436805675000 //访客标签创建时间
}
}
}
}
事件名称:VisitorUserCreateEvent
触发条件:会话进行中、结束后,坐席/管理员创建、更改“资料”访客标签来源
消息内容示例:
{
"eventId": "b9c1e0b0-07b7-11e7-8ab4-53b659cd1343", //事件ID
"timestamp": 1489387133611, //时间戳
"event": "VisitorUserCreateEvent", //事件名称
"payload": {
"visitor": {
"id": "2ad4af98-903a-4050-9cea-2d5807c85002", //系统内部访客ID
"username": "webim-visitor-EM3GEFC7TBQVRXYM6GGC", //访客ID
"nickname": "Leoli", //访客昵称
"name": "Leoli", //访客真实姓名
"roles": [ //访客身份
"visitor"
],
"gendar": 0, //访客性别,0=未知,1=男,2=女
"created_at": 1488884778000, //访客创建时间
"updated_at": 1489387133493 //访客信息更新时间
}
}
}
事件名称:VisitorUserChangeEvent
触发条件:会话进行中、结束后,坐席/管理员修改“资料”页签的访客信息
消息内容示例:
{
"eventId": "b9c1e0b0-07b7-11e7-8ab4-53b659cd1343", //事件ID
"timestamp": 1489387133611, //时间戳
"event": "VisitorUserChangeEvent", //事件名称
"payload": {
"visitor": {
"id": "2ad4af98-903a-4050-9cea-2d5807c85002", //系统内部访客ID
"username": "webim-visitor-EM3GEFC7TBQVRXYM6GGC", //访客ID
"nickname": "Leoli", //访客昵称
"name": "Leoli", //访客真实姓名
"roles": [ //访客身份
"visitor"
],
"gendar": 0, //访客性别,0=未知,1=男,2=女
"created_at": 1488884778000, //访客创建时间
"updated_at": 1489387133493 //访客信息更新时间
}
}
}
事件名称:ServiceSessionAttributesCreateEvent
触发条件:会话创建
消息内容示例:
{
"eventId": "fb50f590-f4ac-11e9-a28f-75fedd96c02a",
"timestamp": 1571735940126,
"event": "ServiceSessionAttributesCreateEvent",
"payload": {
"tenantId": 20016,
"serviceSessionId": "971c53a2-6302-4002-b6b2-6c484c290ce0",
"entity": [
{
"name": "carrierOperator",
"value": "ssss35" //运营商
},
{
"name": "referer",
"value": "124" //会话发起页
},
{
"name": "system",
"value": "sssss" //操作系统
},
{
"name": "searchType",
"value": null //推广来源
},
{
"name": "accessUrl",
"value": null //着陆页
},
{
"name": "ip",
"value": null //IP
},
{
"name": "equipment",
"value": "4444" //设备
},
{
"name": "userAgent",
"value": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36" //软件环境
},
{
"name": "region",
"value": null //地区
},
{
"name": "keyword",
"value": null //搜索词
},
{
"name": "version",
"value": "1.0" //系统版本
}
]
}
}
事件名称:ServiceSessionAttributesChangeEvent
触发条件:会话来源修改
消息内容示例:
{
"eventId": "fb50f590-f4ac-11e9-a28f-75fedd96c02a",
"timestamp": 1571735940126,
"event": "ServiceSessionAttributesChangeEvent",
"payload": {
"tenantId": 20016,
"serviceSessionId": "971c53a2-6302-4002-b6b2-6c484c290ce0",
"entity": [
{
"name": "carrierOperator",
"value": "ssss35" //运营商
},
{
"name": "referer",
"value": "124" //来源信息
},
{
"name": "system",
"value": "sssss" //操作系统
},
{
"name": "searchType",
"value": null //推广来源
},
{
"name": "accessUrl",
"value": null //着陆页
},
{
"name": "ip",
"value": null //IP
},
{
"name": "equipment",
"value": "4444" //设备
},
{
"name": "userAgent",
"value": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36" //软件环境
},
{
"name": "region",
"value": null //地区
},
{
"name": "keyword",
"value": null //搜索词
},
{
"name": "version",
"value": "1.0" //系统版本
}
]
}
}
事件名称:ServiceSessionCreatedEvent
触发条件:会话创建。呼入:访客发送第一条消息;呼出:客服点击“回呼”按钮
消息内容示例:
{
"eventId": "07da4280-6c74-11e7-ba25-29a88e1d64f3", //事件ID
"timestamp": 1500463126206, //时间戳
"event": "ServiceSessionCreatedEvent", //事件名称
"payload": {
"serviceSession": {
"id": "d93d1e6c-7bce-4f2e-97e7-40d3c0427d95", //会话ID
"state": "Wait", //会话状态
"origin_type": "webim", //渠道类型,值为app(App渠道)、webim(网页)、weixin(微信)、weibo(微博)、phone(呼叫中心)、rest(rest API渠道)
"from_agent_callback": false, //是否为坐席回呼
"timestamp": {
"create": 1500463126000 //会话创建时间
},
"visitor": {
"id": "e3243090-848a-44fb-babd-f0c3a561d31f",//系统内部访客ID
"name": "webim-visitor-8WCFW7M7YEGEF2EJCYCP" //访客ID
},
"channel": {
"id": 10625, //关联ID
"type": "easemob" //关联类型
},
"agent_queue": {
"id": 35018 //技能组ID
}
}
}
}
事件名称:ServiceSessionMessageEvent
触发条件:会话中出现新消息,包括访客消息、坐席消息、系统消息、命令消息
文本消息内容示例:
{
"eventId": "3a7e82a0-aa60-11e5-8544-5111ba4b872e", //事件ID
"timestamp": 1450976598050, //时间戳
"event": "ServiceSessionMessageEvent", //事件名称
"payload": {
"message": {
"id": "dad14e23-4566-4ca6-b10e-fceeb59c42c2", //消息ID
"create_at":"1560417635819", //消息发送时间
"service_session_id": "4e27dd5e-683d-4664-a0db-bb8457ec7101", //对应的会话ID
"from": {
"id": "27f74a74-5139-4f8c-b65f-15129e7808a8", //发送方ID(可以是坐席或者访客)
"name": "Admin", //发送方昵称
"type": "Agent" //发送方类型,坐席、访客等
},
"origin_type": "app", //渠道类型,值为app(App渠道)、webim(网页)、weixin(微信)、weibo(微博)、phone(呼叫中心)、rest(rest API渠道)
"channel": {
"id": 21, //关联ID
"type": "easemob" //关联类型
},
"body": {
"type": "txt", //消息类型:文本消息
"msg": "asdf" //消息内容
},
// 新增添的ext字段
"ext": {
"YXUCarID": 32134600,
"YXUCarImage": "http://c1.xinstatic.com/c/20181211/1636/5c0f771a6f683495918_19.jpg",
"YXUCarNAME": "宝骏 730 2016款 1.5T 手动 豪华型",
"YXUCarPRICE": "6.19万 首付0.66万",
"YXUCarYEAR": "2016年 | 3.2万公里",
"msgtype": {
"track": {
"desc": "宝骏 730 2016款 1.5T 手动 豪华型",
"img_url": "http://c1.xinstatic.com/c/20181211/1636/5c0f771a6f683495918.jpg",
"item_url": "https://m.xin.com/x1k284ok45/che32134600.html",
"price": "售价:6.19万 首付0.66万 行驶:3.2万公里",
"title": "您好,我对这辆车很感兴趣,想了解一下车的情况"
}
}
}
}
}
}
图片消息内容示例:
{
"eventId": "bc4a6120-aa68-11e5-b3c3-dd9f501463d3", //事件ID
"timestamp": 1450980251761, //时间戳
"event": "ServiceSessionMessageEvent", //事件名称
"payload": {
"message": {
"id": "dc5004d7-39ce-4a03-bca0-af2c16b269d6", //消息ID
"service_session_id": "4e27dd5e-683d-4664-a0db-bb8457ec7101", //对应的会话ID
"from": {
"id": "2cb00d04-60f3-48a4-93b8-caf15b22a262", //发送方ID
"name": "fa38294841604ac89ba2815689f8f636", //发送方昵称
"type": "Visitor" //发送方类型,坐席、访客等
},
"origin_type": "app", //渠道类型,值为app(App渠道)、webim(网页)、weixin(微信)、weibo(微博)、phone(呼叫中心)、rest(rest API渠道)
"channel": {
"id": 21, //关联ID
"name": "yaaa", //关联名称
"type": "easemob" //关联类型
},
"body": {
"type": "img", //消息类型:图片
"url": "/v1/Tenant/5631/MediaFiles/df56bebd-433c-4b0e-aab9-1684fb75999f", //图片下载地址
"secret": "u9X0eqpoEeW-Hw1NajGLHchLw_cjQA0WifvU7Lid7UsaLafh", //文件上传成功后返回的secret
"filename": "image.jpg", //文件名
"size": { //图片尺寸
"width": 2448, //图片宽度
"height": 3264 //图片高度
}
}
}
}
}
事件名称:ServiceSessionAbortedEvent
触发条件:待接入会话超时自动结束、管理员手动关闭待接入会话
消息内容示例:
{
"eventId": "4642aae0-a1bb-11e7-bc37-fbf67fe4d942", //事件ID
"timestamp": 1506321136945, //时间戳
"event": "ServiceSessionAbortedEvent", //事件名称
"payload": {
"serviceSession": {
"id": "562785f2-aed6-4420-bac5-fb1d2bd82f0e", //会话ID
"state": "Abort", //会话状态
"origin_type": "webim", //渠道类型,值为app(App渠道)、webim(网页)、weixin(微信)、weibo(微博)、phone(呼叫中心)、rest(rest API渠道)
"abort_actor": { //会话结束方信息
"user_id": "946f116d-2e09-410c-9015-4b480edc9939", //坐席ID
"user_name": "260553619@qq.com", //坐席登录邮箱地址
"nice_name": "Admin" //坐席昵称
},
"timestamp": {
"create": 1506320908000, //会话创建时间
"start": 1506321136000, //会话接起时间
"stop": 1506321136000 //会话结束时间
},
"channel": {
"id": 10625, //关联ID
"type": "easemob" //关联类型
},
"visitor": {
"id": "678c9d67-f2f1-498f-a458-6f3fbf223a64", //系统内部访客ID
"name": "webim-visitor-RXFC9WR4KRG8FMK98PCY" //访客ID
},
"agent_queue": {
"id": 39005 //会话所属技能组ID
}
}
}
}
事件名称:ServiceSessionOpenedEvent
触发条件:会话由机器人接起、会话由客服接起(包括会话转接技能组后,技能组内的客服接起会话;不包括会话直接转接客服后,由客服接起会话的情况)
消息内容示例:
{
"eventId": "381b7860-6c74-11e7-805a-c112ad1e2ce6", //事件ID
"timestamp": 1500463207157, //时间戳
"event": "ServiceSessionOpenedEvent", //事件名称
"payload": {
"serviceSession": {
"id": "d93d1e6c-7bce-4f2e-97e7-40d3c0427d95", //会话ID
"state": "Processing", //会话状态
"origin_type": "webim", //渠道类型,值为app(App渠道)、webim(网页)、weixin(微信)、weibo(微博)、phone(呼叫中心)、rest(rest API渠道)
"timestamp": {
"create": 1500463126000, //会话创建时间
"start": 1500463207000 //会话接起时间
},
"visitor": {
"id": "e3243090-848a-44fb-babd-f0c3a561d31f",//系统内部访客ID
"name": "webim-visitor-8WCFW7M7YEGEF2EJCYCP" //访客ID
},
"channel": {
"id": 10625, //关联ID
"type": "easemob" //关联类型
},
"agent_queue": {
"id": 6767 //技能组ID
}
"agent": { //客服信息
"type": "Agent" //客服类型,分为“Agent”和“Robot”两种
"id": "6384ec4b-96ed-4f88-92a9-6f085201e30a",//客服ID
"username":"a@qq.com", //坐席登录邮箱地址
"nickname":"agent1", //坐席昵称
"name":"aaaa", //坐席真实姓名
"business_id":"11111", //坐席工号
}
}
}
}
事件名称:AgentQueueOverflowEvent
触发条件:管理员在“设置-会话分配-排队规则”页面设置了溢出规则,有会话触发溢出规则。
消息内容示例:
{
"eventId": "c9ffa180-2d80-11ec-8cfe-dfeae5055c6a", //事件ID
"timestamp": 1634279170995, //时间戳
"event": "AgentQueueOverflowEvent", //事件名称
"payload": {
"serviceSession": { //会话数据
"id": "b7c44cec-6da5-4f79-b50e-6d01db793add", //会话ID
"state": "Wait", //会话状态
"origin_type": "webim", //渠道类型,值为app(App渠道)、webim(网页)、weixin(微信)、weibo(微博)、phone(呼叫中心)、rest(rest API渠道)
"timestamp": {
"create": 1634279169000, //会话创建时间
"start": 1634279170000 //会话接起时间
},
"visitor": {
"id": "d454c4d7-da9e-4ac0-86d4-6e3c8d3a9d0a", //系统内部访客ID
"name": "webim-visitor-99Y7WTPXEEQJ67RQM7E4", //访客ID
"nickname": "webim-visitor-99Y7WTPXEEQJ67RQM7E4" //访客昵称
},
"channel": {
"id": 23727, //关联ID
"type": "easemob" //关联类型
},
"agent_queue": {
"id": 164018 //技能组ID
}
},
"ruleData": { //规则数据
"name": "排队溢出", //用户自定义的排队规则名称
"type": "waiting", //规则类型
"apply": "all", //应用到的技能组id
"rules": [
{
"type": "and", //类型
"criterion": "queue_length", //指标
"threshold": "1", //阈值
"operator": "gt" //运算符
}
],
"actions": [
{
"action": "overflow", //执行动作
"name": "溢出到配置的技能组", //执行名称
"reserve_queue": 41509 //执行预设的技能组id
}
]
}
}
}
事件名称:ServiceSessionTransferedEvent
触发条件:机器人转人工(机器人将会话转接技能组)、客服/管理员将进行中会话转接其他客服、客服/管理员将进行中会话转接技能组,不包括管理员将待接入或历史会话转接客服或技能组
消息内容示例:
{
"eventId": "c3bad5c0-a1ba-11e7-a05d-4db7a46cd15c", //事件ID
"timestamp": 1506320917962, //时间戳
"event": "ServiceSessionTransferedEvent", //事件名称
"payload": {
"serviceSession": {
"id": "562785f2-aed6-4420-bac5-fb1d2bd82f0e", //会话ID
"state": "Wait", //会话状态
"origin_type": "webim", //渠道类型,值为app(App渠道)、webim(网页)、weixin(微信)、weibo(微博)、phone(呼叫中心)、rest(rest API渠道)
"transfered_to_agent_queue": true, //会话是否转接技能组
"transfered_from": {
"from_agent_user_id": "946f116d-2e09-410c-9015-4b480edc9939", //转接方坐席ID
"from_agent_user_nice_name": "Admin", //坐席昵称
"from_agent_user_type": "Agent" //坐席类型
},
"transfered_to": { //被转接到的坐席或技能组信息
"to_queue_id": 39005 //接受方,技能组ID;或,坐席ID和昵称
},
"timestamp": {
"create": 1506320908000, //会话创建时间
"start": 1506320910000 //会话接起时间
},
"visitor": {
"id": "678c9d67-f2f1-498f-a458-6f3fbf223a64", //系统内部访客ID
"name": "webim-visitor-RXFC9WR4KRG8FMK98PCY" //访客ID
},
"channel": {
"id": 10625, //关联ID
"type": "easemob" //关联类型
},
"agent_queue": {
"id": 39005 //会话所属技能组ID
}
}
}
}
事件名称:RtcMediaClosedEvent
触发条件:坐席结束视频通话
消息内容示例:
{
"eventId": "96791f40-8234-11e7-8522-47871522633a",
"timestamp": 1502854804131,
"event": "RtcMediaClosedEvent",
"payload": {
"mediaEntity": { //视频结束事件的详细信息
"session_id": "60e9b15b-8221-4249-ac87-8b53d00cfb43", //视频通话的会话ID
"agent_id": "955eee17-4835-4e23-8b19-7e292d12f0e2", //视频通话中的客服ID
"visitor":{
"id":"dfe7a557-aa77-443c-b2ec-7a8f93f90f22", //视频通话中的访客ID
"nickname":"webim-visitor-YEPWGBB4TCEYVGCPCJMP", //视频通话中的访客昵称
},
"url":{
"agent":"https://kefu-media-files.oss-cn-beijing.aliyuncs.com/MS_X133600273164668928C2632M2__CH_VIDEO_1_C2632__VIDEO.webm?Expires=9223372036854775&OSSAccessKeyId=LTAI3pBwoxnmCWUw&Signature=VtkixMtyf9S4jPhLeCvyheEhc4k%3D",
//视频通话中客服端的录像文件
"visitor":"https://kefu-media-files.oss-cn-beijing.aliyuncs.com/MS_X133600273164668928C2632M4__CH_VIDEO_3_C2632__VIDEO.webm?Expires=9223372036854775&OSSAccessKeyId=LTAI3pBwoxnmCWUw&Signature=gFfY11vIakftWpOmm8TdlYzkuAg%3D",
//视频通话中访客端的录像文件
},
"create_at": 1502854803252 //视频结束事件的发送时间
}
}
}
事件名称:ServiceSessionClosedEvent
触发条件:坐席/管理员手动结束会话、会话超时自动结束
消息内容示例:
{
"eventId": "ca81ade0-6dc5-11e6-9c13-dfa1eed70626", //事件ID
"timestamp": 1472460726612, //时间戳
"event": "ServiceSessionClosedEvent", //事件类型
"payload": {
"serviceSession": {
"id": "4fe1b496-90ac-4412-8f40-0f6a13cbfc4b", //会话ID
"state": "Terminal", //会话状态
"origin_type": "webim", //渠道类型,值为app(App渠道)、webim(网页)、weixin(微信)、weibo(微博)、phone(呼叫中心)、rest(rest API渠道)
"timestamp": {
"create": 1472139263000, //会话创建时间
"start": 1472139269000, //会话接起时间
"stop": 1472460695000 //会话结束时间
},
"channel": { //关联
"id": 3104, //关联ID
"name": "快速创建的关联", //关联名称
"type": "easemob" //关联类型,easemob代表环信IM
},
"visitor": {
"id": "a6527ed1-e3f4-4537-aeef-ae35199e3765", //系统内部访客ID
"name": "webim-visitor-RY7KQK99XVGXBE3JKCHM", //访客ID,显示在资料的ID字段
"channel_user": { //访客所属关联信息(此处是APP渠道示例,其他渠道示例见下文)
"app_name": "sandbox",
"channel_type": "easemob",
"im_id": "webim-visitor-RY7KQK99XVGXBE3JKCHM", //环信IM的环信ID
"org_name": "sipsoft"
}
},
"agent": {
"id": "b58b99c1-cd3b-44d9-9821-20fb6a0f2f49", //坐席ID
"name": "Admin", //坐席昵称
"type": "Agent" //坐席类型,机器人、普通坐席或管理员
},
"agent_queue": {
"id": 2112, //技能组ID
"name": "集体组" //技能组名称
},
"summary_category": [ //会话标签,数组,包含所有的标签ID
{
"id": 23976,
"name": "测试4-4"
}
],
"comment": "", //会话备注
"enquiry":{
"score":3, //满意度评分
"comment":"" //满意度评价详情
}
}
}
}
访客所属关联信息结构示例:
# IM用户
"channel_user": {
"app_name": "sandbox",
"channel_type": "callcenter",
"im_id": "webim-visitor-RY7KQK99XVGXBE3JKCHM",
"org_name": "sipsoft"
}
# CallCenter用户
"channel_user": {
"channel_type": "callcenter",
"name": "访客的名称",
"phone": "13112345678"
}
# Rest 渠道用户
"channel_user": {
}
# weibo 渠道用户
"channel_user": {
"channel_type": "weibo",
"name": "访客的微博名",
"weibo_id": "访客的微博ID"
}
# 微信渠道用户
"channel_user": {
"channel_type": "wechat_oauth2",
"name": "访客的微信名",
"weixin_id": "访客的微信ID"
}
事件名称:ServiceSessionSummaryEvent
触发条件:坐席/管理员 手动 添加/更改 会话标签,系统自动添加会话标签
消息内容示例:
系统添加的会话标签:
{
"eventId": "ca81ade0-6dc5-11e6-9c13-dfa1eed70626", //事件ID
"timestamp": 1472460726612, //时间戳
"event": "ServiceSessionSummaryEvent", //事件名称
"payload": {
"serviceSession": {
"id": "4fe1b496-90ac-4412-8f40-0f6a13cbfc4b", //会话ID
"summary_category": [
[
{
"id": 555554, //会话标签ID
"name": "待接入超时结束会话" //会话标签名称
}
],
[
{
"id": 731840,
"name": "无效会话"
}
]
]
}
}
}
坐席/管理员手动添加的会话标签:
{
"eventId": "ca81ade0-6dc5-11e6-9c13-dfa1eed70626",
"timestamp": 1472460726612,
"event": "ServiceSessionSummaryEvent",
"payload": {
"serviceSession": {
"id": "4fe1b496-90ac-4412-8f40-0f6a13cbfc4b",
"actor": {
"id": "6384ec4b-96ed-4f88-92a9-6f085201e30a", //坐席ID
"type": "Agent" //坐席or管理员
},
"summary_category": [
[
{
"id": 555554,
"name": "待接入超时结束会话"
}
],
[
{
"id": 731840,
"name": "无效会话"
}
]
]
}
}
}
事件名称:ServiceSessionEnquiryInviteEvent
触发条件:客服端发送满意度评价邀请。
消息内容示例:
{
"eventId": "aa652780-c43b-11e7-91bc-21dd9f56e616",
"timestamp": 1535988791731,
"event": "ServiceSessionEnquiryInviteEvent",
"payload": {
"enquiryInvite": {
"actor": { // 发起满意度评价邀请的操作人
"id": "6384ec4b-96ed-4f88-92a9-6f085201e30a", // 坐席ID
"type": "Agent" // 坐席类型
},
"invite_at": 1535988791731, // 满意度评价邀请的发送时间
"serviceSession": {
"id": "95cb44bb-a00b-46bb-9392-8c46f2087aa1" // 会话ID
},
"visitor": {
"id": "4d12f5b5-e4b6-48d2-a99d-d1f5a8b7a0ac", // 访客ID
"nickname": "webim-visitor-T4QF9QM96G77KQ4Y837Q"// 访客昵称
},
"agent": {
"id": "6384ec4b-96ed-4f88-92a9-6f085201e30a", // 坐席ID
"nickname": "agentUserNickName", // 坐席昵称
"type": "Agent" // 坐席类型
},
"inviteId": 61626663, // 满意度评价邀请ID
"enquiryShareEnable": false // “满意度评分共享给会话中的所有客服”开关状态,true: 打开;false:关闭
}
}
}
事件名称:ServiceSessionEnquiryEvent
触发条件:访客完成对会话的满意度评价
消息内容示例:
{
"eventId": "aa652780-c43b-11e7-91bc-21dd9f56e616",
"timestamp": 1510114620029,
"event": "ServiceSessionEnquiryEvent",
"payload": {
"enquiry": { //满意度评价详情
"score": "3", //评分详情
"comment": "评价详情", //评价详情
"tags": [
"评价标签1",
"评价标签2"
], //评价标签,其设置在"满意度评价邀请设置->评分选项设置"中实现
"create_at": 1510114619000, //访客评价的时间
"serviceSession": { //会话简介
"id": "3b6f76e7-747f-46d9-9cf0-a989f4ee8914", //会话ID
"state": "Processing" //会话状态,大致会有“Processiong”和“Terminal”两种状态
},
"visitor": { //访客简介
"id": "4d12f5b5-e4b6-48d2-a99d-d1f5a8b7a0ac", //访客ID
"nickname": "webim-visitor-T4QF9QM96G77KQ4Y837Q",//访客昵称
"username": "webim-visitor-T4QF9QM96G77KQ4Y837Q" //访客的环信ID
},
"agent": { //客服简介
"id": "6384ec4b-96ed-4f88-92a9-6f085201e30a", //客服ID
"nickname": "1011", //客服昵称
"type": "Agent" //客服类型,一般分为“Agent”和“Robot”两种
}
}
}
}
事件名称:CallDetailInfoEvent
触发条件:通话详单生成
消息内容示例:
{
"eventId": "74b4a8e0-4020-11eb-bcd8-43c5cde94bd9",
"timestamp": 1608179393402,
"event": "CallDetailInfoEvent",
"payload": {
"callDetail": {
"cc_id": "d00842df-e406-4f32-9929-80b02f26e07c", //实例id
"contact_id": "2827900505", //通话id
"staff_id": "c4af3583-78ee-4a63-a94b-9af6d8670b99", //坐席id
"group_id": "e155be22-05ca-4535-89aa-ad3c8d358d45", //技能组id
"visitor_id": "fba0d16b-5112-4ed7-9814-49f6c17af717", //访客id
"contact_type": "Outbound", //通话类型:Inbound 呼入 Outbound 呼出
"contact_disposition": "Success", //挂断原因
"calling_number": "02160556504", //主叫号码
"called_number": "17637515819", //被叫号码
"province": "河南", //归属地省
"city": "平顶山", //归属地市
"duration": 50, //总通话时长
"satisfaction": 0, //满意度
"satisfaction_desc": "未发送", //满意度
"start_time": 1598956402000, //时间
"stop_time": 1598956452000,
"last_staff_id": "c4af3583-78ee-4a63-a94b-9af6d8670b99", //最后接待坐席id
"last_agent_true_name": "aliyun_cc_lyj", //最后接待坐席真实姓名
"agent_names": "aliyun_cc_lyj", //参与坐席昵称
"agent_true_names": "aliyun_cc_lyj", //参与坐席真实姓名
"agent_user_names": "aliyun_cc_lyj@easemob.com", //参与坐席账号
"skill_group_names": "沙箱技能组", //技能组id
"visitor": {
"user_id": "fba0d16b-5112-4ed7-9814-49f6c17af717", //访客id
"create_date_time": 1594005561000,
"last_update_date_time": 1594005561000,
"nick_name": "17637515819",
"phone": "17637515819",
"sex": 0,
"tenant_id": 20080
},
"valid_duration": 42, //有效通话时长
"release_user": "agent", //挂断方 agent:坐席 visitor 访客
"on_talking_time": "1598956410000" //接通时间
}
}
}
事件名称:CallRecordInfoEvent
触发条件:录音生成
消息内容示例:
{
"eventId": "1e5ad5e0-4021-11eb-9ab8-9fa8d2f7c377",
"timestamp": 1608179688909,
"event": "CallRecordInfoEvent",
"payload": {
"callRecordDatas": [
{
"cc_id": "d00842df-e406-4f32-9929-80b02f26e07c", //实例id
"contact_id": "2827900505", //通话id
"staff_id": "c4af3583-78ee-4a63-a94b-9af6d8670b99", //坐席id
"file_name": "159895641000500080521673.wav", //录音文件名
"file_url": "http://cloudcallcenter-online.oss-cn-shanghai.aliyuncs.com/record/f626832e-3da0-4c99-b534-ed3a2116b626/159895641000500080521673.wav?Expires=1608180499&OSSAccessKeyId=LTAIvKWEr4DoFSqz&Signature=zV4bSs6cC13KXvnj2G7z8Ro6X2U%3D",
"staff_nick_name": "aliyun_cc_lyj", //坐席昵称
"staff_true_name": "aliyun_cc_lyj", //坐席真实姓名
"staff_user_name": "aliyun_cc_lyj@easemob.com", //坐席账号
"record_start_time": 1598956410000
}
]
}
}
事件名称:MatchKeywordEvent
参数说明:
名称 | 说明 |
---|---|
Integer tenantId | 租户id |
String serviceSessionId | 会话id |
String ruleName | 规则名称 |
String agentId | 坐席ID |
String agentName | 坐席名称 |
String visitorId | 访客ID |
String visitorName | 访客名称 |
long alarmDatetime | 报警时间 |
String content | 告警详情(可能为null) |
String fromUserType | 消息来源(Visitor访客,Agent坐席) |
{
"eventId": "4ffd5d20-4854-11ec-a568-45b7ec94c36d",
"timestamp": 1637228749871,
"event": "MatchKeywordEvent",
"payload": {
"tenantId": 29676,
"serviceSessionId": "b89e3bad-f844-4065-81a1-3fde4afb59a2",
"fromUserType": "Visitor",
"ruleName": "111",
"agentId": "5dade28d-77e8-43a4-84e8-1eefa0c63748",
"agentName": "Admin昵称1",
"visitorId": "3a6728e8-9512-44cc-92b8-e5b847bfa71c",
"visitorName": "webim-visitor-B2FJPW77GEMQHWGW88EF",
"alarmDatetime": 1637228749810,
"content": "aaaa"
}
}
事件名称:VisitorOfflineMessagePushEvent
注:此功能为增值功能,如有需要,请联系商务。
触发条件:客户的app是通过集成环信客服系统访客端SDK的方式,并且在线会话处于进行中时,当app访客处于离开/离线的状态,包含杀死APP进程、切换其他应用等场景下,坐席向访客发送消息时,会通过该事件将消息具体信息推送给客户方配置的接口;
1、文本消息内容示例:
{
"event": "VisitorOfflineMessagePushEvent", //事件类型:访客离线消息推送事件
"eventId": "6f006be0-f18f-11ee-80f8-23ff3aa00859", //事件ID
"payload": {
"message": {
"body": {
"msg": "测试文本消息", //消息内容
"type": "txt" //消息类型:值为 txt(文本消息、视频发送邀请)、img(图片消息)、audio(语音消息)、video(视频消息)、file(文件附件消息)
},
"channel": {
"id": 2289802, //关联ID
"type": "easemob" //关联类型
},
"create_at": 1712130883957, //消息发送时间
"ext": {}, //扩展消息,当message下的基础消息类型需要进一步识别时,会启用ext扩展消息做进一步识别判定
"from": {
"id": "d1452555-9257-4e7a-87aa-87c748cb783d", //发送方ID(坐席)
"name": "77907zzsx-ldb@qq.com", //发送方昵称
"type": "Agent" //发送方类型 Agent为坐席发送到消息,System为系统消息,业务方可自行过滤
},
"id": "dde1cfc0-5d25-43f2-8df7-5f6213a57102", //消息ID
"origin_type": "app", //渠道类型,值为app(App渠道)
"service_session_id": "91b0f355-0b00-4b44-b16b-eb78c33d417f", //对应的会话ID
"to": {
"id": "6ce90ed6-f9c1-459d-91d7-8df1a109a7c9", //接收方ID(访客)
"name": "734972d023764f868d756cfbcf3b9e5378440", //接收方昵称
"type": "Visitor" //接收方类型 访客
}
}
},
"timestamp": 1712130883998 //时间戳
}
2、表情消息内容示例:
注:环信客服系统下的表情为自定义由特殊符号映射的一套表情,建议第三方业务系统接收判断时,统一将其视为 文字类型的消息即可;
{
"event": "VisitorOfflineMessagePushEvent",
"eventId": "a172eec0-f191-11ee-9546-e95ecb5e87a9",
"payload": {
"message": {
"body": {
"msg": "[:D][:-o][;)]", //表情符号内容(注:此为客服系统内部使用的自定义特殊表情,建议业务系统统一当作文本消息类型处理即可)
"type": "txt" //文本消息类型
},
"channel": {
"id": 2289802,
"type": "easemob"
},
"create_at": 1712131827595,
"ext": {},
"from": {
"id": "d1452555-9257-4e7a-87aa-87c748cb783d",
"name": "77907zzsx-ldb@qq.com",
"type": "Agent"
},
"id": "28efc818-21b5-490e-8289-f0854d39a319",
"origin_type": "app",
"service_session_id": "6d873429-40fd-4722-a99b-3fb852eb4180",
"to": {
"id": "6ce90ed6-f9c1-459d-91d7-8df1a109a7c9",
"name": "734972d023764f868d756cfbcf3b9e5378440",
"type": "Visitor"
}
}
},
"timestamp": 1712131827628
}
3、视频通话邀请 类型消息内容示例:
注:环信客服系统下的视频通话邀请是基于文本消息类型扩展使用的,判断时需要结合ext下的字段配合使用;
坐席开始视频呼叫访客时,推送的消息类型如下:
{
"event": "VisitorOfflineMessagePushEvent",
"eventId": "1c6156f0-f190-11ee-baab-19da1c06b5e5",
"payload": {
"message": {
"body": {
"msg": "邀请访客进行视频", //消息内容
"type": "txt" //文本消息类型(包含视频通话邀请,需要进一步判断ext字段)
},
"channel": {
"id": 2289802,
"type": "easemob"
},
"create_at": 1712131174842,
"ext": {
"msgtype": {
"liveStreamInvitation": {
"isNewInvitation": true, //视频邀请标识,为true代表有会话邀请
"msg": "邀请访客进行视频", //消息描述内容
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" //设备标识信息
}
},
"type": "agorartcmedia/video"
},
"from": {
"id": "d1452555-9257-4e7a-87aa-87c748cb783d",
"name": "77907zzsx-ldb@qq.com",
"type": "Agent"
},
"id": "78904e10-5770-4132-b4b6-16a0911403ba",
"origin_type": "app",
"service_session_id": "6d873429-40fd-4722-a99b-3fb852eb4180",
"to": {
"id": "6ce90ed6-f9c1-459d-91d7-8df1a109a7c9",
"name": "734972d023764f868d756cfbcf3b9e5378440",
"type": "Visitor"
}
}
},
"timestamp": 1712131174879
}
坐席取消/挂断其对访客的视频邀请时,推送的消息类型如下:
{
"eventId": "12ebc930-1bce-11ef-8f55-9589a7b89ac8", //事件ID
"timestamp": 1716775736643, //时间戳
"event": "VisitorOfflineMessagePushEvent", //事件类型
"payload": {
"message": {
"id": "566794b5-aab 5-4bf8-9fc9-56fd1cd60e14",
"service_session_id": "a223d3a7-49e6-4241-a1a5-0931b834da1b",
"msg_id_for_ack": null,
"create_at": 1716775736601,
"from": { //消息发送方
"id": "39a4d1e4-4b85- 4e69-9fbd-4a8d16e5067c",
"name": "77907zzsx-dyj@qq.com",
"type": "Agent"
},
"to": { //消息接收方
"id": "ae6886ad-136e-4d34-93dc-b7b28afbedf1",
"name": "386wy0xm1zv72dh",
"type": "Visitor"
},
"origin_type": "app", 、//渠道
"channel": {
"id": 2289961,
"type": "easemob"
},
"body": { //消息体
"msg": "视频通话已结束", //消息内容,此事件为了防止与坐席手动发送发出的消息产生误判,建议结合ext消息进行综合判断
"type": "txt"
},
"ext": { //扩展消息,针对基础消息类型无法满足业务使用时,会通过扩展消息进行判断
"msgtype": {
"videoPlayback ": {
"msg": "playback", //回呼取消/结束
"videoObj": { //视频录制的相关内容,访客端不做展示
"ssId": "a223d3a7-49e6-4241-a1a5-0931b834da1b",
"visitorUserId": "ae6886ad-136e-4d34-93dc-b7b28afbedf1",
"visitorName": "386wy0xm1zv72dh",
"videoStartTime": "2024-05-27T02:08:56.598Z",
"videoEndTime": "2024-05-27T02:08:56.598Z",
"callId": 35109,
"videoType": "agora"
},
"agentName": "77907zzsx-dyj@qq.com"
}
}
}
}
}
}
4、图片类型消息 内容示例:
{
"event": "VisitorOfflineMessagePushEvent",
"eventId": "06bd7bd0-f190-11ee-ac19-3d63d0bf0894",
"payload": {
"message": {
"body": {
"filename": "1.jpg", //图片名称
"mediaId": "c7d8f97a-6251-426b-ad92-4f8736ba9d95MS5qcGc=",
"secret": "", //图片上传后的密钥,此处可以忽略本项
"size": {
"height": 1080, //图片高度
"width": 1920 //图片宽度
},
"thumbSecret": "", //此处可以忽略本项
"type": "img", ////图片消息类型
"url": "/v1/Tenant/77907/MediaFiles/c7d8f97a-6251-426b-ad92-4f8736ba9d95MS5qcGc=" //图片消息地址,需要拼接上客服系统域名
},
"channel": {
"id": 2289802,
"type": "easemob"
},
"create_at": 1712131138535,
"ext": {},
"from": {
"id": "d1452555-9257-4e7a-87aa-87c748cb783d",
"name": "77907zzsx-ldb@qq.com",
"type": "Agent"
},
"id": "ec7383cf-9518-4537-be1c-5965637cc776",
"origin_type": "app",
"service_session_id": "6d873429-40fd-4722-a99b-3fb852eb4180",
"to": {
"id": "6ce90ed6-f9c1-459d-91d7-8df1a109a7c9",
"name": "734972d023764f868d756cfbcf3b9e5378440",
"type": "Visitor"
}
}
},
"timestamp": 1712131138574
}
5、语音文件类型消息内容示例:
{
"event": "VisitorOfflineMessagePushEvent",
"eventId": "284acf00-f190-11ee-87e8-f5538a28ac4a",
"payload": {
"message": {
"body": {
"filename": "blob", //语音名称
"length": 4, //语音时间(单位:秒)
"secret": "", //此处可以忽略本项
"type": "audio", //语音消息类型
"url": "/v1/Tenant/77907/MediaFiles/a83cc0c3-f65d-4840-bdb9-dd56872b6662YmxvYg==" //语音访问地址,需要拼接客服系统域名
},
"channel": {
"id": 2289802,
"type": "easemob"
},
"create_at": 1712131194834,
"ext": {},
"from": {
"id": "d1452555-9257-4e7a-87aa-87c748cb783d",
"name": "77907zzsx-ldb@qq.com",
"type": "Agent"
},
"id": "83c62fb1-7028-46c5-a692-c04833b742f0",
"origin_type": "app",
"service_session_id": "6d873429-40fd-4722-a99b-3fb852eb4180",
"to": {
"id": "6ce90ed6-f9c1-459d-91d7-8df1a109a7c9",
"name": "734972d023764f868d756cfbcf3b9e5378440",
"type": "Visitor"
}
}
},
"timestamp": 1712131194864
}
6、视频文件类型消息 内容示例:
{
"event": "VisitorOfflineMessagePushEvent",
"eventId": "5c53ece0-f191-11ee-8ea3-456ffe44786d",
"payload": {
"message": {
"body": {
"file_length": 513542, /视频附件大小(单位:字节)
"filename": "8880258fb31a1e9d163cdfa102b82e8d.mp4", //视频文件名称
"length": 0, //预留字段,可以忽略,如需要视频长度,请自行根据视频文件进行后端或前端处理后获取视频时长
"mediaId": "0987c268-9194-4ab8-a58d-1bf7bb4fef9fODg4MDI1OGZiMzFhMWU5ZDE2M2NkZmExMDJiODJlOGQubXA0", //视频文件ID,可以忽略
"secret": "", //本项可以忽略
"thumb": "https://077907.sdb-zz.live-helps.com/v1/Tenant/77907/MediaFiles/d4091fae-e53e-43fc-a5ba-a570dfda4dd9ODg4MDI1OGZiMzFhMWU5ZDE2M2NkZmExMDJiODJlOGQuanBn", //视频缩略图地址
"type": "video", //视频消息类型
"url": "/v1/Tenant/77907/MediaFiles/0987c268-9194-4ab8-a58d-1bf7bb4fef9fODg4MDI1OGZiMzFhMWU5ZDE2M2NkZmExMDJiODJlOGQubXA0" //视频文件播放地址,需要拼接客服系统域名
},
"channel": {
"id": 2289802,
"type": "easemob"
},
"create_at": 1712131711633,
"ext": {},
"from": {
"id": "d1452555-9257-4e7a-87aa-87c748cb783d",
"name": "77907zzsx-ldb@qq.com",
"type": "Agent"
},
"id": "dcb4fbb1-5480-411c-9779-49ce45e8590b",
"origin_type": "app",
"service_session_id": "6d873429-40fd-4722-a99b-3fb852eb4180",
"to": {
"id": "6ce90ed6-f9c1-459d-91d7-8df1a109a7c9",
"name": "734972d023764f868d756cfbcf3b9e5378440",
"type": "Visitor"
}
}
},
"timestamp": 1712131711662
}
7、文件附件消息(支持图片、音频、视频、文档、压缩包等各类文件)内容示例:
{
"event": "VisitorOfflineMessagePushEvent",
"eventId": "bc010740-f191-11ee-ba40-bd73d4f07453",
"payload": {
"message": {
"body": {
"file_length": 73382, //文件附件大小(单位:字节)
"filename": "Yearning_Table_Data (74).xlsx", //文件名称
"secret": "", //可以忽略本项
"type": "file", //文件消息类型
"url": "https://077907.sdb-zz.live-helps.com/v1/Tenant/77907/MediaFiles/91dc67f9-6ad3-43d3-b72f-eaa3caeed172WWVhcm5pbmdfVGFibGVfRGF0YSAoNzQpLnhsc3g=" //文件访问地址
},
"channel": {
"id": 2289802,
"type": "easemob"
},
"create_at": 1712131872151,
"ext": {},
"from": {
"id": "d1452555-9257-4e7a-87aa-87c748cb783d",
"name": "77907zzsx-ldb@qq.com",
"type": "Agent"
},
"id": "60fa2ced-e1c5-4188-908e-963397ef5aa2",
"origin_type": "app",
"service_session_id": "6d873429-40fd-4722-a99b-3fb852eb4180",
"to": {
"id": "6ce90ed6-f9c1-459d-91d7-8df1a109a7c9",
"name": "734972d023764f868d756cfbcf3b9e5378440",
"type": "Visitor"
}
}
},
"timestamp": 1712131872180
}
字段解析逻辑说明:环信客服系统消息类型格式为固定格式,不同类型的消息仅为细微区别,结构不会发生改变,建议都从 payload>message>body下去解析type类型开始:
当type为txt时: 1、先去payload>message>ext下判断,如果ext下为空,则代表是文本类型消息,直接展示payload>message>body下的msg即可; 2、如果ext>msgtype>liveStreamInvitation下的 "isNewInvitation"为true,则代表视频邀请,会直接展示payload>message>body下的msg同时,触发坐席侧的视频接听等动作; 注:环信客服系统下的表情为自定义由特殊符号映射的一套表情,建议第三方业务系统接收判断时,统一视为 文字类型的消息即可) 当type为img:对应图片消息,直接解析body下的对应内容即可; 当type为audio:对应语音片段,直接解析body下的对应内容即可; 当type为video:对应视频片段,直接解析body下的对应内容即可; 当type为file:对应文档附件,直接解析body下的对应内容即可; 关于访客的相关信息,可直接从payload>message>to下解析即可;
事件名称:RtcOcrPushEvent
触发条件:视频客服在接待视频会话过程中,对来自app访客端侧的证件进行识别,并将识别成功后的结果及图片推送给第三方系统;
注:此功能为增值功能,如有需要,请联系商务。
各类卡证标识如下:
参数 | 类型 |
---|---|
IDCardFace | 身份证人像面 |
IDCardBack | 身份证国徽面 |
BankCard | 银行卡 |
DrivingLicenseFace | 驾驶证主页 |
DrivingLicenseBack | 驾驶证副页 |
HKExitEntryPermitToMainlandFace | 港澳来往大陆(内地)通行证人像面 |
HKExitEntryPermitToMainlandBack | 港澳来往大陆(内地)通行证反面 |
TWExitEntryPermitToMainlandFace | 台湾来往大陆(内地)通行证人像面 |
TWExitEntryPermitToMainlandBack | 台湾来往大陆(内地)通行证反面 |
PassportFace | 国际护照主页 |
PassportBack | 国际护照签注页 |
ForeignerPermanentIdCardFace | 外国人永久居留身份证人像面 |
ForeignerPermanentIdCardBack | 外国人永久居留身份证反面 |
HMTResidenceFace | 港澳台居住证人像面 |
HMTResidenceBack | 港澳台居住证反面 |
OTHERS | 其他类型证件 |
身份证人像面-识别成功后推送的消息示例字段如下:
{
"event": "RtcOcrPushEvent", //事件类型,此处代表视频过程中OCR卡证识别推送事件
"eventId": "255df7e0-0de2-11ef-9855-15829acbfca5", //事件ID
"timestamp": 1715245041246, //时间戳
"payload": {
"mediaEntity": {
"agent_id": "d1452555-9257-4e7a-87aa-87c748cb783d", //视频通话中的客服ID
"create_at": 1715245041245, //结束事件的发送时间
"media_url": "http://kefu-ocr-sandbox.oss-cn-shanghai.aliyuncs.com/77907/6650a97b-5a9d-4da5-8349-a352ec936ba3MTcxNTI0NTAzODc0OS5qcGc%3D?Expires=1715248641&OSSAccessKeyId=LTAI5tEFeYpT2CqTP9FHLGmq&Signature=0DQoL/9wlXhSYIBkHqjr0RtFbUc%3D", //生成的图片url地址
"session_id": "351f3e1e-1ffd-46a2-8dea-2c94e4f57870", //视频通话的会话ID
"visitor": {
"id": "f478b8be-7111-4c2f-932e-2c6775f1b4c5", //视频通话中的访客ID
"nickname": "我是访客", //视频通话中的访客昵称
"username": "zhangsan"//视频通话中的访客账号(一般是第三方传进来的用户ID)
}
},
"ocrEntity": { //OCR识别后的具体字段内容
"name ": "代用名 ", //姓名
"sex ": "男 ", //性别
"ethnicity ": "汉 ", //民族
"birthDate ": "2013 年5月6日 ", //出生日期
"address ": "湖南省长沙市开福区巡道街幸福小区居民组 ", //地址
"idNumber ": "430512198908131367 " //证件号码
},
"ocr_type": "IDCardFace" //识别的证件类型,具体类型详见 卡证识别各类证件类型汇总
}
}
身份证国徽面-识别成功后推送的消息示例字段如下:
{
"eventId": "065c5610-174d-11ef-bb8e-fb65af1d6f7b",
"timestamp": 1716280505841,
"event": "RtcOcrPushEvent",
"payload": {
"mediaEntity": {
"session_id": "1afe4de2-9ca7-4ab7-9544-e8da676af54e",
"agent_id": "39a4d1e4-4b85-4e69-9fbd-4a8d16e5067c",
"visitor": {
"id": "6cc61b90-66e4-4edd-9277-4d1942e13158",
"nickname": "guma65bz4y7qe77",
"username": "zhangsan"//视频通话中的访客账号(一般是第三方传进来的用户ID)
},
"media_url": "http://yzyf-kefu-ocr.oss-cn-hangzhou.aliyuncs.com/77907/f827604c-2892-4d5c-9968-7121f8e9f387MTcxNjI4MDUwNDgyNS5qcGc%3D?Expires=1716284105&OSSAccessKeyId=LTAI5tAYhNz9sWiMUrDXHisc&Signature=WCsM19yPpv7kBjafJEwhcJaSbvE%3D",
"create_at": 1716280505841
},
"ocr_type": "IDCardBack",
"ocrEntity": { //OCR识别后的具体字段内容
"issueAuthority": "北京市公安局丰台分局", //签发机关
"validPeriod": "2015.07.14-2035.07.14" //有效期
}
}
}
银行卡-识别成功后推送的消息示例字段如下:
{
"eventId": "103fc4fa-174d-11ef-896a-e143b08bc046",
"timestamp": 1716280522431,
"event": "RtcOcrPushEvent",
"payload": {
"mediaEntity": {
"session_id": "1afe4de2-9ca7-4ab7-9544-e8da676af54e",
"agent_id": "39a4d1e4-4b85-4e69-9fbd-4a8d16e5067c",
"visitor": {
"id": "6cc61b90-66e4-4edd-9277-4d1942e13158",
"nickname": "guma65bz4y7qe77",
"username": "zhangsan"//视频通话中的访客账号(一般是第三方传进来的用户ID)
},
"media_url": "http://yzyf-kefu-ocr.oss-cn-hangzhou.aliyuncs.com/77907/f2b8dccd-fd5c-4dc2-bb0e-5805631fc416MTcxNjI4MDUyMTY1NS5qcGc%3D?Expires=1716284122&OSSAccessKeyId=LTAI5tAYhNz9sWiMUrDXHisc&Signature=SyZQ90Pc38LmmNtrzlDDhMu%2BPoI%3D",
"create_at": 1716280522431
},
"ocr_type": "BankCard",
"ocrEntity": { //OCR识别后的具体字段内容
"cardNumber": "6217856101088888888", //银行卡号码
"validToDate": "01/25", //卡片有效期
"bankName": "中国银行" //银行名称
}
}
}
驾驶证主页-识别成功后推送的消息示例字段如下:
{
"eventId": "1af85e20-174d-11ef-9a1d-17daa478a2fd",
"timestamp": 1716280540418,
"event": "RtcOcrPushEvent",
"payload": {
"mediaEntity": {
"session_id": "1afe4de2-9ca7-4ab7-9544-e8da676af54e",
"agent_id": "39a4d1e4-4b85-4e69-9fbd-4a8d16e5067c",
"visitor": {
"id": "6cc61b90-66e4-4edd-9277-4d1942e13158",
"nickname": "guma65bz4y7qe77",
"username": "zhangsan"//视频通话中的访客账号(一般是第三方传进来的用户ID)
},
"media_url": "http://yzyf-kefu-ocr.oss-cn-hangzhou.aliyuncs.com/77907/b1edee53-58c0-4176-b28b-ff65cdb2947eMTcxNjI4MDUzOTM1Ny5qcGc%3D?Expires=1716284140&OSSAccessKeyId=LTAI5tAYhNz9sWiMUrDXHisc&Signature=f3Fk4TQMBvXiQEnhXeGH9AhmvZA%3D",
"create_at": 1716280540418
},
"ocr_type": "DrivingLicenseFace",
"ocrEntity": {
"licenseNumber": "370123198908181127", //证号
"name": "读光", //姓名
"sex": "男", //性别
"nationality": "中国", //国籍
"address": "山东省诸城市百尺河镇", //住址
"birthDate": "1989-08-18", //出生日期
"initialIssueDate": "2009-08-07", //初次领证日期
"approvedType": "C1", //准驾车型
"issueAuthority": "山东省潍坊市公安局通警察支队", //颁发单位
"validFromDate": "2015-08-07", //有效期限开始日期
"validPeriod": "2015-08-07至2025-08-07" //有效期限区间
}
}
}
驾驶证副页-识别成功后推送的消息示例字段如下:
{
"eventId": "2043f560-174d-11ef-ae4e-95e65b41d3d3",
"timestamp": 1716280549302,
"event": "RtcOcrPushEvent",
"payload": {
"mediaEntity": {
"session_id": "1afe4de2-9ca7-4ab7-9544-e8da676af54e",
"agent_id": "39a4d1e4-4b85-4e69-9fbd-4a8d16e5067c",
"visitor": {
"id": "6cc61b90-66e4-4edd-9277-4d1942e13158",
"nickname": "guma65bz4y7qe77",
"username": "zhangsan"//视频通话中的访客账号(一般是第三方传进来的用户ID)
},
"media_url": "http://yzyf-kefu-ocr.oss-cn-hangzhou.aliyuncs.com/77907/b74afdff-dbf5-47ad-be38-bfb8f6011766MTcxNjI4MDU0ODI1Ny5qcGc%3D?Expires=1716284149&OSSAccessKeyId=LTAI5tAYhNz9sWiMUrDXHisc&Signature=pBeyFnD45t0X6ldvpAVCEI9fwio%3D",
"create_at": 1716280549302
},
"ocr_type": "DrivingLicenseBack",
"ocrEntity": {
"name": "丁艺杰", //姓名
"recordNumber": "413703428142", //档案编号
"record": "增驾D,实习期至2023年09月29日。", //记录
"licenseNumber": "410182192302112411" //证号
}
}
}
外国人永久居留身份证人像面-识别成功后推送的消息示例字段如下:
{
"eventId": "37619f40-174d-11ef-b972-799be0328036",
"timestamp": 1716280588084,
"event": "RtcOcrPushEvent",
"payload": {
"mediaEntity": {
"session_id": "1afe4de2-9ca7-4ab7-9544-e8da676af54e",
"agent_id": "39a4d1e4-4b85-4e69-9fbd-4a8d16e5067c",
"visitor": {
"id": "6cc61b90-66e4-4edd-9277-4d1942e13158",
"nickname": "guma65bz4y7qe77",
"username": "zhangsan"//视频通话中的访客账号(一般是第三方传进来的用户ID)
},
"media_url": "http://yzyf-kefu-ocr.oss-cn-hangzhou.aliyuncs.com/77907/1688adcc-331c-4215-ada9-2f7fe6136984MTcxNjI4MDU4NDk4MC5qcGc%3D?Expires=1716284188&OSSAccessKeyId=LTAI5tAYhNz9sWiMUrDXHisc&Signature=TZvQmkF3DZSpu77sDMcVZlHSgMU%3D",
"create_at": 1716280588083
},
"ocr_type": "ForeignerPermanentIdCardFace",
"ocrEntity": {
"name": "BRENT", //姓名
"sex": "男/M", //性别
"birthday": "1987.11.12", //出生日期
"validityDate": "2015.08.07 - 2025.08.07", //有效期限
"cardNumber": "USA310087111201" //证件号码
}
}
}.
外国人永久居留身份证反面【不做识别直接推送】-识别成功后推送的消息示例字段如下:
{
"eventId": "3f7a1220-174d-11ef-9aff-213ef6a6f73b",
"timestamp": 1716280601666,
"event": "RtcOcrPushEvent",
"payload": {
"mediaEntity": {
"session_id": "1afe4de2-9ca7-4ab7-9544-e8da676af54e",
"agent_id": "39a4d1e4-4b85-4e69-9fbd-4a8d16e5067c",
"visitor": {
"id": "6cc61b90-66e4-4edd-9277-4d1942e13158",
"nickname": "guma65bz4y7qe77",
"username": "zhangsan"//视频通话中的访客账号(一般是第三方传进来的用户ID)
},
"media_url": "http://yzyf-kefu-ocr.oss-cn-hangzhou.aliyuncs.com/77907/32a923ec-1fa0-4122-aedb-b10ef0561d9cMTcxNjI4MDYwMTE4OS5qcGc%3D?Expires=1716284201&OSSAccessKeyId=LTAI5tAYhNz9sWiMUrDXHisc&Signature=7UFEykN5acF1Lu6EetpSXerNnVc%3D",
"create_at": 1716280601666
},
"ocr_type": "ForeignerPermanentIdCardBack"
}
}
港澳台居住证人像面-识别成功后推送的消息示例字段如下:
{
"eventId": "4e1a6cd0-174d-11ef-a63d-f7c35c64ea21",
"timestamp": 1716280626205,
"event": "RtcOcrPushEvent",
"payload": {
"mediaEntity": {
"session_id": "1afe4de2-9ca7-4ab7-9544-e8da676af54e",
"agent_id": "39a4d1e4-4b85-4e69-9fbd-4a8d16e5067c",
"visitor": {
"id": "6cc61b90-66e4-4edd-9277-4d1942e13158",
"nickname": "guma65bz4y7qe77",
"username": "zhangsan"//视频通话中的访客账号(一般是第三方传进来的用户ID)
},
"media_url": "http://yzyf-kefu-ocr.oss-cn-hangzhou.aliyuncs.com/77907/fe84f3d2-940f-493c-b807-de6cba26f4a8MTcxNjI4MDYyMjk3NS5qcGc%3D?Expires=1716284226&OSSAccessKeyId=LTAI5tAYhNz9sWiMUrDXHisc&Signature=1m6/mO%2Bsw2ZwwEnpiFYTKtgYMlc%3D",
"create_at": 1716280626205
},
"ocr_type": "HMTResidenceFace",
"ocrEntity": {
"name": "金鑫", //姓名
"sex": "女", //性别
"birthday": "1994年88月3日", //出生日期
"idNumber": "810000199408230021" //公民身份号码
}
}
}
港澳台居住证反面-识别成功后推送的消息示例字段如下:
{
"eventId": "566190d0-174d-11ef-ab1c-f52c265eb9fa",
"timestamp": 1716280640093,
"event": "RtcOcrPushEvent",
"payload": {
"mediaEntity": {
"session_id": "1afe4de2-9ca7-4ab7-9544-e8da676af54e",
"agent_id": "39a4d1e4-4b85-4e69-9fbd-4a8d16e5067c",
"visitor": {
"id": "6cc61b90-66e4-4edd-9277-4d1942e13158",
"nickname": "guma65bz4y7qe77",
"username": "zhangsan"//视频通话中的访客账号(一般是第三方传进来的用户ID)
},
"media_url": "http://yzyf-kefu-ocr.oss-cn-hangzhou.aliyuncs.com/77907/6d754cea-3e28-4c2e-a970-f7e89676dd3cMTcxNjI4MDYzNzA2My5qcGc%3D?Expires=1716284240&OSSAccessKeyId=LTAI5tAYhNz9sWiMUrDXHisc&Signature=1sCd810hcuZiR9jxUvxotlgaxqs%3D",
"create_at": 1716280640093
},
"ocr_type": "HMTResidenceBack",
"ocrEntity": {
"validDate": "2018.09.01-2023.08.31", //有效期限
"cardNumber": "000000000" //通行证号码
}
}
}
港澳来往大陆(内地)通行证人像面-识别成功后推送的消息示例字段如下:
{
"eventId": "62207670-174d-11ef-bb70-49ca4f63549e",
"timestamp": 1716280659799,
"event": "RtcOcrPushEvent",
"payload": {
"mediaEntity": {
"session_id": "1afe4de2-9ca7-4ab7-9544-e8da676af54e",
"agent_id": "39a4d1e4-4b85-4e69-9fbd-4a8d16e5067c",
"visitor": {
"id": "6cc61b90-66e4-4edd-9277-4d1942e13158",
"nickname": "guma65bz4y7qe77",
"username": "zhangsan"//视频通话中的访客账号(一般是第三方传进来的用户ID)
},
"media_url": "http://yzyf-kefu-ocr.oss-cn-hangzhou.aliyuncs.com/77907/2e334233-2c58-4dd0-b0a2-61ebff850b8aMTcxNjI4MDY1ODczMy5qcGc%3D?Expires=1716284259&OSSAccessKeyId=LTAI5tAYhNz9sWiMUrDXHisc&Signature=On6NL1/oY0caON1wdqFrsAU4ZAI%3D",
"create_at": 1716280659799
},
"ocr_type": "HKExitEntryPermitToMainlandFace",
"ocrEntity": {
"birthDate": "1981.08.03", //出生日期
"issueAuthority": "公安部出入境管理局", //签发机关
"issueCount": "00", //换证次数
"issuePlace": "",
"nameCn": "证件样本", //中文名字
"nameEn": "ZHENGJIAN, JIAN,YANG BEN", //英文名字
"permitNumber": "H12345678", //证件号码
"permitType": "港澳居民来往内地通行证",
"sex": "女", //性别
"validPeriod": "2012.12.12-2022.12.11" //有效期限
}
}
}
港澳来往大陆(内地)通行证反-识别成功后推送的消息示例字段如下:
{
"eventId": "6800fab0-174d-11ef-8371-d3906e2f3fb0",
"timestamp": 1716280669659,
"event": "RtcOcrPushEvent",
"payload": {
"mediaEntity": {
"session_id": "1afe4de2-9ca7-4ab7-9544-e8da676af54e",
"agent_id": "39a4d1e4-4b85-4e69-9fbd-4a8d16e5067c",
"visitor": {
"id": "6cc61b90-66e4-4edd-9277-4d1942e13158",
"nickname": "guma65bz4y7qe77",
"username": "zhangsan"//视频通话中的访客账号(一般是第三方传进来的用户ID)
},
"media_url": "http://yzyf-kefu-ocr.oss-cn-hangzhou.aliyuncs.com/77907/210ef0fb-ea74-4f0a-80c8-7ac4be9a22faMTcxNjI4MDY2NjQyNS5qcGc%3D?Expires=1716284269&OSSAccessKeyId=LTAI5tAYhNz9sWiMUrDXHisc&Signature=xWmVxchbC6jBxe78IVCAVm1etw4%3D",
"create_at": 1716280669659
},
"ocr_type": "HKExitEntryPermitToMainlandBack",
"ocrEntity": {
"cardNum": "A1234567(8)" //身份证件号码
}
}
}
台湾居民来往大陆通行证人像面-识别成功后推送的消息示例字段如下:
{
"eventId": "70d89ee0-174d-11ef-b23b-b319e6231ee4",
"timestamp": 1716280684494,
"event": "RtcOcrPushEvent",
"payload": {
"mediaEntity": {
"session_id": "1afe4de2-9ca7-4ab7-9544-e8da676af54e",
"agent_id": "39a4d1e4-4b85-4e69-9fbd-4a8d16e5067c",
"visitor": {
"id": "6cc61b90-66e4-4edd-9277-4d1942e13158",
"nickname": "guma65bz4y7qe77",
"username": "zhangsan"//视频通话中的访客账号(一般是第三方传进来的用户ID)
},
"media_url": "http://yzyf-kefu-ocr.oss-cn-hangzhou.aliyuncs.com/77907/1e4287c4-dce9-48e6-aef1-eef1a857e244MTcxNjI4MDY4MzM3Ni5qcGc%3D?Expires=1716284284&OSSAccessKeyId=LTAI5tAYhNz9sWiMUrDXHisc&Signature=4Dx8S92BCHC%2BuwXmWLYE1kQDj7M%3D",
"create_at": 1716280684494
},
"ocr_type": "TWExitEntryPermitToMainlandFace",
"ocrEntity": {
"birthDate": "1931.08.03", //出生日期
"issueAuthority": "公安部出入境管理局", //签发机关
"issueCount": "01", //签发次数
"issuePlace": "福建", //签发地点
"nameCn": "证件样本", //中文姓名
"nameEn": "ZHENG-JIAN", //英文姓名
"permitNumber": "00000000", //证件号码
"permitType": "台湾居民来往大陆通行证", //通行证大标题文字
"sex": "女", //性别
"validPeriod": "2015.06.09-2020.06.08" //有效期限
}
}
}
台湾居民来往大陆通行证反面-识别成功后推送的消息示例字段如下:
{
"eventId": "79d5a560-174d-11ef-b24f-ffe6207502a3",
"timestamp": 1716280699574,
"event": "RtcOcrPushEvent",
"payload": {
"mediaEntity": {
"session_id": "1afe4de2-9ca7-4ab7-9544-e8da676af54e",
"agent_id": "39a4d1e4-4b85-4e69-9fbd-4a8d16e5067c",
"visitor": {
"id": "6cc61b90-66e4-4edd-9277-4d1942e13158",
"nickname": "guma65bz4y7qe77",
"username": "zhangsan"//视频通话中的访客账号(一般是第三方传进来的用户ID)
},
"media_url": "http://yzyf-kefu-ocr.oss-cn-hangzhou.aliyuncs.com/77907/3caf3365-9e5f-41c9-9af0-9d276c5845abMTcxNjI4MDY5NjUxNS5qcGc%3D?Expires=1716284299&OSSAccessKeyId=LTAI5tAYhNz9sWiMUrDXHisc&Signature=ORr%2BZKbAS5VupoX5JwR08aXnC5E%3D",
"create_at": 1716280699574
},
"ocr_type": "TWExitEntryPermitToMainlandBack",
"ocrEntity": {
"cardNum": "00000000" //台湾身份证号码
}
}
}
国际护照(港澳台地区及境外护照)主页-识别成功后推送的消息示例字段如下:
{
"eventId": "85ef7c40-174d-11ef-b210-ed4d3e8b053c",
"timestamp": 1716280719876,
"event": "RtcOcrPushEvent",
"payload": {
"mediaEntity": {
"session_id": "1afe4de2-9ca7-4ab7-9544-e8da676af54e",
"agent_id": "39a4d1e4-4b85-4e69-9fbd-4a8d16e5067c",
"visitor": {
"id": "6cc61b90-66e4-4edd-9277-4d1942e13158",
"nickname": "guma65bz4y7qe77",
"username": "zhangsan"//视频通话中的访客账号(一般是第三方传进来的用户ID)
},
"media_url": "http://yzyf-kefu-ocr.oss-cn-hangzhou.aliyuncs.com/77907/a18298ca-9cf5-4f2b-bcb8-6606fc68c99aMTcxNjI4MDcxODUyMi5qcGc%3D?Expires=1716284319&OSSAccessKeyId=LTAI5tAYhNz9sWiMUrDXHisc&Signature=LUQXmoa4mx0sKprLgmf/1aacBJ0%3D",
"create_at": 1716280719876
},
"ocr_type": "PassportFace",
"ocrEntity": {
"passportType": "P/7",
"surname": "U",
"givenName": "XIAOGUANG",
"passportNumber": "31000000",
"nationality": "SRD",
"nameEn": "DU, XIAOGUANG",
"name": "Tom", //姓名
"sex": "Female", //性别
"birthPlaceEn": "F/QJERUSALEM",
"birthPlace": "",
"country": "ISRAELI",
"validToDate": "2022年08月06日", //证件有效期
"birthDate": "680404",
"birthDateYmd": "1968年04月04日",
"issueDateYmd": "070B2017",
"issuePlaceEn": "",
"issuePlace": "",
"issueAuthorityEn": "06/08/2022 JERUSALEM 0700",
"issueAuthority": "",
"idNumber": "3-1234567-1", //护照号码
"mrzLine1": "PISRDU<<XIAOGUANG<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<",
"mrzLine2": "31000000<1ISR6804042F22080623<1234567<1<<<50"
}
}
}
国际护照(港澳台地区及境外护照)签注页【不识别直接推送】-推送的消息示例字段如下:
{
"eventId": "8b220d40-174d-11ef-bc47-0f2190a26cc8",
"timestamp": 1716280728596,
"event": "RtcOcrPushEvent",
"payload": {
"mediaEntity": {
"session_id": "1afe4de2-9ca7-4ab7-9544-e8da676af54e",
"agent_id": "39a4d1e4-4b85-4e69-9fbd-4a8d16e5067c",
"visitor": {
"id": "6cc61b90-66e4-4edd-9277-4d1942e13158",
"nickname": "guma65bz4y7qe77",
"username": "zhangsan"//视频通话中的访客账号(一般是第三方传进来的用户ID)
},
"media_url": "http://yzyf-kefu-ocr.oss-cn-hangzhou.aliyuncs.com/77907/caaab43c-1cfc-4b93-af6b-4e5e110ada9dMTcxNjI4MDcyODMxMC5qcGc%3D?Expires=1716284328&OSSAccessKeyId=LTAI5tAYhNz9sWiMUrDXHisc&Signature=zq9DmxQNoqnwpBbmxGqPXViKvdA%3D",
"create_at": 1716280728596
},
"ocr_type": "PassportBack"
}
}
其他类型证件-推送的消息示例字段如下(注:此类型的证件不识别直接推送,由业务系统自行存储过滤):
{
"eventId": "8b220d40-174d-11ef-bc47-0f2190a26cc8",
"timestamp": 1716280728596,
"event": "RtcOcrPushEvent",
"payload": {
"mediaEntity": {
"session_id": "1afe4de2-9ca7-4ab7-9544-e8da676af54e",
"agent_id": "39a4d1e4-4b85-4e69-9fbd-4a8d16e5067c",
"visitor": {
"id": "6cc61b90-66e4-4edd-9277-4d1942e13158",
"nickname": "guma65bz4y7qe77",
"username": "zhangsan"//视频通话中的访客账号(一般是第三方传进来的用户ID)
},
"media_url": "http://yzyf-kefu-ocr.oss-cn-hangzhou.aliyuncs.com/77907/caaab43c-1cfc-4b93-af6b-4e5e110ada9dMTcxNjI4MDcyODMxMC5qcGc%3D?Expires=1716284328&OSSAccessKeyId=LTAI5tAYhNz9sWiMUrDXHisc&Signature=zq9DmxQNoqnwpBbmxGqPXViKvdA%3D",
"create_at": 1716280728596
},
"ocr_type": "OTHERS"
}
}
事件名称:RtcVisitorPushEvent
触发条件:视频客服接待app端进线的访客过程中,坐席手动对访客端的视频画面进行单独录制,结束后将触发本事件推送。
注:此功能为增值功能,如有需要,请联系商务。
访客端画面录制完成后推送的消息示例字段如下:
{
"event": "RtcVisitorVideoPushEvent", //事件类型,此处代表访客端单录视频推送事件
"eventId": "9f2fd9f0-142a-11ef-ac3f-a3f0cee74991", //事件ID
"timestamp": 1715935876367, //时间戳
"payload": {
"mediaEntity": {
"session_id": "9b7fc0ef-9518-40a9-afbb-8575b8039937",//视频通话的会话ID
"agent_id": "d1452555-9257-4e7a-87aa-87c748cb783d",//视频通话中的客服ID
"visitor": {
"id": "a0057f9c-541a-4eca-9c0b-9a28fe84787b",//视频通话中的访客ID,客服系统内部使用的唯一ID
"nickname": "我是访客", //视频通话中的访客昵称
"username": "71cfef2b53244521ad90496a76c8a0fd11 91"//视频通话中的访客账号(一般是第三方传进来的用户ID)
},
"playbackUrls": ["https://kefu-sandbox-agora-rtc.oss-cn-hangzhou.aliyuncs.com/kefu/agoravideo/77907/9b7fc0ef951840a9afbb8575b8039937/34980/17116/4b1edfb5a049e5716c1f09bccaf01cf1_9b7fc0ef-9518-40a9-afbb-8575b8 039937_0.mp4?Expires=1715979076&OSSAccessKeyId=STS.NTvVGxHLkqqCmKUN1G2Q3jgWH&Signature=AXPY8%2FeJNWBnjb2BYVWnTUL0PxI%3D&security-token=CAIS8AJ1q6Ft5B2yfSjIr5fDHf3MpZNKxrOob23kqjESPt4fhaL8qjz2IHhFfXlpAOwft%2Fo1m2xZ6fY blo1%2FEsMYHxGZMI4htMkItF%2BsPIOE65O85PlU15b6RTiYAUGrh8OKxQtLi0OEKJmXcFnhunJZ49mTLEePPTGMNZmOluQUDLA%2BVRW5ajxrHcpfIhAYxuYRKXrWM4TGUHeo%2BB2yanBloQ1hk2hyxL2iy8mHkHrkgUb91%2FUeqvaaQPHmTbE1ZMYhCYblgbMrKvuRjX8K0XUQqvcq1 p4j0Czco9SQD2NW5xi7KOfO%2BrVtVlQhN%2FFqQvcY9aGiz6Ik67ODzp6%2FwhJMLPxTVD%2FEX4mmzMHDCOqmMcwwb6rwIXnE3teJMojlO%2FHosKTRpWqgEvhWyR8YYXREIlmyof94Yud4FemJ%2FwmUAgxHMIv0vrQZx6D%2BA3Klbfvn%2F2i2FFHSAQ2mSeBYo6KfEMskNzgoWTcBo 97mNzJ1Mng2wRqAAV4Wby6pVwzAin1vjlXFKnXEqM4%2BpFsu6jhFGH9dZ33awjd8re4WdAtQwkDKAk0eu9tDK0AJYb65oCcQaDB9Iiv29rfKM9ZvriFh%2FiAznlsY%2BnKdvai6e3qlJpF9wrygDBTNAqQSkUz499dhwKBnVY6CLjamqYKmrC%2FHqElAdcvAIAA%3D"],
"create_at ": 1715935876366 //结束事件的发送时间
}
}
}