

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# Amazon Connect 中的流程區塊：驗證客戶
<a name="authenticate-customer"></a>

本主題定義流程區塊來驗證客戶，並根據身分驗證結果將客戶轉接到流程中的特定路徑。

**注意**  
在您使用此區塊之前：  
必須為您的 Amazon Connect 執行個體啟用客戶身分驗證功能。此外，必須使用您的身分提供者建立新的 Amazon Cognito 使用者集區。如需說明，請參閱[在 Amazon Connect 中為聊天聯絡設定客戶身分驗證](customer-auth.md)。
必須為您的 Amazon Connect 執行個體[啟用](enable-customer-profiles.md)客戶設定檔。

## Description
<a name="authenticate-customer-description"></a>
+ 讓您的客戶在聊天期間進行驗證。
+ 客戶成功登入並從 Amazon Cognito 擷取 ID 權杖後，Amazon Connect 會根據用來將資訊儲存到客戶設定檔的識別符，更新現有的客戶設定檔或建立新的客戶設定檔。
+ 如果客戶設定檔中有「名字」欄位，客戶的顯示名稱會更新為該名稱。

## 此區塊的使用案例
<a name="scenarios-authenticate-customer"></a>

此流程區塊旨在用於下列案例：
+ 您可以提示客戶在聊天期間登入和驗證。例如，系統會提示未驗證的客戶登入：
  + 與聊天機器人互動時，在轉接到客服人員之前。
  + 執行交易，例如付款。
  + 在提供帳戶狀態或允許他們更新其設定檔資訊之前驗證其身分。
+ 您也可以使用此區塊，透過 [Apple Messages for Business](enabling-authentication-for-apple-messages-for-business.md) 在聊天期間驗證客戶。

## 聯絡類型
<a name="play-channels"></a>


| 聯絡人類型 | 支援？ | 
| --- | --- | 
| 語音 | 否 – **錯誤**分支 | 
| 聊天 | 是   | 
| 任務 | 否 – **錯誤**分支  | 
| Email | 否 – 錯誤分支 | 

## 流程類型
<a name="authenticate-customer-types"></a>

您可以在下列[流程類型](create-contact-flow.md#contact-flow-types)中使用此區塊：


| 流程類型 | 支援？ | 
| --- | --- | 
| 入站流程 | 是 | 
| 客戶佇列流程 | 否 | 
| 客戶保留通話流程 | 否 | 
| 客戶低語流程 | 否 | 
| 外撥低語流程 | 否 | 
| 客服人員保留流程 | 否 | 
| 客服人員低語流程 | 否 | 
| 轉接客服人員流程 | 否 | 
| 轉接至佇列流程 | 否 | 

## 如何設定此區塊
<a name="authenticate-customer-properties"></a>

您可以使用 Amazon Connect 管理員網站或使用 Amazon Connect Flow 語言中的 [AuthenticateParticipant](https://docs.aws.amazon.com/connect/latest/APIReference/participant-actions-authenticateparticipant.html) 動作來設定驗證**客戶**區塊。

下圖顯示**驗證客戶**區塊的 [屬性] 頁面範例。

![\[「驗證客戶」區塊的屬性頁面。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/authenticate-customer-properties.png)


**Amazon Cognito**
+ **選取 Amazon Cognito 使用者集區**：在主控台頁面上建立使用者集區關聯後，從下拉式清單中選擇使用者集區的名稱。
+ **選取 Amazon Cognito 應用程式用戶端**：選取使用者集區後，從下拉式清單中選擇應用程式用戶端的名稱。

**Amazon Connect Customer Profiles 組態**
+ **依預設儲存範本**：透過選擇預設範本，Amazon Connect Customer Profile 會根據預先定義的「客戶設定檔」物件類型，將 [Amazon Cognito 標準屬性](https://docs.aws.amazon.com/cognito/latest/developerguide/user-pool-settings-attributes.html#cognito-user-pools-standard-attributes)擷取至統一的標準設定檔物件。此範本使用電話號碼和電子郵件，將客戶映射至設定檔。
+ **輸入唯一識別符**：您可以透過[建立物件類型映射](create-object-type-mapping.md)來自訂「客戶設定檔」如何擷取資料。如果您想要自訂資料映射或金鑰，請事先建立您自己的物件類型映射，選取**輸入唯一識別符**並輸入映射名稱。

**逾時**：輸入在未登入的非作用中客戶向下轉接至「逾時」分支之前的時間長度。
+ 下限 (預設值)：3 分鐘
+ 上限：15 分鐘

### 流程區塊分支
<a name="authenticate-customer-branches"></a>

此區塊支援下列輸出分支：

![\[已設定的驗證客戶區塊。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/authenticate-customer-configured.png)

+ **成功**：已驗證客戶。
+ **逾時**：客戶處於非作用中狀態，且未在配置的時間內登入。
+ **選擇退出**：客戶選擇不登入。
+ **錯誤**：發生其中一個[錯誤案例](#authenticate-customer-errorscenarios)。

### 其他組態提示
<a name="authenticate-customer-tips"></a>
+ 建議您在 Amazon CloudWatch 日誌群組中啟用流程日誌，可在流程與客戶進行互動時，提供您流程事件的即時詳細資訊。您也可以使用流程日誌來協助您在建立流程時進行偵錯。如需詳細資訊，請參閱[在 Amazon CloudWatch 日誌群組中啟用 Amazon Connect 流程日誌](contact-flow-logs.md)。
+ 如需為 Apple Messages for Business Chats 啟用客戶身分驗證的詳細資訊，請參閱 [啟用 Apple Messages for Business 的身分驗證](enabling-authentication-for-apple-messages-for-business.md)。

### 此區塊產生的資料
<a name="authenticate-customer-data"></a>

此區塊不會產生任何資料。

## 錯誤情況
<a name="authenticate-customer-errorscenarios"></a>

在下列情況下，聯絡案例會沿著 **錯誤** 分支轉接：
+ 您的 Amazon Connect 執行個體未啟用客戶設定檔。在建立執行個體時，預設會選取啟用客戶設定檔的選項，但可以取消選取此選項。如需手動啟用客戶設定檔的指示，請參閱 [為您的 Amazon Connect 執行個體啟用客戶設定檔。](enable-customer-profiles.md)。
+ 不支援聊天子類型。
+ 提供的驗證碼不正確。
+ Amazon Cognito 權杖端點發生錯誤，因為用戶端或請求未正確設定 (`invalid_request`、`invalid_client`、`unauthorized_client`)
+ 不支援區域。如需支援的區域的清單，請參閱 [客戶身分驗證可用性 (按區域)](regions.md#customerauthentication_region)。