はじめに
対話型AIプラットフォーム
チャットボットの概要
自然言語処理(NLP)
ボットの概念と用語
クイックスタートガイド
プラットフォームへのアクセス
ボットビルダーの操作
リリースノート
最新バージョン(英語)
以前のバージョン(英語)
廃止機能(英語)
コンセプト
設計
ストーリーボード
ダイアログタスク
ダイアログタスクとは
ダイアログビルダー
ノードタイプ
インテントノード
ダイアログノード
エンティティノード
フォームノード
確認ノード
ロジックノード
ボットアクションノード
サービスノード
Webhookノード
スクリプトノード
グループノード
エージェント転送ノード
ユーザープロンプト
音声通話プロパティ
イベント ハンドラー
ナレッジグラフ
ナレッジグラフの抽出
ナレッジグラフの構築
ボットにナレッジグラフを追加
グラフの作成
ナレッジグラフの構築
既存のソースからFAQを構築
特性、同義語、停止用語
変数ネームスペースの管理
更新
ノード間の質問と回答の移動
用語の編集と削除
質問と応答の編集
ナレッジグラフの分析
通知タスク
スモールトーク
デジタルスキル
デジタルフォーム
デジタルビュー
デジタルビューとは
パネル
ウィジェット
トレーニング
トレーニングとは
機械学習
機械学習とは
モデル検証
ファンダメンタルミーニング
ナレッジグラフ
示唆
ランキングおよび解決
NLPの詳細設定
NLPのガイドライン
インテリジェンス
インテリジェンスとは
コンテキスト
コンテキストインテント
割り込み
複数インテントの検出
エンティティの変更
デフォルトの会話
センチメント管理
トーン分析
テストとデバッグ
ボットと会話
発話テスト
バッチテスト
会話テスト
デプロイ
チャネル
公開
分析
ボットの分析
NLPメトリクス
会話フロー
Usage Metrics
封じ込め測定
カスタムダッシュボード
カスタムダッシュボードとは
メタタグ
カスタムダッシュボードとウィジェット
ユニバーサルボット
ユニバーサルボットとは
ユニバーサルボットの定義
ユニバーサルボットの作成
ユニバーサルボットのトレーニング
ユニバーサルボットのカスタマイズ
他言語の有効化
ストア
プラントと使用
Overview
Usage Plans
Support Plans
Invoices
管理
ボット認証
複数言語対応ボット
個人を特定できる情報の編集
ボット変数の使用
IVRのシステム連携
一般設定
ボット管理
ハウツー
会話スキルの設計
バンキングボットを作成
バンキングボット – 資金の振り替え
バンキングボット – 残高を更新
ナレッジグラフを構築
スマートアラートの予約方法
デジタルスキルの設計
デジタルフォームの設定方法
デジタルビューの設定方法
データテーブルのデータの追加方法
データテーブルのデータの更新方法
Add Data from Digital Forms
ボットのトレーニング
示唆の使用方法
インテントとエンティティのパターンの使用方法
コンテキスト切り替えの管理方法
ボットのデプロイ
エージェント転送の設定方法
ボット関数の使用方法
コンテンツ変数の使用方法
グローバル変数の使用方法
Web SDK Tutorial(英語)
Widget SDK Tutorial(英語)
ボットの分析
カスタムダッシュボードの作成方法
カスタムタグを使ってフィルタリング
管理
ボット管理者コンソール
ダッシュボード
ユーザーの管理
ユーザーの管理
グループの管理
ロール管理
ボット管理モジュール
登録
ユーザーの招待
招待状の一括送信
ユーザーデータのインポート
Active Directoryからユーザーを同期
セキュリティ/コンプライアンス
シングル サインオンの使用
セキュリティ設定
Billing(日本未対応)
  1. ホーム
  2. Docs
  3. Virtual Assistants
  4. SDKs
  5. Widget SDK – Message Formatting and Templates

Widget SDK – Message Formatting and Templates

Kore.ai Widget SDK allows you to override the default message formatting using markdown and apply templates to display custom formatted bot messages to users on the Widget SDK channel.

For details on Web/Mobile SDK, refer here.

Button Template

Shows a clickable button in the header option. The button can be placed anywhere within a message and for any message template.

There are two types of buttons:

  • URL type to open an external site. url field should contain the external site address.
  • postback type to trigger an utterance in Virtual Assistant. The payload defines the utterance to be passed to the Virtual Assistant and the nlmeta defines the additional information that the Platform needs to trigger the respective task.

