> 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/serve/daily-operations/contact.md).

# 聯絡人

聯絡人是什麼：記錄終端客戶身分與權限的資料卡，聯絡人類型比較、如何設定、權限管理與自動化整合。

## 什麼是聯絡人？ <a href="#what-is-contact" id="what-is-contact"></a>

**聯絡人**(Contact)是 MaiAgent 的核心功能之一，就像企業的「客戶名片夾」。它讓企業能夠為每位客戶建立專屬的身分檔案，確保每次對話都能提供個人化的服務體驗。

{% hint style="info" %}
**簡單理解：**

聯絡人就像是「客戶資料卡」，記錄了客戶的身分和權限。當客戶來訪時，Agent 會根據這張資料卡決定要提供什麼樣的服務和內容。
{% endhint %}

<figure><img src="https://1593648278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmzb5NG9GDzFP2YDKeYVl%2Fuploads%2Fgit-blob-1634b51135220c90d53ad7711e213c0d38ff3ca5%2Fimage.png?alt=media" alt=""><figcaption><p>身分識別範例</p></figcaption></figure>

想像一下，當客戶透過網站聊天室與您互動時，系統能立即識別「這是張先生，他是 VIP 會員」或「這是新訪客，只能開放部分文件」，並據此提供相應的服務內容和權限。

## 為什麼需要聯絡人功能？ <a href="#why-contact-feature" id="why-contact-feature"></a>

### **個人化服務體驗** <a href="#personalized-service" id="personalized-service"></a>

每位客戶都有獨特的需求和背景，聯絡人功能讓 Agent 能夠：

* 記住與該客戶的對話歷史
* 根據客戶身分提供合適的資訊
* 避免重複詢問已知資訊

### **精確的權限管理** <a href="#precise-permission-management" id="precise-permission-management"></a>

不同客戶應該看到不同的內容：

* VIP 會員可以查看專屬優惠
* 一般會員看到標準服務內容
* 訪客只能使用公開資訊

### **資料安全保護** <a href="#data-security" id="data-security"></a>

* 確保客戶只能存取屬於自己的資料，防止資訊洩露。

## 聯絡人如何運作？ <a href="#how-contact-works" id="how-contact-works"></a>

當使用者展開對話框後，對話請求會被送入企業內部系統進行處理，判斷是否已有會員資訊帶入，根據判斷結果決定尋找/建立聯絡人(匿名或非匿名)。無論走哪條路徑，最終都會展開個人化對話，確保每位使用者都能獲得適合的個人化體驗。

聯絡人運作示意圖

<figure><img src="https://1593648278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmzb5NG9GDzFP2YDKeYVl%2Fuploads%2Fgit-blob-81445826ddf96daa6f4a304ada67f70a5f8a8403%2Fplayma%20(4).png?alt=media" alt=""><figcaption><p>聯絡人運作示意圖</p></figcaption></figure>

## 聯絡人類型說明 <a href="#contact-types" id="contact-types"></a>

MaiAgent 的聯絡人系統根據用戶身分識別方式，分為兩種類型：

{% hint style="info" %}
**簡單理解：**

* **匿名聯絡人** = 沒有登入的訪客，系統不知道他是誰
* **非匿名聯絡人** = 已登入的會員，系統知道他的身分和資料
  {% endhint %}

## 聯絡人類型比較表格 <a href="#contact-type-comparison" id="contact-type-comparison"></a>

