1. 使用说明
欢迎使用“AICC” API 服务。您可以直接通过标准化的 HTTPS 接口,快速实现平台与自有系统的集成,管理平台的数据配置、呼叫控制、通话记录等各种资源。我们同时还提供了 开发者工具套件(SDK),对 API接口调用进行了封装。推荐您优先使用 SDK ,可以更方便地进行系统集成。
2. 接口规范
2.1. 调用方式
2.1.1. 系统接入
通信协议
出于安全考虑,平台只提供 HTTPS 协议访问,只支持服务端调用,不支持浏览器访问。
字符编码
请求及返回结果都使用 UTF-8 字符集编码。
接入地址
-
公有云平台:
-
北京平台:https://api-bj.clink.cn
-
上海平台:https://api-sh.clink.cn
-
-
其它平台: 请咨询技术支持
2.1.2. 公共参数
公共请求参数
每个 API 接口都需要以 URL Parameter 的形式携带公共请求参数,对请求进行鉴权。
名称 | 类型 | 是否必须 | 说明 |
---|---|---|---|
AccessKeyId |
String |
是 |
客服云平台颁发给客户端的访问密钥 ID。 |
Expires |
String |
是 |
签名的有效时间(秒),最小值为 1,最大值为 86400(24 小时)。 |
Timestamp |
String |
是 |
签名的时间戳,格式遵循 ISO 8601 标准,按照格式 “ yyyy-MM-ddTHH:mm:ssZ ” 进行格式化。示例:2018-01-01T12:00:00Z表示北京时间2018年01月01日20点00分00秒 |
Signature |
String |
是 |
根据请求参数和访问密钥计算的签名。 |
请求示例
https://api-bj.clink.cn/xxxxxx?
&AccessKeyId=b1fcdc6c62be261cf97b00b25be6a2af
&Expires=60
&Timestamp=2018-09-11T12:02:34Z
&Signature=A4GDuUoWiFj59wQ0Bfq%2FJnB%2BSRU%3D
...
公共返回参数
名称 | 类型 | 说明 |
---|---|---|
requestId |
String |
请求 ID。无论请求 API 服务是否成功,客服云平台都会返回每个请求的唯一 ID 到客户端。 |
2.1.3. 签名机制
签名(Signature)的计算需要使用访问密钥对:AccessKeyId/AccessKeySecret。访问密钥对可以通过登录系统管理后台,在【系统管理-系统对接-接口密钥】模块自助生成。每个访问密钥对可以设置不同的接口访问控制权限。
签名算法
签名(Signature)用于对 API 请求进行身份认证和鉴权,每个请求必须具有唯一的签名。 签名的具体实现是以 AccessKeySecret 为密钥,使用 hmac-sha1 算法对用户请求参数(QueryString)、访问密钥ID(AccessKeyId)、签名有效时间(Expires)、签名当前时间戳(Timestamp)做哈希计算。 具体步骤如下:
1. GET示例:
https://api-bj.clink.cn/cc/list_clients?
AccessKeyId=b1fcdc6c62be261cf97b00b25be6a2af
&Expires=60
&Timestamp=2018-10-12T10:18:12Z
&limit=10
&offset=0
&qno=0000
&cnos[0]=0000
&cnos[1]=0001
拼接要加密的字符串规则:请求方法(GET)+ 请求域名(api-bj.clink.cn)+ 请求参数。其中,访问密钥ID(AccessKeyId)、签名有效时间(Expires)、签名时间戳(Timestamp)分别与上面的公共请求参数相对应,请求参数具体拼接规则为:
-
首先对用户请求参数的 name 进行字典排序
AccessKeyId,Expires,Timestamp,cnos[0],cnos[1],limit,offset,qno
-
通过&符号连接用户请求参数的 name 和 value
AccessKeyId=b1fcdc6c62be261cf97b00b25be6a2af&Expires=60&Timestamp=2018-10-12T10:18:12Z&&cnos[0]=0000&cnos[1]=0001&limit=10&offset=0&qno=0000
-
Timestamp为UTC时间格式,所有请求参数都要进行UrlEncode
2018-10-12T10:18:12Z => 2018-10-12T10%3A18%3A12Z
cnos[0] => cnos%5B0%5D
cnos[1] => cnos%5B1%5D
-
参数urlParam结果
GETapi-bj.clink.cn/cc/list_clients?AccessKeyId=b1fcdc6c62be261cf97b00b25be6a2af&Expires=60&Timestamp=2018-10-12T10%3A18%3A12Z&cnos%5B0%5D=0000&cnos%5B1%5D=0001&limit=10&offset=0&qno=0000
-
计算Signature
Signature = URLEncode(base64(hmac-sha1(AccessKeySecret, urlParam)))
-
最终请求地址
https://api-bj.clink.cn/cc/list_clients?
AccessKeyId=b1fcdc6c62be261cf97b00b25be6a2af
&Expires=60
&Timestamp=2018-10-12T10%3A18%3A12Z
&limit=10
&offset=0
&qno=0000
&cnos%5B0%5D
&cnos%5B1%5D
&Signature=pDS5pcYkw3SqQV0zk312iCaQJpg%3D
2. POST示例:
https://api-bj.clink.cn/cc/online?
AccessKeyId=b1fcdc6c62be261cf97b00b25be6a2af
&Expires=60
&Timestamp=2018-10-12T10:18:12Z
请求体
{
"qno":"0000",
"cnos":["0000","0001"],
"bindTel":"138xxxx8888",
"bindType":1,
"status":1
}
拼接要加密的字符串规则:请求方法(POST)+ 请求域名(api-bj.clink.cn)+ 请求参数(由于POST方法URL中只有公共参数,其他参数通过请求体传递,所以计算签名时只需考虑公共参数)。其中,访问密钥ID(AccessKeyId)、签名有效时间(Expires)、签名时间戳(Timestamp)分别与上面的公共请求参数相对应,请求参数具体拼接规则为:
-
首先对用户请求参数的 name 进行字典排序
AccessKeyId,Expires,Timestamp
-
通过&符号连接用户请求参数的 name 和 value
AccessKeyId=b1fcdc6c62be261cf97b00b25be6a2af&Expires=60&Timestamp=2018-10-12T10:18:12Z
-
Timestamp为UTC时间格式,所有请求参数都要进行URL转码
2018-10-12T10:18:12Z => 2018-10-12T10%3A18%3A12Z
-
参数urlParam结果
POSTapi-bj.clink.cn/cc/online?AccessKeyId=b1fcdc6c62be261cf97b00b25be6a2af&Expires=60&Timestamp=2018-10-12T10%3A18%3A12Z
-
计算Signature
Signature = URLEncode(base64(hmac-sha1(AccessKeySecret, urlParam)))
-
最终请求地址
https://api-bj.clink.cn/cc/online?
AccessKeyId=b1fcdc6c62be261cf97b00b25be6a2af
&Expires=60
&Timestamp=2018-10-12T10%3A18%3A12Z
&Signature=pDS5pcYkw3SqQV0zk312iCaQJpg%3D
|
2.2. 返回结果
API 的返回结果统一为 JSON 格式,使用 UTF-8 字符集编码。为了方便阅读,文中的示例有换行和缩进处理,实际返回结果无换行和缩进处理。
正常返回示例
接口调用成功后,会返回接口调用结果和请求 ID(requestId),HTTP 状态码为 2xx。
示例
{
"requestId": "c4bc3588-29bd-44be-91d4-d846c8eea64f"
}
分页示例:
{
"requestId": "77efcfd8-db8c-4f5c-bdb8-d804cfce7423",
"pageNumber": 1,
"pageSize": 10,
"totalCount": 2,
"objects": [
{
"field1":"value1",
"field2":"value2"
},
{
"field3":"value3",
"field4":"value4"
}
]
}
异常返回示例
接口调用失败或出错后,会返回错误码、错误信息和请求 ID,HTTP 状态码为 4xx 或 5xx。
您可以根据接口错误码和错误信息排查错误。当您无法排查错误时,可以联系我们的技术支持,并提供 requestId。
示例
{
"requestId": "778a71c5-7f62-4bbf-b5c2-383a71227b67",
"error": {
"code": "ResourceNotFound",
"message": "指定的资源不存在"
}
}
2.3. IP白名单
您可以在【系统管理-系统对接-IP白名单】模块中设置对接系统的 IP 白名单,进一步提高数据安全性。如果设置了 IP 白名单,系统只会对指定的 IP 提供 API 服务。系统支持两种 IP 格式:
-
指定 IP 地址,如:10.10.1.1 。
-
指定 IP 地址段,如:10.10.1.* - 10.10.2.* 。
2.4. 错误码说明
错误码分为两种类型:
-
客户端错误:该类型错误由客户端引起,例如无效的请求参数、用户没有权限访问资源等。
-
服务器错误:该类型错误在服务端产生,由系统异常引起,没有固定的类型。
示例
{
"requestId": "842ab2a6-3732-4c03-8ab7-c7f83180fb0c",
"error": {
"code": "ResourceNotFound",
"message": "指定的资源不存在"
}
}
2.4.1. 客户端错误
本节列出了所有操作都可能返回的常见客户端错误。
code | HTTP Status | message |
---|---|---|
AuthFailure |
401 |
身份验证失败。 |
InvalidParameter |
400 |
请求中指定的参数无效,不受支持或无法使用。 返回的消息提供了错误值的说明。 |
MissingParameter |
400 |
请求缺少必需参数。 |
ResourceNotFound |
404 |
请求资源不存在。 |
MissingRequestBody |
400 |
缺少请求body。 |
MissingAuthenticationToken |
400 |
请求必须包含有效的访问密钥ID。 |
HttpMediaTypeNotSupported |
400 |
HttpMediaType不支持,只支持application/json |
HttpRequestMethodNotSupported |
405 |
HTTP方法不支持。 |
UnauthorizedOperation |
403 |
您无权执行此操作。请确认您的密钥ID有此权限 |
UnknownParameter |
400 |
提供了未知或未识别的参数。 |
SignaturesExpired |
403 |
签名过期 |
TooManyRequests |
429 |
请求超限 |
2.4.2. 服务器错误
code | HTTP Status | message |
---|---|---|
InternalError |
500 |
发生内部错误。 重试您的请求,但如果问题仍然存在,请联系技术支持。 |
3. 工单管理接口
3.1. 获取工单记录列表
POST /ticket/list_ticket
请求参数
名称 |
类型 |
是否必需 |
描述 |
id |
Integer |
false |
工单 ID |
customId |
String |
false |
工单自定义编号 |
handleStatus |
Integer |
false |
处理状态 0: 待领取 2: 处理中 4: 已完成 5: 已关闭 9: 待接单。 默认为全部状态 |
creatorId |
Integer |
false |
创建人 ID |
topic |
String |
false |
工单主题 |
workflowId |
Integer |
false |
工单模板 ID, 查询所处任务节点的工单时, 工单模板 ID必传 |
handlerType |
Integer |
false |
处理类型 0: 座席, 1: 队列 |
handlerId |
Integer |
false |
处理人 ID |
level |
Integer |
false |
工单优先级 0: 低, 1: 中, 2: 高, 3: 紧急 (系统默认优先级 可自定义) |
tag |
String |
false |
工单标签名称 |
type |
Integer |
false |
工单类别 1: 预制工作流模板, 2: 人工分配模板 不传为所有类别 |
startTime |
String |
true |
开始时间 按照格式 "yyyy-MM-dd HH:mm:ss" 进行格式化 |
endTime |
String |
true |
结束时间 按照格式 "yyyy-MM-dd HH:mm:ss" 进行格式化 |
closeTimeStart |
String |
false |
工单关闭开始时间 按照格式 "yyyy-MM-dd HH:mm:ss" 进行格式化 |
closeTimeEnd |
String |
false |
工单关闭结束时间 按照格式 "yyyy-MM-dd HH:mm:ss" 进行格式化 |
endTimeStart |
String |
false |
工单完成开始时间 按照格式 "yyyy-MM-dd HH:mm:ss" 进行格式化 |
endTimeEnd |
String |
false |
工单完成结束时间 按照格式 "yyyy-MM-dd HH:mm:ss" 进行格式化 |
updateTimeStart |
String |
false |
更新开始时间 按照格式 "yyyy-MM-dd HH:mm:ss" 进行格式化 |
updateTimeEnd |
String |
false |
更新结束时间 按照格式 "yyyy-MM-dd HH:mm:ss" 进行格式化 |
lastReminderTimeStart |
String |
false |
最近催单开始时间 按照格式 "yyyy-MM-dd" 进行格式化 |
lastReminderTimeEnd |
String |
false |
最近催单结束时间 按照格式 "yyyy-MM-dd" 进行格式化 |
reminderCount |
Integer |
false |
催单次数 |
customerName |
String |
false |
客户名称 |
customerTel |
String |
false |
客户号码 |
customerId |
Integer |
false |
客户资料ID |
taskKey |
String |
false |
节点唯一标识 |
fields |
Map<String, String> |
false |
自定义字段集合 key: 字段 ID, value: 查询值 自定义字段 |
systemFields |
Map<String, String> |
false |
自定义系统属性字段集合 key: 字段 ID, value: 查询值 自定义属性字段 |
source |
Integer |
false |
来源 0: 呼叫中心, 1: 在线咨询, 2: 微信, 3: 人工添加, 4: 小程序, 5: 微博, 6: 电子邮件, 7: app端, 8: 企业微信, 9: 微信客服(独立版), 10: 第三方接入, 11: 接口创建, 12: 企微客服, 14: 抖音企业号, 15: 百度营销, 16: sdk渠道, 17: 自助工单, 18: 访客端APP, 19: 微信客服, 20: 人工导入创建, 21: 企微助手, 22: 自动化任务创建, 23:飞书, 24: 留言节点, 30: 接口创建, 31: 知识库审批, 32: 智能质检, 33: 触发器, 34: 视频客服, 35: 邮件工单, 36: 在线留言, 37: 机器人工单, 38: 小红书 |
offset |
Integer |
false |
偏移量,范围 大于等于0。默认值为 0 |
limit |
Integer |
false |
查询条数,范围 10-100。默认值为 10 |
自定义字段
类型 |
参数说明 |
单行文本(单行、数值、邮箱、IP、电话) |
"单行文本" |
多行文本 |
"多行文本" |
下拉列表 |
传选项的值, "下拉1,下拉2" |
自定义级联 |
如选择 自定义级联A-1 > 自定义级联A-2 > 自定义级联A-3, 则传 "自定义级联A-1,自定义级联A-2,自定义级联A-3" |
地区级联 |
如选择 北京 > 北京市 > 东城区, 则传 "北京,北京市,东城区" |
单选 |
传选项的值, 如 "单选框" |
复选 |
传选项的值, 如 "复选框1,复选框2" |
日期时间 |
"2022-10-25 00:00:00,2022-10-27 00:00:00" |
级联多选 |
如选择 国家》中国 > 四川 > 成都 和 生物 > 动物 > 哺乳动物 > 小狗, 则传 "国家,中国,四川,成都##生物,动物,哺乳动物,小狗" |
自增表格 |
自增表格中的字段上的文本值,如字增表格中的单行文本字段包含“检索内容”,则传 "检索内容",其他字段类型类似 |
自定义属性字段
类型 |
参数说明 |
单行文本(单行、数值、邮箱、IP、电话) |
"单行文本" |
下拉列表 |
传选项的值, "下拉1,下拉2" |
日期时间 |
"2022-10-25 00:00:00,2022-10-27 00:00:00" |
示例
请求URL
https://api-bj.clink.cn/ticket/list_ticket?limit=10&offset=0
&<公共请求参数>
请求示例 请求参数
{
"startTime": "2019-07-01 00:00:00",
"endTime": "2020-08-10 23:59:59",
"closeTimeStart": "2019-07-01 00:00:00",
"closeTimeEnd": "2020-08-10 23:59:59",
"updateTimeStart": "2019-07-01 00:00:00",
"updateTimeEnd": "2020-08-10 23:59:59",
"id": 1,
"handleStatus": 2,
"creatorId": 123,
"topic": "工单主题",
"workflowId": 1,
"handlerType": 0,
"handlerId": 123,
"level": 1,
"tag": "工单标签",
"type": 1,
"lastReminderTimeStart": "2020-07-01",
"lastReminderTimeEnd": "2020-07-02",
"reminderCount": 1,
"customerName": "客户名称",
"customerTel": "180xxxxxxxx",
"taskKey": "UserTask_0cqajg6",
"fields": {
"115948": "自定义字段"
},
"systemFields": {
"115948": "自定义属性字段"
},
"source": 0
}
工单记录字段
名称 |
类型 |
描述 |
id |
integer |
工单 ID |
workflowId |
Integer |
模板 ID |
workflowName |
String |
模板名称 |
type |
Integer |
工单类型 1: 预制工作流工单, 2: 人工分配的工单 |
topic |
String |
工单主题 |
level |
Integer |
工单优先级 0: 低, 1: 中, 2: 高, 3: 紧急 (系统默认优先级 可自定义) |
status |
TicketStatusModel[] |
工单状态 工单状态字段 |
creatorName |
String |
创建人名称 |
creatorId |
Integer |
创建人 ID |
modifierId |
Integer |
修改人 ID |
source |
Integer |
来源 0: 呼叫中心, 1: 在线咨询, 2: 微信, 3: 人工添加, 4: 小程序, 5: 微博, 6: 电子邮件, 7: app端, 8: 企业微信, 9: 微信客服(独立版), 10: 第三方接入, 11: 接口创建, 12: 企微客服, 14: 抖音企业号, 15: 百度营销, 16: sdk渠道, 17: 自助工单, 18: 访客端APP, 19: 微信客服, 20: 人工导入创建, 21: 企微助手, 22: 自动化任务创建, 23:飞书, 24: 留言节点, 30: 接口创建, 31: 知识库审批, 32: 智能质检, 33: 触发器, 34: 视频客服, 35: 邮件工单, 36: 在线留言, 37: 机器人工单, 38: 小红书 |
timeout |
Integer |
是否超时 0: 未超时, 1: 超时 |
endTime |
Date |
结束时间 |
createTime |
Date |
创建时间 |
closeTime |
Date |
关闭时间 |
stateSelected |
String |
当前工单状态(当工单为人工分配的工单时, 该字段有值) |
lastReminderTime |
Date |
最近催单时间 |
reminderCount |
Integer |
催单次数 |
customerId |
Integer |
客户 ID |
customerName |
String |
客户名称 |
customerTel |
String[] |
客户号码 |
customerId |
Integer |
客户 ID |
customerEmail |
String |
客户邮箱 |
customerAddress |
String |
客户地址 |
customerCreatorId |
Integer |
客户资料创建人 ID |
customerCreatorName |
String |
客户资料创建人名称 |
customerModifierId |
Integer |
客户资料修改人, 创建时创建人即是修改人 |
customerModifierName |
String |
客户资料修改人姓名 |
tags |
Tag[] |
工单标签 工单标签字段 |
chatId |
String |
会话记录唯一标识 |
systemForm |
TicketSystemForm |
工单属性表单 工单属性表单字段 |
工单状态字段
名称 |
类型 |
描述 |
handleStatus |
Integer |
处理状态 0: 待领取 2: 处理中 4: 已完成 5: 已关闭 9: 待接单 |
handlerType |
Integer |
处理人类型 0: 座席, 1: 队列 |
handlerName |
String |
处理人名称 |
handlerId |
Integer |
处理人 ID |
taskId |
String |
工作流任务 ID |
formId |
Integer |
表单 ID |
taskName |
String |
任务名称 |
工单标签字段
名称 |
类型 |
描述 |
name |
String |
工单标签名称 |
color |
Integer |
工单标签颜色 1: #ff0000, 2: #00 8000, 3: #0000ff, 4: #ffff00, 5: #00ffff, 6: #800080, 7: #ff6600, 8: #33ff66, 9: #ff0099, 10: #999999。 |
工单属性表单字段
名称 |
类型 |
描述 |
modifierType |
Integer |
修改人类型 |
modifierId |
Integer |
修改人类型 ID |
updateTime |
String |
表单更新时间 |
fields |
TicketHistoryField[] |
字段名称及字段值工单详情起始表单中的字段 |
返回示例
{
"requestId":"4ed8f07d-683e-49b6-8759-c9c3ad08da5e",
"pageNumber":1,
"pageSize":1,
"totalCount":2,
"tickets":[
{
"id":342,
"workflowId":123,
"workflowName":"工单模板名称",
"type":1,
"topic":"工单主题",
"level":1,
"source":0,
"status":[
{
"handleStatus":0,
"handlerType":0,
"handlerName":"正在处理的座席名称",
"handlerId":123432,
"taskId":"1",
"formId":1,
"taskName":"任务名称1",
"addNodePermission": null,
"isAddedNode": null,
"addNodeDesc": null
},
{
"handleStatus":2,
"handlerType":0,
"handlerName":"正在处理的座席名称",
"handlerId":1233432,
"taskId":"2",
"formId":2,
"taskName":"任务名称2",
"addNodePermission": null,
"isAddedNode": null,
"addNodeDesc": null
}
],
"creatorType":1,
"creatorName":"座席名称",
"creatorId":1234,
"modifierType":1,
"modifierId":34123,
"timeout":null,
"endTime":"2020-08-20T11:19:15.249+0800",
"createTime":"2020-08-20T11:19:15.249+0800",
"closeTime":"2020-08-20T11:19:15.249+0800",
"stateSelected":null,
"lastReminderTime":"2020-08-20T11:19:15.249+0800",
"reminderCount":2,
"customerId":173086,
"customerTel":"153xxxxxxxx",
"customerName":"客户名称",
"customerEmail":"xx@qq.com",
"customerAddress":"xxx市xx县",
"customerCreatorId":12345,
"customerCreatorName":"客户资料名称",
"customerModifierId":321,
"customerModifierName":"客户资料修改人名称",
"tags":[
{
"name":"标签1",
"color":1
},
{
"name":"标签2",
"color":2
}
],
"systemForm":{
"modifierType":0,
"modifierId":161175,
"fields":[
{
"id":1,
"type":1,
"name":"单行文本",
"value":"文本内容"
},
{
"id":2,
"type":11,
"name":"日期时间",
"value":"2022/07/10 00:15:19"
},
{
"id": 163488,
"type": 105,
"name": "属性员工字段",
"value": "20849",
"valueExt": {
"uno": "952709",
"name": "zhangsan",
"id": 20849,
"username": "zhangsan"
},
"children": null
}
],
"updateTime":1657383326846
}
},
{
"id":3422,
"workflowId":1232,
"workflowName":"工单模板名称1",
"type":2,
"topic":"工单主题1",
"level":2,
"source":0,
"status":[
{
"handleStatus":0,
"handlerType":0,
"handlerName":"正在处理的座席名称",
"handlerId":123432,
"taskId":"1",
"formId":1,
"taskName":"任务名称1",
"addNodePermission": null,
"isAddedNode": null,
"addNodeDesc": null
},
{
"handleStatus":2,
"handlerType":0,
"handlerName":"正在处理的座席名称",
"handlerId":1233432,
"taskId":"2",
"formId":2,
"taskName":"任务名称2",
"addNodePermission": null,
"isAddedNode": null,
"addNodeDesc": null
}
],
"creatorType":1,
"creatorName":"座席名称",
"creatorId":1234,
"modifierType":1,
"modifierId":34123,
"timeout":null,
"endTime":"2020-08-20T11:19:15.249+0800",
"createTime":"2020-08-20T11:19:15.249+0800",
"closeTime":"2020-08-20T11:19:15.249+0800",
"stateSelected":"正在处理中",
"lastReminderTime":"2020-08-20T11:19:15.249+0800",
"reminderCount":2,
"customerId":173086,
"customerTel":"153xxxxxxxx",
"customerName":"客户名称",
"customerEmail":"aa@qq.com",
"customerAddress":"xxx市xx县",
"customerCreatorId":12345,
"customerCreatorName":"客户资料名称",
"customerModifierId":321,
"customerModifierName":"客户资料修改人名称",
"tags":[
{
"name":"标签1",
"color":1
},
{
"name":"标签2",
"color":2
}
],
"systemForm":{
"modifierType":0,
"modifierId":161175,
"fields":[
{
"id":1,
"type":1,
"name":"单行文本",
"value":"文本内容"
},
{
"id":2,
"type":11,
"name":"日期时间",
"value":"2022/07/10 00:15:19"
},
{
"id": 163488,
"type": 105,
"name": "属性员工字段",
"value": "20849",
"valueExt": {
"uno": "952709",
"name": "zhangsan",
"id": 20849,
"username": "zhangsan"
},
"children": null
}
],
"updateTime":1657383326846
}
}
]
}
3.2. 获取工单详情
GET /ticket/get_ticket_detail
请求参数
名称 |
类型 |
是否必需 |
描述 |
id |
Integer |
false |
工单 ID (id 和 externalId 两者必有一个) |
externalId |
String |
false |
外部工单 ID (id 和 externalId 两者必有一个) |
includeSaveForm |
Integer |
false |
forms中是否包含保存、存草稿表单信息 (1: 包含; 0/null: 不包含) |
返回参数
名称 |
类型 |
描述 |
id |
Integer |
工单 ID |
workflowId |
Integer |
工作流 ID |
workflowName |
String |
工作流名称 |
workflowCategoryId |
Integer |
模板类别id |
workflowCategoryName |
String |
模板类别名称 |
topic |
String |
工单主题 |
level |
Integer |
工单优先级 0: 低, 1: 中, 2: 高, 3: 紧急 (系统默认优先级 可自定义) |
status |
TicketStatusModel[] |
工单系统状态 工单详情状态字段 |
state |
String[] |
自定义状态数组(只有人工分配的工单有自定义状态) |
type |
Integer |
模板类型 1: 预制流模板, 2: 人工分配模板 |
creatorType |
Integer |
创建人类型 0: 座席, 1: 管理员 |
creatorId |
Integer |
创建人 ID |
creatorName |
String |
创建人名称 |
modifierType |
Integer |
修改人类型 0: 座席, 1: 管理员 |
modifierId |
Integer |
修改人 ID |
modifierName |
String |
修改人名称 |
focus |
ClientAllModel[] |
关注人数组集合 工单关注人字段 |
stateSelected |
String |
当前工单状态(只有人工分配的工单有该状态) |
source |
Integer |
来源 0: 呼叫中心, 1: 在线咨询, 2: 微信, 3: 人工添加, 4: 小程序, 5: 微博, 6: 电子邮件, 7: app端, 8: 企业微信, 9: 微信客服(独立版), 10: 第三方接入, 11: 接口创建, 12: 企微客服, 14: 抖音企业号, 15: 百度营销, 16: sdk渠道, 17: 自助工单, 18: 访客端APP, 19: 微信客服, 20: 人工导入创建, 21: 企微助手, 22: 自动化任务创建, 23:飞书, 24: 留言节点, 30: 接口创建, 31: 知识库审批, 32: 智能质检, 33: 触发器, 34: 视频客服, 35: 邮件工单, 36: 在线留言, 37: 机器人工单, 38: 小红书 |
endTime |
Date |
结束时间 |
createTime |
Date |
创建时间 |
updateTime |
Date |
更新时间 |
customerId |
Integer |
客户 ID |
customerName |
String |
客户名称 |
customerTel |
String[] |
客户电话 |
tags |
Tag[] |
工单标签数组 工单详情标签字段 |
comments |
TicketCommentSearchResultModel[] |
评论人数组 工单详情评论人字段 |
startForm |
TicketHistoryForm |
起始表单 工单详情表单字段 |
operationLogs |
TicketOperationLogModel[] |
工单操作日志 工单操作日志字段 |
operationLogsNew |
OperationLogChangesNewModel[] |
工单操作日志v2 工单操作日志v2字段 |
callId |
String |
通话记录唯一标识 |
chatId |
String |
会话记录唯一标识 |
closeTime |
Date |
关闭时间 |
forms |
TicketHistoryForm[] |
历史表单 工单详情表单字段 |
systemForm |
TicketSystemForm |
工单属性表单 工单属性表单字段 |
reminderLogs |
ReminderLogModel[] |
催单记录 催单记录字段 |
工单详情状态字段
名称 |
类型 |
描述 |
handleStatus |
Integer |
处理状态 0: 待领取 2: 处理中 4: 已完成 5: 已关闭 9: 待接单 |
handlerType |
Integer |
处理人类型 0: 座席 1: 队列 |
handlerName |
String |
处理人名称 |
handlerId |
Integer |
处理人 ID |
taskId |
String |
任务 ID |
taskName |
String |
任务名称 |
formId |
Integer |
表单 ID |
工单关注人字段
名称 |
类型 |
描述 |
id |
Integer |
关注人 Id |
cno |
String |
座席号 |
name |
String |
座席名称 |
type |
Integer |
座席类型 1: 全渠道, 2: 呼叫中心, 3: 在线客服 |
工单详情标签字段
名称 |
类型 |
描述 |
name |
String |
工单标签名称 |
color |
Integer |
工单标签颜色 1: #ff0000, 2: #00 8000, 3: #0000ff, 4: #ffff00, 5: #00ffff, 6: #800080, 7: #ff6600, 8: #33ff66, 9: #ff0099, 10: #999999。 |
工单详情评论人字段
名称 |
类型 |
描述 |
operatorType |
Integer |
评论人/操作人类型 0: 座席、1: 管理员 |
operator |
Integer |
评论人 ID |
operatorName |
String |
评论人/操作人名称 |
avatar |
String |
评论人的头像链接地址 |
content |
String |
评论内容 |
createTime |
Date |
评论时间 |
fileValue |
String |
附件相关信息 |
工单详情表单字段
名称 |
类型 |
描述 |
formId |
Integer |
表单ID |
formName |
String |
表单名称 |
operator |
Integer |
审核人 |
operatorId |
Integer |
操作人ID |
operationType |
Integer |
操作类型 1: 保存; null: 存草稿或提交 |
taskName |
String |
当前节点的名称 |
nodeBeginTime |
Date |
节点流入时间 |
nodeEndTime |
Date |
节点完成时间 |
taskKey |
String |
节点唯一标识 |
taskId |
String |
流转过程中表单的唯一标识 |
fields |
TicketHistoryField[] |
字段名称及字段值工单详情起始表单中的字段 |
工单详情起始表单中的字段
名称 |
类型 |
描述 |
id |
Integer |
字段 Id |
type |
Integer |
字段类型。 1: 单行文本, 2: 数值, 3: 邮件, 4: IP地址, 5: 多行文本, 6: 下拉框, 7: 自定义级联, 8: 地区级联, 9: 单选框, 10: 复选框, 11: 日期时间, 12: 日期, 13: 时间, 14: 文件, 15: 签名, 16: 定位, 17:自增表格, 18: 级联多选, 99: 子表单, 100: 手机号码, 非自定字段添加时的可选类型, 用于手机号码格式校验的转义类型, 110:富文本 |
name |
String |
字段名称 |
value |
String |
字段值 |
valueExt |
Object |
字段值的扩展信息(目前仅对于员工类型字段,此字段有返回值) |
children |
List<TicketHistoryField> |
子表单字段 |
工单操作日志字段
名称 |
类型 |
描述 |
operatorName |
String |
操作人名称 |
avatar |
String |
操作人头像 |
propertyChanges |
String |
属性变更(属性名:属性值) |
createTime |
Date |
创建时间 |
remark |
String |
备注 |
actionSource |
String |
操作类型 0: 接口调用, 1: 触发器, 2: 自助工单, 3: APP, 4: 自动化任务 |
工单操作日志v2字段
名称 |
类型 |
描述 |
operatorId |
Integer |
操作人ID |
operatorType |
Integer |
操作人类型 |
operatorName |
String |
操作人名称 |
type |
Integer |
操作人类型 工单操作日志类型 |
content |
String |
日志对象JSON字符串 |
createTime |
Date |
创建时间 |
工单操作日志类型
值 |
描述 |
1 |
创建 |
2 |
编辑 |
3 |
领取 |
4 |
关联 |
5 |
保存 |
6 |
分配 |
7 |
提交 |
8 |
完成 |
9 |
关闭 |
10 |
退回 |
11 |
撤回 |
12 |
重启 |
13 |
跳转 |
14 |
加签 |
15 |
共享 |
16 |
取消共享 |
17 |
满意度评价 |
18 |
取消关联 |
19 |
关注人 |
20 |
优先级 |
21 |
状态 |
22 |
标签 |
23 |
客户关联 |
24 |
主题变更 |
25 |
增加评论 |
26 |
字段变更 |
27 |
邮件组件发送 |
28 |
其他操作 |
29 |
存草稿 |
30 |
完成人变更 |
31 |
客户取消关联 |
32 |
sla暂停 |
33 |
编辑备注 |
34 |
删除备注 |
35 |
转回原处理人 |
36 |
高级slas手动暂停 |
37 |
高级sla手动暂停计时恢复 |
38 |
高级sla开始 |
39 |
高级sla结束 |
40 |
高级sla条件暂停 |
41 |
高级sla条件恢复 |
42 |
撤销 |
43 |
高级sla延长时效 |
44 |
工单关联通话 |
45 |
工单取消关联通话 |
50 |
工单接单 |
51 |
工单被取消关联 |
52 |
工单被关联 |
53 |
触发器共享工单 |
54 |
替班工单分配 |
55 |
批量完成 |
56 |
批量跳转 |
表单和字段的关联关系
名称 |
类型 |
描述 |
id |
Integer |
表单和字段的关联关系 ID |
formId |
Integer |
表单 ID |
fieldId |
Integer |
字段 ID |
priority |
Integer |
优先级 0: 低, 1: 中, 2: 高, 3: 紧急 |
required |
Integer |
是否必传 0: 是, 1: 否 |
unique |
Integer |
是否唯一 0: 是, 1: 否 |
clientReadonly |
Integer |
是否座席只读 0: 是, 1: 否 |
clientHidden |
Integer |
普通座席是否只读 0: 是, 1: 否 |
searchDisplay |
Integer |
查询是否展示 0: 是, 1: 否 |
hidden |
Integer |
是否隐藏 0: 是, 1: 否 |
createTime |
Date |
创建时间 |
group |
String |
分类名称 |
formType |
Integer |
表单类型 null: 主表单, 1: 子表单 |
formName |
String |
子表单名称 |
childrenFormGroupFields |
Map<String, List<FormField>> |
子表单属性信息 {分类名称:字段属性集合} |
childrenFormId |
Integer |
子表单formId |
field |
Field |
关联的属性 |
type |
Integer |
类别 |
工单自定义字段
名称 |
类型 |
描述 |
id |
Integer |
表单和字段的关联关系 ID |
key |
String |
字段键值 |
name |
String |
属性名称 |
type |
Integer |
类别 |
defaults |
Integer |
是否系统默认 0: 否, 1: 是 |
property |
String |
属性参数 |
searchDisplay |
Integer |
查询是否展示 0: 否, 1: 是 |
childrenFormGroupFields |
Map<String, List<FormField>> |
子表单属性信息 {分类名称:字段属性集合} |
checked |
Integer |
是否被选中 0: 未选中, 1: 选中 |
催单记录字段
名称 |
类型 |
描述 |
reminderClient |
Integer |
催单人ID |
reminderClientName |
String |
催单人姓名 |
reminderClientUserName |
String |
催单人用户名 |
reminderClientCno |
String |
催单人工号 |
reminderTime |
Date |
催单人时间 |
reminderRemark |
String |
催单人备注 |
reminderAttachmentModelList |
ReminderAttachmentModel[] |
催单附件列表催单附件字段 |
催单附件字段
名称 |
类型 |
描述 |
attachmentKey |
String |
催单附件OssKey |
attachmentUrl |
String |
催单附件URL(7天有效) |
返回示例
{
"requestId":"4ed8f07d-683e-49b6-8759-c9c3ad08da5e",
"ticketDetail":[
{
"id":342,
"workflowId":1243,
"workflowName":"模板名称1",
"topic":"工单主题",
"level":1,
"source":0,
"status":[
{
"handleStatus":2,
"handlerType":0,
"handlerName":"正在处理的座席名称",
"handlerId":123432,
"taskId":"7eed0408-b0c9-11ec-9115-debcb9a47063",
"taskName":"任务节点名称",
"formId":123
},
{
"handleStatus":2,
"handlerType":1,
"handlerName":"正在处理的队列名称",
"handlerId":1233432,
"taskId":"7eed0408-b0c9-11ec-9115-debcb9a47063",
"taskName":"任务节点名称",
"formId":123
}
],
"creatorType":1,
"creatorId":1234,
"creatorName":"创建人1",
"modifierType":1,
"modifierId":1234,
"modifierName":"修改人名称",
"focus":[
{
"id":111,
"cno":"123",
"name":"关注人1",
"type":1
},
{
"id":122,
"cno":"1234",
"name":"关注人2",
"type":1
}
],
"stateSelected":"人工工单状态",
"endTime":"2020-08-20T11:19:15.249+0800",
"createTime":"2020-08-20T11:19:15.249+0800",
"updateTime":"2020-08-20T11:19:15.249+0800",
"customerId":123,
"customerName":"客户名称",
"customerTel":"156xxxxxxxx",
"tags":[
{
"name":"标签1",
"color":1
},
{
"name":"标签2",
"color":2
}
],
"comments":[
{
"operatorType":0,
"operator":111,
"operatorName":"评论人1",
"avatar":"头像地址",
"content":"评论内容",
"createTime":"2020-08-20T11:19:15.249+0800"
},
{
"operatorType":0,
"operator":122,
"operatorName":"评论人2",
"avatar":"头像地址",
"content":"评论内容2",
"createTime":"2020-08-20T11:19:15.249+0800"
}
],
"startForm":{
"formId":1,
"formName":"表单名称",
"operator":123,
"operatorId":1233,
"taskName":"当前节点名称",
"nodeBeginTime":"2020-08-20T11:19:15.249+0800",
"nodeEndTime":"2020-08-20T11:19:15.249+0800",
"taskKey":"节点唯一标识",
"fields":[
{
"id":1,
"type":1,
"name":"字段名称",
"value":"value值",
"children":null
},
{
"id": 162589,
"type": 105,
"name": "员工字段",
"value": "1_1035113",
"valueExt": {
"qno": "1010",
"name": "员工组",
"id": 1035113
},
"children": null
},
{
"id":2,
"type":99,
"name":"字段名称",
"value":"value值",
"children":[
{
"id":1,
"type":1,
"name":"字段名称",
"value":"value值",
"children":null
},
{
"id":2,
"type":2,
"name":"字段名称",
"value":"value值",
"children":null
},
{
"id": 3,
"type": 17,
"name": "自增表格",
"value": "{\"head\":[{\"name\":\"单行文本\",\"id\":\"98847\"},{\"name\":\"多行文本\",\"id\":\"98848\"}],\"data\":[{\"98847\":\"单行文本字段值\",\"98848\":\"多行文本字段值\"}],\"invalid\":false}",
"children": null
},
{
"id": 162589,
"type": 105,
"name": "员工字段",
"value": "1_1035113",
"valueExt": {
"qno": "1010",
"name": "员工组",
"id": 1035113
},
"children": null
}
]
}
]
},
"operationLogs":[
{
"operatorName":"张三(8358)",
"avatar":"头像地址",
"createTime":"2020-09-04T18:36:34.190+0800",
"propertyChanges":"{'处理座席':'张三(8358)'}",
"remark":null,
"actionSource":2
}
],
"operationLogsNew": [
{
"operatorId": 1030042,
"operatorType": 0,
"operatorName": "wangli(666666)",
"type": 1,
"content": "{\"fields\":[{\"curFieldValue\":\"紧急\",\"fieldId\":120178,\"fieldName\":\"优先级\",\"fieldType\":1},{\"curFieldValue\":\"处理中\",\"fieldName\":\"工单状态\"},{\"curFieldValue\":\"cy1\",\"fieldId\":156199,\"fieldName\":\"cy下拉\",\"fieldType\":6}]}",
"createTime": 1689839858815
},
{
"operatorId": 1030042,
"operatorType": 0,
"operatorName": "wangli(666666)",
"type": 2,
"content": "{\"fields\":[{\"curFieldValue\":\"cy2\",\"fieldId\":156199,\"fieldName\":\"cy下拉\",\"fieldType\":6,\"orgFieldValue\":\"cy1\"}],\"nodeName\":\"开始\"}",
"createTime": 1689839872929
}
],
"state":[
"状态1",
"状态2"
],
"type":2,
"callId":"12321432254dsafas",
"closeTime":"2020-08-20T11:19:15.249+0800",
"forms":[
{
"formId":1,
"formName":"表单名称",
"operator":123,
"operatorId":1233,
"taskName":"当前节点名称",
"nodeBeginTime":"2020-08-20T11:19:15.249+0800",
"nodeEndTime":"2020-08-20T11:19:15.249+0800",
"taskKey":"节点唯一标识",
"fields":[
{
"id":1,
"type":1,
"name":"字段名称",
"value":"value值",
"children":null
},
{
"id": 162589,
"type": 105,
"name": "员工字段",
"value": "1_1035113",
"valueExt": {
"qno": "1010",
"name": "员工组",
"id": 1035113
},
"children": null
},
{
"id":2,
"type":99,
"name":"字段名称",
"value":"value值",
"children":[
{
"id":1,
"type":1,
"name":"字段名称",
"value":"value值",
"children":null
},
{
"id":2,
"type":2,
"name":"字段名称",
"value":"value值",
"children":null
},
{
"id": 162589,
"type": 105,
"name": "员工字段",
"value": "1_1035113",
"valueExt": {
"qno": "1010",
"name": "员工组",
"id": 1035113
},
"children": null
}
]
}, {
"id": 3,
"type": 17,
"name": "自增表格",
"value": "{\"head\":[{\"name\":\"单行文本\",\"id\":\"98847\"},{\"name\":\"多行文本\",\"id\":\"98848\"}],\"data\":[{\"98847\":\"单行文本字段值\",\"98848\":\"多行文本字段值\"}],\"invalid\":false}",
"children": null
}
]
}
],
"systemForm":{
"modifierType":0,
"modifierId":161175,
"fields":[
{
"id":1,
"type":1,
"name":"单行文本",
"value":"文本内容"
},
{
"id":2,
"type":11,
"name":"日期时间",
"value":"2022/07/10 00:15:19"
},
{
"id": 163488,
"type": 105,
"name": "属性员工字段",
"value": "20849",
"valueExt": {
"uno": "952709",
"name": "zhangsan",
"id": 20849,
"username": "zhangsan"
},
"children": null
}
],
"updateTime":1657383326846
},
"reminderLogs": [{
"reminderClient": 1001612,
"reminderClientName": "小张",
"reminderClientUserName": "xiaozhang",
"reminderClientCno": "03784",
"reminderTime": 1747119570466,
"reminderRemark": "小朋友",
"reminderAttachmentModelList": [{
"attachmentKey": "ticket/20250513/8001678/f561ed52-f105-461f-bcd9-666c2e073fcd.xlsx",
"attachmentUrl": "https://a-bucket.oss-cn-beijing.aliyuncs.com/ticket/20250513/8001678/f561ed52-f105-461f-bcd9-666c2e073fcd.xlsx?response-content-disposition=attachment%3B%20filename%3Db90952af-a40c-46a9-945e-ece978&x-oss-date=20250514T090218Z&x-oss-expires=604799&x-oss-signature-version=OSS4-HMAC-SHA256&x-oss-credential=LTAI5tMQpqm2YTNUhXhWvDKd%2F20250514%2Fcn-beijing%2Foss%2Faliyun_v4_request&x-oss-signature=3e7390ba76fa3333ca76a86900052bde0c4c7812f3604c04c99263a88effabcb"
},{
"attachmentKey": "ticket/20250513/8001678/f0c98495-ffbd-44ad-a52b-78749215a9f7.xlsx",
"attachmentUrl": "https://a-bucket.oss-cn-beijing.aliyuncs.com/ticket/20250513/8001678/f0c98495-ffbd-44ad-a52b-78749215a9f7.xlsx?response-content-disposition=attachment%3B%20filename%3Dbccf6d7d-8009-474a-8d3b-f20b16&x-oss-date=20250514T090218Z&x-oss-expires=604799&x-oss-signature-version=OSS4-HMAC-SHA256&x-oss-credential=LTAI5tMQpqm2YTNUhXhWvDKd%2F20250514%2Fcn-beijing%2Foss%2Faliyun_v4_request&x-oss-signature=0f243c22e7e3c13aac9b5d425e7effea843d852595a5cc75a1851c5d1959c1b5"
}
]
}]
}
]
}
3.3. 获取工单模板类别
GET /ticket/list_ticket_category
请求参数
无
返回参数
名称 |
类型 |
描述 |
id |
Integer |
工单模板类别 ID |
name |
String |
工单模板类别名称 |
返回示例
{
"requestId":"4ed8f07d-683e-49b6-8759-c9c3ad08da5e",
"categoryModels":[
{
"id":342,
"name":"工单模板类别名称1"
},
{
"id":3422,
"name":"工单模板类别名称2"
}
]
}
3.4. 获取工单模板列表
GET /ticket/list_ticket_workflow
示例
请求URL
https://api-bj.clink.cn/ticket/list_ticket_workflow?id=1&category=1&name=模板名称&limit=10&offset=0
&<公共请求参数>
请求参数
名称 |
类型 |
是否必需 |
描述 |
id |
Integer |
false |
工单模板 ID |
category |
Integer |
false |
工单模板类别 ID |
name |
String |
false |
工单模板名称 |
offset |
Integer |
false |
偏移量,范围 大于等于0。默认值为 0 |
limit |
Integer |
false |
查询条数,范围 10-100。默认值为 10 |
返回参数
名称 |
类型 |
描述 |
id |
Integer |
工单模板 ID |
name |
String |
工单模板名称 |
type |
Integer |
工单模板类型 1: 预制工作流模板, 2: 人工分配模板 |
status |
Integer |
工单模板状态 0: 停用, 1: 启用 |
state |
List<String> |
工单自定义状态集合 |
categoryId |
Integer |
工单模板类别 ID |
categoryName |
String |
工单模板类别名称 |
form |
TicketFormModel |
工单模板表单实体对象 表单实体对象详情 |
createTime |
Date |
工单模板创建时间 |
updateTime |
Date |
工单模板更新时间 |
sysFormFields |
SysFormField[] |
工单模板启用的属性表单 属性表单字实体对象详情 |
表单实体对象详情
名称 |
类型 |
描述 |
id |
Integer |
表单 ID |
name |
String |
表单名称 |
taskKey |
String |
节点 key |
taskId |
String |
工作流转中表单的唯一标识 |
taskName |
String |
节点名称 |
fields |
List<Field> |
表单中保存的字段集合 表单字段实体对象详情 |
childForms |
List<OpenapiFormModel> |
子表单列表 子表单实体对象详情&子表单字段实体对象详情 |
表单字段实体对象详情
名称 |
类型 |
描述 |
id |
Integer |
字段 ID (当 type=99 时存子表单 ID) |
name |
String |
字段名称 (当 type=99 时存子表单名称) |
property |
String |
对应不同的类型的字段中的值具体见: property字段说明 |
value |
String |
字段值 (当 type=99 时存子表单类别名称) |
type |
Integer |
字段类型 取值范围如下: 1: 单行文本, 2: 数值, 3: 邮件, 4: IP地址, 5: 多行文本, 6: 下拉框, 7: 自定义级联, 8: 地区级联, 9: 单选框, 10: 复选框, 11: 日期和时间, 12: 日期, 13: 时间, 14: 文件, 15: 签名, 16: 定位, 17:自增表格, 18: 级联多选, 99: 子表单, 110:富文本 |
required |
Integer |
该字段是否必填 0: 非必填, 1: 必填 |
children |
List<Field> |
子表单字段(此字段未设置返回值,请勿用此字段) |
属性表单字实体对象详情
名称 |
类型 |
描述 |
id |
Integer |
字段 ID (当 type=99 时存子表单 ID) |
name |
String |
字段名称 (当 type=99 时存子表单名称) |
permission |
Integer |
字段权限 取值范围如下: 插件页面字段权限(1:隐藏、2:只读、3:选填、4:必填) 字段权限 1-必填, 2-选填,3-只读,4-隐藏 |
externalCustomerVisible |
Integer |
外部客户权限 (字段是否在自主工单详情展示),默认可见 取值范围如下: 0/null:不可见 1:可见 |
property字段说明
下拉列表的 property
[
{
"name":"选项1",
"selected":1
}
]
自定义级联和地区级联的 property
[
{
"title":"北京市",
"selected":1,
"options":[
{
"title":"北京市",
"selected":1,
"options":[
{
"title":"大兴区",
"selected":1
},
{
"title":"朝阳区",
"selected":0
}
]
}
]
},
{
"title":"河北省",
"selected":0,
"options":[
{
"title":"石家庄",
"selected":1
},
{
"title":"邢台",
"selected":0
}
]
}
]
单选框和复选框的 property
[
{
"name":"选择1",
"selected":0
},
{
"name":"选择2",
"selected":1
}
]
返回示例
{
"requestId":"4ed8f07d-683e-49b6-8759-c9c3ad08da5e",
"pageNumber":1,
"pageSize":15,
"totalCount":1,
"workflows":[
{
"id":342,
"name":"工单模板名称1",
"type":2,
"status":1,
"state":[
"自定义状态1",
"自定义状态2",
"自定义状态3"
],
"categoryId":1,
"categoryName":"工单模板类别名称1",
"createTime":"2020-08-20T11:19:15.249+0800",
"updateTime":"2020-08-20T11:19:15.249+0800",
"form":{
"id":1,
"name":"表单名称",
"taskKey":null,
"taskName":null,
"fields":[
{
"id":1,
"name":"单行文本无限制",
"type":1,
"property":null,
"value":null,
"required":0
},
{
"id":2,
"name":"数值",
"type":2,
"property":null,
"value":null,
"required":0
},
{
"id":3,
"name":"邮箱",
"type":3,
"property":null,
"value":null,
"required":1
},
{
"id":4,
"name":"IP地址",
"type":4,
"property":null,
"value":null,
"required":0
},
{
"id":5,
"name":"多行文本",
"type":5,
"property":null,
"value":null,
"required":0
},
{
"id":6,
"name":"下拉框",
"type":6,
"property":"[{\"name\":\"通过\",\"selected\":0},{\"name\":\"不通过\",\"selected\":0}]",
"value":null,
"required":0
},
{
"id":7,
"name":"自定义级联",
"type":7,
"property":"[{\"title\":\"1\",\"options\":[{\"title\":\"2\",\"options\":[{\"title\":\"3\"}]}]}]",
"value":null,
"required":0
},
{
"id":8,
"name":"地区级联",
"type":8,
"property":"[{\"title\":\"安徽省\",\"options\":[{\"title\":\"合肥市\",\"options\":[{\"title\":\"包河区\"}]}]}]",
"value":null,
"required":0
},
{
"id":9,
"name":"单选框",
"type":9,
"property":"[{\"name\":\"通过\",\"selected\":1},{\"name\":\"不通过\",\"selected\":0}]",
"value":null,
"required":0
},
{
"id":10,
"name":"复选框",
"type":10,
"property":"[{\"name\":\"选项1\",\"selected\":0},{\"name\":\"选项2\",\"selected\":0}]",
"value":null,
"required":0
},
{
"id":11,
"name":"日期和时间",
"type":11,
"property":null,
"value":null,
"required":0
},
{
"id":12,
"name":"日期",
"type":12,
"property":null,
"value":null,
"required":0
},
{
"id":13,
"name":"时间",
"type":13,
"property":null,
"value":null,
"required":0
},
{
"id":14,
"name":"文件",
"type":14,
"property":null,
"value":null,
"required":0
}
]
},
"sysFormFields":[
{
"id":1,
"name":"工单主题",
"permission": 2,
"externalCustomerVisible": 1
},
{
"id":2,
"name":"属性查找",
"permission": 2,
"externalCustomerVisible": 1
},
{
"id":3,
"name":"状态",
"permission": 2,
"externalCustomerVisible": 1
}
]
}
]
}
3.5. 工单创建接口
POST /ticket/save_ticket
Content-Type multipart/form-data
请求参数
名称 |
类型 |
是否必需 |
描述 |
model |
String |
true |
请求实体对象JSON字符串 创建工单的model 参数详情 |
附件自定义字段ID |
File |
false |
附件类型自定义字段ID, 如果有多个附件字段直接追加即可 |
创建工单的model 参数详情
名称 |
类型 |
是否必需 |
描述 |
workflowId |
Integer |
true |
工单模板 ID |
customerId |
Integer |
false |
客户资料 ID |
topic |
String |
false |
工单主题 默认值为“无” |
level |
Integer |
false |
工单优先级 0: 低, 1: 中, 2: 高, 3: 紧急 默认为0 |
creatorId |
String |
false |
创建人 ID, 此处传座席 ID, 如不传值, 默认外部用户, ID为 -2 |
creatorIdType |
Integer |
false |
创建人类型 1: 用户id, 2: 用户手机号, 3: 用户名, 4: 用户工号, 5: sso标识, 如不传值默认为1 |
handlerType |
Integer |
true |
处理类型 0: 座席, 1: 队列 (预置流工单非必填) |
handlerId |
String |
true |
处理人 ID (预置流工单非必填) |
handlerIdType |
Integer |
false |
处理人类型 1: 用户id, 2: 用户手机号, 3: 用户名, 4: 用户工号, 5: sso标识, 如不传值默认为1 |
focus |
String[] |
false |
关注人 ID数组 |
focusIdType |
Integer |
false |
关注人类型 1: 用户id, 2: 用户手机号, 3: 用户名, 4: 用户工号, 5: sso标识, 如不传值默认为1 |
tags |
Tag[] |
false |
工单标签数组 工单详情标签字段 |
relateTicketId |
Integer[] |
false |
关联的工单 ID 数组 |
stateSelected |
String |
false |
当前工单状态(若是预制流类型的工单, 该状态可不填, 人工类型的工单, 该状态必填) |
externalId |
String |
false |
外部工单 ID (第三方用户可根据该 Id 进行更新或者查询) |
form |
TicketFormModel |
true |
表单数据 表单实体对象详情 |
createTime |
Date |
false |
创建时间 默认为当前时间 |
close |
Integer |
false |
是否创建一个关闭的工单, 人工类型的工单生效 0: 否, 1: 是 默认为0 |
customizeSystemFields |
Field[] |
false |
工单属性表单字段集合 表单字段实体对象详情 |
callId |
String |
false |
通话唯一标识 与会话唯一标识不可同时存在 |
chatId |
String |
false |
会话唯一标识 与通话唯一标识不可同时存在 |
chatStartTime |
Long |
false |
会话开始时间 传通话唯一标识时, 该属性必传 |
notFillFields |
Integer |
false |
未传字段是否补全 1: 不补全, 0: 补全 默认为0 |
TicketFormModel:参数详情
名称 |
类型 |
是否必需 |
描述 |
id |
Integer |
true |
工单模板 ID |
name |
String |
false |
工单模板名称 |
fields |
List<Field> |
false |
工单模板字段集合 |
Field:参数详情
名称 |
类型 |
是否必需 |
描述 |
id |
Integer |
true |
字段 ID |
name |
String |
true |
字段名称 |
type |
List<Field> |
true |
字段类型 取值范围如下: 1: 单行文本, 2: 数值, 3: 邮件, 4: IP地址, 5: 多行文本, 6: 下拉框, 7: 自定义级联, 8: 地区级联, 9: 单选框, 10: 复选框, 11: 日期和时间, 12: 日期, 13: 时间, 14: 文件, 15: 签名, 16: 定位, 17: 自增表格, 18: 级联多选, 99: 子表单, 110:富文本 |
value |
String |
false |
字段的取值, 如果该字段是必填字段, 则该值必须存在 |
请求示例 方式1. HTTP
------WebKitFormBoundaryOr9QRWfnHXqngnif
Content-Disposition: form-data; name="model"
{
"workflowId": 1,
"customerId": 1,
"topic": "工单主题",
"level": 1,
"creatorId": "123",
"creatorIdType": 1
"handlerType": 0,
"handlerId": "123",
"handlerIdType": 1
"focus": ["123", "1234", "321"],
"focusIdType": 1,
"tags": [{
"name": "标签1",
"color": 1
}, {
"name": 2,
"color": 2
}],
"relateTicketId": [2, 3],
"stateSelected": "自定义状态1",
"externalId": 123,
"form": {
"id": 1,
"name:": "表单名称",
"fields": [{
"id": 1,
"name": "字段1",
"type": 1,
"required": 0,
"value": "xxx"
}, {
"id": 2,
"name": "字段2",
"type": 2,
"required": 1,
"value": "xxx"
}, {
"id": 3,
"name": "附件",
"type": 14,
"required": 1,
"value": ""
}, {
"id": 4,
"name": "级联多选",
"type": 18,
"required": 1,
"value": "1,11,111,1111##2,22,222,2222"
}, {
"id": 5,
"type": 17,
"name": "cy自增表格",
"required": 0,
"value": "[{\"98741\":\"字段值1\",\"98742\":\"字段值1\",\"98845\":\"字段值1\",\"98847\":\"字段值1\",\"98848\":\"字段值1\",\"98849\":\"字段值1\",\"98850\":\"字段值1\",\"98851\":\"字段值1\"},{\"98741\":\"字段值21\",\"98742\":\"字段值2\",\"98845\":\"字段值2\",\"98847\":\"字段值2\",\"98848\":\"字段值2\",\"98849\":\"字段值2\",\"98850\":\"字段值2\",\"98851\":\"字段值2\"}]"
}, {
"id": 100,
"name": "子表单名称",
"type": 99,
"required": 1,
"value": "分类名称",
"children": [{
"id": 1,
"name": "字段1",
"type": 1,
"required": 0,
"value": "xxx"
}, {
"id": 2,
"name": "字段2",
"type": 2,
"required": 1,
"value": "xxx"
}, {
"id": 3,
"name": "附件",
"type": 14,
"required": 1,
"value": ""
}, {
"id": 4,
"name": "级联多选",
"type": 18,
"required": 1,
"value": "1,11,111,1111##2,22,222,2222"
}, {
"id": 5,
"type": 17,
"name": "cy自增表格",
"required": 0,
"value": "[{\"98741\":\"字段值1\",\"98742\":\"字段值1\",\"98845\":\"字段值1\",\"98847\":\"字段值1\",\"98848\":\"字段值1\",\"98849\":\"字段值1\",\"98850\":\"字段值1\",\"98851\":\"字段值1\"},{\"98741\":\"字段值21\",\"98742\":\"字段值2\",\"98845\":\"字段值2\",\"98847\":\"字段值2\",\"98848\":\"字段值2\",\"98849\":\"字段值2\",\"98850\":\"字段值2\",\"98851\":\"字段值2\"}]"
}]
}]
},
"customizeSystemFields": [{
"id": 1,
"type": 1,
"name": "单行文本",
"value": "文本内容"
}, {
"id": 2,
"type": 11,
"name": "日期时间",
"value": "2022/07/10 00:15:19"
}],
"callId": "medias_1-1667208549.123"
}
------WebKitFormBoundaryOr9QRWfnHXqngnif
Content-Disposition: form-data; name="3"; filename="xxxxxx.xlsx"
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
------WebKitFormBoundaryOr9QRWfnHXqngnif
Content-Disposition: form-data; name="3"; filename="aaaaaa.xlsx"
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
------WebKitFormBoundaryOr9QRWfnHXqngnif
Content-Disposition: form-data; name="100分类名称3"; filename="xxxxxx.xlsx"
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
------WebKitFormBoundaryOr9QRWfnHXqngnif
Content-Disposition: form-data; name="100分类名称3"; filename="aaaaaa.xlsx"
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
方式2. cURL
curl --location --request POST 'https://api-bj.clink.cn/ticket/save_ticket?AccessKeyId=24b1xxxxxx&Expires=6400&Timestamp=2023-04-24T17%3A00%3A00Z&Signature=PP%2xxxxxx' \
--form 'model="{\"workflowId\":1,\"customerId\":1,\"topic\":\"工单主题\",\"level\":1,\"creatorId\":123,\"handlerType\":0,\"handlerId\":1,\"focus\":[123,1234,321],\"tags\":[{\"name\":\"标签1\",\"color\":1},{\"name\":2,\"color\":2}],\"relateTicketId\":[2,3],\"stateSelected\":\"自定义状态1\",\"externalId\":123,\"form\":{\"id\":1,\"name:\":\"表单名称\",\"fields\":[{\"id\":1,\"name\":\"字段1\",\"type\":1,\"required\":0,\"value\":\"xxx\"},{\"id\":2,\"name\":\"字段2\",\"type\":2,\"required\":1,\"value\":\"xxx\"},{\"id\":3,\"name\":\"附件\",\"type\":14,\"required\":1,\"value\":\"\"},{\"id\":4,\"name\":\"级联多选\",\"type\":18,\"required\":1,\"value\":\"1,11,111,1111##2,22,222,2222\"},{\"id\":100,\"name\":\"子表单名称\",\"type\":99,\"required\":1,\"value\":\"分类名称\",\"children\":[{\"id\":1,\"name\":\"字段1\",\"type\":1,\"required\":0,\"value\":\"xxx\"},{\"id\":2,\"name\":\"字段2\",\"type\":2,\"required\":1,\"value\":\"xxx\"},{\"id\":3,\"name\":\"附件\",\"type\":14,\"required\":1,\"value\":\"\"},{\"id\":4,\"name\":\"级联多选\",\"type\":18,\"required\":1,\"value\":\"1,11,111,1111##2,22,222,2222\"}]}]},\"customizeSystemFields\":[{\"id\":1,\"type\":1,\"name\":\"单行文本\",\"value\":\"文本内容\"},{\"id\":2,\"type\":11,\"name\":\"日期时间\",\"value\":\"2022/07/10 00:15:19\"}], \"callId\": \"medias_1-1667208549.123\"}"' \
--form '3=@"xxxxxx.xlsx"'
--form '3=@"aaaaaa.xlsx"'
--form '100分类名称3=@"xxxxxx.xlsx"'
--form '100分类名称3=@"aaaaaa.xlsx"'
返回参数
名称 |
类型 |
描述 |
requestId |
String |
请求 ID |
ticketId |
Integer |
工单 ID |
返回示例
{
"requestId":"4ed8f07d-683e-49b6-8759-c9c3ad08da5e",
"ticketId": 1379
}
3.6. 工单暂存接口
POST /ticket/staging_ticket
Content-Type multipart/form-data
请求参数
名称 |
类型 |
是否必需 |
描述 |
model |
String |
true |
请求实体对象JSON字符串 暂存工单的model 参数详情 |
附件自定义字段ID |
File |
false |
附件类型自定义字段ID, 如果有多个附件字段直接追加即可 |
暂存工单的model 参数详情
名称 |
类型 |
是否必需 |
描述 |
creatorCode |
Integer |
true |
创建人类型 1: 员工ID, 2: 手机号, 3: 员工用户名, 4: 座席工号 |
creatorValue |
String |
true |
创建人值 |
workflowId |
Integer |
true |
工单模板 ID |
customerId |
Integer |
false |
客户资料 ID |
topic |
String |
false |
工单主题 默认值为“无” |
level |
Integer |
false |
工单优先级 0: 低, 1: 中, 2: 高, 3: 紧急 默认为0 |
handlerType |
Integer |
false |
处理类型 0: 座席, 1: 队列 (预置流工单非必填) |
handlerId |
String |
false |
处理人 ID (预置流工单非必填) |
handlerIdType |
Integer |
false |
处理人类型 1: 用户id, 2: 用户手机号, 3: 用户名, 4: 用户工号, 5: sso标识, 如不传值默认为1 |
focus |
String[] |
false |
关注人 ID数组 |
focusIdType |
Integer |
false |
处理人类型 1: 用户id, 2: 用户手机号, 3: 用户名, 4: 用户工号, 5: sso标识, 如不传值默认为1 |
tags |
Tag[] |
false |
工单标签数组 工单详情标签字段 |
relateTicketId |
Integer[] |
false |
关联的工单 ID 数组 |
stateSelected |
String |
false |
当前工单状态(若是预制流类型的工单, 该状态可不填, 人工类型的工单, 该状态必填) |
externalId |
String |
false |
外部工单 ID (第三方用户可根据该 Id 进行更新或者查询) |
form |
TicketFormModel |
true |
表单数据 表单实体对象详情 |
createTime |
Date |
false |
创建时间 默认为当前时间 |
close |
Integer |
false |
是否创建一个关闭的工单, 人工类型的工单生效 0: 否, 1: 是 默认为0 |
customizeSystemFields |
Field[] |
false |
工单属性表单字段集合 表单字段实体对象详情 |
callId |
String |
false |
通话唯一标识 与会话唯一标识不可同时存在 |
chatId |
String |
false |
会话唯一标识 与通话唯一标识不可同时存在 |
chatStartTime |
Long |
false |
会话开始时间 传通话唯一标识时, 该属性必传 |
请求示例 方式1. HTTP
------WebKitFormBoundaryOr9QRWfnHXqngnif
Content-Disposition: form-data; name="model"
{
"creatorCode": 1,
"creatorValue": "1001",
"workflowId": 1,
"customerId": 1,
"topic": "工单主题",
"level": 1,
"handlerType": 0,
"handlerId": "123",
"handlerIdType": 1,
"focus": ["123", "1234", "321"],
"focusIdType": 1,
"tags": [{
"name": "标签1",
"color": 1
}, {
"name": 2,
"color": 2
}],
"relateTicketId": [2, 3],
"stateSelected": "自定义状态1",
"externalId": 123,
"form": {
"id": 1,
"name:": "表单名称",
"fields": [{
"id": 1,
"name": "字段1",
"type": 1,
"required": 0,
"value": "xxx"
}, {
"id": 2,
"name": "字段2",
"type": 2,
"required": 1,
"value": "xxx"
}, {
"id": 3,
"name": "附件",
"type": 14,
"required": 1,
"value": ""
}, {
"id": 4,
"name": "级联多选",
"type": 18,
"required": 1,
"value": "1,11,111,1111##2,22,222,2222"
}, {
"id": 5,
"type": 17,
"name": "cy自增表格",
"required": 0,
"value": "[{\"98741\":\"字段值1\",\"98742\":\"字段值1\",\"98845\":\"字段值1\",\"98847\":\"字段值1\",\"98848\":\"字段值1\",\"98849\":\"字段值1\",\"98850\":\"字段值1\",\"98851\":\"字段值1\"},{\"98741\":\"字段值21\",\"98742\":\"字段值2\",\"98845\":\"字段值2\",\"98847\":\"字段值2\",\"98848\":\"字段值2\",\"98849\":\"字段值2\",\"98850\":\"字段值2\",\"98851\":\"字段值2\"}]"
}, {
"id": 100,
"name": "子表单名称",
"type": 99,
"required": 1,
"value": "分类名称",
"children": [{
"id": 1,
"name": "字段1",
"type": 1,
"required": 0,
"value": "xxx"
}, {
"id": 2,
"name": "字段2",
"type": 2,
"required": 1,
"value": "xxx"
}, {
"id": 3,
"name": "附件",
"type": 14,
"required": 1,
"value": ""
}, {
"id": 4,
"name": "级联多选",
"type": 18,
"required": 1,
"value": "1,11,111,1111##2,22,222,2222"
}, {
"id": 5,
"type": 17,
"name": "cy自增表格",
"required": 0,
"value": "[{\"98741\":\"字段值1\",\"98742\":\"字段值1\",\"98845\":\"字段值1\",\"98847\":\"字段值1\",\"98848\":\"字段值1\",\"98849\":\"字段值1\",\"98850\":\"字段值1\",\"98851\":\"字段值1\"},{\"98741\":\"字段值21\",\"98742\":\"字段值2\",\"98845\":\"字段值2\",\"98847\":\"字段值2\",\"98848\":\"字段值2\",\"98849\":\"字段值2\",\"98850\":\"字段值2\",\"98851\":\"字段值2\"}]"
}]
}]
},
"customizeSystemFields": [{
"id": 1,
"type": 1,
"name": "单行文本",
"value": "文本内容"
}, {
"id": 2,
"type": 11,
"name": "日期时间",
"value": "2022/07/10 00:15:19"
}],
"callId": "medias_1-1667208549.123"
}
------WebKitFormBoundaryOr9QRWfnHXqngnif
Content-Disposition: form-data; name="3"; filename="xxxxxx.xlsx"
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
------WebKitFormBoundaryOr9QRWfnHXqngnif
Content-Disposition: form-data; name="3"; filename="aaaaaa.xlsx"
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
------WebKitFormBoundaryOr9QRWfnHXqngnif
Content-Disposition: form-data; name="100分类名称3"; filename="xxxxxx.xlsx"
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
------WebKitFormBoundaryOr9QRWfnHXqngnif
Content-Disposition: form-data; name="100分类名称3"; filename="aaaaaa.xlsx"
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
方式2. cURL
curl --location --request POST 'https://api-bj.clink.cn/ticket/save_ticket?AccessKeyId=24b1xxxxxx&Expires=6400&Timestamp=2023-04-24T17%3A00%3A00Z&Signature=PP%2xxxxxx' \
--form 'model="{\"creatorCode\":1,\"creatorValue\":\"1001\",\"workflowId\":1,\"customerId\":1,\"topic\":\"工单主题\",\"level\":1,\"creatorId\":123,\"handlerType\":0,\"handlerId\":1,\"focus\":[123,1234,321],\"tags\":[{\"name\":\"标签1\",\"color\":1},{\"name\":2,\"color\":2}],\"relateTicketId\":[2,3],\"stateSelected\":\"自定义状态1\",\"externalId\":123,\"form\":{\"id\":1,\"name:\":\"表单名称\",\"fields\":[{\"id\":1,\"name\":\"字段1\",\"type\":1,\"required\":0,\"value\":\"xxx\"},{\"id\":2,\"name\":\"字段2\",\"type\":2,\"required\":1,\"value\":\"xxx\"},{\"id\":3,\"name\":\"附件\",\"type\":14,\"required\":1,\"value\":\"\"},{\"id\":4,\"name\":\"级联多选\",\"type\":18,\"required\":1,\"value\":\"1,11,111,1111##2,22,222,2222\"},{\"id\":100,\"name\":\"子表单名称\",\"type\":99,\"required\":1,\"value\":\"分类名称\",\"children\":[{\"id\":1,\"name\":\"字段1\",\"type\":1,\"required\":0,\"value\":\"xxx\"},{\"id\":2,\"name\":\"字段2\",\"type\":2,\"required\":1,\"value\":\"xxx\"},{\"id\":3,\"name\":\"附件\",\"type\":14,\"required\":1,\"value\":\"\"},{\"id\":4,\"name\":\"级联多选\",\"type\":18,\"required\":1,\"value\":\"1,11,111,1111##2,22,222,2222\"}]}]},\"customizeSystemFields\":[{\"id\":1,\"type\":1,\"name\":\"单行文本\",\"value\":\"文本内容\"},{\"id\":2,\"type\":11,\"name\":\"日期时间\",\"value\":\"2022/07/10 00:15:19\"}], \"callId\": \"medias_1-1667208549.123\"}"' \
--form '3=@"xxxxxx.xlsx"'
--form '3=@"aaaaaa.xlsx"'
--form '100分类名称3=@"xxxxxx.xlsx"'
--form '100分类名称3=@"aaaaaa.xlsx"'
返回参数
名称 |
类型 |
描述 |
requestId |
String |
请求 ID |
ticketId |
Integer |
工单 ID |
返回示例
{
"requestId":"4ed8f07d-683e-49b6-8759-c9c3ad08da5e",
"ticketId": 1379
}
3.7. 工单更新接口
POST /ticket/update_ticket
Content-Type multipart/form-data
请求参数
名称 |
类型 |
是否必需 |
描述 |
model |
String |
true |
请求实体对象JSON字符串 更新工单的model 参数详情 |
附件自定义字段ID |
File |
false |
附件类型自定义字段ID, 如果有多个附件字段直接追加即可 |
更新工单的model 参数详情
名称 |
类型 |
是否必需 |
描述 |
id |
Integer |
false |
工单 ID (id、customId、externalId 三者必有一个) |
externalId |
String |
false |
工单外部 ID (id、customId、externalId 三者必有一个) |
customId |
String |
false |
工单编号 (id、customId、externalId 三者必有一个) |
topic |
String |
false |
工单主题 |
level |
Integer |
false |
工单优先级 0: 低, 1: 中, 2: 高, 3: 紧急 |
focus |
String[] |
false |
关注人 ID数组 |
focusIdType |
Integer |
false |
处理人类型 1: 用户id, 2: 用户手机号, 3: 用户名, 4: 用户工号, 5: sso标识, 如不传值默认为1 |
tags |
Tag[] |
false |
工单标签数组 工单详情标签字段 |
stateSelected |
String |
false |
当前工单状态, 只对人工类型的工单生效 |
form |
TicketFormModel |
false |
表单数据 表单实体对象详情 |
updateTime |
Date |
false |
更新时间 默认为当前时间 |
customizeSystemFields |
Field[] |
false |
工单属性表单字段集合 表单字段实体对象详情 |
请求示例 方式1. HTTP
------WebKitFormBoundaryOr9QRWfnHXqngnif
Content-Disposition: form-data; name="model"
{"id":1,"topic":"工单主题","level":1,"focus":["123","1234","321"],"focusIdType":1,"tags":[{"name":"标签1","color":1},{"name":2,"color":2}],"stateSelected":"自定义状态1","form":{"id":1,"name:":"表单名称","fields":[{"id":1,"name":"字段1","type":1,"required":0,"value":"xxx"},{"id":2,"name":"字段2","type":2,"required":1,"value":"xxx"},{"id":3,"name":"附件","type":14,"required":1,"value":""},{"id":4,"name":"级联多选","type":18,"required":1,"value":"1,11,111,1111##2,22,222,2222"},{"id":5,"type":17,"name":"cy自增表格","required":0,"value":"[{\"98741\":\"字段值1\",\"98742\":\"字段值1\",\"98845\":\"字段值1\",\"98847\":\"字段值1\",\"98848\":\"字段值1\",\"98849\":\"字段值1\",\"98850\":\"字段值1\",\"98851\":\"字段值1\"},{\"98741\":\"字段值21\",\"98742\":\"字段值2\",\"98845\":\"字段值2\",\"98847\":\"字段值2\",\"98848\":\"字段值2\",\"98849\":\"字段值2\",\"98850\":\"字段值2\",\"98851\":\"字段值2\"}]"},{"id":100,"name":"子表单名称","type":99,"required":1,"value":"分类名称","children":[{"id":1,"name":"字段1","type":1,"required":0,"value":"xxx"},{"id":2,"name":"字段2","type":2,"required":1,"value":"xxx"},{"id":3,"name":"附件","type":14,"required":1,"value":""},{"id":4,"name":"级联多选","type":18,"required":1,"value":"1,11,111,1111##2,22,222,2222"},{"id":5,"type":17,"name":"cy自增表格","required":0,"value":"[{\"98741\":\"字段值1\",\"98742\":\"字段值1\",\"98845\":\"字段值1\",\"98847\":\"字段值1\",\"98848\":\"字段值1\",\"98849\":\"字段值1\",\"98850\":\"字段值1\",\"98851\":\"字段值1\"},{\"98741\":\"字段值21\",\"98742\":\"字段值2\",\"98845\":\"字段值2\",\"98847\":\"字段值2\",\"98848\":\"字段值2\",\"98849\":\"字段值2\",\"98850\":\"字段值2\",\"98851\":\"字段值2\"}]"}]}]},"customizeSystemFields":[{"id":1,"type":1,"name":"单行文本","value":"文本内容"},{"id":2,"type":11,"name":"日期时间","value":"2022/07/10 00:15:19"}]}
------WebKitFormBoundaryOr9QRWfnHXqngnif
Content-Disposition: form-data; name="3"; filename="bbbbb.xlsx"
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
------WebKitFormBoundaryOr9QRWfnHXqngnif
Content-Disposition: form-data; name="3"; filename="ccccc.xlsx"
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
------WebKitFormBoundaryOr9QRWfnHXqngnif
Content-Disposition: form-data; name="100分类名称3"; filename="bbbbb.xlsx"
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
------WebKitFormBoundaryOr9QRWfnHXqngnif
Content-Disposition: form-data; name="100分类名称3"; filename="ccccc.xlsx"
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
方式2. cURL
curl --location --request POST 'https://api-bj.clink.cn/ticket/update_ticket?AccessKeyId=24b1xxxxxx&Expires=6400&Timestamp=2023-04-24T17%3A02%3A35Z&Signature=2xxxxxx' \
--form 'model="{\"id\":1,\"topic\":\"工单主题\",\"level\":1,\"focus\":[123,1234,321],\"tags\":[{\"name\":\"标签1\",\"color\":1},{\"name\":2,\"color\":2}],\"stateSelected\":\"自定义状态1\",\"form\":{\"id\":1,\"name:\":\"表单名称\",\"fields\":[{\"id\":1,\"name\":\"字段1\",\"type\":1,\"required\":0,\"value\":\"xxx\"},{\"id\":2,\"name\":\"字段2\",\"type\":2,\"required\":1,\"value\":\"xxx\"},{\"id\":3,\"name\":\"附件\",\"type\":14,\"required\":1,\"value\":\"\"},{\"id\":4,\"name\":\"级联多选\",\"type\":18,\"required\":1,\"value\":\"1,11,111,1111##2,22,222,2222\"},{\"id\":100,\"name\":\"子表单名称\",\"type\":99,\"required\":1,\"value\":\"分类名称\",\"children\":[{\"id\":1,\"name\":\"字段1\",\"type\":1,\"required\":0,\"value\":\"xxx\"},{\"id\":2,\"name\":\"字段2\",\"type\":2,\"required\":1,\"value\":\"xxx\"},{\"id\":3,\"name\":\"附件\",\"type\":14,\"required\":1,\"value\":\"\"},{\"id\":4,\"name\":\"级联多选\",\"type\":18,\"required\":1,\"value\":\"1,11,111,1111##2,22,222,2222\"}]}]},\"customizeSystemFields\":[{\"id\":1,\"type\":1,\"name\":\"单行文本\",\"value\":\"文本内容\"},{\"id\":2,\"type\":11,\"name\":\"日期时间\",\"value\":\"2022/07/10 00:15:19\"}]}"'
--form '3=@"bbbbb.xlsx"'
--form '3=@"ccccc.xlsx"'
--form '100分类名称3=@"bbbbb.xlsx"'
--form '100分类名称3=@"ccccc.xlsx"'
3.8. 预制流历史表单更新接口
POST /ticket/update_ticket_prefabricated
Content-Type multipart/form-data
请求参数
名称 |
类型 |
是否必需 |
描述 |
model |
String |
true |
请求实体对象JSON字符串 更新预制流工单的model 参数详情 |
附件自定义字段ID |
File |
false |
附件类型自定义字段ID, 如果有多个附件字段直接追加即可 |
更新预制流工单的model 参数详情
名称 |
类型 |
是否必需 |
描述 |
id |
Integer |
false |
工单 ID (id和externalId 二者必有一个) |
externalId |
String |
false |
工单外部 ID (id和externalId 二者必有一个) |
form |
TicketFormModel |
false |
表单数据 表单实体对象详情 |
updateTime |
Date |
false |
更新时间 默认为当前时间 |
operatorId |
String |
false |
操作人ID |
operatorIdType |
Integer |
false |
处理人类型 1: 用户id, 2: 用户手机号, 3: 用户名, 4: 用户工号, 5: sso标识, 如不传值默认为1 |
请求示例
------WebKitFormBoundaryOr9QRWfnHXqngnif
Content-Disposition: form-data; name="model"
{"id":1,"form":{"id":1,"name:":"表单名称","fields":[{"id":1,"name":"字段1","type":1,"required":0,"value":"xxx"},{"id":2,"name":"字段2","type":2,"required":1,"value":"xxx"},{"id":3,"name":"附件","type":14,"required":1,"value":""},{"id":4,"name":"级联多选","type":18,"required":1,"value":"1,11,111,1111##2,22,222,2222"},{"id":100,"name":"子表单名称","type":99,"required":1,"value":"分类名称","children":[{"id":1,"name":"字段1","type":1,"required":0,"value":"xxx"},{"id":2,"name":"字段2","type":2,"required":1,"value":"xxx"},{"id":3,"name":"附件","type":14,"required":1,"value":""},{"id":4,"name":"级联多选","type":18,"required":1,"value":"1,11,111,1111##2,22,222,2222"}]}]}}
------WebKitFormBoundaryOr9QRWfnHXqngnif
Content-Disposition: form-data; name="3"; filename="bbbbb.xlsx"
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
------WebKitFormBoundaryOr9QRWfnHXqngnif
Content-Disposition: form-data; name="3"; filename="ccccc.xlsx"
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
------WebKitFormBoundaryOr9QRWfnHXqngnif
Content-Disposition: form-data; name="100分类名称3"; filename="bbbbb.xlsx"
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
------WebKitFormBoundaryOr9QRWfnHXqngnif
Content-Disposition: form-data; name="100分类名称3"; filename="ccccc.xlsx"
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
3.9. 工单备注接口
POST /ticket/comment_ticket
Content-Type multipart/form-data
请求参数
名称 |
类型 |
是否必需 |
描述 |
model |
String |
true |
请求实体对象 JSON 字符串 备注工单的 model 参数详情 |
fileName |
File |
false |
备注附件 如果有多个附件字段直接追加即可 |
备注工单的 model 参数详情
名称 |
类型 |
是否必需 |
描述 |
id |
Integer |
false |
工单 ID (id 和 externalId 二者必有一个) |
externalId |
String |
false |
工单外部 id (id 和 externalId 二者必有一个) |
content |
String |
true |
工单备注内容 |
commentatorId |
String |
false |
评论人id |
commentatorIdType |
Integer |
false |
处理人类型 1: 用户id, 2: 用户手机号, 3: 用户名, 4: 用户工号, 5: sso标识, 如不传值默认为1 |
stateId |
String |
false |
工单状态id |
stateIdType |
Integer |
false |
工单状态id类型。1:id 2:名称。不传此参数时默认为id |
请求示例
------WebKitFormBoundaryOr9QRWfnHXqngnif
Content-Disposition: form-data; name="model"
{"id":1,"content":"备注内容"}
------WebKitFormBoundaryOr9QRWfnHXqngnif
Content-Disposition: form-data; name="fileName"; fileName="bbbbb.xlsx"
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
------WebKitFormBoundaryOr9QRWfnHXqngnif
Content-Disposition: form-data; name="fileName"; fileName="ccccc.xlsx"
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
返回参数
名称 |
类型 |
描述 |
result.files |
String[] |
上传文件的key数组 |
requestId |
String |
请求 ID |
返回示例
{
"result": {
"files": [
"ticket/20240704/8000376/b0f97dc1-e6a5-4be9-adee-7976022ad1ee.",
"ticket/20240704/8000376/b0f97dc1-e6a5-4be9-adee-7976022ad1ee."
]
},
"requestId": "4ed8f07d-683e-49b6-8759-c9c3ad08da5e"
}
3.10. 工单分配接口
POST /ticket/assign_ticket
Content-Type application/json
请求参数
名称 |
类型 |
是否必需 |
描述 |
id |
Integer |
true |
工单的 ID |
handlerType |
Integer |
true |
处理人的类型 |
handlerId |
String |
true |
处理人的 ID |
handleIdType |
Integer |
false |
处理人类型 1: 用户id, 2: 用户手机号, 3: 用户名, 4: 用户工号, 5: sso标识, 如不传值默认为1 |
taskId |
String |
false |
任务 ID(可从工单详情接口的status中获取) |
operatorId |
String |
false |
操作人的 ID |
operatorIdType |
Integer |
false |
处理人类型 1: 用户id, 2: 用户手机号, 3: 用户名, 4: 用户工号, 5: sso标识, 如不传值默认为1 |
autoAssign |
Integer |
false |
是否开启自动分配 |
content |
String |
false |
分配工单备注的内容 |
请求示例
{
"id": 100001,
"handlerType": 0,
"handlerId": "1234568",
"handlerIdType": 1,
"taskId": "1324-abcd-abcd-1234-abcd",
"operatorId": "1234567",
"operatorIdType": 1,
"content": "工单分配备注"
}
3.11. 工单关闭接口
POST /ticket/close_ticket
Content-Type application/json
请求参数
名称 |
类型 |
是否必需 |
描述 |
ticketId |
Integer |
true |
工单的 ID |
content |
String |
false |
关闭工单的备注信息 |
operatorId |
String |
false |
关闭工单的操作人 ID |
operatorIdType |
Integer |
false |
处理人类型 1: 用户id, 2: 用户手机号, 3: 用户名, 4: 用户工号, 5: sso标识, 如不传值默认为1 |
请求示例
{
"ticketId": 12345,
"content": "关闭工单备注",
"operatorId": "123",
"operatorIdType": 1
}
3.12. 工单完成接口
POST /ticket/finish_ticket
Content-Type application/json
请求参数
名称 |
类型 |
是否必需 |
描述 |
ticketId |
Integer |
true |
工单的 ID |
content |
String |
false |
完成工单的备注信息 |
operatorId |
String |
false |
完成工单的操作人 ID |
operatorIdType |
Integer |
false |
处理人类型 1: 用户id, 2: 用户手机号, 3: 用户名, 4: 用户工号, 5: sso标识, 如不传值默认为1 |
请求示例
{
"ticketId": 12345,
"content": "完成工单备注",
"operatorId": "123",
"operatorIdType": 1
}
3.13. 工单催单接口
POST /ticket/reminder_ticket
Content-Type multipart/form-data
请求参数
名称 |
类型 |
是否必需 |
描述 |
model |
String |
true |
请求实体对象JSON字符串 创建工单的model 参数详情 |
files |
File |
false |
催单附件。如果有多个附件字段直接追加即可。 |
创建工单的model 参数详情
名称 |
类型 |
是否必需 |
描述 |
userId |
String |
false |
催单员工 Id |
userIdtype |
Integer |
false |
处理人类型 1: 用户id, 2: 用户手机号, 3: 用户名, 4: 用户工号, 5: sso标识, 如不传值默认为1 |
reminderRemark |
String |
false |
催单描述 |
taskId |
String |
false |
催单任务的id |
ticketId |
Integer |
false |
工单的 Id (ticketId和customId 二者必有一个) |
customId |
String |
false |
自定义工单编号 (ticketId和customId 二者必有一个) |
请求示例
------WebKitFormBoundaryOr9QRWfnHXqngnif
Content-Disposition: form-data; name="model"
{"userId":"1","userIdType“:1,"reminderRemark":"***","taskId":1,"ticketId":1,"customId":"***"}
------WebKitFormBoundaryOr9QRWfnHXqngnif
Content-Disposition: form-data; name="files"; filename="xxxxxx.xlsx"
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
3.14. 工单重启接口
POST /ticket/restart_ticket
Content-Type application/json
请求参数
名称 |
类型 |
是否必需 |
描述 |
ticketId |
Integer |
false |
工单 Id (ticketId和customId 二者必有一个) |
customId |
String |
false |
自定义工单编号 (ticketId和customId 二者必有一个) |
handlerId |
String |
false |
处理人 Id |
handlerIdType |
Integer |
false |
处理人类型 1: 用户id, 2: 用户手机号, 3: 用户名, 4: 用户工号, 5: sso标识, 如不传值默认为1 |
handlerCno |
String |
false |
处理人工号 |
handlerUserName |
String |
false |
处理人名称 |
content |
String |
false |
重启描述 |
afterRestartHandlerId |
String |
false |
重启后处理人 Id (afterRestartHandlerId、afterRestartHandlerCno、afterRestartHandlerUserName 三者必有一个) |
afterRestartHandlerIdType |
Integer |
false |
处理人类型 1: 用户id, 2: 用户手机号, 3: 用户名, 4: 用户工号, 5: sso标识, 如不传值默认为1 |
afterRestartHandlerCno |
String |
false |
重启后处理人工号 (afterRestartHandlerId、afterRestartHandlerCno、afterRestartHandlerUserName 三者必有一个) |
afterRestartHandlerUserName |
String |
false |
重启后处理人名称 (afterRestartHandlerId、afterRestartHandlerCno、afterRestartHandlerUserName 三者必有一个) |
请求示例
{
"ticketId": 1,
"customId": null,
"handlerId": "1",
"handlerIdType": 1,
"handlerCno": null,
"handlerUserName": null,
"content": "****",
"afterRestartHandlerId": "1",
"afterRestartHandlerIdType": 1,
"afterRestartHandlerCno": null,
"afterRestartHandlerUserName": null
}
3.15. 获取工单文件url接口
GET /ticket/get_ticket_file_url
请求参数
名称 |
类型 |
是否必需 |
描述 |
fileKey |
String |
true |
工单附件文件的 fileKey |
返回参数
名称 |
类型 |
描述 |
requestId |
String |
请求 ID |
fileUrl |
String |
文件下载链接 url |
返回示例
{
"requestId": "13dc9d86-66f1-4bdb-8f57-0399014c530d",
"fileUrl": "https://xxx.oss-cn-beijing.aliyuncs.com/xxxx/72dba571-9310-4f44-87a3-7ee314b320b2.png?response-content-disposition=attachment; filename=xxx.png&x-oss-date=20250319T054319Z&x-oss-expires=604800&x-oss-signature-version=OSS4-HMAC-SHA256&x-oss-credential=xxx&x-oss-signature=xxxx"
}
3.16. 获取表单详情
GET /ticket/get_form_detail
请求参数
名称 |
类型 |
是否必需 |
描述 |
id |
Integer |
true |
表单 ID |
返回参数
名称 |
类型 |
描述 |
form |
TicketFormModel |
工单模板表单实体对象 表单实体对象详情 |
返回示例
{
"requestId": "4ed8f07d-683e-49b6-8759-c9c3ad08da5e",
"form": {
"id": 1,
"name": "表单名称",
"fields": [{
"id": 1,
"name": "单行文本",
"type": 1,
"property": null,
"required": 0
},
{
"id": 2,
"name": "数值",
"type": 2,
"property": null,
"required": 0
},
{
"id": 3,
"name": "邮箱",
"type": 3,
"property": null,
"required": 1
},
{
"id": 4,
"name": "IP地址",
"type": 4,
"property": null,
"required": 0
},
{
"id": 5,
"name": "多行文本",
"type": 5,
"property": null,
"required": 0
},
{
"id": 6,
"name": "下拉框",
"type": 6,
"property": "[{\"name\":\"通过\",\"selected\":0},{\"name\":\"不通过\",\"selected\":0}]",
"required": 0
},
{
"id": 7,
"name": "自定义级联",
"type": 7,
"property": "[{\"title\":\"示例title1\",\"options\":[{\"title\":\"示例title2\",\"options\":[{\"title\":\"示例title3\"}]}]}]",
"required": 0
},
{
"id": 8,
"name": "地区级联",
"type": 8,
"property": "[{\"title\":\"安徽省\",\"options\":[{\"title\":\"合肥市\",\"options\":[{\"title\":\"包河区\"}]}]}]",
"required": 0
},
{
"id": 9,
"name": "单选框",
"type": 9,
"property": "[{\"name\":\"通过\",\"selected\":1},{\"name\":\"不通过\",\"selected\":0}]",
"required": 0
},
{
"id": 10,
"name": "复选框",
"type": 10,
"property": "[{\"name\":\"选项1\",\"selected\":0},{\"name\":\"选项2\",\"selected\":0}]",
"required": 0
},
{
"id": 11,
"name": "日期和时间",
"type": 11,
"property": null,
"required": 0
},
{
"id": 12,
"name": "日期",
"type": 12,
"property": null,
"required": 0
},
{
"id": 13,
"name": "时间",
"type": 13,
"property": null,
"required": 0
},
{
"id": 14,
"name": "文件",
"type": 14,
"property": null,
"required": 0
},
{
"id": 15,
"name": "签名",
"type": 15,
"property": null,
"required": 0
},
{
"id": 16,
"name": "定位",
"type": 16,
"property": null,
"required": 0
},
{
"id": 98868,
"name": "自增表格",
"property": "[98742,98741,98845,98847,98848,98849,98850,98851]",
"value": null,
"type": 17,
"required": 0,
"children": null
}
],
"childForms": [{
"id": 5467,
"name": "子表单",
"description": "子表单测试,常用字段",
"createTime": 1681907171874,
"updateTime": 1681907171874,
"enabled": 1,
"childrenFormModelList": [{
"fields": [{
"type": 1,
"fieldId": 88140,
"priority": 1,
"required": 0,
"group": "子表单分类",
"groupDesc": "",
"name": "单行",
"property": "{\"defaultValue\":\"\"}"
}, {
"type": 5,
"fieldId": 88141,
"priority": 2,
"required": 0,
"group": "子表单分类",
"groupDesc": "",
"name": "多行",
"property": "{\"defaultValue\":\"多行\\n回车\"}"
}],
"group": "子表单分类",
"groupDesc": "",
"groupSerialNumber": 0
}, {
"fields": [{
"type": 4,
"fieldId": 91467,
"priority": 1,
"required": 0,
"group": "全",
"groupDesc": "",
"name": " IP地址"
}, {
"type": 6,
"fieldId": 91365,
"priority": 2,
"required": 0,
"group": "全",
"groupDesc": "",
"name": "下拉",
"property": "[{\"name\":\"下拉1\",\"selected\":1,\"code\":\"\"},{\"name\":\"下拉2\",\"selected\":0,\"code\":\"\"},{\"name\":\"下拉3\",\"selected\":0,\"code\":\"\"}]"
}, {
"type": 17,
"fieldId": 123346,
"priority": 21,
"required": 0,
"group": "全",
"groupDesc": "",
"name": "全自增",
"property": "[91467,91365,88140,91366,91815,91400,88141,91465,91816,91401,91817,108125,89699,91466]"
}],
"group": "全",
"groupDesc": "",
"groupSerialNumber": 1
}],
"cascade": 0,
"formConfig": {
"exportColumnMode": 0
},
"property": "[]"
},
{
"id": 5616,
"name": "子表单2",
"description": "这是子表单2",
"createTime": 1693213269132,
"updateTime": 1693213269132,
"enabled": 1,
"childrenFormModelList": [{
"fields": [{
"type": 1,
"fieldId": 88140,
"priority": 1,
"required": 0,
"group": "分类2",
"groupDesc": "234",
"name": "单行",
"property": "{\"defaultValue\":\"\"}"
}, {
"type": 100,
"fieldId": 108125,
"priority": 2,
"required": 0,
"group": "分类2",
"groupDesc": "234",
"name": "电话"
}, {
"type": 107,
"fieldId": 110730,
"priority": 4,
"required": 0,
"group": "分类2",
"groupDesc": "234",
"name": "岗位",
"property": "[]"
}, {
"type": 17,
"fieldId": 91406,
"priority": 5,
"required": 0,
"group": "分类2",
"groupDesc": "234",
"name": "自增表格",
"property": "[88140,91365]"
}],
"group": "分类2",
"groupDesc": "234",
"groupSerialNumber": 0
}, {
"fields": [{
"type": 107,
"fieldId": 110730,
"priority": 1,
"required": 0,
"group": "部门岗位人员",
"groupDesc": "正泰的同步",
"name": "岗位",
"property": "[]"
}, {
"type": 107,
"fieldId": 110732,
"priority": 2,
"required": 0,
"group": "部门岗位人员",
"groupDesc": "正泰的同步",
"name": "人员",
"property": "[]"
}, {
"type": 6,
"fieldId": 91365,
"priority": 3,
"required": 0,
"group": "部门岗位人员",
"groupDesc": "正泰的同步",
"name": "下拉",
"property": "[{\"name\":\"下拉1\",\"selected\":1,\"code\":\"\"},{\"name\":\"下拉2\",\"selected\":0,\"code\":\"\"},{\"name\":\"下拉3\",\"selected\":0,\"code\":\"\"}]"
}, {
"type": 6,
"fieldId": 187154,
"priority": 4,
"required": 0,
"group": "部门岗位人员",
"groupDesc": "正泰的同步",
"name": "历史数据-下拉-勿动",
"property": "[{\"name\":\"下拉1\",\"selected\":0,\"code\":\"11\"},{\"name\":\"下拉2\",\"selected\":0,\"code\":\"22\"},{\"name\":\"下拉3\",\"selected\":0,\"code\":\"33\"},{\"name\":\"下拉4\",\"selected\":0,\"code\":\"44\"}]"
}, {
"type": 1,
"fieldId": 187153,
"priority": 5,
"required": 0,
"group": "部门岗位人员",
"groupDesc": "正泰的同步",
"name": "历史数据-单行-勿动",
"property": "{\"defaultValue\":\"\"}"
}],
"group": "部门岗位人员",
"groupDesc": "正泰的同步",
"groupSerialNumber": 1
}],
"cascade": 0,
"formConfig": {
"exportColumnMode": 0
},
"property": "[]"
},
{
"id": 12561,
"name": "级联子表单",
"description": "",
"createTime": 1686549487490,
"updateTime": 1686549487490,
"enabled": 1,
"childrenFormModelList": [],
"cascade": 1,
"formConfig": {
"exportColumnMode": 1
},
"property": "[{\"code\":null,\"title\":\"1\",\"options\":[{\"code\":null,\"title\":\"11\",\"options\":[{\"code\":null,\"title\":\"12\",\"options\":[],\"groupDesc\":\"一\",\"id\":\"1,11,12\"},{\"code\":null,\"title\":\"13\",\"options\":[],\"groupDesc\":\"一二\",\"id\":\"1,11,13\"},{\"code\":null,\"title\":\"14\",\"options\":[{\"code\":null,\"title\":\"15\",\"options\":[{\"code\":null,\"title\":\"16\",\"options\":[],\"groupDesc\":\"123456\",\"id\":\"1,11,14,15,16\"}],\"groupDesc\":null,\"id\":\"1,11,14,15\"}],\"groupDesc\":null,\"id\":\"1,11,14\"}],\"groupDesc\":null,\"id\":\"1,11\"},{\"code\":null,\"title\":\"111\",\"options\":[],\"groupDesc\":null,\"id\":\"1,111\"}],\"groupDesc\":null,\"id\":\"1\"},{\"code\":null,\"title\":\"2\",\"options\":[{\"code\":null,\"title\":\"11\",\"options\":[],\"groupDesc\":null,\"id\":\"2,11\"},{\"code\":null,\"title\":\"22\",\"options\":[],\"groupDesc\":null,\"id\":\"2,22\"},{\"code\":null,\"title\":\"2\",\"options\":[],\"groupDesc\":null,\"id\":\"2,2\"},{\"code\":null,\"title\":\"二\",\"options\":[],\"groupDesc\":\"二二\",\"id\":\"2,二\"}],\"groupDesc\":null,\"id\":\"2\"}]"
}
]
}
}
3.17. 工单流转接口
POST /ticket/flow_ticket
Content-Type multipart/form-data
请求参数
名称 |
类型 |
是否必需 |
描述 |
model |
String |
true |
请求实体对象 JSON 字符串 流转工单的model 参数详情 |
附件自定义字段 ID |
File |
false |
附件类型自定义字段 ID, 如果有多个附件字段直接追加即可 |
签名自定义字段 ID |
File |
false |
签名类型自定义字段 ID, 签名限制传输一个文件 |
流转工单的model 参数详情
名称 |
类型 |
是否必需 |
描述 |
ticketId |
Integer |
true |
工单 ID |
handlerId |
String |
true |
当前工单的工单节点的处理人 ID |
handlerIdType |
Integer |
false |
处理人类型 1: 用户id, 2: 用户手机号, 3: 用户名, 4: 用户工号, 5: sso标识, 如不传值默认为1 |
nextHandlerId |
String |
false |
指定当前工单的下一节点的处理人 ID |
nextHandlerIdType |
Integer |
false |
处理人类型 1: 用户id, 2: 用户手机号, 3: 用户名, 4: 用户工号, 5: sso标识, 如不传值默认为1 |
taskId |
Integer |
true |
任务 ID(可从工单详情接口的status中获取) |
stateId |
Integer |
false |
自定义状态id,用于指定当前工单的下一节点的自定义状态 |
form |
TicketFormModel |
true |
表单数据 表单实体对象详情 |
customizeSystemFields |
Field[] |
false |
工单属性表单字段集合 表单字段实体对象详情 |
TicketFormModel:参数详情
名称 |
类型 |
是否必需 |
描述 |
id |
Integer |
true |
工单模板 ID |
name |
String |
false |
工单模板名称 |
fields |
List<Field> |
false |
工单模板字段集合 |
Field:参数详情
名称 |
类型 |
是否必需 |
描述 |
id |
Integer |
true |
字段 ID |
name |
String |
false |
字段名称 |
type |
List<Field> |
true |
字段类型, 取值范围如下: 1: 单行文本, 2: 数值, 3: 邮件, 4: IP地址, 5: 多行文本, 6: 下拉框, 7: 自定义级联, 8: 地区级联, 9: 单选框, 10: 复选框, 11: 日期和时间, 12: 日期, 13: 时间, 14: 文件, 15: 签名, 16: 定位, 18: 级联多选, 99: 子表单, 110:富文本 |
value |
String |
false |
字段的取值, 如果该字段是必填字段, 则该值必须存在 |
请求示例
------WebKitFormBoundaryOr9QRWfnHXqngnif
Content-Disposition: form-data; name="model"
{"ticketId":1,"handlerId":"1","handlerIdType":1,"taskId":"2580f848-af01-11ec-a454-6259a6ed7ff4","stateId":123,"form":{"id":1,"name:":"表单名称","fields":[{"id":1,"name":"字段1","type":1,"required":0,"value":"xxx"},{"id":2,"name":"字段2","type":2,"required":1,"value":"xxx"},{"id":3,"name":"附件","type":14,"required":1,"value":""},{"id":4,"name":"级联多选","type":18,"required":1,"value":"1,11,111,1111##2,22,222,2222"},{"id":100,"name":"子表单名称","type":99,"required":1,"value":"分类名称","children":[{"id":1,"name":"字段1","type":1,"required":0,"value":"xxx"},{"id":2,"name":"字段2","type":2,"required":1,"value":"xxx"},{"id":3,"name":"附件","type":14,"required":1,"value":""},{"id":4,"name":"级联多选","type":18,"required":1,"value":"1,11,111,1111##2,22,222,2222"}]}]},"customizeSystemFields":[{"id":1,"type":1,"name":"单行文本","value":"文本内容"},{"id":2,"type":11,"name":"日期时间","value":"2022/07/10 00:15:19"}]}
------WebKitFormBoundaryOr9QRWfnHXqngnif
Content-Disposition: form-data; name="3"; filename="xxxxxx.xlsx"
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
------WebKitFormBoundaryOr9QRWfnHXqngnif
Content-Disposition: form-data; name="3"; filename="aaaaaa.xlsx"
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
------WebKitFormBoundaryOr9QRWfnHXqngnif
Content-Disposition: form-data; name="100分类名称3"; filename="xxxxxx.xlsx"
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
------WebKitFormBoundaryOr9QRWfnHXqngnif
Content-Disposition: form-data; name="100分类名称3"; filename="aaaaaa.xlsx"
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
3.18. 工单存草稿接口
POST /ticket/store_ticket
Content-Type multipart/form-data
请求参数
名称 |
类型 |
是否必需 |
描述 |
model |
String |
true |
请求实体对象 JSON 字符串 保存工单的model 参数详情 |
附件自定义字段 ID |
File |
false |
附件类型自定义字段 ID。如果有多个附件字段直接追加即可。 |
签名自定义字段 ID |
File |
false |
签名类型自定义字段 ID。签名限制传输一个文件。 |
保存工单的model 参数详情
名称 |
类型 |
是否必需 |
描述 |
ticketId |
Integer |
true |
工单 Id |
handlerId |
String |
true |
当前工单的工单节点的处理人 ID |
handlerIdType |
Integer |
false |
处理人类型 1: 用户id, 2: 用户手机号, 3: 用户名, 4: 用户工号, 5: sso标识, 如不传值默认为1 |
taskId |
Integer |
true |
任务 Id(可从工单详情接口的status中获取) |
form |
TicketFormModel |
true |
表单数据 表单实体对象详情 |
TicketFormModel:参数详情
名称 |
类型 |
是否必需 |
描述 |
id |
Integer |
true |
工单模板 Id |
name |
String |
false |
工单模板名称 |
fields |
List<Field> |
false |
工单模板字段集合 |
Field:参数详情
名称 |
类型 |
是否必需 |
描述 |
id |
Integer |
true |
字段 Id |
name |
String |
false |
字段名称 |
type |
List<Field> |
true |
字段类型。取值范围如下: 1: 单行文本,2: 数值, 3: 邮件,4: IP地址, 5: 多行文本,6: 下拉框,7: 自定义级联, 8: 地区级联,9: 单选框,10: 复选框,11: 日期和时间, 12: 日期,13: 时间,14: 文件,15: 签名,16: 定位,17:自增表格,18:级联多选,99: 子表单,110:富文本 |
value |
String |
false |
字段的取值,如果该字段是必填字段,则该值必须存在。 |
请求示例
------WebKitFormBoundaryOr9QRWfnHXqngnif
Content-Disposition: form-data; name="model"
{"ticketId":1,"handlerId":"1","handlerIdType": 1,"taskId":"2580f848-af01-11ec-a454-6259a6ed7ff4","form":{"id":1,"name:":"表单名称","fields":[{"id":1,"name":"字段1","type":1,"required":0,"value":"xxx"},{"id":2,"name":"字段2","type":2,"required":1,"value":"xxx"},{"id":3,"name":"附件","type":14,"required":1,"value":""},{"id":4,"name":"级联多选","type":18,"required":1,"value":"1,11,111,1111##2,22,222,2222"},{"id":5,"type":17,"name":"cy自增表格","required":0,"value":"[{\"98741\":\"字段值1\",\"98742\":\"字段值1\",\"98845\":\"字段值1\",\"98847\":\"字段值1\",\"98848\":\"字段值1\",\"98849\":\"字段值1\",\"98850\":\"字段值1\",\"98851\":\"字段值1\"},{\"98741\":\"字段值21\",\"98742\":\"字段值2\",\"98845\":\"字段值2\",\"98847\":\"字段值2\",\"98848\":\"字段值2\",\"98849\":\"字段值2\",\"98850\":\"字段值2\",\"98851\":\"字段值2\"}]"},{"id":100,"name":"子表单名称","type":99,"required":1,"value":"分类名称","children":[{"id":1,"name":"字段1","type":1,"required":0,"value":"xxx"},{"id":2,"name":"字段2","type":2,"required":1,"value":"xxx"},{"id":3,"name":"附件","type":14,"required":1,"value":""},{"id":4,"name":"级联多选","type":18,"required":1,"value":"1,11,111,1111##2,22,222,2222"},{"id":5,"type":17,"name":"cy自增表格","required":0,"value":"[{\"98741\":\"字段值1\",\"98742\":\"字段值1\",\"98845\":\"字段值1\",\"98847\":\"字段值1\",\"98848\":\"字段值1\",\"98849\":\"字段值1\",\"98850\":\"字段值1\",\"98851\":\"字段值1\"},{\"98741\":\"字段值21\",\"98742\":\"字段值2\",\"98845\":\"字段值2\",\"98847\":\"字段值2\",\"98848\":\"字段值2\",\"98849\":\"字段值2\",\"98850\":\"字段值2\",\"98851\":\"字段值2\"}]"}]}]}}
------WebKitFormBoundaryOr9QRWfnHXqngnif
Content-Disposition: form-data; name="3"; filename="xxxxxx.xlsx"
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
------WebKitFormBoundaryOr9QRWfnHXqngnif
Content-Disposition: form-data; name="3"; filename="aaaaaa.xlsx"
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
------WebKitFormBoundaryOr9QRWfnHXqngnif
Content-Disposition: form-data; name="100分类名称3"; filename="xxxxxx.xlsx"
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
------WebKitFormBoundaryOr9QRWfnHXqngnif
Content-Disposition: form-data; name="100分类名称3"; filename="aaaaaa.xlsx"
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
3.19. 工单保存接口
POST /ticket/ticket_preserve
Content-Type multipart/form-data
请求参数
名称 |
类型 |
是否必需 |
描述 |
model |
String |
true |
请求实体对象 JSON 字符串 保存工单的model 参数详情 |
附件自定义字段 ID |
File |
false |
附件类型自定义字段 ID, 如果有多个附件字段直接追加即可 |
签名自定义字段 ID |
File |
false |
签名类型自定义字段 ID, 签名限制传输一个文件 |
保存工单的model 参数详情
名称 |
类型 |
是否必需 |
描述 |
ticketId |
Integer |
true |
工单 ID |
handlerId |
String |
true |
当前工单的工单节点的处理人 ID |
handlerIdType |
Integer |
false |
处理人类型 1: 用户id, 2: 用户手机号, 3: 用户名, 4: 用户工号, 5: sso标识, 如不传值默认为1 |
taskId |
Integer |
true |
任务 ID(可从工单详情接口的status中获取) |
stateId |
Integer |
false |
自定义状态id,用于指定当前工单的当前节点的自定义状态 |
form |
TicketFormModel |
true |
表单数据 表单实体对象详情 |
TicketFormModel:参数详情
名称 |
类型 |
是否必需 |
描述 |
id |
Integer |
true |
工单模板 ID |
name |
String |
false |
工单模板名称 |
fields |
List<Field> |
false |
工单模板字段集合 |
Field:参数详情
名称 |
类型 |
是否必需 |
描述 |
id |
Integer |
true |
字段 ID |
name |
String |
false |
字段名称 |
type |
List<Field> |
true |
字段类型。取值范围如下: 1: 单行文本, 2: 数值, 3: 邮件, 4: IP地址, 5: 多行文本, 6: 下拉框, 7: 自定义级联, 8: 地区级联, 9: 单选框, 10: 复选框, 11: 日期和时间, 12: 日期, 13: 时间, 14: 文件, 15: 签名, 16: 定位, 18: 级联多选, 99: 子表单, 110:富文本 |
value |
String |
false |
字段的取值, 如果该字段是必填字段, 则该值必须存在 |
请求示例
------WebKitFormBoundaryOr9QRWfnHXqngnif
Content-Disposition: form-data; name="model"
{"ticketId":1,"handlerId":"1","handlerIdType":1,"taskId":"2580f848-af01-11ec-a454-6259a6ed7ff4","stateId":123,"form":{"id":1,"name:":"表单名称","fields":[{"id":1,"name":"字段1","type":1,"required":0,"value":"xxx"},{"id":2,"name":"字段2","type":2,"required":1,"value":"xxx"},{"id":3,"name":"附件","type":14,"required":1,"value":""},{"id":4,"name":"级联多选","type":18,"required":1,"value":"1,11,111,1111##2,22,222,2222"},{"id":100,"name":"子表单名称","type":99,"required":1,"value":"分类名称","children":[{"id":1,"name":"字段1","type":1,"required":0,"value":"xxx"},{"id":2,"name":"字段2","type":2,"required":1,"value":"xxx"},{"id":3,"name":"附件","type":14,"required":1,"value":""},{"id":4,"name":"级联多选","type":18,"required":1,"value":"1,11,111,1111##2,22,222,2222"}]}]}}
------WebKitFormBoundaryOr9QRWfnHXqngnif
Content-Disposition: form-data; name="3"; filename="xxxxxx.xlsx"
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
------WebKitFormBoundaryOr9QRWfnHXqngnif
Content-Disposition: form-data; name="3"; filename="aaaaaa.xlsx"
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
------WebKitFormBoundaryOr9QRWfnHXqngnif
Content-Disposition: form-data; name="100分类名称3"; filename="xxxxxx.xlsx"
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
------WebKitFormBoundaryOr9QRWfnHXqngnif
Content-Disposition: form-data; name="100分类名称3"; filename="aaaaaa.xlsx"
Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
3.20. 获取属性表单详情
GET /ticket/get_sys_form_detail
请求参数
无
返回参数
名称 |
类型 |
描述 |
form |
TicketFormModel |
工单模板表单实体对象 表单实体对象详情 |
返回示例
{
"requestId":"4ed8f07d-683e-49b6-8759-c9c3ad08da5e",
"form":{
"id":1,
"name":"工单记录默认表单",
"fields":[
{
"id":1,
"name":"单行文本",
"type":1,
"property":null,
"required":0
},
{
"id":11,
"name":"日期时间",
"type":11,
"property":null,
"required":0
}
]
}
}
3.21. 获取子表单列表
GET /ticket/get_child_form_list
请求参数
名称 |
类型 |
是否必需 |
描述 |
formId |
Integer |
false |
查询条件,子表单id |
formName |
String |
false |
查询条件,子表单名称 |
offset |
Integer |
false |
偏移量,范围 大于等于0。默认值为 0 |
limit |
Integer |
false |
查询条数,范围 10-100。默认值为 10 |
返回参数
名称 |
类型 |
描述 |
forms |
OpenapiFormListVo |
工单子表单表单实体对象 子表单列表实体对象详情 |
子表单列表实体对象详情
名称 |
类型 |
描述 |
id |
Integer |
子表单 ID |
name |
String |
子表单名称 |
description |
String |
子表单描述 |
createTime |
Long |
子表单创建时间戳 |
updateTime |
Long |
子表单更新时间戳 |
enabled |
Integer |
子表单是否启用,0:禁用,1:启用 |
cascade |
Integer |
子表单是否级联,0:列表,1:级联 |
返回示例
{
"data": {
"start": 0,
"currentPageNo": 1,
"pageSize": 20,
"data": [
{
"id": 19770,
"name": "子表单",
"description": "子表单描述",
"createTime": 1698051047523,
"updateTime": 1698051047523,
"enabled": 1,
"cascade": 0,
"property": "[]"
}],
"totalCount": 20,
"totalPageCount": 1,
"countMap": {}
},
"requestId": null
}
3.22. 获取子表单详情
GET /ticket/get_child_form_detail
请求参数
名称 |
类型 |
是否必需 |
描述 |
formId |
Integer |
true |
子表单id |
子表单实体对象详情
名称 |
类型 |
描述 |
id |
Integer |
子表单 ID |
name |
String |
子表单名称 |
description |
String |
子表单描述 |
createTime |
Long |
子表单创建时间戳 |
updateTime |
Long |
子表单更新时间戳 |
enabled |
Integer |
子表单是否启用,0:禁用,1:启用 |
cascade |
Integer |
子表单是否级联,0:列表,1:级联 |
property |
String |
子表单级联属性配置,json格式存储的层级关系 |
formConfig.exportColumnMode |
Integer |
子表单导出时的列模式,0:分类数据在一列中展示,1:按照分类分成多列展示 |
childrenFormModelList |
List<Field> |
表单中保存的字段集合 子表单字段实体对象详情 |
子表单字段实体对象详情
名称 |
类型 |
描述 |
fieldId |
Integer |
字段 ID |
name |
String |
字段名称 |
priority |
Integer |
排序,值越小越靠前 |
property |
String |
字段的配置,如单选、下拉的选项 |
required |
Integer |
字段是否必填,0:非必填,1:必填 |
group |
String |
字段所属分组 |
groupDesc |
String |
字段所属分组描述信息 |
type |
Integer |
字段类型 取值范围如下: 1: 单行文本, 2: 数值, 3: 邮件, 4: IP地址, 5: 多行文本, 6: 下拉框, 7: 自定义级联, 8: 地区级联, 9: 单选框, 10: 复选框, 11: 日期和时间, 12: 日期, 13: 时间, 14: 文件, 15: 签名, 16: 定位, 17:自增表格, 18: 级联多选, 99: 子表单, 110:富文本 |
返回示例
{
"data": {
"id": 20336,
"name": "zhy子表单级联",
"description": "",
"createTime": 1694162097251,
"updateTime": 1694162097251,
"childrenFormModelList": [{
"fields": [{
"type": 105,
"fieldId": 175168,
"priority": 1,
"required": 0,
"group": "f1,f2,f3,f4,f5",
"groupDesc": "",
"name": "zhy员工",
"property": "{\"typeLimit\":[0,1,3,4]}"
}, {
"type": 9,
"fieldId": 175172,
"priority": 2,
"required": 0,
"group": "f1,f2,f3,f4,f5",
"groupDesc": "",
"name": "zhy单选",
"property": "[{\"name\":\"a\",\"selected\":0,\"code\":null},{\"name\":\"b\",\"selected\":1,\"code\":\"\"},{\"name\":\"c\",\"selected\":0,\"code\":\"\"}]"
}],
"group": "f1,f2,f3,f4,f5",
"groupDesc": "",
"groupSerialNumber": 0
}, {
"fields": [{
"name": "zhy自定义下拉列表",
"type": 107,
"fieldId": 175176,
"priority": 1,
"required": 0,
"unique": 0,
"group": "f1,f2,f3",
"groupDesc": "123",
"property": "[{\"name\":\"下拉1\",\"selected\":0,\"code\":\"111\"},{\"name\":\"下拉2\",\"selected\":1,\"code\":\"222\"},{\"name\":\"下拉3\",\"selected\":0,\"code\":\"333\"}]"
}],
"group": "f1,f2,f3",
"groupDesc": "123"
}],
"cascade": 1,
"property": "[{\"code\":null,\"title\":\"f1\",\"options\":[{\"code\":null,\"title\":\"f2\",\"options\":[{\"code\":null,\"title\":\"f3\",\"options\":[{\"code\":null,\"title\":\"f4\",\"options\":[{\"code\":null,\"title\":\"f5\",\"options\":[],\"groupDesc\":null,\"id\":\"f1,f2,f3,f4,f5\"}],\"groupDesc\":null,\"id\":\"f1,f2,f3,f4\"}],\"groupDesc\":null,\"id\":\"f1,f2,f3\"}],\"groupDesc\":null,\"id\":\"f1,f2\"}],\"groupDesc\":null,\"id\":\"f1\"}]",
"formConfig": {
"exportColumnMode": 1
}
},
"requestId": null
}
3.23. 创建子表单
POST /ticket/create_child_form
Body 请求参数
名称 |
类型 |
描述 |
name |
String |
子表单名称 |
description |
String |
子表单描述 |
cascade |
Integer |
子表单是否级联,0:下拉,1:级联 |
formConfig.exportColumnMode |
Integer |
子表单导出时的列模式,0:分类数据在一列中展示,1:按照分类分成多列展示 |
fields |
List<Field> |
表单中保存的字段集合 子表单字段实体对象详情 |
请求示例
{
"name": "测试",
"description": "描述",
"cascade": 1,
"formConfig": {
"exportColumnMode": 0
},
"fields": [
{
"group": "1,11,12",
"groupDesc": "一",
"fieldId": 95262,
"required": 0,
"type": 8,
"priority": 1
},
{
"group": "1,11,12",
"groupDesc": "一",
"fieldId": 95263,
"required": 0,
"type": 18,
"priority": 2
},
{
"group": "1,11,13",
"groupDesc": "一二"
}
]
}
返回参数
同请求参数
3.24. 更新子表单
PUT /ticket/update_child_form
url 请求参数
名称 |
类型 |
是否必需 |
描述 |
formId |
Integer |
true |
子表单id |
Body 请求参数
名称 |
类型 |
描述 |
name |
String |
子表单名称 |
description |
String |
子表单描述 |
cascade |
Integer |
子表单是否级联,0:列表,1:级联 |
formConfig.exportColumnMode |
Integer |
子表单导出时的列模式,0:分类数据在一列中展示,1:按照分类分成多列展示 |
fields |
List<Field> |
表单中保存的字段集合 子表单字段实体对象详情 |
请求示例
{
"name": "测试",
"description": "描述",
"cascade": 1,
"formConfig": {
"exportColumnMode": 0
},
"fields": [
{
"group": "1,11,12",
"groupDesc": "一",
"fieldId": 95262,
"required": 0,
"type": 8,
"priority": 1
},
{
"group": "1,11,12",
"groupDesc": "一",
"fieldId": 95263,
"required": 0,
"type": 18,
"priority": 2
},
{
"group": "1,11,13",
"groupDesc": "一二"
}
]
}
3.26. 根据外部参数或ID查询工单插件
GET /ticket/get_ticket_plugin
请求参数
名称 |
类型 |
是否必需 |
描述 |
id |
Integer |
false |
工单插件ID, 和外部参数至少填一个, 如果两个参数都传了值, 以ID作为查询条件 |
extParam |
String |
false |
外部参数, 和ID至少填一个, 如果两个参数都传了值, 以ID作为查询条件 |
返回参数
名称 |
类型 |
描述 |
ticketPlugin |
TicketPluginModel |
工单插件实体对象 工单插件实体对象详情 |
工单插件实体对象详情
名称 |
类型 |
描述 |
name |
String |
工单插件名称 |
workflowId |
Integer |
工单模板 ID |
url |
String |
工单插件代码链接 |
返回示例
{
"name":"示例_工单插件",
"workflowId":1514,
"url":"https://api-bj.clink.cn/ticket.html?accessId=123"
}
3.27. 获取工单字段列表
POST /ticket/list_ticket_fields
请求参数
名称 | 类型 | 是否必需 | 描述 |
---|---|---|---|
ids |
Integer[] |
false |
字段 ID 集合 |
示例
请求URL
https://api-bj.clink.cn/ticket/list_ticket_fields
?<公共请求参数>
请求示例 请求参数
{
"ids": [1001, 1002]
}
工单字段
名称 | 类型 | 描述 |
---|---|---|
id |
Integer |
字段 ID |
name |
String |
字段名称 |
type |
Integer |
字段类型 6: 下拉框 7: 自定义级联 9: 单选框 10: 复选框 18: 级联多选 110: 富文本 |
property |
String |
属性参数 |
category |
Integer |
所属大类 1: 自定义字段 2: 系统字段 3: 系统自定义字段 |
返回示例
{
"requestId": "705fef39-3559-47d9-8fef-80a3e83e58cb",
"fields": [
{
"id": 1001,
"name": "示例_工单主题",
"type": 1,
"property": null,
"category": 2
},
{
"id": 1002,
"name": "0038下拉列表",
"type": 6,
"property": "[{\"name\":\"示例_下拉1\",\"selected\":0},{\"name\":\"示例_下拉2\",\"selected\":0},{\"name\":\"示例_下拉3\",\"selected\":0}]",
"category": 1
}
]
}
3.28. 更新工单字段选项值
POST /ticket/update_ticket_field_property
请求参数
名称 | 类型 | 是否必需 | 描述 |
---|---|---|---|
id |
Integer |
true |
字段 ID |
property |
String |
true |
字段选项值 JSON字符串 |
示例
请求URL
https://api-bj.clink.cn/ticket/update_ticket_field_property
?<公共请求参数>
请求示例 请求参数
{
"id": 1002,
"property": "[{\"name\":\"示例_下拉1\",\"selected\":0},{\"name\":\"示例_下拉2\",\"selected\":0},{\"name\":\"示例_下拉3\",\"selected\":0}]"
}
3.29. 工单监控HTTP告警推送说明
在工单监控指标满足工单监控告警指标条件后, 可以将告警指标、告警数据等通过http推送的方式, 推送至客户自有系统, 实现和客户系统之间的数据互通。 目前主要支持推送告警指标名称、告警数据、告警维度名称、告警通知人。
配置示例:
推送请求参数
名称 |
code |
类型 |
描述 |
告警指标名称 |
indexName |
String |
告警指标名称 |
告警维度名称 |
dimensionName |
String |
告警维度名称 |
告警数据 |
warningData |
Map<String, Map<String, String>> |
|
告警通知人 |
reminder |
List<SimpleReminder> |
告警通知人(默认推送)[SimpleReminder] |
SimpleReminder
名称 |
类型 |
描述 |
id |
Integer |
员工id |
enterpriseId |
Integer |
租户id |
cno |
String |
员工号 |
username |
String |
员工用户名 |
phone |
String |
员工电话 |
tags |
List<String> |
员工标签信息 |
告警数据
名称 |
类型 |
描述 |
key |
String |
纬度值信息,为JSON字符串。key.id:纬度值id,key.name:纬度值名称,key.type:纬度值类型。key.type的枚举值为:0-员工 1:3-部门 |
value |
Map<String, String> |
value.key为告警阈值,value.value为告警当前值 |
推送请求示例
{
"reminder": [{
"cno": "952709",
"enterpriseId": 8000376,
"id": 20849,
"name": "aaa",
"phone": "18217091909",
"tags": ["工单座席", "管理员"]
}, {
"cno": "800002",
"enterpriseId": 8000376,
"id": 2463585,
"name": "bbb",
"tags": ["微工单座席", "工单座席"]
}, {
"cno": "800001",
"enterpriseId": 8000376,
"id": 2463584,
"name": "ccc",
"tags": ["微工单座席", "工单座席"]
}, {
"cno": "051204",
"enterpriseId": 8000376,
"id": 2463459,
"name": "ddd",
"tags": ["在线客服普通座席", "工单座席", "管理员"]
}, {
"cno": "800003",
"enterpriseId": 8000376,
"id": 2463586,
"name": "eee",
"tags": ["微工单座席", "工单座席"]
}],
"indexName": "告警指标名称",
"warningData": {
"{\"name\":\"lisi(9988)\",\"id\":\"2494495\",\"type\":\"0\"}": {
"99": "0"
},
"{\"name\":\"zhangsan(952709)\",\"id\":\"20849\",\"type\":\"0\"}": {
"99": "99"
}
},
"dimensionName": "告警维度名称"
}
3.30. 获取时间段
Post /ticket/get_time_slot_optional_date
请求参数
名称 |
类型 |
是否必需 |
描述 |
formId |
Integer |
true |
表单 ID |
fieldId |
Integer |
true |
字段 ID |
skillId |
String |
false |
产品技能 ID |
timeSlotCount |
Integer |
false |
时间段个数(timeSlotCount与timeSlotDates两者必有一个) |
timeSlotDates |
List<String> |
false |
时间槽日期(timeSlotCount与timeSlotDates两者必有一个) |
请求示例
{
"formId":1234,
"fieldId":1234,
"skillId":"1234",
"timeSlotCount": 10
}
返回参数
名称 |
类型 |
描述 |
isSpecialSkills |
Boolean |
是否存在特殊技能 |
optionalTimeSlots |
Map |
时间段详情 |
返回示例
{
"result": {
"optionalTimeSlots": {
"2024-02-03": [
{
"startTime": "09:00",
"endTime": "09:30",
"count": 3
},
{
"startTime": "09:30",
"endTime": "10:00",
"count": 3
}
],
"2024-02-01": [
{
"startTime": "09:00",
"endTime": "09:30",
"count": 0
},
{
"startTime": "09:30",
"endTime": "10:00",
"count": 0
}
]
},
"isSpecialSkills": false
},
"requestId": "4ed8f07d-683e-49b6-8759-c9c3ad08da5e"
}
3.31. 时间槽占用
Post /ticket/time_slot_occupy
请求参数
名称 |
类型 |
是否必需 |
描述 |
timeSlotDate |
String |
true |
时间槽日期 |
startTime |
String |
true |
时间段开始时间 |
endTime |
String |
true |
时间段结束时间 |
formId |
Integer |
true |
表单 ID |
fieldId |
Integer |
true |
字段 ID |
skillId |
String |
false |
产品技能 ID |
请求示例
{
"timeSlotDate":"2024-01-08",
"startTime":"17:00",
"endTime":"17:30",
"formId":1234,
"fieldId":1234,
"skillId":"1"
}
返回参数
名称 |
类型 |
描述 |
result |
Integer |
占用时间槽对应的 ID |
返回示例
{
"result": 123,
"requestId": "4ed8f07d-683e-49b6-8759-c9c3ad08da5e"
}
3.32. 时间槽取消占用
Get /ticket/time_slot_cancel_occupy
请求参数
名称 |
类型 |
是否必需 |
描述 |
cancelOccupyId |
Integer |
true |
取消占用时间槽对应的 ID |
3.33. 创建工单参数示例
Get /ticket/mock_save_ticket
请求参数
名称 |
类型 |
是否必需 |
描述 |
workflowName |
String |
true |
(需要生成创建工单接口model参数对应的)工单模版名称 |
返回参数
名称 |
类型 |
描述 |
requestId |
String |
请求 ID |
model |
String |
工单创建接口时的model参数示例值 |
返回示例
{
"requestId": "9c218970-f1d9-4571-9dc0-0c5415d95af3",
"model": "{\"workflowId\":18140,\"customerId\":781721593,\"topic\":\"这是topic\",\"level\":0,\"creatorId\":\"110442745\",\"creatorIdType\":1,\"handlerType\":0,\"handlerId\":\"804829024\",\"handlerIdType\":0,\"focus\":[\"1704155895\",\"1231046379\"],\"focusIdType\":1,\"tags\":[{\"name\":\"lint标签\",\"color\":3},{\"name\":\"五二五\",\"color\":10}],\"relateTicketId\":[123],\"stateSelected\":\"已完成\",\"externalId\":\"1024848224\",\"form\":{\"id\":32391,\"name\":\"知识审核_创建表单\",\"taskKey\":\"StartEvent_1uwp14d\",\"fields\":[{\"id\":288542,\"name\":\"知识类型\",\"value\":\"这个是一个单行文本的示例\",\"type\":1,\"required\":0},{\"id\":288540,\"name\":\"所属目录\",\"value\":\"这个是一个单行文本的示例\",\"type\":1,\"required\":0},{\"id\":288537,\"name\":\"客户问题\",\"value\":\"这个是一个单行文本的示例\",\"type\":1,\"required\":0},{\"id\":288538,\"name\":\"问题名称/文档名称\",\"type\":5,\"required\":0},{\"id\":288541,\"name\":\"变更内容\",\"type\":5,\"required\":0},{\"id\":288536,\"name\":\"文档\",\"type\":5,\"required\":0},{\"id\":288543,\"name\":\"问题答案\",\"type\":5,\"required\":0},{\"id\":288539,\"name\":\"知识简介/文档说明\",\"type\":5,\"required\":0}]},\"createTime\":1749089006473,\"close\":0,\"customizeSystemFields\":[{\"id\":120177,\"name\":\"工单主题\",\"value\":\"这个是一个单行文本的示例\",\"type\":1,\"required\":0},{\"id\":120178,\"name\":\"优先级\",\"value\":\"这个是一个单行文本的示例\",\"type\":1,\"required\":0},{\"id\":120179,\"name\":\"工单标签\",\"value\":\"这个是一个单行文本的示例\",\"type\":1,\"required\":0},{\"id\":120180,\"name\":\"工单关注人\",\"value\":\"这个是一个单行文本的示例\",\"type\":1,\"required\":0},{\"id\":121215,\"name\":\"提单用户\",\"type\":104,\"required\":0},{\"id\":137574,\"name\":\"关联工单数\",\"value\":\"100\",\"type\":2,\"required\":0},{\"id\":121168,\"name\":\"客户名称\",\"type\":106,\"required\":0},{\"id\":211291,\"name\":\"创建人\",\"value\":\"1_1465141\",\"type\":105,\"required\":0},{\"id\":211292,\"name\":\"创建时间\",\"value\":\"2025/05/19 15:41:15\",\"type\":11,\"required\":0},{\"id\":211293,\"name\":\"修改人\",\"value\":\"1_1465141\",\"type\":105,\"required\":0},{\"id\":211294,\"name\":\"修改时间\",\"value\":\"2025/05/19 15:41:15\",\"type\":11,\"required\":0},{\"id\":211295,\"name\":\"完成人\",\"value\":\"1_1465141\",\"type\":105,\"required\":0},{\"id\":211296,\"name\":\"完成时间\",\"value\":\"2025/05/19 15:41:15\",\"type\":11,\"required\":0},{\"id\":211297,\"name\":\"关闭人\",\"value\":\"1_1465141\",\"type\":105,\"required\":0},{\"id\":211298,\"name\":\"关闭时间\",\"value\":\"2025/05/19 15:41:15\",\"type\":11,\"required\":0},{\"id\":211299,\"name\":\"到期时间\",\"value\":\"2025/05/19 15:41:15\",\"type\":11,\"required\":0},{\"id\":211300,\"name\":\"最近催单时间\",\"value\":\"2025/05/19 15:41:15\",\"type\":11,\"required\":0},{\"id\":177257,\"name\":\"yangjw属性电话\",\"value\":\"(+86)17600000000\",\"type\":100,\"required\":0},{\"id\":211301,\"name\":\"催单次数\",\"value\":\"100\",\"type\":2,\"required\":0},{\"id\":177258,\"name\":\"yangjw属性邮箱\",\"value\":\"user@example.com\",\"type\":3,\"required\":0},{\"id\":177259,\"name\":\"yangjw属性ip\",\"value\":\"192.168.1.1\",\"type\":4,\"required\":0},{\"id\":177260,\"name\":\"yangjw属性多行\",\"value\":\"校验规则被删了,属性字段是全局的,需要校验规则,自行使用单独的字段:^(\\\\d{18,18}|\\\\d{15,15}|\\\\d{17,17}X)$\\n511381133412346789\",\"type\":5,\"required\":0},{\"id\":177261,\"name\":\"yangjw属性\",\"value\":\"属性下\",\"type\":6,\"required\":0},{\"id\":177262,\"name\":\"yangjw属性单选\",\"value\":\"属性单选2\",\"type\":9,\"required\":0},{\"id\":177263,\"name\":\"yangjw属性复选-平铺\",\"value\":\"属性复选\",\"type\":10,\"required\":0},{\"id\":177264,\"name\":\"yangjw属性日期时间\",\"value\":\"2025/05/19 15:41:15\",\"type\":11,\"required\":0},{\"id\":177265,\"name\":\"yangjw属性日期\",\"value\":\"2025/05/19\",\"type\":12,\"required\":0},{\"id\":177266,\"name\":\"yangjw属性时间\",\"value\":\"00:01:16\",\"type\":13,\"required\":0},{\"id\":177268,\"name\":\"yangjw属性附件\",\"type\":14,\"required\":0},{\"id\":177269,\"name\":\"yangjw属性员工员\",\"value\":\"1_1465141\",\"type\":105,\"required\":0},{\"id\":177270,\"name\":\"yangjw属性列表检索\",\"value\":\"外部扩展列表检索\",\"type\":109,\"required\":0},{\"id\":263940,\"name\":\"处理人\",\"value\":\"1_1465141\",\"type\":105,\"required\":0},{\"id\":260280,\"name\":\"yangjw属性级联\",\"value\":\"属性级联超长\",\"type\":7,\"required\":0},{\"id\":280701,\"name\":\"发件邮箱\",\"value\":\"user@example.com\",\"type\":3,\"required\":0},{\"id\":304582,\"name\":\"迟滞客服来源\",\"value\":\"迟滞客服来源\",\"type\":6,\"required\":0},{\"id\":260538,\"name\":\"yangjw属性区号电话\",\"value\":\"(+86)17600000000\",\"type\":100,\"required\":0},{\"id\":280702,\"name\":\"收件邮箱\",\"value\":\"user@example.com\",\"type\":3,\"required\":0},{\"id\":294955,\"name\":\"自动打标签\",\"value\":\"在线客服来源\",\"type\":6,\"required\":0},{\"id\":288220,\"name\":\"工单系统状态123\",\"value\":\"下拉2\",\"type\":6,\"required\":0},{\"id\":264498,\"name\":\"工单状态\",\"value\":\"这个是一个单行文本的示例\",\"type\":1,\"required\":1},{\"id\":280486,\"name\":\"Q员工\",\"value\":\"1_1465141\",\"type\":105,\"required\":0},{\"id\":280509,\"name\":\"CJJ测试属性字段\",\"value\":\"这个是一个单行文本的示例\",\"type\":1,\"required\":0},{\"id\":280831,\"name\":\"附件\",\"type\":14,\"required\":0},{\"id\":280924,\"name\":\"验证文本数值\",\"value\":\"这个是一个单行文本的示例\",\"type\":1,\"required\":0},{\"id\":280971,\"name\":\"mask1\",\"value\":\"user@example.com\",\"type\":3,\"required\":0},{\"id\":329,\"name\":\"预警进度-\",\"value\":\"高\",\"type\":6,\"required\":0},{\"id\":284405,\"name\":\"msk单选\",\"value\":\"低1-改黄色\",\"type\":9,\"required\":0},{\"id\":284678,\"name\":\"liuxl下拉-优先级\",\"value\":\"低1-改黄色\",\"type\":6,\"required\":0},{\"id\":284679,\"name\":\"liuxl单选-优先级\",\"value\":\"低1-改黄色\",\"type\":9,\"required\":0},{\"id\":284680,\"name\":\"liuxl下拉与自定义的单选值相同\",\"value\":\"平均\",\"type\":6,\"required\":0},{\"id\":284681,\"name\":\"liuxl复选2\",\"value\":\"白居易\",\"type\":10,\"required\":0},{\"id\":284682,\"name\":\"liuxl单选2\",\"value\":\"单选2\",\"type\":9,\"required\":0},{\"id\":284732,\"name\":\"msk下拉\",\"value\":\"低1-改黄色\",\"type\":6,\"required\":0},{\"id\":284756,\"name\":\"yangjw属性级联\",\"value\":\"1,11,111\",\"type\":7,\"required\":0},{\"id\":285746,\"name\":\"OOOliuxl新的属性\",\"value\":\"这个是一个单行文本的示例\",\"type\":1,\"required\":0},{\"id\":289778,\"name\":\"liuxl数值\",\"value\":\"100\",\"type\":2,\"required\":0},{\"id\":290757,\"name\":\"ls测试插件\",\"value\":\"2\",\"type\":6,\"required\":0},{\"id\":290772,\"name\":\"yanxp属性复选平铺\",\"value\":\"复选7,复选5,复选6,复选8,复选3,复选4\",\"type\":10,\"required\":0},{\"id\":290858,\"name\":\"单行-不限\",\"value\":\"这个是一个单行文本的示例\",\"type\":1,\"required\":0},{\"id\":290859,\"name\":\"单行-数值\",\"value\":\"100\",\"type\":2,\"required\":0},{\"id\":290860,\"name\":\"-单行-电话\",\"value\":\"(+86)17600000000\",\"type\":100,\"required\":0},{\"id\":290861,\"name\":\"-单行-不限IP\",\"value\":\"192.168.1.1\",\"type\":4,\"required\":0},{\"id\":290862,\"name\":\"-单行-邮箱\",\"value\":\"user@example.com\",\"type\":3,\"required\":0},{\"id\":290863,\"name\":\"-多行\",\"type\":5,\"required\":0},{\"id\":290864,\"name\":\"-日期时间-日期时间\",\"value\":\"2025/05/19 15:41:15\",\"type\":11,\"required\":0},{\"id\":290865,\"name\":\"-日期时间-日期\",\"value\":\"2025/05/19\",\"type\":12,\"required\":0},{\"id\":290866,\"name\":\"-日期时间-时间\",\"value\":\"15:41:15\",\"type\":13,\"required\":0},{\"id\":290868,\"name\":\"-级联\",\"value\":\"Aa12中文,Bb12中文\",\"type\":7,\"required\":0},{\"id\":290869,\"name\":\"-单选\",\"value\":\"Aa1中\",\"type\":9,\"required\":0},{\"id\":290870,\"name\":\"-复选\",\"value\":\"Aa12中文_01,Aa12中文_02\",\"type\":10,\"required\":0},{\"id\":290871,\"name\":\"-附件\",\"type\":14,\"required\":0},{\"id\":290960,\"name\":\"yangjw属性复选-下拉\",\"value\":\"属性复选下拉\",\"type\":10,\"required\":0},{\"id\":291183,\"name\":\"yytest-新增属性字段\",\"value\":\"这个是一个单行文本的示例\",\"type\":1,\"required\":0},{\"id\":291823,\"name\":\"yangjw属性数值\",\"value\":\"100\",\"type\":2,\"required\":0},{\"id\":293929,\"name\":\"yangjw属性多行超链接\",\"value\":\"https://devops.aliyun.com/projex/project/a79e96e9956505cf3241a27488/sprint/992e437cb20bb19162f5ce0a54#activeTab=Workitem&viewIdentifier=2dd1ce2ff71a4dd0c396255086&openWorkitemIdentifier=d868db37a9eebd20524ec6b316\",\"type\":5,\"required\":0},{\"id\":294035,\"name\":\"yangjw属性单行\",\"value\":\"这个是一个单行文本的示例\",\"type\":1,\"required\":0},{\"id\":294564,\"name\":\"自动打标签-复制\",\"value\":\"在线客服来源\",\"type\":6,\"required\":0},{\"id\":294759,\"name\":\"zhy属性查找_员工\",\"value\":\"{\\\"productUniqueId\\\":\\\"836d2184-9ca7-493b-a93a-933fbf740798\\\",\\\"fieldType\\\":\\\"\\\"}\",\"type\":22,\"required\":0},{\"id\":294925,\"name\":\"zhy属性查找_单行\",\"value\":\"{\\\"productUniqueId\\\":\\\"836d2184-9ca7-493b-a93a-933fbf740798\\\",\\\"fieldType\\\":\\\"\\\"}\",\"type\":22,\"required\":0},{\"id\":294926,\"name\":\"zhy属性查找_多行\",\"value\":\"{\\\"productUniqueId\\\":\\\"836d2184-9ca7-493b-a93a-933fbf740798\\\",\\\"fieldType\\\":\\\"\\\"}\",\"type\":22,\"required\":0},{\"id\":294927,\"name\":\"zhy属性查找_数值\",\"value\":\"{\\\"productUniqueId\\\":\\\"836d2184-9ca7-493b-a93a-933fbf740798\\\",\\\"fieldType\\\":\\\"\\\"}\",\"type\":22,\"required\":0},{\"id\":295710,\"name\":\"附件-复制\",\"type\":14,\"required\":0}],\"callId\":\"af893302-c906-46e7-a526-9f97afbac900\",\"chatId\":\"b1958d39-1a55-45f6-8600-673d222af95e\",\"chatStartTime\":1749089006473,\"parentTicketId\":479069360,\"notFillFields\":0}"
}
3.34. 更新工单参数示例
Get /ticket/mock_update_ticket
示例
请求URL
https://api-bj.clink.cn/ticket/mock_update_ticket?id=69821&formId=32391&taskId=StartEvent_1uwp14d-27d98023-1e2c-4ffa-bf5f-598096c3957f&<公共请求参数>
请求参数
名称 |
类型 |
是否必需 |
描述 |
formId |
Integer |
false |
需要更新节点对应的表单ID(预制流时必填) |
taskId |
String |
false |
需要更新节点对应的任务ID(预制流时必填) |
id |
Integer |
false |
工单ID(id、externalId、customId至少填一个) |
externalId |
String |
false |
外部ID(id、externalId、customId至少填一个) |
customId |
String |
false |
自定义编号(id、externalId、customId至少填一个) |
返回参数
名称 |
类型 |
描述 |
requestId |
String |
请求 ID |
model |
String |
工单更新接口时的model参数示例值 |
返回示例
{
"requestId": "80580a24-ec66-46c8-8089-16b49b9cdddf",
"model": "{\"id\":69821,\"form\":{\"id\":32391,\"name\":\"知识审核_创建表单\",\"taskId\":\"StartEvent_1uwp14d-27d98023-1e2c-4ffa-bf5f-598096c3957f\",\"fields\":[{\"id\":288542,\"name\":\"知识类型\",\"value\":\"这个是一个单行文本的示例\",\"type\":1,\"required\":0},{\"id\":288540,\"name\":\"所属目录\",\"value\":\"这个是一个单行文本的示例\",\"type\":1,\"required\":0},{\"id\":288537,\"name\":\"客户问题\",\"value\":\"这个是一个单行文本的示例\",\"type\":1,\"required\":0},{\"id\":288538,\"name\":\"问题名称/文档名称\",\"type\":5,\"required\":0},{\"id\":288541,\"name\":\"变更内容\",\"type\":5,\"required\":0},{\"id\":288536,\"name\":\"文档\",\"type\":5,\"required\":0},{\"id\":288543,\"name\":\"问题答案\",\"type\":5,\"required\":0},{\"id\":288539,\"name\":\"知识简介/文档说明\",\"type\":5,\"required\":0}]},\"updateTime\":1749090011749,\"topic\":\"这是topic\",\"level\":0,\"focus\":[\"1768999099\",\"307445229\"],\"focusIdType\":1,\"tags\":[{\"name\":\"lint标签\",\"color\":3},{\"name\":\"五二五\",\"color\":10}],\"stateSelected\":\"已完成\",\"customizeSystemFields\":[{\"id\":120177,\"name\":\"工单主题\",\"value\":\"这个是一个单行文本的示例\",\"type\":1,\"required\":0},{\"id\":120178,\"name\":\"优先级\",\"value\":\"这个是一个单行文本的示例\",\"type\":1,\"required\":0},{\"id\":120179,\"name\":\"工单标签\",\"value\":\"这个是一个单行文本的示例\",\"type\":1,\"required\":0},{\"id\":120180,\"name\":\"工单关注人\",\"value\":\"这个是一个单行文本的示例\",\"type\":1,\"required\":0},{\"id\":121215,\"name\":\"提单用户\",\"type\":104,\"required\":0},{\"id\":211295,\"name\":\"完成人\",\"value\":\"1_1465141\",\"type\":105,\"required\":0},{\"id\":211296,\"name\":\"完成时间\",\"value\":\"2025/05/19 15:41:15\",\"type\":11,\"required\":0},{\"id\":211297,\"name\":\"关闭人\",\"value\":\"1_1465141\",\"type\":105,\"required\":0},{\"id\":211298,\"name\":\"关闭时间\",\"value\":\"2025/05/19 15:41:15\",\"type\":11,\"required\":0},{\"id\":211299,\"name\":\"到期时间\",\"value\":\"2025/05/19 15:41:15\",\"type\":11,\"required\":0},{\"id\":211300,\"name\":\"最近催单时间\",\"value\":\"2025/05/19 15:41:15\",\"type\":11,\"required\":0},{\"id\":177257,\"name\":\"yangjw属性电话\",\"value\":\"(+86)17600000000\",\"type\":100,\"required\":0},{\"id\":137574,\"name\":\"关联工单数\",\"value\":\"100\",\"type\":2,\"required\":0},{\"id\":211301,\"name\":\"催单次数\",\"value\":\"100\",\"type\":2,\"required\":0},{\"id\":211291,\"name\":\"创建人\",\"value\":\"1_1465141\",\"type\":105,\"required\":0},{\"id\":211292,\"name\":\"创建时间\",\"value\":\"2025/05/19 15:41:15\",\"type\":11,\"required\":0},{\"id\":211293,\"name\":\"修改人\",\"value\":\"1_1465141\",\"type\":105,\"required\":0},{\"id\":211294,\"name\":\"修改时间\",\"value\":\"2025/05/19 15:41:15\",\"type\":11,\"required\":0},{\"id\":121168,\"name\":\"客户名称\",\"type\":106,\"required\":0},{\"id\":177258,\"name\":\"yangjw属性邮箱\",\"value\":\"user@example.com\",\"type\":3,\"required\":0},{\"id\":177259,\"name\":\"yangjw属性ip\",\"value\":\"192.168.1.1\",\"type\":4,\"required\":0},{\"id\":177260,\"name\":\"yangjw属性多行\",\"value\":\"校验规则被删了,属性字段是全局的,需要校验规则,自行使用单独的字段:^(\\\\d{18,18}|\\\\d{15,15}|\\\\d{17,17}X)$\\n511381133412346789\",\"type\":5,\"required\":0},{\"id\":177261,\"name\":\"yangjw属性下拉\",\"value\":\"属性下拉\",\"type\":6,\"required\":0},{\"id\":177262,\"name\":\"yangjw属性单选\",\"value\":\"属性单选2\",\"type\":9,\"required\":0},{\"id\":177263,\"name\":\"yangjw属性复选-平铺\",\"value\":\"属性复选\",\"type\":10,\"required\":0},{\"id\":177264,\"name\":\"yangjw属性日期时间\",\"value\":\"2025/05/19 15:41:15\",\"type\":11,\"required\":0},{\"id\":177265,\"name\":\"yangjw属性日期\",\"value\":\"2025/05/19\",\"type\":12,\"required\":0},{\"id\":177266,\"name\":\"yangjw属性时间\",\"value\":\"00:01:16\",\"type\":13,\"required\":0},{\"id\":177268,\"name\":\"yangjw属性附件\",\"type\":14,\"required\":0},{\"id\":177269,\"name\":\"yangjw属性员工\",\"value\":\"1_1465141\",\"type\":105,\"required\":0},{\"id\":263940,\"name\":\"处理人\",\"value\":\"1_1465141\",\"type\":105,\"required\":0},{\"id\":177270,\"name\":\"yangjw属性列表检索\",\"value\":\"外部扩展列表检索\",\"type\":109,\"required\":0},{\"id\":260280,\"name\":\"yangjw属性级联\",\"value\":\"属性级联\",\"type\":7,\"required\":0},{\"id\":280701,\"name\":\"发件邮箱\",\"value\":\"user@example.com\",\"type\":3,\"required\":0},{\"id\":280702,\"name\":\"收件邮箱\",\"value\":\"user@example.com\",\"type\":3,\"required\":0},{\"id\":294955,\"name\":\"自动打标签\",\"value\":\"在线客服来源\",\"type\":6,\"required\":0},{\"id\":304582,\"name\":\"迟滞客服来源\",\"value\":\"迟滞客服来源\",\"type\":6,\"required\":0},{\"id\":260538,\"name\":\"yangjw属性区号电话\",\"value\":\"(+86)17600000000\",\"type\":100,\"required\":0},{\"id\":288220,\"name\":\"工单系统状态123\",\"value\":\"下拉2\",\"type\":6,\"required\":0},{\"id\":264498,\"name\":\"工单状态\",\"value\":\"这个是一个单行文本的示例\",\"type\":1,\"required\":1},{\"id\":280486,\"name\":\"Q员工\",\"value\":\"1_1465141\",\"type\":105,\"required\":0},{\"id\":280509,\"name\":\"CJJ测试属性字段\",\"value\":\"这个是一个单行文本的示例\",\"type\":1,\"required\":0},{\"id\":280831,\"name\":\"附件\",\"type\":14,\"required\":0},{\"id\":280924,\"name\":\"验证文本数值\",\"value\":\"这个是一个单行文本的示例\",\"type\":1,\"required\":0},{\"id\":280971,\"name\":\"mask1\",\"value\":\"user@example.com\",\"type\":3,\"required\":0},{\"id\":329,\"name\":\"预警进度-\",\"value\":\"中\",\"type\":6,\"required\":0},{\"id\":284405,\"name\":\"msk单选\",\"value\":\"低1-改黄色\",\"type\":9,\"required\":0},{\"id\":284678,\"name\":\"liuxl下拉-优先级\",\"value\":\"中\",\"type\":6,\"required\":0},{\"id\":284679,\"name\":\"liuxl单选-优先级\",\"value\":\"高\",\"type\":9,\"required\":0},{\"id\":284680,\"name\":\"liuxl下拉与自定义的单选值相同\",\"value\":\"末尾\",\"type\":6,\"required\":0},{\"id\":284681,\"name\":\"liuxl复选2\",\"value\":\"白居易\",\"type\":10,\"required\":0},{\"id\":284682,\"name\":\"liuxl单选2\",\"value\":\"单选2\",\"type\":9,\"required\":0},{\"id\":284732,\"name\":\"msk下拉\",\"value\":\"低1-改黄色\",\"type\":6,\"required\":0},{\"id\":284756,\"name\":\"yangjw属性级联\",\"value\":\"2,21,211\",\"type\":7,\"required\":0},{\"id\":285746,\"name\":\"OOOliuxl新\",\"value\":\"这个是一个单行文本的示例\",\"type\":1,\"required\":0},{\"id\":289778,\"name\":\"liuxl数值\",\"value\":\"100\",\"type\":2,\"required\":0},{\"id\":290757,\"name\":\"ls测试插件\",\"value\":\"2\",\"type\":6,\"required\":0},{\"id\":290772,\"name\":\"yanxp属性复选平铺\",\"value\":\"复选6,复选1\",\"type\":10,\"required\":0},{\"id\":290858,\"name\":\"-单行-不限\",\"value\":\"这个是一个单行文本的示例\",\"type\":1,\"required\":0},{\"id\":290859,\"name\":\"-单行-数值\",\"value\":\"100\",\"type\":2,\"required\":0},{\"id\":290860,\"name\":\"-单行-电话\",\"value\":\"(+86)17600000000\",\"type\":100,\"required\":0},{\"id\":290861,\"name\":\"-单行-不限IP\",\"value\":\"192.168.1.1\",\"type\":4,\"required\":0},{\"id\":290862,\"name\":\"-单行-邮箱\",\"value\":\"user@example.com\",\"type\":3,\"required\":0},{\"id\":290863,\"name\":\"-多行\",\"type\":5,\"required\":0},{\"id\":290864,\"name\":\"-日期时间-日期时间\",\"value\":\"2025/05/19 15:41:15\",\"type\":11,\"required\":0},{\"id\":290865,\"name\":\"-日期时间-日期\",\"value\":\"2025/05/19\",\"type\":12,\"required\":0},{\"id\":290866,\"name\":\"-日期时间-时间\",\"value\":\"15:41:15\",\"type\":13,\"required\":0},{\"id\":290868,\"name\":\"-级联\",\"value\":\"Aa12中文,Cc12中文\",\"type\":7,\"required\":0},{\"id\":290869,\"name\":\"-单选\",\"value\":\"Aa1中\",\"type\":9,\"required\":0},{\"id\":290870,\"name\":\"-复选\",\"value\":\"Aa12中文_03\",\"type\":10,\"required\":0},{\"id\":290871,\"name\":\"-附件\",\"type\":14,\"required\":0},{\"id\":290960,\"name\":\"yangjw属性复选-下拉\",\"value\":\"属性复选下拉1,属性复选下拉2,属性复选下拉3\",\"type\":10,\"required\":0},{\"id\":291183,\"name\":\"yytest-新增属性字段\",\"value\":\"这个是一个单行文本的示例\",\"type\":1,\"required\":0},{\"id\":291823,\"name\":\"yangjw属性数值\",\"value\":\"100\",\"type\":2,\"required\":0},{\"id\":293929,\"name\":\"yangjw属性多行超链接\",\"value\":\"https://devops.aliyun.com/projex/project/a79e96e9956505cf3241a27488/sprint/992e437cb20bb19162f5ce0a54#activeTab=Workitem&viewIdentifier=2dd1ce2ff71a4dd0c396255086&openWorkitemIdentifier=d868db37a9eebd20524ec6b316\",\"type\":5,\"required\":0},{\"id\":294035,\"name\":\"yangjw属性单行\",\"value\":\"这个是一个单行文本的示例\",\"type\":1,\"required\":0},{\"id\":294564,\"name\":\"自动打标签-复制\",\"value\":\"在线客服来源\",\"type\":6,\"required\":0},{\"id\":294759,\"name\":\"zhy属性查找_员工\",\"value\":\"{\\\"productUniqueId\\\":\\\"836d2184-9ca7-493b-a93a-933fbf740798\\\",\\\"fieldType\\\":\\\"\\\"}\",\"type\":22,\"required\":0},{\"id\":294925,\"name\":\"zhy属性查找_单行\",\"value\":\"{\\\"productUniqueId\\\":\\\"836d2184-9ca7-493b-a93a-933fbf740798\\\",\\\"fieldType\\\":\\\"\\\"}\",\"type\":22,\"required\":0},{\"id\":294926,\"name\":\"zhy属性查找_多行\",\"value\":\"{\\\"productUniqueId\\\":\\\"836d2184-9ca7-493b-a93a-933fbf740798\\\",\\\"fieldType\\\":\\\"\\\"}\",\"type\":22,\"required\":0},{\"id\":294927,\"name\":\"zhy属性查找_数值\",\"value\":\"{\\\"productUniqueId\\\":\\\"836d2184-9ca7-493b-a93a-933fbf740798\\\",\\\"fieldType\\\":\\\"\\\"}\",\"type\":22,\"required\":0},{\"id\":295710,\"name\":\"附件-复制\",\"type\":14,\"required\":0}]}"
}
3.35. 工单催单参数示例
Get /ticket/mock_reminder_ticket
请求参数
名称 |
类型 |
是否必需 |
描述 |
ticketId |
Integer |
false |
工单ID(ticketId、customId至少填一个) |
customId |
String |
false |
自定义编号(ticketId、customId至少填一个) |
返回参数
名称 |
类型 |
描述 |
requestId |
String |
请求 ID |
model |
String |
工单催单接口时的model参数示例值 |
返回示例
{
"requestId": "64a52726-2043-47a0-b64c-5a4f8feebb42",
"model": "{\"userId\":\"-3\",\"userIdType\":1,\"userName\":\"系统\",\"reminderRemark\":\"这是一个催单描述示例\",\"taskId\":\"ec96fc6d-41b1-11f0-afd1-ee2322a1e532\",\"ticketId\":69821,\"customId\":\"kk-69821\"}"
}
4. 工单报表
4.1. 工单整体统计报表
POST /ticket/stat_ticket
|
请求参数
字段名 | 类型 | 是否必须 | 说明 |
---|---|---|---|
date |
String |
是 |
同步日期,时间格式 (yyyyMMdd) |
fields |
List<String> |
否 |
指定需要显示的字段 (默认全部) |
tag |
String |
否 |
标签 |
sources |
List<String> |
否 |
渠道来源 0: 呼叫中心 1: 在线咨询 2: 微信 3: 人工添加 4: 小程序 5: 微博 6: 电子邮件 7: app端 8: 企业微信 9: 微信客服(独立版) 10: 第三方接入 11: 接口创建 12: 企微客服 14: 抖音企业号 15: 百度营销 16: sdk渠道 17: 自助工单 18: 访客端APP 19: 微信客服 20: 人工导入创建 21: 企微助手 22: 自动化任务创建 23: 飞书 24: 留言节点 30: 接口创建 31: 知识库审批 32: 智能质检 33: 触发器 34: 视频客服 35: 邮件工单 36: 在线留言 37: 机器人工单 |
statisticMethod |
Integer |
否 |
统计方式 (默认为 1) 取值范围为 [1, 2]; 1: 分时统计; 2: 分日统计 |
报表字段 注:时长字段 单位均为秒
字段名 |
类型 |
说明 |
date |
String |
日期 当统计方式为2时会回传同步日期; 统计方式为1时会返回分时信息,例 0-1时 |
ticketNewCount |
Integer |
新增工单数 |
ticketSolvedCount |
Integer |
已解决工单数 |
ticketAvgSolvedDuration |
String |
平均工单解决时长 |
ticketToBeSolvedCount |
Integer |
待解决工单数 |
ticketOvertimeCount |
Integer |
超时工单数 |
ticketSolvedRate |
String |
解决率 |
ticketToBeSolvedRate |
String |
待解决率 |
ticketReportTotalCount |
Integer |
总工单数 |
ticketSolveImmediatelyCount |
Integer |
首次解决数 |
ticketSolveImmediatelyRate |
String |
首次解决率 |
返回参数
名称 |
类型 |
描述 |
statTicket |
List<Map<String,Object>> |
报表数据 |
示例
请求示例
https://api-bj.clink.cn/ticket/stat_ticket
?date=20220819
&<公共请求参数>
返回示例
{
"requestId": "accc5638-e56e-4bb0-b09b-3e565447c479",
"statTicket": [
{
"date": "9-10时",
"ticketNewCount": 1,
"ticketSolvedCount": 0,
"ticketAvgSolvedDuration": "00:00:00",
"ticketToBeSolvedCount": 1,
"ticketOvertimeCount": 0,
"ticketSolvedRate": "0%",
"ticketToBeSolvedRate": "100%",
"ticketReportTotalCount": 2,
"ticketSolveImmediatelyCount": 0,
"ticketSolveImmediatelyRate": "0%"
}
]
}
4.2. 工单座席情况统计报表
POST /ticket/stat_ticket_client
|
请求参数
字段名 | 类型 | 是否必须 | 说明 |
---|---|---|---|
date |
String |
是 |
同步日期,时间格式 (yyyyMMdd) |
fields |
List<String> |
否 |
指定需要显示的字段 (默认全部) |
cnos |
List<String> |
否 |
座席号集合 (默认全部) |
报表字段 注:时长字段 单位均为秒
字段名 |
类型 |
说明 |
theQueue |
String |
所属座席组 |
cname |
String |
座席名称 |
ticketCreateCount |
Integer |
创建工单数 |
ticketCurrentHandleCount |
Integer |
处理数 |
ticketHandleCount |
Integer |
处理完成数 |
ticketSolvedCount |
Integer |
已解决工单数 |
ticketClientTotalCount |
Integer |
总工单数 |
ticketClientAssignedCount |
Integer |
被分配工单数 |
ticketClientClaimCount |
Integer |
主动领取工单数 |
ticketClientSolvedCount |
String |
解决工单数 |
返回参数
名称 |
类型 |
描述 |
statTicket |
List<Map<String,Object>> |
报表数据 |
示例
请求示例
https://api-bj.clink.cn/ticket/stat_ticket_client
?date=20220819
&<公共请求参数>
返回示例
{
"requestId": "c9513770-e6ee-4848-b370-5324de8d6fa3",
"statTicketByClient": [
{
"theQueue": "zhangpc",
"cname": "zhangpc[000000]",
"ticketCreateCount": 3,
"ticketCurrentHandleCount": 3,
"ticketHandleCount": 0,
"ticketSolvedCount": 0,
"ticketClientTotalCount": 102,
"ticketClientAssignedCount": 8,
"ticketClientClaimCount": 0,
"ticketClientSolvedCount": 2
}
]
}
4.3. 工单座席组情况统计报表
POST /ticket/stat_ticket_queue
|
请求参数
字段名 | 类型 | 是否必须 | 说明 |
---|---|---|---|
date |
String |
是 |
同步日期,时间格式 (yyyyMMdd) |
fields |
List<String> |
否 |
指定需要显示的字段 (默认全部) |
qnos |
List<String> |
否 |
座席组集合 (默认全部) |
报表字段 注:时长字段 单位均为秒
字段名 |
类型 |
说明 |
qname |
String |
座席组名称 |
ticketQueueTotalCount |
Integer |
总工单数 |
ticketQueueSolvedCount |
Integer |
已解决工单数 |
ticketQueueNeedHandleCount |
Integer |
待解决工单数 |
ticketQueueSolvedRate |
String |
工单解决率 |
ticketQueueNeedHandleRate |
String |
工单待解决率 |
返回参数
名称 |
类型 |
描述 |
statTicket |
List<Map<String,Object>> |
报表数据 |
示例
请求示例
https://api-bj.clink.cn/ticket/stat_ticket_queue
?date=20220819
&<公共请求参数>
返回示例
{
"requestId": "7d603025-5439-462e-9c4d-0a6100a97b74",
"statTicketByQueue": [
{
"qname": "zhangpc[0000]",
"ticketQueueTotalCount": 183,
"ticketQueueSolvedCount": 6,
"ticketQueueNeedHandleCount": 177,
"ticketQueueSolvedRate": "3.28%",
"ticketQueueNeedHandleRate": "96.72%"
}
]
}