Example

var message = {
	"templateType": "List",
	"widgetName": "Account Summary",
	"description": "Showing all accounts",
	"headerOptions": {
		"layout": {
			"align": "top",
			"colSize": "25%"
		},
		"type": "button",
		"button":
		    {
                        // type can be anyone of ["url", "postback"]
			"type": "postback",
			"title": "New Account",
			"payload": "Apply Account",
			"nlmeta": {
				"intent": "Apply Account",
				"isRefreshplace": "true",
				"entities": {
					"Name": "John"
				},
				"interruptionOptions": "discardAll"
			},
			"customdata": {
				"key": "value"
			}
          }
	},
	"elements": [
	  {
			"title": "Salary Account",
			"subtitle": "Active",
			"details": [
			  {
					"image": {
						"image_type": "image",
						"image_src": "https://static.thenounproject.com/png/2539563-200.png"
					},
					"description": "$ 25 - Feb 8, 2020 08:45 AM - Fuel Purchase"
				}
			]
		}
	]
}
print(JSON.stringify(message));

Menu Template

Shows a dropdown menu in the header option. The menu can be placed for any message template. There are two types of menu items:

  • URL type to open an external site. url field should contain the external site address.
  • postback type to trigger an utterance in the Virtual Assistant. The payload defines the utterance to be passed to the assistant and the nlmeta defines the additional information that the Platform needs to trigger the respective task.

Example

var message = {
	"templateType": "List",
	"widgetName": "Account Summary",
	"description": "Showing all accounts",
	"headerOptions": {
		"layout": {
			"align": "top",
			"colSize": "25%"
		},
		"type": "menu",
		"menu":
            [
             {
                // type can be anyone of ["url", "postback"]
                "type": "url",
                "title": "Website",
                "url": "kore.ai",
                "customdata": {
                    "key": "value"
                }
            },
            {
                // type can be anyone of ["url", "postback"]
                "type": "postback",
                "title": "New Account",
                "payload": "Create Account",
                "nlmeta": {
                    "intent": "Create Account",
                    "entities": {},
                    "interruptionOptions": "discardAll"
                },
                "customdata": {
                    "key": "value"
                }
            }
        ]
	},
    "elements": [
	  {
			"title": "Salary Account",
			"subtitle": "Active",
			"details": [
			  {
					"image": {
						"image_type": "image",
						"image_src": "https://static.thenounproject.com/png/2539563-200.png"
					},
					"description": "$ 25 - Feb 8, 2020 08:45 AM - Fuel Purchase"
				}
			]
		}
	]
}
print(JSON.stringify(message));

List Template

Shows a formatted list of date to the user with clickable text and images as choices for additional information or trigger tasks.

Example

