# 串接對話平台：WhatsApp

## 串接前確認 <a href="#pre-integration-checklist" id="pre-integration-checklist"></a>

* 已在 [MaiAgent 平台](https://admin.maiagent.ai/)上建立好一個「AI 助理」
* 已擁有 [Meta Business](https://business.facebook.com/) 帳號
* 已建立 WhatsApp Business 帳號並綁定電話號碼

## 開始串接 <a href="#start-integration" id="start-integration"></a>

### 1. 進入串接對話平台頁面 <a href="#step-go-to-channel-page" id="step-go-to-channel-page"></a>

在左側選單點選 <mark style="color:blue;">對話平台</mark>，點擊右上角 <mark style="color:blue;">串接對話平台</mark> 按鈕。

<figure><img src="/files/IAjhGtL7M9fClzhzJxMs" alt=""><figcaption><p>選擇要串接的平台類型</p></figcaption></figure>

### 2. 選擇 WhatsApp <a href="#step-select-whatsapp" id="step-select-whatsapp"></a>

在平台選擇頁面中，點擊 <mark style="color:blue;">WhatsApp</mark>。

<figure><img src="/files/bmbc36jb3CFr6cAGSRFe" alt=""><figcaption><p>WhatsApp 串接設定畫面</p></figcaption></figure>

### 3. 連接 Facebook 帳號 <a href="#step-connect-facebook-account" id="step-connect-facebook-account"></a>

點擊 <mark style="color:blue;">連接 WhatsApp</mark> 按鈕，系統會開啟 Facebook OAuth 登入視窗。

1. 登入您的 Facebook 帳號
2. 授權 MaiAgent 存取 WhatsApp Business 管理權限
3. 授權完成後，視窗會自動關閉並回到設定頁面

{% hint style="warning" %}
請確認瀏覽器允許彈出視窗，否則 OAuth 登入視窗可能被封鎖。
{% endhint %}

### 4. 選擇 WhatsApp Business 帳號與電話號碼 <a href="#step-select-whatsapp-business-account-and-phone" id="step-select-whatsapp-business-account-and-phone"></a>

OAuth 授權完成後：

1. 從 <mark style="color:blue;">選擇 WhatsApp Business 帳號</mark> 下拉選單中，選擇要串接的商業帳號
2. 從 <mark style="color:blue;">選擇電話號碼</mark> 下拉選單中，選擇要接收訊息的電話號碼

### 5. 基本設定 <a href="#step-basic-settings" id="step-basic-settings"></a>

| 欄位         | 說明                           |
| ---------- | ---------------------------- |
| **對話平台名稱** | 為此串接取一個名稱，方便辨識               |
| **AI 助理**  | 選擇要綁定的 AI 助理                 |
| **重置指令**   | （選填）設定讓使用者重新開始對話的指令，例如「重新開始」 |

### 6. 儲存設定 <a href="#step-save-settings" id="step-save-settings"></a>

確認設定無誤後，點擊 <mark style="color:blue;">儲存</mark> 完成串接。

串接完成後，使用者透過 WhatsApp 傳送訊息至該電話號碼時，AI 助理就會自動回覆。

{% hint style="info" %}
串接成功後，您可以在對話平台列表中找到此串接，點擊編輯可進一步設定功能選項（OCR 辨識、時段回覆、權限控管等）。
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.maiagent.ai/conversations/whatsapp.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
