webhook消息通知对接技术对接文档

webhook消息体(message)类型及字段说明:

事件回调支持以下事件:

事件名 说明
workorderCreate 创建工单
workorderChange 工单字段变更
workorderComment 工单新回复

对接鉴权文档: webhook消息通知对接鉴权方法

工单相关对象说明:webhook消息通知对接工单相关对象说明

1. 创建工单

“message”示例如下:


{
    "messageType":"workorderCreate",
    "orderId":"12",
    "orderName":"售后工单1",
    "processName":"类型1",
    "orderStatus":3,
    "priority":2,
    "channelName":"渠道名称1",
    "tags":"xx",
    "orderDesc":"工单描述1",
    "attachments":[
        {
            "realName":"附件1",
            "extName":".txt",
            "type":2,
            "fileSize":22333,
            "filePath":"http://www.xxx.com",
            "mediumFilePath":"http://www.xxx.com",
            "thumbnailFilePath":"http://www.xxx.com"
        },
        {
             "realName":"附件1",
            "extName":".txt",
            "type":2,
            "fileSize":22333,
            "filePath":"http://www.xxx.com",
            "mediumFilePath":"http://www.xxx.com",
            "thumbnailFilePath":"http://www.xxx.com"
        }
    ],
    "customerId":"23",
    "customerName":"张三",
    "phone":"13223332325",
    "woOperateDtoList":[
        {
            "operateType":0,
            "userId":54,
            "userName":"李四"    
        },
        {
            "operateType":3,
            "groupId":54,
            "groupName":"李四"
        }
    ],
    "orderExtDtoList":[
         {
            "extendsData": "{}",
            "itemCode": "51d84d2da9ca4185b70053363940817d",
            "itemDesc": "扩展字段1",
            "itemValue": "扩展字段12"
        }, {
            "extendsData": "{\"options\":[{\"key\":1,\"value\":\"选项1\"},{\"key\":2,\"value\":\"选项2\"},{\"key\":3,\"value\":\"选项3\"},{\"key\":4,\"value\":\"选项4\"}]}",
            "itemCode": "faultType",
            "itemDesc": "故障类型",
            "itemValue": "3"
        }
    ]
}

2. 工单字段变更

说明:如果变更之前的值或者变更之后的值为空,这用字符串"-"来占位。

“message”的数据结构如下:

{
  "messageType":"workorderChange",
  "orderId": 工单id,
  "changes": {
    "属性名1": [原值,变更后的值],
    "字段说明":"xx",//如果是下拉项或者单选、多选等字段,对选项进行说明
    "字段名称":"字段中文名称",
  },
 "operateId":操作人ID,
 "operateName":操作人,
 "operateGroupId":操作人组ID,
 "operateGroupName":操作人组,
 "operateTime":操作时间
}

示例如下:

{
  "messageType":"workorderChange",
  "orderId": "12",
  "changes": {
    "字段说明": "{\"options\":[{\"key\":1,\"value\":\"选项1\"},{\"key\":2,\"value\":\"选项2\"},{\"key\":3,\"value\":\"选项3\"},{\"key\":4,\"value\":\"选项4\"}]}",
    "字段名称": "故障类型",    
    "faultType": ["3", "4"]
  },
 "operateId":33,
 "operateName":"张三",
 "operateGroupId":"43",
 "operateGroupName":"张组",
 "operateTime":1601013846000
}

3. 工单新回复

“message”示例如下:

{
  "messageType":"workorderComment",
  "orderId": "12",
  "commentId":"22",
  "commentType":1,
  "attachmentVos":[
    {
    "realName":"附件1.txt",
    "type":2,
    "fileSize":22333,
    "filePath":"http://www.xxx.com",
    "mediumFilePath":"http://www.xxx.com",
    "thumbnailFilePath":"http://www.xxx.com"
    },
    {
     "realName":"附件1.txt",
    "type":2,
    "fileSize":22333,
    "filePath":"http://www.xxx.com",
    "mediumFilePath":"http://www.xxx.com",
    "thumbnailFilePath":"http://www.xxx.com"
    }
   ],
  "content":"快点给我办理",
  "createOpGroupId":"56",
  "createOpGroupName":"李组",
  "createOpId":87,
  "createOpName":"李四",
  "createTime":1601013846000
}

results matching ""

    No results matching ""