仮想エージェント APIのコントロール

  • リリースバージョン: Australia
  • 更新日 2026年03月12日
  • 所要時間:19分
  • 仮想エージェント API には、会話の応答を管理するためのさまざまなコントロールが用意されています。

    仮想エージェント APIで利用可能なコントロールは次のとおりです。

    出力テキスト

    {
      "uiType": "OutputText",
      "group": "DefaultText",
      "value": "**bold**\n*italic*\n***bold italic***\n[Google](https://empcygiraffe6.service-now.com/va_link.do?token=77ee77ef77eSZGFlMTc3OWU5NzY2MTExMDUyNjFiMzQ3MTE1M2FmYjTvt6zvt5Qx77es77etWE1nS0ZLOElhU1FQYzhIajh2dmNmZz09WHdPTDYzV3ZpUWF1MGJwRlB0ZktUY29wVWt1UGVueUNIS1FkRHRyUW9idHlmVFZlRWJOODZyRjZYN0VQamxnWUV5WkhZSDRJaWFGWmJRZU1CaXZLYWhudnkwbDdvNFZsMlMzUUw4Q3VRTUJWMHhvTWlRLXZOQnh5M0hveVBuellNVmJCbGlka0RqNTAzVFVUQml0MTZzSnlUTVJoakdZektldXdoYXlM77eu77ev&target_url=https%3A%2F%2Fwww.google.co.in)\n\n- ***ul1***\n- ***ul2***\n\n\n1. ol1\n2. ol2\n\n",
      "maskType": "NONE | SECURE"
    }
    フィールド 説明
    出力テキスト値が含まれます。
    maskType 「NONE」は標準テキストを示し、「SECURE」は安全な出力テキストを示します。

    出力 HTML

    {
      "uiType": "OutputHtml",
      "group": "DefaultOutputHtml",
      "style": "inline",
      "height": 0,
      "width": 0,
      "value": "<html>     <body>     <table>   <tr>     <th>Company</th>     <th>Contact</th>     <th>Country</th>   </tr>   <tr>     <td><a href=\"https://www.google.co.in\">Alfreds Futterkiste</a></td>     <td>Maria Anders</td>     <td>Germany</td>   </tr>   <tr>     <td>Centro comercial Moctezuma</td>     <td>Francisco Chang</td>     <td>Mexico</td>   </tr>   <tr>     <td><a href=\"https://www.google.co.in\">Ernest Handel</a></td>     <td>Roland Mendel</td>     <td>Austria</td>   </tr>   <tr>     <td>Island Trading</td>     <td>Helen Bennett</td>     <td>UK</td>   </tr>   <tr>     <td>Laughing Bacchus Winecellars</td>     <td>Yoshi Tannamuri</td>     <td><a href=\"https://www.google.co.in\">Canada</a></td>   </tr>   <tr>     <td>Magazzini Alimentari Riuniti</td>     <td>Giovanni Rovelli</td>     <td>Italy</td>   </tr> </table>     </body> </html> ",
      "imageUrl": "https://empcygiraffe6.service-now.com//api/now/v1/cs/media/zKFqUx0NJyVaFRJqzeRhFgeMsMo9211mCvrMgKzrRpTWqFJDrXLOadoYGC5CQnwr",
      "imageHeight": 217,
      "imageWidth": 501,
      "links": [
        {
          "link": "https://www.google.co.in",
          "label": "Alfreds Futterkiste"
        },
        {
           "link": "https://www.google.co.in",
           "label": "Ernest Handel"
        },
        {
           "link": "https://www.google.co.in",
           "label": "Canada"
        }
      ]
    }
    フィールド 説明
    html 値が含まれます。
    画像 URL sys_cs_providerで [HTML から画像への変換が必要] が有効になっている場合は、HTML の画像が含まれます。
    イメージの高さ sys_cs_providerで [HTML から画像への変換が必要] が有効になっている場合、画像の高さが含まれます。
    画像幅 sys_cs_providerで [HTML から画像への変換が必要 (Html to image conversion required)] が有効になっている場合に、画像幅が含まれます。
    リンク sys_cs_providerで [HTML から画像への変換が必要] が有効になっている場合、指定された HTML のリンクが含まれます。

    出力画像

    {
      "uiType": "OutputImage",
      "group": "DefaultOutputImage",
      "value": "https://adaptivecards.io/content/cats/1.png",
      "altText": "Image alt text"
     }
    フィールド 説明
    画像 URL が含まれます。
    代替テキスト 画像の代替テキストが含まれます (必須ではありません)。

    出力リンク

    {
      "uiType": "OutputLink",
      "group": "DefaultOutputLink",
      "label": "ServiceNow",
      "header": "The world works with ServiceNow",
      "type": "link",
      "value": {
        "action": "https://empcygiraffe6.service-now.com/va_link.do?token=<token>&target_url=https%3A%2F%2Fwww.servicenow.com",
        "target": "_blank"
      }
    }
    フィールド 説明
    ヘッダー リンクヘッダー
    ラベル リンクのラベル
    value->action リンク URL

    マルチリンク

    {
      "uiType": "GroupedPartsOutputControl",
      "group": "DefaultGroupedPartsOutputControl",
      "groupPartType": "Link",
      "header": "Multilink Header",
      "values": [
        {
          "action": "https://empcygiraffe6.service-now.com/va_link.do?token=<token>&target_url=https%3A%2F%2Fwww.link1.com",
          "description": "a short desc",
          "label": "link 1 label",
          "context": "KB",
          "target": "_blank"
        },
        {
          "action": "https://empcygiraffe6.service-now.com/va_link.do?token=<token>&target_url=https%3A%2F%2Fwww.link2.com",
          "description": "a short desc",
          "label": "link 2 label",
          "context": "ITSM",
          "target": "_blank"
        }
      ]
    }
    フィールド 説明
    ヘッダー マルチリンクコントロールヘッダー
    リンクアレイ
    リンクアレイのリンク構造:
    フィールド 説明
    ラベル リンクのラベル
    アクション リンク URL
    説明 リンクの説明
    コンテキスト コンテキストまたは分類

    出力カード

    {
      "uiType": "OutputCard",
      "group": "DefaultOutputCard",
      "templateName": "<card-template>",
      "data": "<card-data-json>",
    }
    フィールド 説明
    テンプレート名 カードタイプまたはカード名
    データ カードデータを表す JSON。
    注:
    データフィールドは文字列型になります。データを使用するには、解析する必要があります。
    テキスト付きの大きな画像
    {
      "uiType": "OutputCard",
      "group": "DefaultOutputCard",
      "templateName": "Large image with text",
      "data": "{\"image\":\"https://adaptivecards.io/content/cats/1.png\",\"description\":\"Large image description\", \"dataNowSmartLink\":\"W9F4Ld8z\",\"title\":\"Large image\",\"imageAlt\":\"large image alt text\",\"url\":\"\",\"target\":\"_blank\"}",
      "smartLinksMetadata": {
        "W9F4Ld8z": {
          "type": "standard",
          "source": "",
          "target": "_blank"
        }
      }
    }
    テキスト付きの小さな画像
    {
      "uiType": "OutputCard",
      "group": "DefaultOutputCard",
      "templateName": "Small image with text",
      "data": "{\"image\":\"https://adaptivecards.io/content/cats/1.png\",\"description\":\"Small image with text description\",\"dataNowSmartLink\":\"i6CL61tN\",\"title\":\"Small image with text\",\"imageAlt\":\"small image alt text\",\"url\":\"\",\"target\":\"_blank\"}",
      "smartLinksMetadata": {
         "i6CL61tN": {
           "type": "standard",
           "source": "",
           "target": "_blank"
         }
      }
    }
    Youtube
    {
      "uiType": "OutputCard",
      "group": "DefaultOutputCard",
      "templateName": "Youtube Video Card",
      "data": "{\"link\":\"https://empcygiraffe6.service-now.com/va_link.do?token=<token>&target_url=servicenow.com\",\"description\":\"The world works with ServiceNow\",\"id\":\"IWsGk-Kh5ko\",\"title\":\"ServiceNow\",\"url\":\"\",\"target\":\"_blank\"}"
    }
    レコード
    {
      "uiType": "OutputCard",
      "group": "DefaultOutputCard",
      "templateName": "Card",
      "data": "{\"sys_id\":\"0c5f3cece1b12010f877971dea0b1449\",\"subtitle\":\"INC0008001\",\"dataNowSmartLink\":\"VLzQTN88\",\"title\":\"Incident\",\"fields\":[{\"fieldLabel\":\"Number\",\"fieldValue\":\"INC0008001\"},{\"fieldLabel\":\"Short description\",\"fieldValue\":\"ATF:TEST2\"},{\"fieldLabel\":\"Caller\",\"fieldValue\":\"survey user\"}],\"table_name\":\"incident\",\"url\":\"https://empcygiraffe6.service-now.com/va_link.do?token=<token>target_url=https%3A%2F%2Fempcygiraffe6.service-now.com%2Fsp%3Fsys_id%3D0c5f3cece1b12010f877971dea0b1449%26id%3Dticket%26table%3Dincident\",\"target\":\"_blank\"}",
      "smartLinksMetadata": {
        "VLzQTN88": {
          "type": "standard",
          "source": "https://empcygiraffe6.service-now.com/sp?sys_id=0c5f3cece1b12010f877971dea0b1449&id=ticket&table=incident",
          "target": "_blank"
        }
      }
    }

    マルチパート出力

    {
      "uiType": "MultiPartOutput",
      "group": "DefaultMultiPartOutput",
      "navigationBtnLabel": "Click for more",
      "content": {
        "uiType": "OutputText",
        "value": "multipart text output",
        "maskType": "NONE"
      }
    }
    フィールド 説明
    navigationBtnLabel ナビゲーションボタンラベル
    コンテンツ マルチパートで定義されたコントロールを表します。
    注:
    • コンテンツには、OutputText、OutputImage、OutputHtml、OutputLink、OutputCard を使用できます。
    • 次のパートに進むには、応答として「click_for_more」を送信する必要があります。

    InputText

    {
      "uiType": "InputText",
      "group": "DefaultText",
      "required": true,
      "nluTextEnabled": false,
      "entityType": "Text",
      "label": "enter something",
      "maskType": "NONE"
    }
    フィールド 説明
    ラベル 入力テキストラベル
    必須 コントロールをスキップできるかどうかを示す true または false。
    maskType NONE または SECURE。
    • NONE は通常の入力を示します。
    • SECURE は安全な入力を示します。
    entityType 入力はテキスト、メール、または IP アドレスです。
    nluTextEnabled このノードで nlu が有効になっているかどうか。

    ブール

    {
      "uiType": "Boolean",
      "group": "DefaultPicker",
      "required": true,
      "nluTextEnabled": false,
      "entityType": "Boolean",
      "label": "select yes/no",
      "options": [
        {
           "label": "Yes",
           "value": "yes",
           "renderStyle": "data"
        },
        {
           "label": "No",
           "value": "no",
           "renderStyle": "data"
        }
      ]
    }
    フィールド 説明
    ラベル ブールコントロールプロンプト
    必須 コントロールをスキップできるかどうかを示す true または false。
    maskType NONE または SECURE。
    • NONE は通常の入力を示します。
    • SECURE は安全な入力を示します。
    entityType ブール
    nluTextEnabled このノードで NLU が有効になっているかどうか。
    オプション ブールオプション
    オプションアレイのオプション構造:
    フィールド 説明
    ラベル オプションラベル
    オプション値
    レンダリングスタイル データまたはボタン

    ピッカー

    {
      "uiType": "Picker",
      "group": "DefaultPicker",
      "required": true,
      "nluTextEnabled": false,
      "label": "Select an option",
      "itemType": "List",
      "style": "list",
      "multiSelect": false,
      "options": [
        {
          "label": "option 1",
          "value": "option 1",
          "renderStyle": "data",
          "enabled": false
        },
        {
          "label": "option 2",
          "value": "option 2",
          "renderStyle": "data",
          "enabled": false
        },
        {
          "label": "option 3",
          "value": "option 3",
          "renderStyle": "data",
          "enabled": false
        }
      ],
      "scriptedData": {
        "cardData": "{\"title\":\"Choice - Large image with text\",\"description\":\"Choice - Large image with text description\",\"image\":\"https://adaptivecards.io/content/cats/1.png\",\"imageAlt\":\"alt text\"}",
        "cardName": "Large image with text",
        "cardTemplate": "",
        "renderStyle": "card"
      }
    }
    フィールド 説明
    ラベル ピッカーコントロールプロンプト
    style リストまたはカルーセル。カルーセルは、カルーセルコントロールを示します。
    必須 コントロールをスキップできるかどうかを示す true または false。
    maskType NONE または SECURE。
    • NONE は通常の入力を示します。
    • SECURE は安全な入力を示します。
    entityType ブール
    nluTextEnabled このノードで NLU が有効になっているかどうか。
    オプション ブールオプション
    スクリプト化されたデータ ピッカーとともに表示されるカードを表します。
    オプションアレイのオプション構造:
    フィールド 説明
    ラベル オプションラベル
    オプション値
    レンダリングスタイル データまたはボタン
    scriptedData 構造体:
    フィールド 説明
    cardName テンプレート名
    cardData json 文字列としてのカードデータ。

    カルーセル

    {
      "uiType": "Picker",
      "group": "DefaultPicker",
      "required": true,
      "nluTextEnabled": false,
      "label": "select an image",
      "itemType": "Picture",
      "style": "carousel",
      "multiSelect": false,
      "options": [
        {
           "label": "name1",
           "description": "a description of value_1 item",
           "attachment": "https://adaptivecards.io/content/cats/1.png",
           "value": "value_1",
           "renderStyle": "data",
           "enabled": false
        },
        {
           "label": "name2",
           "description": "a description of value_2 item",
           "attachment": "https://adaptivecards.io/content/cats/1.png",
           "value": "value_2",
           "renderStyle": "data",
           "enabled": false
        },
        {
           "label": "name3",
           "description": "a description of value_3 item",
           "attachment": "https://adaptivecards.io/content/cats/1.png",
           "value": "value_3",
           "renderStyle": "data",
           "enabled": false
        }
      ],
      "scriptedData": null
    }
    フィールド 説明
    ラベル ピッカーコントロールプロンプト
    style リストまたはカルーセル。カルーセルは、カルーセルコントロールを示します。
    必須 コントロールをスキップできるかどうかを示す true または false。
    maskType NONE または SECURE。
    • NONE は通常の入力を示します。
    • SECURE は安全な入力を示します。
    entityType ブール
    nluTextEnabled このノードで NLU が有効になっているかどうか。
    オプション ブールオプション
    オプションアレイのオプション構造:
    フィールド 説明
    ラベル オプションラベル
    オプション値
    説明 オプションの説明
    添付ファイル オプションの写真または画像

    日付

    {
      "uiType": "Date",
      "group": "DefaultDate",
      "required": true,
      "nluTextEnabled": false,
      "entityType": "Date",
      "label": "test date"
    }
    フィールド 説明
    ラベル 日付コントロールプロンプト
    必須 コントロールをスキップできるかどうかを示す true または false。
    entityType 日付
    nluTextEnabled このノードで NLU が有効になっているかどうか。

    時刻

    {
      "uiType": "Time",
      "group": "DefaultDate",
      "required": true,
      "nluTextEnabled": false,
      "entityType": "Time",
      "label": "Select time"
    }
    フィールド 説明
    ラベル 時間コントロールプロンプト
    必須 コントロールをスキップできるかどうかを示す true または false。
    entityType 時刻
    nluTextEnabled このノードで NLU が有効になっているかどうか。

    DateTime

    {
      "uiType": "DateTime",
      "group": "DefaultDate",
      "required": true,
      "nluTextEnabled": false,
      "entityType": "Time",
      "label": "Select time"
    }
    フィールド 説明
    ラベル 日時コントロールプロンプト
    必須 コントロールをスキップできるかどうかを示す true または false。
    entityType 時刻
    nluTextEnabled このノードで NLU が有効になっているかどうか。

    会話を開始

    {
      "uiType": "ActionMsg",
      "actionType": "StartConversation",
      "conversationId": "e0494b2187332550326d0d05dabb350d"
    }
    フィールド 説明
    uiType アクションメッセージ
    actionType 会話を開始

    会話が 仮想エージェント API で開始されたことを示します。