新零售智能助理商家问答

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

请求参数

名称 类型 是否必选 示例值 描述
RobotCode String 1cY9drMec4b2uzS2

机器人ID

SessionId String aUeafnr-scgyw28f4

买卖家之间的会话ID

ChatId String c8jd-2ncpocs

单句的唯一ID

Round Integer 2

当前的对话轮次

Content String 你好

用户输入的query

ContentType String TEXT

用户输入的query类型

ExtraContent Map

query扩展信息, 通常在点击事件中使用

UserNick String 买家账号

买家nick

UserId String 12345678

买家ID

StaffNick String 智能助理测试账号:客服

卖家接待人nick

StaffId String 12341

卖家接待人ID

SellerNick String 智能助理测试账号

卖家nick

SellerId String 124234

卖家ID

ServiceMode String AUTO

机器人模式

FocusOrderId String 987654321

焦点订单id

FocusItemId String 13579

焦点商品id

Orders Array

订单列表

OrderId String 987654321

子订单id

ParentOrderId String 1234567890

主订单id

CreateTime Long 1611130298820

订单创建时间

PayTime Long 1611130298820

订单支付时间

BuyerId String 123445

买家id

SellerId String 124321143

卖家id

PayStatus String STATUS_PAID

支付状态

RefundStatus String STATUS_WAIT_SELLER_AGREE

退款状态

LogisticsStatus String STATUS_CONSIGNED

物流状态

BuyerRateStatus String RATE_STATUS_RATED

评价状态

ItemId String 13579

订单中的商品id

ItemTitle String xxx商品

商品标题

ItemPic String https://image.alicdn.com/xxxxx

商品主图url

Price Float 123.45

订单价格

Count Integer 1

订单中的商品数量

SkuProperty String 颜色:红;材质:棉

sku属性

Items Array

商品列表

ItemId String 13579

商品id

SellerId String 124321143

卖家id

Title String xxx商品

商品标题

CategoryId String 3333333

商品叶子类目id

Price Float 123.45

商品价格

PicUrl String https://img.alicdn.com/xxxxx

商品主图url

Property Map

商品属性

Packages Array

客户端信息

PackageCode String common

行业包code

PackageVersion String 2

行业包版本

ClientInfo Object

客户端信息

ClientVersion String 2.0.5

客户端版本

ClientApp String TB

客户端APP

ClientOs String Android

客户端系统

返回数据

名称 类型 示例值 描述
RequestId String 59C3CCE4-24B1-4277-A4A0-C0EFE4C14E0A

Id of the request

Data object

问答返回结果

Scene object

定位到的场景

SceneDTOs Array of SceneDTO

场景识别

SceneKey String sc_wenhou

场景key

EmotionTag String fq_fennu

情绪识别

SemanticComplete String SEMANTIC_COMPLETE

语义完整性识别

ItemId String 13579

定位场景使用的商品id

OrderId String 987654321

定位场景使用的订单id

Knowledges Array of KnowledgeDTO

定位到的知识

KnowledgeId Long 1

知识id

KnowledgeTitle String 测试知识

知识标题

SceneKey String sc_wenhou

场景key

Solutions Array of Solution

知识答案

SolutionId Long 3

答案id

KnowledgeId Long 1

知识id

SolutionType String text

答案类型

SolutionSource String source

答案来源

SolutionContent String 你好

答案内容

Conditions Array of Condition

答案限定条件

ConditionType String EffectiveMode

条件类型

ConditionValue String auto

条件表达式

ExtraContent String ["emoji1","emoji2"]

扩展答案信息

SolutionVariables Array of SolutionVariable

答案变量

VariableName String 变量名称

变量名称

VariableType String 系统变量

变量类型

OutputMessages Array of OutputMessage

建议的回复内容

OutputContentType String ASK_TEXT

回复类型

OutputContent Map

回复内容

示例

请求示例