var message = {
	"templateType": "List",
	"widgetName": "Account Summary",
	"description": "Showing all accounts",
	"headerOptions": {
		"layout": {
			"align": "top",
			"colSize": "25%"
		},
               "type": "url",
               "url": {
               "title": "Open Site",
               "link": "kore.ai"
               },
	 },
	"elements": [
	  {
			"image": {
				"image_type": "image",
				"image_src": "https://static.thenounproject.com/png/1863652-200.png"
			},
			"title": "Salary Account",
			"subtitle": "Active",
			"buttonsLayout": {
				"displayLimit": {
					"count": 2        //adds an open icon if more than 2 elements are present
				},
				"style": "fitToWidth"
			},
			"value": {
				"layout": {
					"align": "top",
					"colSize": "25%"
				},
				"type": "text",
				"text": "$ 45",
			},
			"details": [
			  {
					"image": {
						"image_type": "image",
						"image_src": "https://static.thenounproject.com/png/2539563-200.png"
					},
					"description": "$ 25 - Feb 8, 2020 08:45 AM - Fuel Purchase"
				},
				{
					"image": {
						"image_type": "image",
						"image_src": "https://static.thenounproject.com/png/953447-200.png"
					},
					"description": "$ 77 - Feb 9, 2020 02:23 PM - Library Enrollment"
				},
				{
					"image": {
						"image_type": "image",
						"image_src": "https://static.thenounproject.com/png/2539563-200.png"
					},
					"description": "$ 18 - Feb 9, 2020 04:03 PM - Sainsbury's"
				}
			],
			"default_action": {
				"type": "postback",
				"payload": "Show recent transactions"
			},
			"buttons": [
			  {
					"type": "postback",
					"title": "Statement",
					"payload": "Account Statement",
					"image": {
						"image_type": "image",
						"image_src": "https://static.thenounproject.com/png/2033288-200.png"
					},
					"nlmeta": {
				"intent": "Account Statement",
				"isRefreshplace": "true",
				"entities": {
					"entity_name": "entity_value"
				},
				"interruptionOptions": "discardAll"
			},
			"customdata": {
				"key": "value"
			}
				},
			   {
					"type": "postback",
					"title": "Upgrade",
					"payload": "Upgrade Account",
					"image": {
						"image_type": "image",
						"image_src": "https://static.thenounproject.com/png/1586653-200.png"
					},
					"nlmeta": {
				"intent": "Upgrade Account",
				"isRefreshplace": "true",
				"entities": {
					"entity_name": "entity_value"
				},
				"interruptionOptions": "discardAll"
			},
			"customdata": {
				"key": "value"
			}
				}
			]
		},
	 {
			"image": {
				"image_type": "image",
				"image_src": "https://static.thenounproject.com/png/2119994-200.png"
			},
			"title": "Infinia Credit card",
			"subtitle": "Active - Payment Due on Feb 14, 2020",
			"buttonsLayout": {
				"displayLimit": {
					"count": 3
				},
				"style": "fitToWidth"
			},
			"value": {
				"layout": {
					"align": "top",
					"colSize": "25%"
				},
				"type": "text",
				"text": "$ 8,520",
			},
			"details": [
			  {
					"image": {
						"image_type": "image",
						"image_src": "https://static.thenounproject.com/png/953447-200.png"
					},
					"description": "$ 78 - Feb 3, 2020 07:03 PM - Pizzabar"
				},
				{
					"image": {
						"image_type": "image",
						"image_src": "https://static.thenounproject.com/png/953447-200.png"
					},
					"description": "$ 12 - Feb 5, 2020 11:23 AM - McDonald's"
				},
					{
					"image": {
						"image_type": "image",
						"image_src": "https://static.thenounproject.com/png/953447-200.png"
					},
					"description": "$ 62 - Feb 6, 2020 02:11 PM - CarzRent"
				}
			],
			"default_action": {
				"type": "postback",
				"payload": "Postback text payload"
			},
			"buttons": [
			  {
					"type": "postback",
					"title": "Statement",
					"payload": "Statement",
					"image": {
						"image_type": "image",
						"image_src": "https://static.thenounproject.com/png/2033288-200.png"
					},
					"nlmeta": {
				"intent": "name of the intent",
				"isRefreshplace": "true",
				"entities": {
					"entity_name": "entity_value"
				},
				"interruptionOptions": "discardAll"
			},
			"customdata": {
				"key": "value"
			}
				},
			   {
					"type": "postback",
					"title": "Pay Dues",
					"payload": "Pau Dues",
					
					"nlmeta": {
				"intent": "name of the intent",
				"isRefreshplace": "true",
				"entities": {
					"entity_name": "entity_value"
				},
				"interruptionOptions": "discardAll"
			},
			"customdata": {
				"key": "value"
			}
				},
			   {
					"type": "postback",
					"title": "Redeem",
					"payload": "Redeem",
					
					"nlmeta": {
				"intent": "name of the intent",
				"isRefreshplace": "true",
				"entities": {
					"entity_name": "entity_value"
				},
				"interruptionOptions": "discardAll"
			},
			"customdata": {
				"key": "value"
			}
				},
			   {
					"type": "postback",
					"title": "Upgrade",
					"payload": "Upgrade",
					
					"nlmeta": {
				"intent": "name of the intent",
				"isRefreshplace": "true",
				"entities": {
					"entity_name": "entity_value"
				},
				"interruptionOptions": "discardAll"
			},
			"customdata": {
				"key": "value"
			}
				},
				{
					"type": "postback",
					"title": "Block",
					"payload": "Block",
					
					"nlmeta": {
				"intent": "name of the intent",
				"isRefreshplace": "true",
				"entities": {
					"entity_name": "entity_value"
				},
				"interruptionOptions": "discardAll"
			},
			"customdata": {
				"key": "value"
			}
				}
			]
		}
	]
}
print(JSON.stringify(message));

Pie Chart Template

Shows the data in a Pie chart

Sample

