更新时间:2025-11-13 GMT+08:00
分享

工单字段抽取接口

场景描述

给第三方接入方调用,实现根据对话文本工单字段自动抽取能力。

接口方法

设置成“POST”。

URL

https://IP:PORT/oifde/rest/api/caseField

请求说明

表1 请求体参数

参数名称

数据类型

参数位置

必选/可选

描述

tenantId

String

body

True

租户ID。

language

String

body

True

语言。选项如下:

  • zh_CN:中文
  • en_US:英文

history

String

body

True

对话文本。

中文格式:"座席:您好!请问现在办理带宽有哪些套餐?稍等。\n客户:你好我需要办理5G流量套餐并且携带有免费宽带"

英文格式:"staff:Hello! What are the bandwidth packages? Wait a minute.\nuser:Hello, I need to apply for a 5G traffic package and carry free broadband."

caseType

caseType

body

True

工单类型对象

authToken

String

body

True

认证token。

请参见C3 智能助手平台接口鉴权方式

表2 caseType

Name

Mandatory

Type

Description

caseTypeID

True

String

工单类型ID

caseTypeName

True

String

工单类型名称

响应说明

参数名称

数据类型

参数位置

必选/可选

描述

errorCode

int

body

True

错误码

  • 0表示成功
  • 非0表示失败

results

caseType[]

body

True

工单类型对象列表

表3 caseType

Name

Mandatory

Type

Description

caseTypeID

True

String

工单类型ID

caseTypeName

True

String

工单类型名称

caseFields

caseField[]

Array

工单字段对象数组

表4 caseField

Name

Mandatory

Type

Description

caseFieldName

True

String

工单字段名称

caseFieldID

True

String

工单字段ID

caseFieldValue

True

String

工单字段抽取的值

报文样例

  • 请求样例
    {
        "tenantId": "202301041851",
        "language": "zh_CN",
        "history": "客户: 人工 坐席: 哈喽!萌哒哒真人小移已经飞奔到您的身边,请问有什么可以为您【本机】效劳?千兆宽带+超低折扣,12月2日15:00直播间准时约定你\n 客户: 为什么有话费还欠费\n 客户: 坐席: 欠费10.10\n客户: 这不是有一百多话费? 系统: 人工mm正在帮您核实问题,请您稍等~ \n坐席: 亲,您目前的总余额是108.60元,基本余额0.00元,赠送余额108.60元,您也可以拨打1008611核对余额哦,如有疑问可以再来咨询小移哦。\n 坐席: 赠送话费不能抵扣新版任我换产品\n客户: 那个产品 \n客户: 那可以拿来干嘛\n 客户: 什么都不可以用 \n坐席: 亲稍等,小移查询下o(^_^)o ",
        "caseType": {
            "caseTypeName": "话费投诉",
            "caseTypeID": "cvmC000001F0I9FRpqa0"
        },
        "authToken":"E2mjXcv*******************XX1av"
    }
  • 响应样例
    {
        "errorCode": 0,
        "results": {
            "caseTypeName": "话费投诉",
            "caseTypeID": "cvmC000001F0I9FRpqa0",
            "caseFields": [
                {
                    "caseFieldName": "Origin",
                    "caseFieldID": "AICC__Origin__CST",
                    "caseFieldValue": null
                },
                {
                    "caseFieldName": "Description",
                    "caseFieldID": "AICC__Description__CST",
                    "caseFieldValue": "停机问题投诉"
                },
                {
                    "caseFieldName": "用户问题描述",
                    "caseFieldID": "userProblemDescription__CST",
                    "caseFieldValue": "停机问题投诉"
                },
                {
                    "caseFieldName": "contactName",
                    "caseFieldID": "AICC__contactName__CST",
                    "caseFieldValue": null
                },
                {
                    "caseFieldName": "Priority",
                    "caseFieldID": "AICC__Priority__CST",
                    "caseFieldValue": "高"
                },
                {
                    "caseFieldName": "Title",
                    "caseFieldID": "AICC__Title__CST",
                    "caseFieldValue": "欺骗消费者"
                },
                {
                    "caseFieldName": "用户电话号码",
                    "caseFieldID": "userPhoneNumber__CST",
                    "caseFieldValue": "195****309"
                },
                {
                    "caseFieldName": "ContactId",
                    "caseFieldID": "AICC__ContactId__CST",
                    "caseFieldValue": null
                },
                {
                    "caseFieldName": "OwnerType",
                    "caseFieldID": "AICC__OwnerType__CST",
                    "caseFieldValue": null
                },
                {
                    "caseFieldName": "Type",
                    "caseFieldID": "AICC__Type__CST",
                    "caseFieldValue": null
                },
                {
                    "caseFieldName": "OwnerId",
                    "caseFieldID": "AICC__OwnerId__CST",
                    "caseFieldValue": null
                },
                {
                    "caseFieldName": "用户姓名",
                    "caseFieldID": "name__CST",
                    "caseFieldValue": null
                },
                {
                    "caseFieldName": "DueDate",
                    "caseFieldID": "AICC__DueDate__CST",
                    "caseFieldValue": "2024-07-26"
                }
            ]
        }
    }

相关文档