工单事件推送对接

注意:事件推送请求默认都为post,接收到平台推送后,需要在8s内返回json格式,{"code": "200"},否则都视为推送失败,会有重推逻辑。

一、推送配置

设置->对接中心->工单事件->新建->选择事件类型->填写推送地址->保存

二、创建工单推送

2.1 字段说明

字段名称字段类型字段描述
accountIdstring账户编号
createAgentstring创建座席工号
createTimestring创建时间 例如:"2023-12-05 10:13:05"
eventTypestring推送事件类型:创建工单CreateTicketEvent
eventUniqueIdstring推送事件唯一ID
orderNostring工单编号
templateIdstring流程模型ID
templateNamestring流程模型名称
orderStatusstring工单状态待领取:10,待处理:20,完成:30,终止:40
activityNameString当前流程节点名称
eventTimestring事件时间
dataJSON工单字段内容

2.2 推送示例

{"orderNo":"2023122800007","data":{"文本2":"","文本1":""},"orderId":"752711550362189825","activityName":"处理节点","orderStatus":"20","eventUniqueId":"cc10d97a-00cb-416b-a609-27959c0d79f0","eventType":"CreateTicketEvent","templateId":"752398099581263872","createAgent":"8005","accountId":"1090","activityId":"celldc2478440fbf41f3a1b8e250230a3359","createTime":"2023-12-28 16:19:19","templateName":"工单任一规则的动态表单","eventTime":"2023-12-28 16:19:22"}

三、修改工单推送

3.1 字段说明

字段名称字段类型字段描述
accountIdstring账户编号
createAgentstring创建座席工号
createTimestring创建时间 例如:"2023-12-05 10:13:05"
eventTypestring推送事件类型:修改工单UpdateTicketEvent
eventUniqueIdstring推送事件唯一ID
orderNostring工单编号
templateIdstring流程模型ID
templateNamestring流程模型名称
orderStatusstring工单状态待领取:10,待处理:20,完成:30,终止:40
activityNameString当前流程节点名称
eventTimestring事件时间
dataJSON工单字段内容
currentAgentJSON当前处理座席的信息,包含第三方系统字段:crmId,座席名称:name,座席工号:workId

3.2 推送示例

{"orderNo":"2024080600002","data":{"附件":"","型号":"123333","产品线":""},"orderId":"833165687197548545","activityName":"处理节点","orderStatus":"20","eventUniqueId":"e3e4f538-1595-4adc-aa4d-9068a8b2f31f","eventType":"CreateTicketEvent","templateId":"822622278211620864","currentAgent":{"crmId":"crmid","name":"sss9002~","workId":"9002","master":"691521418588135424"},"createAgent":"sss9002~[9002]","accountId":"1090","activityId":"celldc2478440fbf41f3a1b8e250230a3359","createTime":"2024-08-06 16:35:20","templateName":"自助报修工单","eventTime":"2024-08-06 16:35:23"}

四、提交工单推送

4.1 字段说明

字段名称字段类型字段描述
accountIdstring账户编号
createAgentstring创建座席工号
createTimestring创建时间 例如:"2023-12-05 10:13:05"
eventTypestring推送事件类型:结束工单EndTicketEvent
eventUniqueIdstring推送事件唯一ID
orderNostring工单编号
templateIdstring流程模型ID
templateNamestring流程模型名称
orderStatusstring工单状态待领取:10,待处理:20,完成:30,终止:40
activityNameString当前流程节点名称
eventTimestring事件时间
dataJSON工单字段内容
{"orderNo":"2024042300001","data":{"文本":"66","单选":"咨询"},"orderId":"795191701444227073","activityName":"处理节点1","orderStatus":"20","eventUniqueId":"f875467f-3f28-431e-bbc7-0965d7ce1a88","eventType":"CommitTicketEvent","templateId":"747187117782466560","createAgent":"hhh[8073]","accountId":"1019","activityId":"cell412def6c23734267b0ef064d982ae356","createTime":"2024-04-23 21:40:16","templateName":"多级流转","eventTime":"2024-04-23 21:41:25"}

五、结束工单推送

5.1 字段格式

字段名称字段类型字段描述
accountIdstring账户编号
createAgentstring创建座席工号
createTimestring创建时间 例如:"2023-12-05 10:13:05"
eventTypestring推送事件类型:结束工单EndTicketEvent
eventUniqueIdstring推送事件唯一ID
orderNostring工单编号
templateIdstring流程模型ID
templateNamestring流程模型名称
orderStatusstring工单状态待领取:10,待处理:20,完成:30,终止:40
activityNameString当前流程节点名称
eventTimestring事件时间
dataJSON工单字段内容

5.2 推送示例

{"orderNo":"2023122800007","data":{"文本2":"","文本1":""},"orderId":"752711550362189825","activityName":"处理节点","orderStatus":"20","eventUniqueId":"cc10d97a-00cb-416b-a609-27959c0d79f0","eventType":"EndTicketEvent","templateId":"752398099581263872","createAgent":"8005","accountId":"1090","activityId":"celldc2478440fbf41f3a1b8e250230a3359","createTime":"2023-12-28 16:19:19","templateName":"工单任一规则的动态表单","eventTime":"2023-12-28 16:19:22"}
2024-08-22