var data = {
  "templateType": "piechart",
  "pie_type": "regular",
  "title": "Spend Analysis",
   "headerOptions": {
    "type": "url",
    "url": {
      "title": "Manage Spends",
      "link": "https://kore.ai"
    }
  },
  "elements": [
    {
      "title": "Food and Drinks",
      "value": "200",
      "displayValue": "$ 200"
    },
    {
      "title": "Travel",
      "value": "120",
      "displayValue": "$ 120"
    },
    {
      "title": "Inivestments",
      "value": "320",
      "displayValue": "$ 320"
    },
    {
      "title": "Entertainment",
      "value": "180",
      "displayValue": "$ 180"
    }
  ],
  "buttons": [
    {
      "type": "postback",
      "title": "Download",
      "utterance": "Show Expense Report",
      "payload": "Show Expense Report"
    }
  ]
};
print(JSON.stringify(data));

Line Chart Template

Shows the data in a line chart.

Sample

var data = {
  "templateType": "linechart",
   "headerOptions": {
    "type": "url",
    "url": {
      "title": "Manage Spends",
      "link": "https://kore.ai"
    },
  "image": {
        "image_type": "image",
        "image_src": "https://static.thenounproject.com/png/1863652-200.png"
     },
  },
  "X_axis": [
    "F&B",
    "Travel",
    "Investments",
    "Entertainment"
  ],
  "Auto_adjust_X_axis": "yes",
  "elements": [
    {
      "title": "Jan",
        "values": [
            20,
            12,
            32,
            18
        ],
        "displayValues": [
            "$20k",
            "$12k",
            "$32k",
            "$18k"
        ]
    },
    {
      "title": "Feb",
      "values": [
        30,
        15,
        12,
        60
      ],
      "displayValues": [
        "$30k",
        "$15k",
        "$12k",
        "$60k"
      ]
    }
  ],
  "buttons": [
    {
      "type": "postback",
      "title": "Download",
      "utterance": "Download Report",
      "payload": "Download Report"
    }
  ],
  "speech_hint": "Here is your report"
};
print(JSON.stringify(data));

To understand customized JavaScript responses and channel-specific templates, refer to Customize JavaScript Responses in User Prompts.

Widget SDK – Message Formatting and Templates

Kore.ai Widget SDK allows you to override the default message formatting using markdown and apply templates to display custom formatted bot messages to users on the Widget SDK channel.

For details on Web/Mobile SDK, refer here.

Button Template

Shows a clickable button in the header option. The button can be placed anywhere within a message and for any message template.

There are two types of buttons:

  • URL type to open an external site. url field should contain the external site address.
  • postback type to trigger an utterance in Virtual Assistant. The payload defines the utterance to be passed to the Virtual Assistant and the nlmeta defines the additional information that the Platform needs to trigger the respective task.

Example

var message = {
	"templateType": "List",
	"widgetName": "Account Summary",
	"description": "Showing all accounts",
	"headerOptions": {
		"layout": {
			"align": "top",
			"colSize": "25%"
		},
		"type": "button",
		"button":
		    {
                        // type can be anyone of ["url", "postback"]
			"type": "postback",
			"title": "New Account",
			"payload": "Apply Account",
			"nlmeta": {
				"intent": "Apply Account",
				"isRefreshplace": "true",
				"entities": {
					"Name": "John"
				},
				"interruptionOptions": "discardAll"
			},
			"customdata": {
				"key": "value"
			}
          }
	},
	"elements": [
	  {
			"title": "Salary Account",
			"subtitle": "Active",
			"details": [
			  {
					"image": {
						"image_type": "image",
						"image_src": "https://static.thenounproject.com/png/2539563-200.png"
					},
					"description": "$ 25 - Feb 8, 2020 08:45 AM - Fuel Purchase"
				}
			]
		}
	]
}
print(JSON.stringify(message));

Menu Template

Shows a dropdown menu in the header option. The menu can be placed for any message template. There are two types of menu items:

  • URL type to open an external site. url field should contain the external site address.
  • postback type to trigger an utterance in the Virtual Assistant. The payload defines the utterance to be passed to the assistant and the nlmeta defines the additional information that the Platform needs to trigger the respective task.

Example