http(s)://[Endpoint]/?RobotCode=1cY9drMec4b2uzS2
&SessionId=aUeafnr-scgyw28f4
&ChatId=c8jd-2ncpocs
&Round=2
&Content=你好
&ContentType=TEXT
&UserNick=买家账号
&UserId=12345678
&StaffNick=智能助理测试账号:客服
&StaffId=12341
&SellerNick=智能助理测试账号
&SellerId=124234
&ServiceMode=AUTO
&FocusOrderId=987654321
&FocusItemId=13579
&Orders=[{"OrderId":"987654321","ParentOrderId":"1234567890","CreateTime":1611130298820,"PayTime":1611130298820,"BuyerId":"123445","SellerId":"124321143","PayStatus":"STATUS_PAID","RefundStatus":"STATUS_WAIT_SELLER_AGREE","LogisticsStatus":"STATUS_CONSIGNED","BuyerRateStatus":"RATE_STATUS_RATED","ItemId":"13579","ItemTitle":"xxx商品","ItemPic":"https://image.alicdn.com/xxxxx","Price":123.45,"Count":1,"SkuProperty":"颜色:红;材质:棉"}]
&Items=[{"ItemId":"13579","SellerId":"124321143","Title":"xxx商品","CategoryId":"3333333","ShopCategoryIds":["12343421"],"Price":123.45,"PicUrl":"https://img.alicdn.com/xxxxx","Property":{"key":"颜色:红"}}]
&Packages=[{"PackageCode":"common","PackageVersion":"2"}]
&ClientInfo={"ClientVersion":"2.0.5","ClientApp":"TB","ClientOs":"Android"}
&公共请求参数

正常返回示例

XML格式

HTTP/1.1 200 OK
Content-Type:application/xml

<RequestId>59C3CCE4-24B1-4277-A4A0-C0EFE4C14E0A</RequestId>
<Data>
    <Scene>
        <SceneDTOs>
            <SceneKey>sc_wenhou</SceneKey>
        </SceneDTOs>
        <EmotionTag>fq_fennu</EmotionTag>
        <SemanticComplete>SEMANTIC_COMPLETE</SemanticComplete>
        <ItemId>13579</ItemId>
        <OrderId>987654321</OrderId>
    </Scene>
    <Knowledges>
        <KnowledgeId>1</KnowledgeId>
        <KnowledgeTitle>测试知识</KnowledgeTitle>
        <SceneKey>sc_wenhou</SceneKey>
        <Solutions>
            <SolutionId>3</SolutionId>
            <KnowledgeId>1</KnowledgeId>
            <SolutionType>text</SolutionType>
            <SolutionSource>source</SolutionSource>
            <SolutionContent>你好</SolutionContent>
            <Conditions>
                <ConditionType>EffectiveMode</ConditionType>
                <ConditionValue>auto</ConditionValue>
            </Conditions>
            <ExtraContent>["emoji1","emoji2"]</ExtraContent>
            <SolutionVariables>
                <VariableName>变量名称</VariableName>
                <VariableType>系统变量</VariableType>
            </SolutionVariables>
        </Solutions>
    </Knowledges>
    <OutputMessages>
        <OutputContentType>ASK_TEXT</OutputContentType>
    </OutputMessages>
</Data>

JSON格式

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "59C3CCE4-24B1-4277-A4A0-C0EFE4C14E0A",
  "Data" : {
    "Scene" : {
      "SceneDTOs" : [ {
        "SceneKey" : "sc_wenhou"
      } ],
      "EmotionTag" : "fq_fennu",
      "SemanticComplete" : "SEMANTIC_COMPLETE",
      "ItemId" : "13579",
      "OrderId" : "987654321"
    },
    "Knowledges" : [ {
      "KnowledgeId" : 1,
      "KnowledgeTitle" : "测试知识",
      "SceneKey" : "sc_wenhou",
      "Solutions" : [ {
        "SolutionId" : 3,
        "KnowledgeId" : 1,
        "SolutionType" : "text",
        "SolutionSource" : "source",
        "SolutionContent" : "你好",
        "Conditions" : [ {
          "ConditionType" : "EffectiveMode",
          "ConditionValue" : "auto"
        } ],
        "ExtraContent" : "[\"emoji1\",\"emoji2\"]",
        "SolutionVariables" : [ {
          "VariableName" : "变量名称",
          "VariableType" : "系统变量"
        } ]
      } ]
    } ],
    "OutputMessages" : [ {
      "OutputContentType" : "ASK_TEXT"
    } ]
  }
}

错误码

访问错误中心查看更多错误码。

访问错误中心查看更多错误码。