1、创建工单。
1.1、请求路径
POST /openapi/flow/v1/order/create
1.2、请求参数
参数名 | 参数 | 类型 | 是否必填 | 备注 |
---|---|---|---|---|
流程模型id | templateId | String | Y | templateId, templateName只能有一个 |
创建类型 | createType | Integer | Y | 创建类型; 2 座席工号, 3 客户名称, 4 客户ID,5 客户手机号 |
创建类型对应值 | content | String | Y | 创建类型对应值; 座席工号/客户名称/客户ID/客户手机号 |
工单内容 | data | Json | Y | 工单内容, 工单模型属性编码kv键值对,示例:{"multi_text_wAXC_1700543422750":"test"} |
客户id | customerId | String | Y | 工单需关联一位客户 |
请求示例
{
"templateId": "742554901119381504",
"templateName": "",
"createType": 2,
"content": "6000",
"data": {
"text_p2jU_1701330017675": "测试文本444",
"checkbox_SFpa_1701330020818":[1,3],
"cascade_select_ebM6_1701657253066":["四川省","成都市","自贡市"]
},
"customerId": "742554901119381504"
}
1.3、响应参数
参数名 | 参数 | 类型 | 备注 |
---|---|---|---|
工单id | id | String | |
工单编号 | orderNo | String | |
工单状态 | orderStatus | Integer | 工单状态: 0 未提交, 10 待领取, 20 待处理, 30 完成, 40 终止, 默认待领取 |
创建时间 | createTime | String | yyyy-MM-dd HH:mm:ss |
响应示例:
{
"success": true,
"message": "200 ok!",
"code": "200",
"data": {
"id": "841144181148815361",
"orderNo": "2024082800001",
"orderStatus": null,
"satisfactionStatus": null,
"businessId": null,
"createTime": "2024-08-28 16:59:01"
}
}
2、提交工单。
2.1、请求路径
POST /openapi/flow/v1/order/commit
2.2、请求参数
参数名 | 参数 | 类型 | 是否必填 | 备注 |
---|---|---|---|---|
用户工号 | userNumber | String | Y | |
工单流程模型id | templateId | String | Y | |
工单id | orderId | String | Y | |
活动节点id | activityId | String | Y | |
活动节点名称 | activityName | String | N | |
按钮名称 | buttonName | String | Y | |
备注内容 | notes | String | N |
{
"templateId": "742554901119381504",
"userNumber": "6000",
"orderId":"742625216906276865",
"activityId":"celldc2478440fbf41f3a1b8e250230a3359",
"activityName": "处理节点",
"buttonName":"提交"
}
2.3、响应示例
{
"success": true,
"message": "200 ok!",
"code": "200",
"data": null
}
3、暂存/更新工单。
3.1、请求路径
POST /openapi/flow/v1/order/update
3.2、请求参数
参数名 | 参数 | 类型 | 是否必填 | 备注 |
---|---|---|---|---|
用户工号 | userNumber | String | Y | |
工单流程模型id | templateId | String | Y | |
工单id | orderId | String | Y | |
活动节点id | activityId | String | Y | |
活动节点名称 | activityName | String | N | |
按钮名称 | buttonName | String | Y | |
备注内容 | notes | String | N | |
工单内容 | data | Json | Y | 工单内容, 工单模型属性编码kv键值对,示例:{"multi_text_wAXC_1700543422750":"test"} |
{
"templateId": "742554901119381504",
"userNumber": "6000",
"orderId":"742625037079687169",
"activityId":"celldc2478440fbf41f3a1b8e250230a3359",
"activityName": "处理节点",
"data": {
"text_p2jU_1701330017675": "1201测试",
"checkbox_SFpa_1701330020818":[2],
"radio_RIVM_1701347818101":1,
"number_scPj_1701347821771":666,
"dateTime_cX2Y_1701347849129":"2023-11-30 20:47:49",
"accessory_ksKQ_1701347861959": [
{
"url": "https://fs1.useasy.net/1124/customer/2023124/新建文本文档 (2).txt",
"fileName": "新建文本文档 (2).txt",
"name": "新建文本文档 (2)",
"suffix": "txt",
"type": "txt"
}
]
},
"buttonName":"更新"
}
3.3、响应示例
{
"success": true,
"message": "200 ok!",
"code": "200",
"data": null
}
4、领取工单
4.1、请求路径
POST /openapi/flow/v1/order/claim
4.2、请求参数
参数名 | 参数 | 类型 | 是否必填 | 备注 |
---|---|---|---|---|
用户工号 | userNumber | String | Y | |
工单流程模型id | templateId | String | Y | |
工单id | orderId | String | Y | |
活动节点id | activityId | String | Y | |
活动节点名称 | activityName | String | N | |
按钮名称 | buttonName | String | Y | |
备注内容 | notes | String | N |
4.3、响应示例
{
"success": true,
"message": "200 ok!",
"code": "200",
"data": null
}
5、转派工单
5.1、请求路径
POST /openapi/flow/v1/order/toAssign
5.2、请求参数
参数名 | 参数 | 类型 | 是否必填 | 备注 |
---|---|---|---|---|
用户工号 | userNumber | String | Y | |
工单流程模型id | templateId | String | Y | |
工单id | orderId | String | Y | |
活动节点id | activityId | String | Y | |
活动节点名称 | activityName | String | N | |
按钮名称 | buttonName | String | Y | |
备注内容 | notes | String | N | |
指派成员 | toUsers | Array(String) | N | 用户工号数组 |
指派部门 | toDepartments | Array(String) | N | 部门/服务组编号 |
5.3、响应示例
{
"success": true,
"message": "200 ok!",
"code": "200",
"data": null
}
6、终止工单
6.1、请求路径
POST /openapi/flow/v1/order/stop
6.2、请求参数
参数名 | 参数 | 类型 | 是否必填 | 备注 |
---|---|---|---|---|
用户工号 | userNumber | String | Y | |
工单流程模型id | templateId | String | Y | |
工单id | orderId | String | Y | |
活动节点id | activityId | String | Y | |
活动节点名称 | activityName | String | N | |
按钮名称 | buttonName | String | Y | |
备注内容 | notes | String | N | |
用户来源 | userSource | Integer | Y | 用户来源: 1, 工程师端, 2, 用户端 |
6.3、响应示例
{
"success": true,
"message": "200 ok!",
"code": "200",
"data": null
}
7、获取历史节点信息。
7.1、请求路径
POST /openapi/flow/v1/order/historyActivity
7.2、请求参数
参数名 | 参数 | 类型 | 是否必填 | 备注 |
---|---|---|---|---|
用户工号 | userNumber | String | Y | |
工单流程模型id | templateId | String | Y | |
工单id | orderId | String | Y |
{
"templateId": "742554901119381504",
"userNumber": "6000",
"orderId":"742625037079687169"
}
7.3、响应参数
参数名 | 参数 | 类型 | 备注 |
---|---|---|---|
节点id | id | String | |
节点名称 | name | String | |
处理人 | handler | String | 工号 |
处理人名字 | handlerName | String | |
开始时间 | startTime | String | 格式:yyyy-MM-dd HH:mm:ss |
结束时间 | endTime | String | 格式:yyyy-MM-dd HH:mm:ss |
7.4、响应示例
{
"success": true,
"message": "200 ok!",
"code": "200",
"data": [
{
"id": "",
"name": "",
"handler": "",
"handlerName":"",
"startTime": "",
"endTime": ""
}
]
}
8、回退工单
8.1、请求路径
POST /openapi/flow/v1/order/back
8.2、请求参数
参数名 | 参数 | 类型 | 是否必填 | 备注 |
---|---|---|---|---|
用户工号 | userNumber | String | Y | |
工单流程模型id | templateId | String | Y | |
工单id | orderId | String | Y | |
活动节点id | activityId | String | Y | |
活动节点名称 | activityName | String | N | |
按钮名称 | buttonName | String | Y | |
备注内容 | notes | String | N | |
目标活动id | toActivityId | String | N | 不传就是返回上一个节点 |
目标活动名称 | toActivityName | String | N |
8.3、响应示例
{
"success": true,
"message": "200 ok!",
"code": "200",
"data": null
}
9、获取当前节点活动的配置信息。
9.1、请求路径
POST /openapi/flow/v1/get/current/activity
9.2、请求参数
参数名 | 参数 | 类型 | 是否必填 | 备注 |
---|---|---|---|---|
工单流程模型id | templateId | String | Y | |
工单id | orderId | String | Y |
{
"templateId": "742554901119381504",
"orderId":"752726817239625729"
}
9.3、响应参数
参数名 | 参数 | 类型 | 备注 |
---|---|---|---|
工单流程模型的id | templateId | String | |
节点活动id | activityId | String | |
表单配置 | formConfig | Array(JSON) | |
页签设置 | pageConfig | Array(JSON) | 当前节点的页面配置 |
处理设置 | dealConfig | JSON |
表单配置JSON:
参数名 | 参数 | 类型 | 备注 |
---|---|---|---|
字段id | fieldId | String | |
字段名称 | fieldName | String | |
字段类型 | fieldType | String | 文本:text 富文本:multiText日期时间:dateTime数字:number单选:radio多选:checkbox用户:member部门:department |
只读 | readonly | Boolean | |
必填 | require | Boolean | |
隐藏 | hide | Boolean |
页签设置JSON
参数名 | 参数 | 类型 | 备注 |
---|---|---|---|
类型 | type | String | |
名称 | name | String | |
默认名称 | defaultName | String | |
是否启用 | enable | Boolean |
处理设置JSON
参数名 | 参数 | 类型 | 备注 |
---|---|---|---|
指派方式 | assignType | Integer | 0 跟随字段 1 固定处理人 3 自动分配 |
指派内容 | assignContent | String | 跟随字段时(字段id) 自动分配时:范围 |
流转类型 | flowType | Integer | 1 用户 2部门 |
节点处理人 | handlers | Array(String) | |
节点处理人的默认处理人 | defaultHandler | String |
9.4、响应示例
{
"success": true,
"message": "200 ok!",
"code": "200",
"data": {
"activityId": "",
"dealConfig": null,
"formConfig": [
{
"fieldId": "",
"fieldName": "",
"fieldType": "",
"hide": false,
"readonly": false,
"require": false
}
],
"pageConfig": [
{
"defaultName": "",
"enable": false,
"name": "",
"type": ""
}
],
"templateId": ""
}
}
10、查询工单流程模板列表。
10.1、请求路径
POST /openapi/flow/v1/template/list
10.2、请求参数
参数名 | 参数 | 类型 | 是否必填 | 备注 |
---|---|---|---|---|
工号 | userNumber | String | N | 可选参数,只查询此座席有创建权限的模板 |
{
"userNumber":"6001"
}
10.3、响应参数
参数名 | 参数 | 类型 | 备注 |
---|---|---|---|
流程模板id | templateId | String | |
流程模板名字 | templateName | String | |
工单表单内容配置 | formConfig | JSON |
工单表单内容配置
参数名 | 参数 | 类型 | 备注 |
---|---|---|---|
字段id | fieldId | String | |
字段名字 | fieldName | String | |
字段类型 | fieldType | String | 单行文本:text多行文本:multiText日期时间:dateTime数字:number单选:radio多选:checkbox人员:member部门:department |
是否只读 | readonly | Boolean | |
是否必填 | require | Boolean | |
是否隐藏 | hide | Boolean |
10.4、响应示例
{
"success": true,
"message": "200 ok!",
"code": "200",
"data": [
{
"templateId": "",
"templateName": "",
"formConfig": {
"fieldId": "",
"fieldName": "",
"fieldType": "",
"readonly": false,
"require": false,
"hide": false
}
}
]
}
11、分页查询工单列表。
11.1、请求路径
POST /openapi/flow/v1/order/pageList
11.2、请求参数
参数名 | 参数 | 类型 | 是否必填 | 备注 |
---|---|---|---|---|
工号 | userNumber | String | N | 可选参数,只查询与此座席相关的 |
客户id | customerId | String | N | 可选参数,只查询与此客户相关的 |
查询页码 | pageNumber | Integer | Y | |
每页最大条数 | pageSize | Integer | Y |
{
"userNumber":"6000",
"pageNumber":1,
"pageSize":10
}
11.3、响应参数
参数名 | 参数 | 类型 | 备注 |
---|---|---|---|
数据列表 | list | Array | |
分页返回参数 | page | JSON |
数据列表内容
参数名 | 参数 | 类型 | 备注 |
---|---|---|---|
工单id | orderId | String | |
工单编号 | orderNo | String | |
流程模型id | templateId | String | |
当前节点名称 | activityName | String | |
状态 | orderStatus | Integer | 未提交:0待领取:10待处理:20完成:30终止:40挂起:50 |
创建时间 | createTime | String | |
修改时间 | updateTime | String | |
工单内容 | detail | JSON | |
当前处理人工号 | masterNumber | String | |
工单创建人工号 | createUserNumber | String | |
工单修改人工号 | updateUserNumber | String |
11.4、响应示例
{
"success": true,
"message": "200 ok!",
"code": "200",
"data": {
"list": [
{
"accountId": "1019",
"orderId": "977664725730603009",
"orderNo": "2025090900002",
"orderStatus": 20,
"preOrderStatus": null,
"suspendIndex": null,
"suspendStartTime": null,
"segmentList": null,
"orderCategory": "投诉 工单",
"estimateStatus": 1,
"assignType": 1,
"master": "686299681458982912",
"candidates": [
"sk_10001218"
],
"source": 2,
"userSource": 1,
"joinList": [
"686299681458982912"
],
"activityId": "celldc2478440fbf41f3a1b8e250230a3359",
"activityName": "处理节点",
"satisfactionConfigId": null,
"templateId": "855613796286070784",
"customerId": "",
"customerName": null,
"version": 1757384584669,
"createUser": "686299681458982912",
"updateUser": "686299681458982912",
"updateTime": "2025-09-09 10:22:55",
"createTime": "2025-09-09 10:22:55",
"overTime": null,
"relatedStatus": 0,
"urgency": 2,
"slaTargetTimestamp": 1757385064000,
"followAgent": [],
"associationWorkList": null,
"webchatIds": [],
"cdrIds": [],
"id": "977664725730603009",
"urgeSign": false,
"detail": {
"id": "977664725730603009",
"multi_text_W0Xr_1728285295147": "22",
"text_j2LA_1728285285388": "11",
"text_Qm8G_1728285344105": "",
"accessory_sHAn_1728285353031": null,
"showClaim": false,
"urgeInfo": null,
"remark": null
},
"createUserNumber": "8073",
"updateUserNumber": "8073",
"joinListNumber": [
"8073"
],
"masterNumber": "8073"
}
],
"page": {
"pageSize": 1,
"pageNumber": 1,
"totalPage": 61,
"total": 61
}
},
"traceId": "94ded9ab9fce42efb8dd22414745af14"
}
12、查询模板表单配置明细。
12.1、请求路径
POST /openapi/flow/v1/template/getFormConfig
12.2、请求参数
参数名 | 参数 | 类型 | 是否必填 | 备注 |
---|---|---|---|---|
流程模型id | templateId | String | Y |
{
"templateId":"742554901119381504"
}
12.3、响应参数
参数名 | 参数 | 类型 | 备注 |
---|---|---|---|
字段类型 | fieldType | String | |
名称 | name | String | |
上传格式 | attachFormat | String | 图片 视频 文档 音频 |
附件默认值 | defaultAttachList | Array() | {"fileName":"","url":""} |
多选类型 | checkboxType | Integer | 1 下拉菜单 2 平铺 |
单选选项 | options | Array | [{"key":"","value":""}] |
多选默认值 | defaultValueCheckbox | Array(Integer) | |
默认值 | defaultValue | String | |
单选默认值 | defaultValueRadio | Integer |
12.4、响应示例
{
"success": true,
"message": "200 ok!",
"code": "200",
"data": [
{
"isChildTableField": 0,
"dataFieldType": "String",
"format": 1,
"sort": 1,
"isSystem": 0,
"name": "文本",
"fieldType": "text",
"dataFieldName": "text_rFHy_1703146323014",
"isDelete": 0,
"defaultType": 1,
"isFilter": 1,
"fieldId": "text_rFHy_1703146323014"
},
{
"isChildTableField": 0,
"dataFieldType": "Integer",
"arrangeType": 1,
"optionType": 0,
"options": [
{
"isDelete": 0,
"value": "选项1",
"key": 1
},
{
"isDelete": 0,
"value": "选项2",
"key": 2
},
{
"isDelete": 0,
"value": "选项3",
"key": 3
}
],
"sort": 2,
"isSystem": 0,
"name": "单选",
"fieldType": "radio",
"dataFieldName": "radio_K1kQ_1703146325263",
"isDelete": 0,
"externalSource": {
"requestType": "GET",
"requestUrl": ""
},
"isFilter": 1,
"radioType": 1,
"fieldId": "radio_K1kQ_1703146325263"
}
]
}
13、添加工单备注。
13.1、请求路径
POST /openapi/work/log/workNote
13.2、请求参数
参数名 | 参数 | 类型 | 是否必填 | 备注 |
---|---|---|---|---|
工单ID | orderId | String | Y | |
流程模型id | templateId | String | Y | |
工号 | userNumber | String | Y | |
备注内容 | remark | String | Y | |
附件 | attachment | Array | N | [{"fileName":"","fileURL":""}] |
{
"templateId": "742554901119381504",
"userNumber": "6000",
"orderId":"742625037079687169",
"remark":"测试备注"
}
13.3、响应示例
{
"success": true,
"message": "200 ok!",
"code": "200",
"data": null
}
14、根据工单id或者工单编号查询工单。
14.1、请求路径
POST /openapi/flow/v1/order/findOne
14.2、请求参数
参数名 | 参数 | 类型 | 是否必填 | 备注 |
---|---|---|---|---|
工单ID | orderId | String | N | |
工单编号 | orderNo | String | N |
{
"orderId":"742625037079687169",
"orderNo":"2024010200009"
}
14.3、响应参数
参数名 | 参数 | 类型 | 备注 |
---|---|---|---|
工单id | orderId | String | |
工单编号 | orderNo | String | |
流程模型id | templateId | String | |
当前节点名称 | activityName | String | |
状态 | orderStatus | Integer | 未提交:0待领取:10待处理:20完成:30终止:40挂起:50 |
创建时间 | createTime | String | |
修改时间 | updateTime | String | |
工单内容 | detail | JSON | |
当前处理人工号 | masterNumber | String | |
创建人工号 | createUserNumber | String | |
修改人工号 | updateUserNumber | String |
14.4、响应示例
{
"success": true,
"message": "200 ok!",
"code": "200",
"data": {
"accountId": "1019",
"orderId": "977664725730603009",
"orderNo": "2025090900002",
"orderStatus": 20,
"preOrderStatus": null,
"suspendIndex": null,
"suspendStartTime": null,
"segmentList": null,
"orderCategory": "投诉 工单",
"estimateStatus": 1,
"assignType": 1,
"master": "686299681458982912",
"candidates": [
"sk_10001218"
],
"source": 2,
"userSource": 1,
"joinList": [
"686299681458982912"
],
"activityId": "celldc2478440fbf41f3a1b8e250230a3359",
"activityName": "处理节点",
"satisfactionConfigId": null,
"templateId": "855613796286070784",
"customerId": "",
"customerName": null,
"version": 1757384584669,
"createUser": "686299681458982912",
"updateUser": "686299681458982912",
"updateTime": "2025-09-09 10:22:55",
"createTime": "2025-09-09 10:22:55",
"overTime": null,
"relatedStatus": 0,
"urgency": 2,
"slaTargetTimestamp": 1757385064000,
"followAgent": [],
"associationWorkList": null,
"webchatIds": [],
"cdrIds": [],
"id": "977664725730603009",
"urgeSign": false,
"detail": {
"id": "977664725730603009",
"multi_text_W0Xr_1728285295147": "22",
"text_j2LA_1728285285388": "11",
"text_Qm8G_1728285344105": "",
"accessory_sHAn_1728285353031": null,
"showClaim": false,
"urgeInfo": null,
"remark": null
},
"createUserNumber": "8073",
"updateUserNumber": "8073",
"joinListNumber": [
"8073"
],
"masterNumber": "8073"
},
"traceId": "f55e033eea104b4989189bdae9c1b513"
}