<table><thead><tr><th width="104.83331298828125">項目</th><th>匿名聯絡人</th><th>非匿名聯絡人</th></tr></thead><tbody><tr><td><strong>適用情況</strong></td><td>從網頁直接進入的訪客，並未登入企業會員系統，因此沒有帳號可以對應取得使用者資料</td><td>已登入的會員或透過其他平台帳號進入（如 Facebook、LINE 等），系統能夠取得使用者姓名和帳號資訊</td></tr><tr><td><strong>身分識別</strong></td><td>無法取得具體的個人資訊</td><td>擁有明確的身分識別資訊(如：姓名、大頭照等)</td></tr><tr><td><strong>系統設定</strong></td><td>在 MaiAgent 系統內設定為「匿名」</td><td>原本的會員帳號 ID 將轉換為 Source ID</td></tr><tr><td><strong>權限管理</strong></td><td>知識庫文件權限、對話平台管理</td><td>兩者相同</td></tr><tr><td><strong>資料對應</strong></td><td>無 Source ID，無法對應企業會員資料</td><td>透過來源 ID 確保聯絡人每次都能對應到正確的使用者</td></tr><tr><td><strong>建立方式</strong></td><td>若為訪客(未帶有會員身分)進入，每個對話會自動建立一個新的匿名聯絡人</td><td>系統根據會員登入資訊透過 MaiAgent API 自動建立或更新<br>詳細串接內容請參考：<a href="https://docs.maiagent.ai/tech/serve/contacts">技術人員手冊—聯絡人(Contact) 介紹及串接</a></td></tr><tr><td><strong>記錄機制</strong></td><td>系統會依快取記錄使用者的對話紀錄</td><td>透過 Source ID、聯絡人對應維持對話連續性</td></tr></tbody></table>

{% hint style="info" %}
**來源 ID (Source ID) 的重要性**

**來源 ID** 是連結 MaiAgent 聯絡人與企業會員系統的關鍵橋樑。當使用者透過不同管道（網站、APP、社群平台）與企業互動時，系統都能透過來源 ID 正確識別使用者身分，確保對話的連續性和個人化體驗。

\*\*簡單理解：\*\*來源 ID 就像是「會員編號」，讓系統能夠在不同平台上都認得同一個客戶。
{% endhint %}

## 設定聯絡人 <a href="#setup-contact" id="setup-contact"></a>

### 聯絡人列表的篩選與欄位 <a href="#contact-list-filters" id="contact-list-filters"></a>

從左側選單 <mark style="color:blue;">客服對話</mark> → <mark style="color:blue;">聯絡人</mark> 進入。列表上方可 <mark style="color:blue;">搜尋聯絡人</mark>（名稱），並 <mark style="color:blue;">依頻道類型篩選</mark>（先選網頁、LINE 等類型，再選具體的 <mark style="color:blue;">對話平台</mark>）與 <mark style="color:blue;">依標籤篩選</mark>；右上角有 <mark style="color:blue;">標籤管理</mark>、<mark style="color:blue;">批次匯入</mark>、<mark style="color:blue;">新增聯絡人</mark> 與 <mark style="color:blue;">重新整理</mark>。欄位：

