1.1 接口说明
第三方系统通过接口在优音云客服系统中流转工单,流入时数据结构是根据系统中配置的每个工单模板的变化而来,可以在系统中查看工单流入的数据格式。
1.2 工单流入与新建工单关系
1.3 查看工单流入数据格式
1.3.1 进入工单设置页面,选择需要流入的工单流程,点击【编辑】按钮进入配置页面
1.3.2 选择需要流出的工单节点,查看流入时对接的url及参数
1.4 调用形式
1.5 调用方式
PUT
1.6 传入参数
说明:
本章节传入参数及参数格式,来自4.1章节新建工单中的回应参数data元素,该接口请求前只需解析并设置rows元素中每个Object对象val值即可(附件请上送name及val)。
非必填参数,调用接口时请传递参数名,参数值可为空
序号 | 名称 | 类型 | 是否必填 | 说明 |
---|---|---|---|---|
1 | form | Object对象 | 是 | 新建工单的表单元素 |
1.1 | rows | Object数组 | 是 | rows元素含有多个Object表单元素对象(参考本章节使用样例):2、kind:字段类型;点击查看详情
4、val:字符型字段值;(若为附件则是Object类型数组,请注意val值勿加双引号””)点击查看详情
|
2 | approve | String | 否 | 4.2工单流出对接章节中:nextNodeForm中含有branch属性,且branch不为空(说明有用户节点后有分支判断)时,必须传入branch中某个Object对象的approve值;其他情况approve参数值为null; |
3 | priority | Object对象 | 是 | 流转工单的优先级(0-紧急 1-重要 2-普通),说明:1、新建工单后的流转工单有priority参数;2、后续工单流出后的流入调用,该参数可为null |
4 | workflow_id | String | 是 | 工作流模板ID |
5 | process_instance_id | String | 是 | 流程实例id |
6 | task_id | String | 是 | 工作流任务ID(为下一步流转工单的任务节点ID) |
7 | target_agent_num | String | 否 | 下步处理座席工号 |
8 | agent_num | String | 是 | 当前处理座席工号 |
1.7 回应参数
序号 | 名称 | 类型 | 是否必填 | 说明 |
---|---|---|---|---|
1 | errcode | Number | 是 | 状态码:0成功,及其他非0错误码,详见错误码列表 |
2 | errmsg | String | 是 | 状态说明 |
1.8 使用样例
调用:
url:https://ykf.uincall.com/openapi/workorder/complete?tenant_id=acf528a2-d0e2-4a7b-8513-74cb399xxxxx&access_token=670253572927b24acffc41078ddxxxxx
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",
"target_agent_num": "1234",
"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",
"target_agent_num": "1234",
"agent_num": "8888"
}
响应:
{
"errcode": 0,
"errmsg": "success"
}
错误类举例:
{
"errcode": 110006,
"errmsg": "合同名称val参数不能为空,合同编号val参数不能为空,附件name参数不能为空"
}
文档更新时间: 2024-09-24 14:35 作者:admin