var message = {
	"templateType": "List",
	"widgetName": "Account Summary",
	"description": "Showing all accounts",
	"headerOptions": {
		"layout": {
			"align": "top",
			"colSize": "25%"
		},
		"type": "menu",
		"menu":
            [
             {
                // type can be anyone of ["url", "postback"]
                "type": "url",
                "title": "Website",
                "url": "kore.ai",
                "customdata": {
                    "key": "value"
                }
            },
            {
                // type can be anyone of ["url", "postback"]
                "type": "postback",
                "title": "New Account",
                "payload": "Create Account",
                "nlmeta": {
                    "intent": "Create Account",
                    "entities": {},
                    "interruptionOptions": "discardAll"
                },
                "customdata": {
                    "key": "value"
                }
            }
        ]
	},
    "elements": [
	  {
			"title": "Salary Account",
			"subtitle": "Active",
			"details": [
			  {
					"image": {
						"image_type": "image",
						"image_src": "https://static.thenounproject.com/png/2539563-200.png"
					},
					"description": "$ 25 - Feb 8, 2020 08:45 AM - Fuel Purchase"
				}
			]
		}
	]
}
print(JSON.stringify(message));

List Template

Shows a formatted list of date to the user with clickable text and images as choices for additional information or trigger tasks.

Example

var message = {
	"templateType": "List",
	"widgetName": "Account Summary",
	"description": "Showing all accounts",
	"headerOptions": {
		"layout": {
			"align": "top",
			"colSize": "25%"
		},
               "type": "url",
               "url": {
               "title": "Open Site",
               "link": "kore.ai"
               },
	 },
	"elements": [
	  {
			"image": {
				"image_type": "image",
				"image_src": "https://static.thenounproject.com/png/1863652-200.png"
			},
			"title": "Salary Account",
			"subtitle": "Active",
			"buttonsLayout": {
				"displayLimit": {
					"count": 2        //adds an open icon if more than 2 elements are present
				},
				"style": "fitToWidth"
			},
			"value": {
				"layout": {
					"align": "top",
					"colSize": "25%"
				},
				"type": "text",
				"text": "$ 45",
			},
			"details": [
			  {
					"image": {
						"image_type": "image",
						"image_src": "https://static.thenounproject.com/png/2539563-200.png"
					},
					"description": "$ 25 - Feb 8, 2020 08:45 AM - Fuel Purchase"
				},
				{
					"image": {
						"image_type": "image",
						"image_src": "https://static.thenounproject.com/png/953447-200.png"
					},
					"description": "$ 77 - Feb 9, 2020 02:23 PM - Library Enrollment"
				},
				{
					"image": {
						"image_type": "image",
						"image_src": "https://static.thenounproject.com/png/2539563-200.png"
					},
					"description": "$ 18 - Feb 9, 2020 04:03 PM - Sainsbury's"
				}
			],
			"default_action": {
				"type": "postback",
				"payload": "Show recent transactions"
			},
			"buttons": [
			  {
					"type": "postback",
					"title": "Statement",
					"payload": "Account Statement",
					"image": {
						"image_type": "image",
						"image_src": "https://static.thenounproject.com/png/2033288-200.png"
					},
					"nlmeta": {
				"intent": "Account Statement",
				"isRefreshplace": "true",
				"entities": {
					"entity_name": "entity_value"
				},
				"interruptionOptions": "discardAll"
			},
			"customdata": {
				"key": "value"
			}
				},
			   {
					"type": "postback",
					"title": "Upgrade",
					"payload": "Upgrade Account",
					"image": {
						"image_type": "image",
						"image_src": "https://static.thenounproject.com/png/1586653-200.png"
					},
					"nlmeta": {
				"intent": "Upgrade Account",
				"isRefreshplace": "true",
				"entities": {
					"entity_name": "entity_value"
				},
				"interruptionOptions": "discardAll"
			},
			"customdata": {
				"key": "value"
			}
				}
			]
		},
	 {
			"image": {
				"image_type": "image",
				"image_src": "https://static.thenounproject.com/png/2119994-200.png"
			},
			"title": "Infinia Credit card",
			"subtitle": "Active - Payment Due on Feb 14, 2020",
			"buttonsLayout": {
				"displayLimit": {
					"count": 3
				},
				"style": "fitToWidth"
			},
			"value": {
				"layout": {
					"align": "top",
					"colSize": "25%"
				},
				"type": "text",
				"text": "$ 8,520",
			},
			"details": [
			  {
					"image": {
						"image_type": "image",
						"image_src": "https://static.thenounproject.com/png/953447-200.png"
					},
					"description": "$ 78 - Feb 3, 2020 07:03 PM - Pizzabar"
				},
				{
					"image": {
						"image_type": "image",
						"image_src": "https://static.thenounproject.com/png/953447-200.png"
					},
					"description": "$ 12 - Feb 5, 2020 11:23 AM - McDonald's"
				},
					{
					"image": {
						"image_type": "image",
						"image_src": "https://static.thenounproject.com/png/953447-200.png"
					},
					"description": "$ 62 - Feb 6, 2020 02:11 PM - CarzRent"
				}
			],
			"default_action": {
				"type": "postback",
				"payload": "Postback text payload"
			},
			"buttons": [
			  {
					"type": "postback",
					"title": "Statement",
					"payload": "Statement",
					"image": {
						"image_type": "image",
						"image_src": "https://static.thenounproject.com/png/2033288-200.png"
					},
					"nlmeta": {
				"intent": "name of the intent",
				"isRefreshplace": "true",
				"entities": {
					"entity_name": "entity_value"
				},
				"interruptionOptions": "discardAll"
			},
			"customdata": {
				"key": "value"
			}
				},
			   {
					"type": "postback",
					"title": "Pay Dues",
					"payload": "Pau Dues",
					
					"nlmeta": {
				"intent": "name of the intent",
				"isRefreshplace": "true",
				"entities": {
					"entity_name": "entity_value"
				},
				"interruptionOptions": "discardAll"
			},
			"customdata": {
				"key": "value"
			}
				},
			   {
					"type": "postback",
					"title": "Redeem",
					"payload": "Redeem",
					
					"nlmeta": {
				"intent": "name of the intent",
				"isRefreshplace": "true",
				"entities": {
					"entity_name": "entity_value"
				},
				"interruptionOptions": "discardAll"
			},
			"customdata": {
				"key": "value"
			}
				},
			   {
					"type": "postback",
					"title": "Upgrade",
					"payload": "Upgrade",
					
					"nlmeta": {
				"intent": "name of the intent",
				"isRefreshplace": "true",
				"entities": {
					"entity_name": "entity_value"
				},
				"interruptionOptions": "discardAll"
			},
			"customdata": {
				"key": "value"
			}
				},
				{
					"type": "postback",
					"title": "Block",
					"payload": "Block",
					
					"nlmeta": {
				"intent": "name of the intent",
				"isRefreshplace": "true",
				"entities": {
					"entity_name": "entity_value"
				},
				"interruptionOptions": "discardAll"
			},
			"customdata": {
				"key": "value"
			}
				}
			]
		}
	]
}
print(JSON.stringify(message));