| 欄位                                                                            | 說明                                              |
| ----------------------------------------------------------------------------- | ----------------------------------------------- |
| <mark style="color:blue;">ID</mark>                                           | 聯絡人的識別碼，API 與 Source ID 免登入對話會用到                |
| <mark style="color:blue;">聯絡人</mark>                                          | 頭像與姓名；匿名使用者顯示系統產生的名稱                            |
| <mark style="color:blue;">電話號碼</mark>                                         | 從通訊平台帶入或手動填寫                                    |
| <mark style="color:blue;">對話平台</mark>                                         | 這位聯絡人出現在哪些對話平台                                  |
| <mark style="color:blue;">來源ID</mark>                                         | 企業內部或通訊平台的使用者識別碼，見[非匿名使用者](#non-anonymous-user) |
| <mark style="color:blue;">查詢元資料</mark>                                        | 限制這位聯絡人可查詢的文件範圍，見[查詢元資料](/org/querymetadata.md) |
| <mark style="color:blue;">標籤</mark>                                           | 已貼的[聯絡人標籤](#contact-tags)                       |
| <mark style="color:blue;">建立時間</mark>、<mark style="color:blue;">最後更新時間</mark> |                                                 |
| <mark style="color:blue;">操作</mark>                                           | 編輯、刪除（刪除前會再確認）                                  |

勾選多位聯絡人後，上方出現「已選擇 N 位聯絡人」與 <mark style="color:blue;">批次新增標籤</mark>／<mark style="color:blue;">批次移除標籤</mark>，見[為聯絡人貼標籤](#tag-contacts)。

### 匿名使用者 <a href="#anonymous-user" id="anonymous-user"></a>

使用者建立新對話，系統自動在後台建立新匿名使用者(每個對話都是一位匿名使用者)⬇️

<div><figure><img src="https://1593648278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmzb5NG9GDzFP2YDKeYVl%2Fuploads%2Fgit-blob-66446e9ecf9b0fdfc64b0150b17c97376dcda59e%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure> <figure><img src="https://1593648278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmzb5NG9GDzFP2YDKeYVl%2Fuploads%2Fgit-blob-e5bc6154a4a421dbb3c1874f40380bbb1062231c%2Fcontact-list.png?alt=media" alt="聯絡人列表：每位訪客一列，匿名訪客顯示為匿名，欄位有 ID、聯絡人、電話號碼、對話平台、來源 ID"><figcaption><p>聯絡人列表：Web Chat 訪客沒有來源 ID 時顯示為「匿名」</p></figcaption></figure></div>

包含聯絡人 ID、對話平台紀錄、建立時間等資訊

您可以點選編輯，手動編輯匿名聯絡人資訊：

<div><figure><img src="https://1593648278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmzb5NG9GDzFP2YDKeYVl%2Fuploads%2Fgit-blob-957075f466edbc2dbd3c0565cdb32c0689a27f09%2F%E8%9E%A2%E5%B9%95%E6%93%B7%E5%8F%96%E7%95%AB%E9%9D%A2%202025-08-25%20105311.png?alt=media" alt=""><figcaption></figcaption></figure> <figure><img src="https://1593648278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmzb5NG9GDzFP2YDKeYVl%2Fuploads%2Fgit-blob-b4f32c14ab93fbef1aa8fb1044435ebd3b1eedc9%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure></div>

**透過編輯**，您可以：

* 變更連結會員資訊：透過輸入來源 ID ，將匿名聯絡人連結到會員資料
* 更新權限等級：開放、限制更多文件讀取的範圍
* 補充客戶姓名、聯絡方式等基本資料

### 非匿名使用者 <a href="#non-anonymous-user" id="non-anonymous-user"></a>

{% hint style="info" %}
Web Chat 若同時開啟登入功能與資料收集表單，已登入使用者填的表單資料會對應到他的登入帳號，換裝置也不必重填。詳見 [Web Chat 介紹總覽：資料收集（Pre-chat 表單）](/build/choose-channel/web-chat.md#pre-chat-with-login)。
{% endhint %}

使用者使用其他對話平台進入(如：LINE、FB Messenger、Telegram)：

後台會自動根據 FB 使用者資訊，建立對應非匿名使用者(包含來源 ID、聯絡人姓名、大頭照等)：

<div><figure><img src="https://1593648278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmzb5NG9GDzFP2YDKeYVl%2Fuploads%2Fgit-blob-4830d3547d2988fb903e5255e2ab9b87351ca354%2F%E8%9E%A2%E5%B9%95%E6%93%B7%E5%8F%96%E7%95%AB%E9%9D%A2%202025-08-25%20112216.png?alt=media" alt=""><figcaption></figcaption></figure> <figure><img src="https://1593648278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmzb5NG9GDzFP2YDKeYVl%2Fuploads%2Fgit-blob-1e302413e8c24274078e7574d15ff7e33438a3ec%2Fcontact-list-platform-filter.png?alt=media" alt="以對話平台篩選後的聯絡人列表，每位聯絡人都有姓名與來源 ID"><figcaption><p>依對話平台篩選：有來源 ID 的聯絡人會顯示姓名</p></figcaption></figure></div>

您仍然可以點按編輯按鈕，編輯非匿名聯絡人資訊

<figure><img src="https://1593648278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmzb5NG9GDzFP2YDKeYVl%2Fuploads%2Fgit-blob-f1658e219053b618b2323630fd4fc92da6173821%2Fcontact-edit-modal.png?alt=media" alt="編輯聯絡人視窗的基本資料分頁：姓名、頭像、電話號碼、電子郵件、對話平台、標籤，上方還有自訂屬性、API 憑證、MCP 憑證與 Connector 授權分頁"><figcaption><p>編輯聯絡人：基本資料分頁</p></figcaption></figure>

**透過編輯，您可以：**

補全與修正資料

* 修正錯誤的查詢元資料設定 ( 根據權限更新開放範圍 )
* 修改企業內來源 ID，連結正確的聯絡人資訊與會員資訊

{% hint style="danger" %}
聯絡人依賴來源 ID 進行對應，因此編輯時請確保來源 ID 與企業內部同步，否則恐會造成後續程式上與企業內部資訊同步時資料對應錯誤。
{% endhint %}

### 新增聯絡人 <a href="#add-contact" id="add-contact"></a>

新建聯絡人功能主要用於**主動建立具有預設權限的客戶檔案**，若您並未在 Web Chat 中指定權限範圍，您可以預先建立聯絡人，在客戶實際發起對話前，就完成權限配置和服務準備。

{% hint style="info" %}
欲在 Web Chat 初始化中使用 javascript 腳本指定權限範圍，請參考：[技術人員手冊：開始建構—使用 JSON 格式](https://docs.maiagent.ai/tech/identity-and-access/zhi-shi-guan-li-quan-xian-query-metadata-cha-xun-yuan-zi-liao-zong-lan/json-interfaces#webchat-chu-shi-hua-she-ding)
{% endhint %}

#### 核心功能說明 <a href="#core-features" id="core-features"></a>

透過手動新建聯絡人，系統管理員可以預先在客服系統中建立特定身分的使用者檔案，並為其配置相應的**查詢元資料權限**(Query Metadata)。當這些預建的聯絡人日後透過**指定對話平台**進行客服互動時，系統將透過**來源 ID 自動比對機制**，立即套用預先設定的權限等級，確保他們能夠存取到符合其身分的資料內容。

{% hint style="info" %}
**簡單理解：**

就像是「提前準備好客戶的權限設定」。當這個客戶第一次來訪時，系統就已經知道他可以看什麼資料、不能看什麼資料。
{% endhint %}

您可以點按新增聯絡人，進入編輯頁面加入資訊：

<div><figure><img src="https://1593648278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmzb5NG9GDzFP2YDKeYVl%2Fuploads%2Fgit-blob-e5bc6154a4a421dbb3c1874f40380bbb1062231c%2Fcontact-list.png?alt=media" alt="聯絡人列表右上角的新增聯絡人按鈕"><figcaption><p>從聯絡人列表右上角點「新增聯絡人」</p></figcaption></figure> <figure><img src="https://1593648278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmzb5NG9GDzFP2YDKeYVl%2Fuploads%2Fgit-blob-578394d5ba7f58c884e7b1e1377d7f4815574bee%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure></div>

頁面中，您可以加入聯絡人姓名、指定對話平台等資訊：

<figure><img src="https://1593648278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmzb5NG9GDzFP2YDKeYVl%2Fuploads%2Fgit-blob-edffa3b7bacd2fefb987e11d32de93791ef29986%2F%E8%9E%A2%E5%B9%95%E6%93%B7%E5%8F%96%E7%95%AB%E9%9D%A2%202025-08-25%20123401.png?alt=media" alt=""><figcaption></figcaption></figure>

#### 基本資料欄位 <a href="#basic-fields" id="basic-fields"></a>

| 欄位                                                                          | 說明                                                                                                                                                              |
| --------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 頭像、<mark style="color:blue;">姓名</mark>                                      | 客服在「所有對話」看到的顯示名稱                                                                                                                                                |
| <mark style="color:blue;">電子郵件</mark>、<mark style="color:blue;">電話號碼</mark> | 聯絡方式，會顯示在對話詳情的「聯絡人資料」；Email 也是批次匯入時比對既有聯絡人的依據                                                                                                                   |
| <mark style="color:blue;">對話平台</mark>                                       | 這位聯絡人屬於哪些對話平台，可複選                                                                                                                                               |
| <mark style="color:blue;">來源ID</mark>                                       | 聯絡人在外部系統的識別碼，供 [Source ID 免登入](/build/choose-channel/web-chat/source-id-access.md) 與批次匯入比對                                                                      |
| <mark style="color:blue;">標籤</mark>                                         | 貼上一或多個 [聯絡人標籤](#contact-tags)                                                                                                                                   |
| <mark style="color:blue;">查詢元資料</mark>                                      | 控制這位聯絡人在知識庫能檢索到哪些文件，可直接填 JSON 或切到 <mark style="color:blue;">查詢構建器</mark> 用介面組條件，見 [查詢元資料](/org/querymetadata.md) 與 [查詢構建器](/org/querymetadata/query-builder.md) |

編輯視窗的其他分頁：<mark style="color:blue;">MCP 憑證</mark> 與 <mark style="color:blue;">API 憑證</mark> 見 [聯絡人 MCP 憑證設定](/build/tools/setup-contacts-mcp-credentials.md) 與 [為每位聯絡人設定 API 憑證](/build/tools/setup_api_tool.md#per-contact-api-credentials)；<mark style="color:blue;">Connector 授權</mark> 與 <mark style="color:blue;">自訂屬性</mark> 見下方。

#### 自訂屬性 <a href="#custom-properties" id="custom-properties"></a>

<mark style="color:blue;">自訂屬性</mark> 分頁可以替聯絡人加上任意的「屬性名稱＝值」，例如會員等級、負責業務、合約編號。這些屬性會顯示在「所有對話」對話詳情的「聯絡人資料」區，讓客服接手時直接看到背景資訊。

* 按 <mark style="color:blue;">新增屬性</mark>，填 <mark style="color:blue;">屬性名稱</mark> 與 <mark style="color:blue;">值</mark>（名稱不可重複）；列表右側可編輯或 <mark style="color:blue;">刪除屬性</mark>。
* 下方 <mark style="color:blue;">JSON 預覽</mark> 顯示目前所有屬性的 JSON，方便與系統串接時核對。

{% hint style="info" %}
這裡的自訂屬性屬於**聯絡人**（對外的客戶），與組織成員「個人資料」頁的 [自訂屬性](/org/overview/custom-attributes.md) 是不同的東西。自訂屬性只給客服看，**不會**影響知識庫的檢索範圍；要限制聯絡人能查到的文件，請用「查詢元資料」。
{% endhint %}

#### Connector 授權 <a href="#connector-authorizations" id="connector-authorizations"></a>

當 Agent 掛了需要聯絡人個別授權的 MCP 工具（例如 Google Workspace 連接器，見 [建立 MCP 工具](/build/tools/mcp-setup.md)），聯絡人會在對話中完成 OAuth 授權。<mark style="color:blue;">Connector 授權</mark> 分頁列出這位聯絡人對每個連接器的授權狀態：

| 欄位                                                                          | 說明                                                                                                                                                   |
| --------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| 狀態                                                                          | <mark style="color:blue;">有效</mark>、<mark style="color:blue;">已過期</mark>、<mark style="color:blue;">已撤銷</mark> 或 <mark style="color:blue;">未授權</mark> |
| <mark style="color:blue;">到期時間</mark>、<mark style="color:blue;">最後使用</mark> | 授權的有效期限與最近一次被工具使用的時間                                                                                                                                 |
| <mark style="color:blue;">授權範圍</mark>                                       | 聯絡人同意的權限範圍（scopes）                                                                                                                                   |

操作：

* <mark style="color:blue;">撤銷</mark>：立即撤銷授權，聯絡人下次使用該工具時必須重新授權。適用於聯絡人要求取消存取、或帳號疑似外洩。
* <mark style="color:blue;">觸發重新授權</mark>：把目前授權標記為失效，聯絡人下次使用時會被要求重新授權；適用於權限範圍有調整、需要對方重新同意時。
* 狀態為「已過期」時不必手動處理：存取權杖過期後，下次實際問答時會自動刷新，聯絡人無需重新授權。

沒有任何授權時顯示「此聯絡人尚未授權任何 Connector」。

## 聯絡人標籤 <a href="#contact-tags" id="contact-tags"></a>

聯絡人標籤貼在**人**身上（例如「VIP」「經銷商」「北區」），用來分類聯絡人、在「所有對話」依 <mark style="color:blue;">依聯絡人標籤篩選</mark> 找對話。它與貼在**對話**上的 [對話標籤](/build/conversation-settings/conversation-tags.md) 是兩套獨立的標籤：對話標籤依對話平台管理，聯絡人標籤則是整個組織共用一份清單。

### 標籤管理頁 <a href="#contact-tag-management" id="contact-tag-management"></a>

前往 <mark style="color:blue;">客服對話</mark> → <mark style="color:blue;">聯絡人</mark>，按右上角的 <mark style="color:blue;">標籤管理</mark> 進入標籤管理頁，可新增、編輯、刪除整個組織的聯絡人標籤：

* <mark style="color:blue;">新增標籤</mark>：填 <mark style="color:blue;">標籤名稱</mark>（50 字以內）後確認。
* <mark style="color:blue;">編輯標籤</mark>：改名會影響所有已貼上此標籤的聯絡人，不必逐一重貼。
* <mark style="color:blue;">刪除</mark>：確認後標籤會自動從所有聯絡人身上移除，完成時提示「共影響 N 位聯絡人」。

### 為聯絡人貼標籤 <a href="#tag-contacts" id="tag-contacts"></a>

三個地方可以貼：

| 位置        | 做法                                                                                                                                                                   |
| --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 聯絡人編輯視窗   | 在 <mark style="color:blue;">基本資料</mark> 的 <mark style="color:blue;">標籤</mark> 欄位選取                                                                                   |
| 聯絡人列表批次   | 勾選多位聯絡人後，按上方的 <mark style="color:blue;">批次新增標籤</mark> 或 <mark style="color:blue;">批次移除標籤</mark>，在「<mark style="color:blue;">選擇標籤</mark>」挑一或多個標籤後確認，完成時提示「共更新 N 位聯絡人」 |
| 所有對話的詳情面板 | 在對話的 <mark style="color:blue;">聯絡人標籤</mark> 區直接新增或移除，見 [對話詳情](/serve/daily-operations/reply.md#conversation-details)                                                 |

聯絡人列表上方可 <mark style="color:blue;">依標籤篩選</mark>，搭配 <mark style="color:blue;">依頻道類型篩選</mark> 與搜尋，快速找出某一群聯絡人後再批次貼標。

### 批次匯入聯絡人 <a href="#bulk-import-contacts" id="bulk-import-contacts"></a>

需要一次建立或更新大量聯絡人時，可先預覽預估筆數與收件匣歸屬，再確認匯入。預覽不會寫入資料，只有按下<mark style="color:blue;">確認匯入</mark>後才會執行。

#### 使用情境 <a href="#bulk-import-scenario" id="bulk-import-scenario"></a>

客服主管要匯入一批活動名單，其中部分既有聯絡人已屬於售後服務的對話平台。她選擇<mark style="color:blue;">合併</mark>，上傳填好的範本並核對預估建立與更新筆數，再確認匯入。既有的售後服務歸屬會保留，同時加入本次選擇的活動對話平台，避免大量覆蓋原有關聯。

#### 準備匯入檔案 <a href="#prepare-import-file" id="prepare-import-file"></a>

{% hint style="info" %}
請使用視窗內下載的 Excel 範本（`.xlsx`）。檔案須小於 10 MB、最多 10,000 列；`Name`、`Email`、`Source ID` 為必填，`Phone Number` 為選填。
{% endhint %}

系統以 `Source ID` 與 `Email` 比對聯絡人，Email 不分大小寫。若找到既有聯絡人，會更新姓名與電話；同一檔案內有重複的比對資料時，只採用第一筆。

#### 匯入並預覽 <a href="#preview-bulk-import" id="preview-bulk-import"></a>

{% stepper %}
{% step %}
進入<mark style="color:blue;">聯絡人</mark>，點擊<mark style="color:blue;">批次匯入</mark>，再從<mark style="color:blue;">批次匯入聯絡人</mark>視窗下載範本。

<figure><img src="https://1593648278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmzb5NG9GDzFP2YDKeYVl%2Fuploads%2Fgit-blob-e5bc6154a4a421dbb3c1874f40380bbb1062231c%2Fcontact-list.png?alt=media" alt="聯絡人頁面右上角的標籤管理、批次匯入與新增聯絡人按鈕"><figcaption><p>從聯絡人頁面右上角進入批次匯入。</p></figcaption></figure>
{% endstep %}

{% step %}
至少選擇一個<mark style="color:blue;">對話平台</mark>，並設定<mark style="color:blue;">收件匣歸屬</mark>：

* <mark style="color:blue;">取代</mark>（預設）：本次選擇會成為這批聯絡人的完整對話平台清單，原有但未選取的關聯會移除。
* <mark style="color:blue;">合併</mark>：保留既有關聯，只加入本次選擇的對話平台。

<figure><img src="https://1593648278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmzb5NG9GDzFP2YDKeYVl%2Fuploads%2Fgit-blob-91455200fdf8b7b375833f2a3491212b710eb0dd%2Fcontact-bulk-import-configure.png?alt=media" alt="批次匯入聯絡人視窗：步驟 1 下載範本、步驟 2 選擇對話平台與收件匣歸屬（取代或合併）、步驟 3 上傳檔案"><figcaption><p>批次匯入聯絡人：下載範本、選擇對話平台與收件匣歸屬，再上傳 Excel。</p></figcaption></figure>
{% endstep %}

{% step %}
上傳填妥的 `.xlsx`，點擊<mark style="color:blue;">預覽匯入</mark>。
{% endstep %}

{% step %}
在<mark style="color:blue;">匯入預覽</mark>核對「將建立」與「將更新」的預估筆數、檔名、對話平台及歸屬模式。需要調整時，點擊<mark style="color:blue;">返回修改</mark>；確認無誤後，點擊<mark style="color:blue;">確認匯入</mark>。

<figure><img src="https://1593648278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmzb5NG9GDzFP2YDKeYVl%2Fuploads%2Fgit-blob-3f08dcf6ec5d20135022add59b7a781d31ab73ed%2Fcontact-bulk-import-preview.png?alt=media" alt="批次匯入預覽顯示建立與更新筆數"><figcaption><p>確認預估建立／更新筆數與歸屬模式後，才執行匯入。</p></figcaption></figure>
{% endstep %}
{% endstepper %}

{% hint style="warning" %}
選擇<mark style="color:blue;">取代</mark>前，請確認已勾選所有要保留的對話平台。若只想為既有聯絡人增加對話平台，請改選<mark style="color:blue;">合併</mark>。
{% endhint %}

若預覽顯示沒有可建立或更新的資料，請返回檢查範本內容。匯入失敗時，系統會保留設定畫面並顯示錯誤，請修正檔案後重新預覽。

## 權限管理 <a href="#permission-management" id="permission-management"></a>

根據企業的需求，您可以使用查詢元資料限制不同的聯絡人使用文件的範圍，如：

#### 按會員等級限制 <a href="#restrict-by-membership-level" id="restrict-by-membership-level"></a>

* **VIP會員**：可查詢所有知識庫、高級FAQ、產品技術文件
* **一般會員**：僅能查詢基礎FAQ、產品使用手冊
* **訪客用戶**：只能查詢公開FAQ、基本產品介紹

#### 按部門權限區分 <a href="#restrict-by-department-permission" id="restrict-by-department-permission"></a>

* **內部員工**：可查詢內部操作手冊、系統維護文件、完整產品資料
* **經銷商**：能查詢產品規格、價格表、銷售資料
* **一般客戶**：僅限查詢使用說明、常見問題、保固資訊

#### 按產品標籤分類 <a href="#restrict-by-product-tag" id="restrict-by-product-tag"></a>

* **企業版用戶**：可查詢標籤為「企業功能」、「進階設定」的文件
* **個人版用戶**：只能查詢標籤為「基礎功能」、「個人使用」的文件
* **試用用戶**：僅能查詢標籤為「試用說明」、「入門指南」的內容

{% hint style="info" %}
欲了解查詢元資料，請參考：[知識管理權限：查詢元資料](/org/querymetadata.md)
{% endhint %}

在聯絡人中，設定查詢元資料時，系統只會授權您根據您指定的對話平台知識庫進行設定，若針對其他對話平台的知識庫設定將會出現以下警示訊息：

<figure><img src="https://1593648278-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmzb5NG9GDzFP2YDKeYVl%2Fuploads%2Fgit-blob-65737b3e2692dd905e7f4b0f63c42f0f22fb69f8%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

## 自動化整合 <a href="#automation-integration" id="automation-integration"></a>

對於技術團隊，MaiAgent 也提供 API 接口，能與企業現有系統無縫整合

{% hint style="info" %}
詳情請參考：[技術人員手冊—聯絡人介紹及串接](https://docs.maiagent.ai/tech/serve/contacts)
{% endhint %}

無論企業規模大小，聯絡人功能都能幫助您提供更好的客戶服務體驗，同時確保資料安全和營運效率。透過匿名與非匿名聯絡人的分類管理、來源 ID 的精確對應機制，以及靈活的建立方式，企業能夠為不同類型的用戶提供最適合的服務體驗，並在客戶互動前就做好充分準備。


---

# 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/serve/daily-operations/contact.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.
