> This is a page from the ElevenLabs documentation. For a complete page index, fetch https://elevenlabs.io/docs/llms.txt. For the full documentation in a single file, fetch https://elevenlabs.io/docs/llms-full.txt.

# インタラクティブメッセージ

## 概要

ユーザーに回答を入力してもらう代わりに、エージェントはWhatsAppの**インタラクティブメッセージ**を送信できます。タップ可能な返信ボタンは最大3個、または最大10個の選択肢のリストを送れます。ユーザーのタップは次のメッセージとして返され、エージェントは選択された項目を正確に把握できます。

インタラクティブメッセージは、アクティブなWhatsAppメッセージ会話でのみ機能します。エージェントは2つのインテグレーションツールを通じて送信します：

* **インタラクティブボタンを送信** — 少数の選択肢向けの、最大3個の返信ボタン。
* **インタラクティブリストを送信** — 3個を超える選択肢向けの、セクションごとにグループ化されたタップ可能な選択肢リスト。

出典：[WhatsAppインタラクティブメッセージに関するMetaのガイド](https://developers.facebook.com/docs/whatsapp/guides/interactive-messages/)。

## ツールを有効にする

#### WhatsAppインテグレーションを追加する

WhatsAppビジネスアカウントをインポートしたら（[手順](/docs/ja/eleven-agents/whatsapp)）、
[インテグレーションページ](https://elevenlabs.io/app/agents/integrations)に移動し、***インテグレーションを追加***&#x30DC;タンをクリックして、WhatsAppを選択しアカウントを接続します。

#### ツールを追加する

[ツールページ](https://elevenlabs.io/app/agents/tools)に移動し、***インテグレーション
ツールを追加***&#x30DC;タンをクリックしてWhatsAppインテグレーションを選び、***インタラクティブボタンを送信***&#x30C4;ールと
***インタラクティブリストを送信***&#x30C4;ールを追加します。

> **Warning**
>
> 複数のWhatsAppアカウントをインポートしている場合、それぞれに固有のWhatsAppインテグレーションがあります。
> エージェントが使用するアカウントに接続されたインテグレーションからツールを追加してください。
> 別のアカウントのインテグレーションから追加したツールは、このエージェントの会話では機能しません。

#### ツールをエージェントに追加する

エージェント設定でツールを追加します。ツールは常にライブ会話のユーザーにメッセージを送信します。
内容を選ぶのはエージェントであり、送信先ではありません。

## インタラクティブボタンを送信する

**インタラクティブボタンを送信**は、現在のWhatsAppメッセージ会話で1～3個の選択肢を提示します。

| パラメーター        | 必須  | 説明                              |
| ------------- | --- | ------------------------------- |
| `body_text`   | はい  | ボタンの上に表示されるメッセージ。最大1024文字。      |
| `buttons`     | はい  | 表示順の1～3個のボタン。タイトルは一意である必要があります。 |
| `footer_text` | いいえ | ボタンの下に表示される補足テキスト。最大60文字。       |

各ボタンには次の項目があります：

| フィールド   | 必須 | 説明                                 |
| ------- | -- | ---------------------------------- |
| `id`    | はい | ユーザーがこのボタンをタップした際に返される識別子。最大256文字。 |
| `title` | はい | ボタンラベル。最大20文字。                     |

## インタラクティブリストを送信する

**インタラクティブリストを送信**は、現在のWhatsAppメッセージ会話で、セクションごとにグループ化された選択肢を提示します。ユーザーはリストを開いて行を選択します。

| パラメーター        | 必須  | 説明                              |
| ------------- | --- | ------------------------------- |
| `body_text`   | はい  | リストの上に表示されるメッセージ。最大4096文字。      |
| `button_text` | はい  | リストを開くボタンのラベル。最大20文字。           |
| `sections`    | はい  | 1～10個の選択肢グループ。リスト全体では最大10行までです。 |
| `header_text` | いいえ | メッセージ本文の上に表示される見出し。最大60文字。      |
| `footer_text` | いいえ | リストの下に表示される補足テキスト。最大60文字。       |

各セクションには次の項目があります：

| フィールド   | 必須 | 説明                  |
| ------- | -- | ------------------- |
| `title` | はい | セクション見出し。最大24文字。    |
| `rows`  | はい | このセクション内の1～10個の選択肢。 |

各行には次の項目があります：

| フィールド         | 必須  | 説明                             |
| ------------- | --- | ------------------------------ |
| `id`          | はい  | ユーザーがこの行を選んだ際に返される識別子。最大200文字。 |
| `title`       | はい  | 行ラベル。最大24文字。                   |
| `description` | いいえ | 行ラベルの下に表示される補足テキスト。最大72文字。     |

エージェントが上限を超えるコンテンツを生成した場合、ツール呼び出しは失敗し、その理由がエージェントに通知されます。これにより、より短いコンテンツで再試行できます。

## エージェントへのプロンプト

選択肢を提示するタイミングをシステムプロンプトでエージェントに伝えます。例：

```text
When you need the user to pick from a fixed set of options (appointment slots,
product variants, yes/no confirmations), use the Send Interactive Buttons tool
for up to 3 options or the Send Interactive List tool for more. Keep option
titles short. Do not use interactive messages for open-ended questions.
```

### 任意：エージェントのツール利用を導くプロシージャを追加する

エージェントにツールを渡すだけでは不十分です。[プロシージャ](/docs/ja/eleven-agents/customization/procedures)で、ツールを効果的に操作する方法を伝えます。

> **Note**
>
> 以下のプロシージャはテンプレートであり、そのまま使えるものではありません。コピー後は用途に合わせて調整してください。
> トリガーをフローに合わせ、エージェントが実際に持つツールだけを残し、選択肢の例とルールをユースケースに合わせて書き換えます。

#### サンプルプロシージャをコピー

```markdown
---
name: Offer choices with interactive messages
trigger: The user must pick from a fixed set of known options in a WhatsApp message conversation, such as appointment slots, product variants, or order confirmations.
---

Offer the options as an interactive message instead of asking the user
to type an answer.

1. Check which interactive tools you have. Prefer Send Interactive
   Buttons for 2–3 options and Send Interactive List for 4–10. If only
   one of the two is available, use it for any option count that fits its
   limits; if no interactive tool fits, ask the question in plain text.
   Never present more than 10 options; narrow them down with a question
   first.
2. Write a body_text that asks one clear question. Do not stack multiple
   questions into one interactive message.
3. Give every option a stable, machine-readable id (for example
   slot_2026-08-20_10am) and a short human title — 20 characters for
   buttons, 24 for list rows.
4. For lists, group related rows into titled sections, and add a
   description to a row only when its title alone is ambiguous.
5. Send the message with the tool, then wait for the user's reply. Do not
   send a second interactive message before the user responds to the first.
6. Treat the reply as the user's choice. Confirm it back in one short line
   and continue the flow.

Rules:

- Never use interactive messages for open-ended questions.
- When the fixed options may not cover everyone, include a final option
  such as "Something else" and follow up with a free-text question.
- If the tool call fails because content exceeds a limit, shorten titles
  and descriptions and retry once.
- If the user types an answer instead of tapping, accept it — do not
  re-send the options.
```

## 制約

* インタラクティブメッセージは**メッセージ**会話でのみ送信できます。WhatsApp音声通話中や、他のチャネルでは送信できません。
* WhatsAppフロー（インタラクティブフォーム）はサポートされていません。ユーザーがフロー返信を送った場合、エージェントには渡されません。
* インタラクティブメッセージはセッションメッセージです。最初の送信連絡としてではなく、アクティブな会話内でのみ送信できます。会話を開始するには[メッセージテンプレート](/docs/ja/eleven-agents/whatsapp/outbound)を使用してください。