在机器人对话中使用卡片

卡片包含图像、标题、正文和按钮列表。 客户可以通过单击按钮与卡片进行交互。 卡片包含两种类型的按钮: 回短信和网址。 文字后退按钮成为发回给机器人的消息的一部分,并成为对话的一部分。 Web URL 按钮允许客户快速访问相关网站,并使您能够提供有关产品或产品的更多详细信息。 客户与他们互动后,卡片不会消失,因此,他们可以与卡片进行多次互动。

示例 Genesys 网络信使中的卡

Genesys 网络信使中的卡

快速回复允许快速、结构化的回复,使您能够通过从选项列表中进行选择,为直接消息提供简单、有指导的答案。 卡片通过引入图片、标题、正文以及可选的外部网站引荐来提供对产品和服务的更精细的描述。 快速回复通过增强客户的自动化体验和更快速地解决问题来促进机器人对话。

注意: 最佳实践建议您将一张卡片上的机器人选择数量限制为三个选项。

目前支持的机器人:

  • Amazon Lex V2
  • Google Dialogflow
  • Google Dialog Flow CX
  • Bot Connector

目前支持的机器人:

  • Facebook Messenger
  • Genesys Web 消息传递
  • LINE
  • WhatsApp Messenger
  • Instagram

卡片实施的注意事项

当你在机器人回复中设计和实现轮播结构时,请考虑以下限制:

  • WhatsApp、LINE 或 Twitter 不支持默认操作。 如果在这些应用程序中配置默认操作,则应用程序将忽略它们。

在 WhatsApp 中配置卡片时,请记住以下注意事项:

  • WhatsApp 最多支持三个带卡的按钮。 如果配置了三个以上的按钮,则会发生错误。
  • WhatsApp 支持仅限于文本返回按钮。 WhatsApp 不支持网址按钮。
  • 客户可以选择每个文本后退按钮一次,而不限于一个选择。 你的机器人行为应考虑到用户可以选择多个选项的情况。
  • WhatsApp 不支持卡片机器人响应中的默认操作。
  • 包含图像或视频的卡片不显示标题。 仅使用文本时,将显示标题。

例如,如果您配置标题为 “飞往挪威航班 50% 的折扣” 的卡片并包含图片,则标题不会显示:

如果您为卡片配置了标题而没有图像,则卡片中将显示标题:

    Amazon Lex V2

    这些部分介绍了如何将快速回复整合到 Amazon Lex V1 机器人中,并包括用例示例和其他资源。

    注释:
    • WhatsApp、LINE 或 Twitter 不支持默认操作。 如果在这些应用程序中配置默认操作,则应用程序将忽略它们。
    • 您还可以通过 AWS UI 设置卡片。
    1. 安装来自 Genesys AppFoundry 的亚马逊 Lex 集成
    2. 使用 Amazon Lex 应用程序的权限配置 IAM 角色
    3. 在 Genesys Cloud 中配置并激活 Lex 集成
    4. 要在 AWS Lex 控制台中设置快速回复选项,请使用此自定义 JSON 为机器人的意图定义回复: 
    {
        "genesys_prompt": "String", // optional message text
        "genesys_carousel": [
             {
                  "title": "String", // mandatory cards title line
                  "description": "String", // optional cards body text explaining its purpose
                  "image": "URL", // optional a URL pointing to the image shown in the card
                  "defaultAction":  {
                        "type": "String", //Describes the type of action. Valid values Link Postback
                        "text": "String", //The response text from the button click
                        "payload": "String", // Text to be returned as the payload from a ButtonResponse when a button is clicked.
                        "url": "String" //A URL of a web page to direct the user to.
                  },
                  "actions": [
                        {                                       
                             "type": "String", //Describes the type of action.  Valid values Link Postback
                             "text": "String", //The response text from the button click
                             "payload": "String" // Text to be returned as the payload from a ButtonResponse when a button is clicked.
                        },
                        {
                             "type": "String", //Describes the type of action.  Valid values Link Postback
                             "text": "String", //The response text from the button click
                             "url": "String" //A URL of a web page to direct the user to.
                        }
                  ]
             }
        ]
    }

    要使用卡片选项来填补机器人的位置,请使用 AWS 控制台卡片编辑器:

    点击图片放大。

    亚马逊 Lex V1 中的卡片

     

    注意: 仅通过自定义 JSON 支持 Web URL 按钮。 有关更多信息,请参阅下一节。
     

    要使用卡片选项在机器人的意图之间切换,请在 AWS Lex 控制台中将上一节中的自定义 JSON 复制到响应输入字段中:

    点击图片放大。

    在亚马逊 Lex V1 中设置卡片

    仅限谷歌 DialogFlow ES:

    这些部分介绍了如何将快速回复整合到 Google Dialogflow ES 机器人中,并包括用例示例和其他资源。

    注意: WhatsApp、LINE 或 Twitter 不支持默认操作。 如果在这些应用程序中配置默认操作,则应用程序将忽略它们。

    1. 安装来自 Genesys AppFoundry 的谷歌对话流集成
    2. 配置谷歌 Dialogflow 平台服务帐号凭据
    3. 启用谷歌对话流集成
    4. 要在 Dialogflow 控制台中设置快速回复选项,请使用此自定义 JSON 为机器人的意图定义选项:
    {
        "genesys_prompt": "String", // optional message text
        "genesys_carousel": [
             {
                  "title": "String", // mandatory cards title line
                  "description": "String", // optional cards body text explaining its purpose
                  "image": "URL", // optional a URL pointing to the image shown in the card
                  "defaultAction":  {
                        "type": "String", //Describes the type of action. Valid values Link Postback
                        "text": "String", //The response text from the button click
                        "payload": "String", // Text to be returned as the payload from a ButtonResponse when a button is clicked.
                        "url": "String" //A URL of a web page to direct the user to.
                  },
                  "actions": [
                        {                                       
                             "type": "String", //Describes the type of action.  Valid values Link Postback
                             "text": "String", //The response text from the button click
                             "payload": "String" // Text to be returned as the payload from a ButtonResponse when a button is clicked.
                        },
                        {
                             "type": "String", //Describes the type of action.  Valid values Link Postback
                             "text": "String", //The response text from the button click
                             "url": "String" //A URL of a web page to direct the user to.
                        }
                  ]
             }
        ]
    }

    要使用卡片选项在机器人的意图之间切换,请在 Dialogflow 控制台中,将上一节中的自定义 JSON 添加到响应输入字段中:

    谷歌云 DialogFlow ES 示例

    点击图片放大。

    谷歌对话流中的卡片

    谷歌云 DialogFlow 客户体验示例

    点击图片放大。

    谷歌 DialogFlow CX 中的卡片

    要使用卡片选项来填充机器人的插槽,请使用上一节中的自定义 JSON 到 webhook。 为此,您还可以使用 AWS lambda。 有关详细信息,请参阅 用于插槽填充的 Webhook 在 Google Cloud Dialogflow ES 指南中。

    了解更多

    Bot Connector

    这些章节介绍了如何将快速回复整合到 Genesys Bot Connector 机器人中,以及如何包含其他资源。