1.1 接口说明
第三方系统通过接口在优音云客服系统中流转工单,流入时数据结构是根据系统中配置的每个工单模板的变化而来,可以在系统中查看工单流入的数据格式。
1.2 调用形式
1.3 调用方式
PUT
1.4传入参数(参考V1.0工单流入接口格式)
非必填参数,调用接口时请传递参数名,参数值可为空
序号 | 名称 | 类型 | 是否必填 | 说明 |
---|---|---|---|---|
1 | form | Object | 是 | 新建工单的表单元素 |
2 | rows | Object数组 | 是 | rows元素含有多个Object表单元素对象(参考本章节使用样例): 其中Object元素对象属性如下: 1、title:字段名称; 2、kind:字段类型; 3、id:元素ID; 4、val:字符型字段值;(若为附件则是Object类型数组) |
3 | approve | String | 否 | 参见4.3工单流出对接章节中:nextNodeForm中含有branch属性,且branch不为空(说明有用户节点后有分支判断)时,必须传入branch中某个Object对象的approve值;其他情况approve参数值为null; |
4 | priority | Object | 是 | 流转工单的优先级(0-紧急 1-重要 2-普通),说明: 1、新建工单后的流转工单有priority参数; 2、后续工单流出后的流入调用,该参数可为null |
5 | workflow_id | String | 是 | 工作流模板ID |
6 | process_instance_id | String | 是 | 流程实例id |
7 | task_id | String | 是 | 工作流任务ID(为下一步流转工单的任务节点ID) |
8 | agent_num | String | 是 | 当前处理座席工号 |
1.5 回应参数
序号 | 名称 | 类型 | 是否必填 | 说明 |
---|---|---|---|---|
1 | errcode | Number | 是 | 状态码:0成功,及其他非0错误码,详见错误码列表 |
2 | errmsg | String | 是 | 状态说明 |
1.6 使用样例
调用
PUT数据:
场景1:流入(流转)工单无分支判断:
{
"form": {
"rows": [{
"id": "3741f7a0-0465-4f36-9b7f-f3bd875bdcb7",
"val": "合同名称",
"kind": 0,
"title": "合同名称"
},
{
"id": "0c01dded-664a-4a5b-9b22-d108b8c87ab2",
"val": "合同编号",
"kind": 0,
"title": "合同编号"
},
{
"id": "8a4530a5-eb68-47a0-a358-f2dea155f6b5",
"val": "多行文本内容",
"kind": 1,
"title": "备注"
},
{
"id": "7c84a23f-39f8-47d6-a596-629f21138ecb",
"val": "男",
"kind": 2,
"title": "性别"
},
{
"id": "c02c28d0-21c4-438d-bcd7-8dde1fcf0c3e",
"val": ["云坐席","优音会议","400","800","云总机","优音电话"],
"kind": 3,
"title": "套餐类别"
},
{
"id": "1788d723-e585-479a-9f22-b60537ad422f",
"val": "不通过",
"kind": 4,
"title": "审批结果"
},
{
"id": "6ce4a733-b722-4c23-add3-89c41b1497be",
"val": "2022-09-01",
"kind": 5,
"title": "执行日期"
},
{
"id": "ea06e5cd-e9f1-4c9f-b37d-e27447ed982c",
"val": "2022-09-01 10:52:13",
"kind": 6,
"title": "执行具体时间"
},
{
"id": "94ef5b5e-8638-4fb8-be4d-1db00ad97d68",
"val": "50000.23",
"kind": 7,
"title": "金额"
},
{
"id": "c3d68aeb-d2cb-4e5c-8ad6-cc25555d79f6",
"val": [
{
"name": "test1.jpg",
"url": "acf528a2-d0e2-4a7b-8513-74cbxxxxxxxx/uploads/20220101/aecb693e85bc431xxxxxxed157eba805.jpg",
"uid": 1662000743313
},
{
"name": "test2.txt",
"url": "acf528a2-d0e2-4a7b-8513-74cbxxxxxxxx/uploads/20220101/75b29ea842bd4afxxxxxx651a4777c81.txt",
"uid": 1662000749477
}
],
"kind": 8,
"title": "附件"
}]
},
"approve": null,
"priority": 2,
"workflow_id": "8c1f9395d43b1449e6e47fd4xxxxxxxx",
"process_instance_id": "afc4460a-4e87-11ec-ba15-0242xxxxxxxx",
"task_id": "6bc00b7a-0034-11ec-8e2a-0050xxxxxxxx",
"agent_num": "8888"
}
场景2:流入(流转)工单包含分支判断:
{
"form": {
"rows": [{
"id": "3741f7a0-0465-4f36-9b7f-f3bd875bdcb7",
"val": "合同名称",
"kind": 0,
"title": "合同名称"
},
{
"id": "0c01dded-664a-4a5b-9b22-d108b8c87ab2",
"val": "合同编号",
"kind": 0,
"title": "合同编号"
},
{
"id": "8a4530a5-eb68-47a0-a358-f2dea155f6b5",
"val": "多行文本内容",
"kind": 1,
"title": "备注"
},
{
"id": "7c84a23f-39f8-47d6-a596-629f21138ecb",
"val": "男",
"kind": 2,
"title": "性别"
},
{
"id": "c02c28d0-21c4-438d-bcd7-8dde1fcf0c3e",
"val": ["云坐席","优音会议","400","800","云总机","优音电话"],
"kind": 3,
"title": "套餐类别"
},
{
"id": "1788d723-e585-479a-9f22-b60537ad422f",
"val": "不通过",
"kind": 4,
"title": "审批结果"
},
{
"id": "6ce4a733-b722-4c23-add3-89c41b1497be",
"val": "2022-09-01",
"kind": 5,
"title": "执行日期"
},
{
"id": "ea06e5cd-e9f1-4c9f-b37d-e27447ed982c",
"val": "2022-09-01 10:52:13",
"kind": 6,
"title": "执行具体时间"
},
{
"id": "94ef5b5e-8638-4fb8-be4d-1db00ad97d68",
"val": "50000.23",
"kind": 7,
"title": "金额"
},
{
"id": "c3d68aeb-d2cb-4e5c-8ad6-cc25555d79f6",
"val": [
{
"name": "test1.jpg",
"url": "acf528a2-d0e2-4a7b-8513-74cbxxxxxxxx/uploads/20220101/aecb693e85bc431xxxxxxed157eba805.jpg",
"uid": 1662000743313
},
{
"name": "test2.txt",
"url": "acf528a2-d0e2-4a7b-8513-74cbxxxxxxxx/uploads/20220101/75b29ea842bd4afxxxxxx651a4777c81.txt",
"uid": 1662000749477
}
],
"kind": 8,
"title": "附件"
}]
},
"approve":"打回销售",
"priority": 2,
"workflow_id":"8c1f9395d43b1449e6e47fd4xxxxxxxx",
"task_id": "6bc00b7a-0034-11ec-8e2a-0050xxxxxxxx",
"process_instance_id":"afc4460a-4e87-11ec-ba15-0242xxxxxxxx",
"agent_num": "8888"
}
响应
{
"errcode": 0,
"errmsg": "success"
}
错误类举例:
{
"errcode": 110006,
"errmsg": "合同名称val参数不能为空,合同编号val参数不能为空,附件name参数不能为空"
}
文档更新时间: 2024-09-24 14:35 作者:admin