> For the complete documentation index, see [llms.txt](https://docs.maiagent.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.maiagent.ai/build/conversation-settings/platform-settings/interaction-settings.md).

# 互動設定

網頁對話視窗的互動行為：開場白、對話開始問題、開場白選項納入 Agent 上下文、對話顯示設定（延續上次對話、歷史對話列表、閒置計時器）、滿意度問卷、額度用完提示訊息。

<mark style="color:blue;">互動設定</mark> 管的是對話視窗「開始、進行、結束」三個階段的行為：開始時說什麼、給哪些引導問題；進行中要不要延續上次的對話、閒置多久算結束；結束後要不要問滿意度、額度用完時怎麼提示。這些只有網頁與內部平台才有，LINE 等通訊平台的對話介面由該平台決定。設定頁的整體結構請見[對話平台設定總覽](/build/conversation-settings/platform-settings.md)。

{% hint style="info" %}
**方案導覽**：本頁是對話平台設定的其中一步，文字客服的完整上線流程見 [文字客服：從零到上線](/serve/text-service.md)；語音客服見 [語音客服：從零到上線](/serve/voice.md)。
{% endhint %}

## 一、什麼時候會用到 <a href="#when-to-use" id="when-to-use"></a>

客服主管發現訪客打開視窗後常常不知道要問什麼，很多對話只有一句「你好」。他進入網頁平台的 <mark style="color:blue;">互動設定</mark>，在 <mark style="color:blue;">開場白</mark> 寫「您好！我可以幫您查詢訂單、退換貨與營業時間」，再加三則 <mark style="color:blue;">對話開始問題</mark>：「如何申請退貨？」「訂單多久到貨？」「營業時間是什麼？」，並開啟 <mark style="color:blue;">開場白選項納入 Agent 上下文</mark>。儲存後訪客一打開視窗就看到三顆問題按鈕，點一下就開始對話；回覆「2」時 Agent 也知道是在問到貨時間。

## 二、文字開場白 <a href="#greeting" id="greeting"></a>

<figure><img src="https://1593648278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmzb5NG9GDzFP2YDKeYVl%2Fuploads%2Fgit-blob-27f3085ad725f5d6b8ef3a6ca9ca9c5bb9bf58f3%2Fwebchat-interaction-greetings-prod.png?alt=media" alt="互動設定：文字開場白、依語系設定開場白、語音開場白、對話開始問題"><figcaption><p>互動設定：開場白與對話開始問題</p></figcaption></figure>

### 開場白 <a href="#greeting-text" id="greeting-text"></a>

點 <mark style="color:blue;">＋ 新增</mark> 加入一段開場白，讓 Agent 在對話開始時先自我介紹或打招呼。可以新增多則，每次對話開始隨機選一則顯示；點項目右側的刪除圖示可移除。

常見寫法：

* **品牌化問候**：「歡迎來到我們的網站！我是您的專屬客服小助手」
* **引導式開場**：「我可以幫您查詢產品資訊、解答使用問題、協助訂單處理」，明確告知服務範圍

### 在開場白加入文字連結 <a href="#greeting-links" id="greeting-links"></a>

開場白可以使用 Markdown 的 `[連結文字](完整網址)` 語法。訪客看到的是可點選的文字，點擊後會在新分頁開啟指定網頁。

例如，客服主管希望訪客先閱讀使用說明，再開始提問。她在 <mark style="color:blue;">開場白</mark> 輸入：

```markdown
您好！歡迎使用示範客服。

請先閱讀 [MaiAgent 使用者手冊](https://docs.maiagent.ai/)，再提出您的問題。
```

儲存後開啟新的網頁對話，訪客會看到「MaiAgent 使用者手冊」文字連結；點擊即可開啟手冊。請填入完整網址，並在發布前實際點擊確認連到正確頁面。

<figure><img src="https://1593648278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmzb5NG9GDzFP2YDKeYVl%2Fuploads%2Fgit-blob-a9c58670632249ea6eb965c48d97f355d3ccfc48%2Fwebchat-greeting-markdown-link-prod.png?alt=media" alt="網頁對話的開場白氣泡中，MaiAgent 使用者手冊顯示為藍色文字連結"><figcaption><p>訪客看到的開場白：文字連結嵌在問候語中</p></figcaption></figure>

### 依語系設定開場白 <a href="#greeting-by-locale" id="greeting-by-locale"></a>

點 <mark style="color:blue;">依語系設定開場白</mark> 旁的 <mark style="color:blue;">＋ 新增</mark>，為特定語系另寫開場白。使用者的語言符合時優先顯示該語系的版本，沒有符合的語系就用上方的預設開場白；同一語系有多則時隨機選一則。

### 語音開場白 <a href="#voice-greeting" id="voice-greeting"></a>

展開 <mark style="color:blue;">語音開場白</mark> 可為語音對話另外設定開場內容，適用於接了語音功能的平台；純文字客服不需要設定。

## 三、對話開始問題 <a href="#starter-questions" id="starter-questions"></a>

點 <mark style="color:blue;">對話開始問題</mark> 旁的 <mark style="color:blue;">＋ 新增</mark>，加入引導問題或熱門問題，例如「如何申請退貨？」「營業時間是什麼？」。這些問題會以按鈕顯示在對話開頭，使用者點一下就送出，不用打字。

* <mark style="color:blue;">隨機顯示則數</mark>：設定多則問題時，每次對話開始隨機挑幾則顯示（預設 2）
* <mark style="color:blue;">依語系設定對話開始問題</mark>：與開場白相同，語言符合時優先顯示該語系的問題

對話開始問題是固定清單，只在對話開頭顯示；平台沒有「依對話內容動態產生建議問題」的設定。要讓 Agent 在對話進行中依情境給出可點選的選項，用 [Agent UI](/build/tools/agent-ui.md) 的 [Quick Reply](/build/tools/agent-ui/quick-reply.md)（Agent 回覆後附按鈕列）或 [提問工具](/build/tools/agent-ui.md#ask-user-question)（Agent 出題讓使用者選）。

<figure><img src="https://1593648278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmzb5NG9GDzFP2YDKeYVl%2Fuploads%2Fgit-blob-3062bdaf23ab7a259e4d955d06166969931febb4%2Fwebchat-greeting-starters-prod.png?alt=media" alt="對話視窗顯示開場白與對話開始問題按鈕"><figcaption><p>對話視窗開頭的開場白與對話開始問題</p></figcaption></figure>

## 四、開場白選項納入 Agent 上下文 <a href="#include-greeting-in-context" id="include-greeting-in-context"></a>

<mark style="color:blue;">開場白選項納入 Agent 上下文</mark> 預設關閉。開啟後，系統會把開場白本文與**編號化的選項清單**提供給 AI，讓使用者以數字或簡短字詞回覆選項時也能被辨識。

<figure><img src="https://1593648278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmzb5NG9GDzFP2YDKeYVl%2Fuploads%2Fgit-blob-1751740ab52f7e08eed37a375aac50a73f2a39f6%2Fwebchat-greeting-context-toggle-prod.png?alt=media" alt="互動設定中的「開場白選項納入 Agent 上下文」開關"><figcaption><p>「開場白選項納入 Agent 上下文」開關</p></figcaption></figure>

### 開啟前後差異 <a href="#greeting-context-comparison" id="greeting-context-comparison"></a>

以航空客服為例：開場白設定為「請問需要什麼協助？」，對話開始問題依序設定「航班查詢」「行李規定」「會員里程」。開啟後系統依順序自動加上編號；訪客只輸入「2」：

| 項目       | 未開啟（預設）                          | 開啟後                      |
| -------- | -------------------------------- | ------------------------ |
| 訪客看到的畫面  | 開場白＋隨機挑選的部分起始問題                  | 開場白＋**依設定順序完整顯示**的全部起始問題 |
| AI 取得的資訊 | 只有開場白本文，沒有選項清單                   | 開場白本文＋編號化的選項清單           |
| 訪客回覆「2」時 | AI 不知道「2」對應哪個選項，可能反問「請問您想詢問什麼呢？」 | AI 理解「2」＝行李規定，直接回覆行李規定說明 |
| 起始問題顯示行為 | 隨機洗牌，受「隨機顯示則數」限制                 | 依序全部顯示，「隨機顯示則數」設定不生效     |

### 適用情境 <a href="#greeting-context-use-cases" id="greeting-context-use-cases"></a>

只要您用開場白搭配多個對話開始問題形成選單式引導，讓訪客從固定服務項目中挑選，就適合開啟：

* **金融／銀行**：開場白「歡迎使用線上客服，請選擇服務項目」，選項「帳戶餘額查詢」「信用卡申辦進度」「保單查詢」「轉接專人」。客戶回「3」，AI 直接進入保單查詢流程
* **醫療／診所**：開場白「您好，請問需要哪項服務？」，選項「門診時段查詢」「預約掛號」「看診進度」「衛教資訊」。民眾回「掛號」，AI 也能對應到選項 2
* **政府／公部門**：開場白「請選擇要申辦的項目」，選項「補助申請」「活動報名」「服務據點查詢」。市民回「1」，AI 接續詢問要申請的補助類別

| 您的引導方式                                     | 建議                  |
| ------------------------------------------ | ------------------- |
| **選單式引導**：已設定多個對話開始問題，希望訪客用編號或簡短字詞回覆、走固定流程 | ✅ 建議開啟              |
| **自由對話型**：只有一般問候語，沒有設定對話開始問題               | ❌ 不需開啟，可節省 Token 成本 |

### 開啟後的注意事項 <a href="#greeting-context-side-effects" id="greeting-context-side-effects"></a>

1. **「隨機顯示則數」失效**：為確保訪客看到的編號與 AI 理解的編號一致，開啟後對話開始問題不再隨機洗牌、也不受顯示數量限制，一律依設定順序全部顯示。開啟前請先確認問題數量適中
2. **Token 成本增加**：開啟後畫面會出現黃色警告，提醒此功能會增加每次請求的上下文長度。選項越多，增加的成本越明顯

{% hint style="info" %}
未開啟時行為與過去相同：AI 仍看得到開場白本文，但不會取得編號化的選項清單，使用者僅回覆「1」時 AI 可能無法對應到選項。
{% endhint %}

## 五、對話顯示設定 <a href="#conversation-display" id="conversation-display"></a>

<figure><img src="https://1593648278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmzb5NG9GDzFP2YDKeYVl%2Fuploads%2Fgit-blob-913aefb7e9a13d38d8985cd5ab3f4cd9772f6b8a%2Fwebchat-interaction-display-prod.png?alt=media" alt="對話顯示設定、滿意度問卷設定、額度用完提示訊息"><figcaption><p>對話顯示設定、滿意度問卷設定與額度用完提示訊息</p></figcaption></figure>

| 開關           | 說明                           | 例子                            |
| ------------ | ---------------------------- | ----------------------------- |
| **延續上次對話**   | 保留上一次的對話內容，使用者再次打開視窗時接續先前的對話 | 客戶昨天問「商品何時到貨」，今天打開還看得到昨天的內容   |
| **顯示歷史對話列表** | 使用者可查看並切換過往的對話記錄，也能開新對話      | 客戶可以看到「今天的訂單問題」「上週的使用諮詢」等過往對話 |
| **閒置計時器**    | 使用者超過設定時間未操作，系統自動結束當前對話      | 客戶問完問題後離開 10 分鐘，對話被標記為結束      |

開啟 <mark style="color:blue;">閒置計時器</mark> 後會多出兩個設定：

* <mark style="color:blue;">閒置時間（分鐘）</mark>：範圍 3 到 60 分鐘
* <mark style="color:blue;">顯示提醒視窗</mark>：關閉時逾時後直接重置對話；開啟時先顯示「對話已逾時，請重新開啟對話」的提醒，使用者按 <mark style="color:blue;">開啟新對話</mark> 才開始新的一段。設定頁提供 <mark style="color:blue;">提醒視窗預覽</mark>，實際顏色依主題色顯示

{% hint style="info" %}
閒置計時只看實質對話：使用者只送出「你好」之類的問候語不會啟動計時，開始詢問實質問題後才計算。使用者中途離開再回來，只要還沒超過閒置時間就能繼續同一段對話。
{% endhint %}

## 六、滿意度問卷設定 <a href="#satisfaction-survey" id="satisfaction-survey"></a>

開啟 <mark style="color:blue;">啟用滿意度問卷</mark> 後，對話閒置一段時間會自動彈出滿意度問卷讓使用者評分（1 到 5 分：不滿意、稍不滿意、普通、稍滿意、滿意），並可留下意見或跳過。可設定：

* <mark style="color:blue;">延遲時間（分鐘）</mark>：對話閒置多久後彈出問卷
* <mark style="color:blue;">問卷標題文字</mark>：留空使用預設「請問您對這次對話的整體滿意度如何？」，並依使用者語系顯示
* <mark style="color:blue;">問卷預覽</mark>：即時預覽問卷外觀

## 七、額度用完提示訊息 <a href="#quota-exhausted-message" id="quota-exhausted-message"></a>

當這個平台的 Credits 額度用完或沒有有效額度時，使用者送出訊息會收到這裡設定的提示，而不是沒有回應。在 <mark style="color:blue;">預設提示訊息</mark> 填入文字，例如「本服務目前額度已用完，請稍後再試或聯繫客服。」；點 <mark style="color:blue;">依語系設定提示訊息</mark> 旁的 <mark style="color:blue;">＋ 新增</mark> 可依訪客語系覆寫，未設定的語系用預設文字。還沒設定額度也可以先儲存備用。額度本身在設定頁上方的 <mark style="color:blue;">額度</mark> 主分頁設定，請見[對話平台 Credits 額度管理](/others/credits/inbox-credit-quota.md)。

## 八、常見問題 <a href="#faq" id="faq"></a>

### Q：開場白會送給 AI 嗎？ <a href="#faq-greeting-to-ai" id="faq-greeting-to-ai"></a>

開場白本文會讓 AI 看到；選項清單只有在開啟 <mark style="color:blue;">開場白選項納入 Agent 上下文</mark> 時才會提供，見[第四節](#include-greeting-in-context)。

### Q：關閉「延續上次對話」後，舊對話還在嗎？ <a href="#faq-history-kept" id="faq-history-kept"></a>

在。關閉只影響使用者打開視窗時是否接續上一段，後台的 <mark style="color:blue;">所有對話</mark> 仍保留完整紀錄。

### Q：LINE 平台可以設開場白嗎？ <a href="#faq-line" id="faq-line"></a>

互動設定只有網頁與內部平台才有。LINE 的歡迎訊息請在 LINE 官方帳號後台設定。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.maiagent.ai/build/conversation-settings/platform-settings/interaction-settings.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