Pie Chart Template

Shows the data in a Pie chart

Sample

var data = {
  "templateType": "piechart",
  "pie_type": "regular",
  "title": "Spend Analysis",
   "headerOptions": {
    "type": "url",
    "url": {
      "title": "Manage Spends",
      "link": "https://kore.ai"
    }
  },
  "elements": [
    {
      "title": "Food and Drinks",
      "value": "200",
      "displayValue": "$ 200"
    },
    {
      "title": "Travel",
      "value": "120",
      "displayValue": "$ 120"
    },
    {
      "title": "Inivestments",
      "value": "320",
      "displayValue": "$ 320"
    },
    {
      "title": "Entertainment",
      "value": "180",
      "displayValue": "$ 180"
    }
  ],
  "buttons": [
    {
      "type": "postback",
      "title": "Download",
      "utterance": "Show Expense Report",
      "payload": "Show Expense Report"
    }
  ]
};
print(JSON.stringify(data));

Line Chart Template

Shows the data in a line chart.

Sample

var data = {
  "templateType": "linechart",
   "headerOptions": {
    "type": "url",
    "url": {
      "title": "Manage Spends",
      "link": "https://kore.ai"
    },
  "image": {
        "image_type": "image",
        "image_src": "https://static.thenounproject.com/png/1863652-200.png"
     },
  },
  "X_axis": [
    "F&B",
    "Travel",
    "Investments",
    "Entertainment"
  ],
  "Auto_adjust_X_axis": "yes",
  "elements": [
    {
      "title": "Jan",
        "values": [
            20,
            12,
            32,
            18
        ],
        "displayValues": [
            "$20k",
            "$12k",
            "$32k",
            "$18k"
        ]
    },
    {
      "title": "Feb",
      "values": [
        30,
        15,
        12,
        60
      ],
      "displayValues": [
        "$30k",
        "$15k",
        "$12k",
        "$60k"
      ]
    }
  ],
  "buttons": [
    {
      "type": "postback",
      "title": "Download",
      "utterance": "Download Report",
      "payload": "Download Report"
    }
  ],
  "speech_hint": "Here is your report"
};
print(JSON.stringify(data));

To understand customized JavaScript responses and channel-specific templates, refer to Customize JavaScript Responses in User Prompts.

メニュー