

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

# Amazon Connect Customer Profiles
<a name="customer-profiles"></a>

為了協助客服人員提供更有效率和個人化的客戶服務，Amazon Connect 可讓您將來自外部應用程式 (例如 Salesforce、Zendesk、ServiceNow 或其他客戶關係管理 (CRM) 產品) 的資訊與來自 Amazon Connect的聯絡歷史記錄相結合。這將建立一個客戶設定檔，其中包含客戶互動過程中所需的所有資訊。

透過客戶資訊 (包括其產品、案例和聯絡歷史記錄) 的單一檢視，客服人員可以快速確認客戶的身分並判斷通話或聊天的原因。

目前，Amazon Connect Customer Profiles 可用於符合 [GDPR](https://aws.amazon.com/compliance/gdpr-center) 規定，並且正在等待 Amazon Connect 持有的其他認證。

下圖顯示客服人員工作區；針對本文件的目的，提供 Amazon Connect 客戶設定檔。客服人員工作區旨在實現高效的多任務處理，可同時處理通話、聊天和任務，同時在同一個瀏覽器視窗中快速存取客戶設定檔資訊。

![\[客服人員應用程式中的客戶設定檔標籤。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-concepts-intro3.png)


1. **案例**：除了使用 Amazon Connect 案例建立和管理的案例之外，狀態、參考 ID、標題、來源、更新日期，以及從第三方應用程式 (例如 Zendesk 和 ServiceNow) 擷取案例的相關資訊。

1. **更多資訊**：包含在[設定檔](https://docs.aws.amazon.com/connect/latest/adminguide/standard-profile-definition.html)之客戶定義的*屬性*欄位中的其他資訊，以及進一步的設定檔資訊，例如行動電話號碼與送貨地址。此資訊將按字母順序排序，以協助客服人員快速找到所需的資訊。

1. **聯絡歷史記錄**：此客戶過去聯絡您聯絡中心的日期、時間和持續時間。

1. **產品購買歷史記錄**：客戶購買的所有資產都可以在此填入。資料是從您與客戶設定檔[整合](integrate-external-apps-customer-profiles.md)的外部應用程式 (例如 Salesforce 或 Zendesk) 擷取。

# Amazon Connect 中的客戶設定檔是什麼？
<a name="customer-profiles-what-data"></a>

*客戶設定檔*是儲存聯絡歷史記錄以及客戶相關資訊 (例如帳號、其他資訊、出生日期、電子郵件、多個地址、姓名和對象類型) 的記錄。*帳戶型設定檔*預期會有基礎子設定檔。

啟用 Amazon Connect Customer Profiles 後，系統會為每個聯絡人建立唯一的客戶設定檔。這使您可以在單一位置免費建立一個客戶設定檔，其中包含客戶互動過程中客服人員需要的一切資訊。

若要存取流程中的客戶設定檔，請使用 [客戶設定檔](customer-profiles-block.md) 區塊。[客服人員存取客戶設定檔](customer-profile-access.md) (在其客服人員工作區中)。

 您可以使用客戶設定檔的付費功能，透過[從外部應用程式擷取資料](integrate-external-apps-customer-profiles.md)為您的客戶設定檔添加內容。如需詳細資訊，請參閱[定價](https://aws.amazon.com/connect/pricing/)。

您也可以使用 [Amazon Connect Customer Profiles API](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/Welcome.html)，將自訂欄位和物件新增至客戶設定檔。

## 客戶設定檔資料如何儲存？
<a name="customer-profiles-data-storage"></a>

Amazon Connect 會在唯一的客戶設定檔中儲存聯絡歷史記錄。它會剖析從外部應用程式擷取的資料，並將其儲存為客戶設定檔屬性。

 Amazon Connect 不會取代或更新外部應用程式中的資料。如果移除了資料來源，則每個語音聯絡人的客戶設定檔都無法再使用外部應用程式中的資料。

如需有關如何保護客戶設定檔資料的資訊，請參閱 [Amazon Connect 的資料保護](data-protection.md)。

如需有關如何存取客戶設定檔中儲存之資料的詳細資訊，請參閱[存取客服人員工作區中的客戶設定檔](https://docs.aws.amazon.com/connect/latest/adminguide/customer-profile-access.html)或[使用客戶設定檔 API](https://docs.aws.amazon.com/connect/latest/adminguide/use-customerprofiles-api.html)。

# 為您的 Amazon Connect 執行個體啟用客戶設定檔。
<a name="enable-customer-profiles"></a>

Amazon Connect 提供預先建置的整合功能，因此您可以快速地將來自多個外部應用程式的客戶資訊與 Amazon Connect 的聯絡歷史記錄相結合。這使您可以在單一位置建立一個客戶設定檔，其中包含客戶互動過程中客服人員需要的一切資訊。

## 開始之前
<a name="enable-customer-profiles-requirements"></a>

以下是關鍵概念的概述，以及在設定過程中會提示您輸入的資訊。

### 關於客戶設定檔網域
<a name="customer-profiles-domain"></a>

啟用 Amazon Connect Customer Profiles 時，您可以建立客戶設定檔網域：用於所有資料的容器，例如客戶設定檔、物件類型、設定檔金鑰和加密金鑰。以下是建立客戶設定檔網域的準則：
+ 每個 Amazon Connect 執行個體只能與一個網域關聯。
+ 您可以建立多個網域，但這些網域不會彼此共用外部應用程式整合或客戶資料。
+ 您建立的所有外部應用程式整合都位於網域層級。與網域相關聯的所有 Amazon Connect 執行個體都會繼承該網域的整合。
+ 您可以選擇不同的網域，隨時將 Amazon Connect 執行個體的關聯從目前的網域變更為新網域。不過，我們不建議您這麼做，因為舊網域的客戶設定檔不會移至新網域。

### 資料存放區
<a name="enable-cp-data-store"></a>

資料存放區是客戶設定檔資料的長期資料存放區。它存放過去 10 年已更新的 Customer Profiles 資料。這是用於由 Spark SQL 和預測洞察提供支援的分段資料，必須啟用才能使用這些功能。它不會用於運算計算屬性或填入客服人員工作區。

### 您要如何命名您的客戶設定檔網域？
<a name="enable-customer-profiles-domains"></a>

當您啟用客戶設定檔時，系統會提示您提供對您有意義的易記網域名稱，如您的組織名稱 (例如 *CustomerProfiles-ExampleCorp*)。您可以隨時使用 API 變更易記名稱。

### 資料存放區
<a name="enable-customer-profiles-data-store"></a>

資料存放區是由 Spark SQL 和預測洞察提供支援的分段所需的服務受管資料存放區，必須啟用才能使用這些功能。它不會用於運算計算屬性或填入客服人員工作區。

啟用資料存放區後，它會自動將您擷取至客戶設定檔。啟用資料存放區後，您無法停用此功能。若要從資料存放區刪除資料，您可以使用 DeleteProfile API 或刪除物件類型或客戶設定檔網域。

### 您要使用無效字母佇列嗎？
<a name="enable-customer-profiles-deadletterqueue"></a>

無效字母佇列用於報告與處理來自外部應用程式資料相關的錯誤。

Amazon AppFlow 會處理與外部應用程式的連線，並將資料從該應用程式移至 Amazon Connect Customer Profiles。然後 Amazon Connect 會處理該檔案。
+ 如果在連線期間或將資料傳輸到 Amazon Connect 時發生錯誤，Amazon AppFlow 會顯示錯誤，但不會將錯誤寫入無效字母佇列。

  例如，處理錯誤可能是外部資料與指定的結構不符，或外部資料格式不正確 (目前僅支援 JSON)。
+ 如果 Amazon Connect 處理檔案時發生錯誤，系統會將錯誤寫入無效字母佇列。您可以稍後查看佇列並嘗試重新處理錯誤。
+ 您可以以網域定義的無效字母佇列中找到 SQS 訊息，其中包含錯誤訊息以及物件。


|  **錯誤訊息**  |  **建議**  | 
| --- | --- | 
| UNIQUE 金鑰或 PROFILE 金鑰不存在設定檔物件中 | 修改資料映射或物件，確認物件的資料映射中有標記為 UNIQUE 和 PROFILE 的金鑰。請參閱如何設定[**資料映射頁面**](customer-profiles-object-type-mapping.md)。 | 
| 每秒在設定檔上擷取太多物件 | 在短時間內指派給相同設定檔太多物件。您可以重新擷取物件，或在呼叫 PutProfileObject API 之間新增等待時間。 | 
| 由於區域中沒有 EncryptionKey (EncryptionKey 沒有授予客戶設定檔使用，或 EncryptionKey 沒有 GenerateDataKey 權限)，因此客戶設定檔無法擷取物件 | 確認您的 KMS 權限，確保客戶設定檔具有必要存取權。參閱[**啟用客戶設定檔，並指定無效字母佇列和 KMS 金鑰**](#enable-customer-profiles-step1)區段。 | 
| KMS 金鑰無效 | 確認您的 KMS 權限，確保客戶設定檔具有必要存取權。參閱[**啟用客戶設定檔，並指定無效字母佇列和 KMS 金鑰**](#enable-customer-profiles-step1)區段。 | 
| 由於 KMS 金鑰無效，客戶設定檔無法擷取物件 | 確認您的 KMS 權限，確保客戶設定檔具有必要存取權。參閱[**啟用客戶設定檔，並指定無效字母佇列和 KMS 金鑰**](#enable-customer-profiles-step1)區段。 | 
| 您的資料包含大於 \$1 位元組的設定檔物件 | 移除任何不必要的欄位並減少資料大小，直到低於錯誤訊息提到的指定限制為止。 | 
| 此物件的所有金鑰都繫結至多個設定檔 | 修改資料映射或物件，確保物件中至少有一個 PROFILE 金鑰繫結至小於或等於 1 個現有設定檔。 | 

啟用客戶設定檔時，您可選擇將 Amazon SQS 佇列指定為無效字母佇列。如果選擇此選項，請將下列資源政策新增至 Amazon SQS，使客戶設定檔具有將訊息傳送到該佇列的權限：

```
{
      "Sid": "Customer Profiles SQS policy",
      "Effect": "Allow",
      "Principal": {
        "Service": "profile.amazonaws.com"
      },
      "Action": "SQS:SendMessage",
      "Resource": "arn:aws:sqs:region:accountID:YourQueueName"
}
```

若要避免混淆的客服人員人安全性問題，請參閱 [Amazon Connect Customer Profiles 跨服務混淆代理人預防](cross-service-confused-deputy-prevention.md#customer-profiles-cross-service) 以獲得要套用的範例政策。

本主題稍後在 [啟用客戶設定檔，並指定無效字母佇列和 KMS 金鑰](#enable-customer-profiles-step1) 提供有關建立無效字母佇列的逐步指示。

### 建立 KMS 金鑰，供客戶設定檔用於加密資料 (必要)
<a name="enable-customer-profiles-awsmanagedkey"></a>

**注意**  
若要維護對客戶設定檔 API 的存取權，使用客戶設定檔 `profile` API 的實體必須在其 IAM 政策中具有明確的 `kms:Decrypt` 和 `kms:GenerateDataKey` 權限。這可讓他們將 `kms:Decrypt` 和 `kms:GenerateDataKey` 用於 KMS 金鑰；該金鑰與客戶設定檔相關 API 擷取的資源有關聯。

當您啟用客戶設定檔時，系統會提示您建立或提供 AWS Key Management Service [KMS 金鑰](https://docs.aws.amazon.com/kms/latest/developerguide/concepts.html#kms_keys)。本主題稍後在 [啟用客戶設定檔，並指定無效字母佇列和 KMS 金鑰](#enable-customer-profiles-step1) 提供建立 KMS 金鑰的逐步指示。

Customer Profiles 的所有靜態資料都會根據您選擇的 KMS 金鑰加密。您的客戶受管 CMK 金鑰由您建立、擁有和管理。您可以完全控制 KMS 金鑰 （需支付AWS KMS 費用）。

如果您選擇設定其他人為管理員的 KMS 金鑰，則該金鑰必須具有允許對客戶設定檔服務主體的 `kms:GenerateDataKey`、`kms:CreateGrant` 和 `kms:Decrypt` 權限的政策。如需有關如何變更金鑰政策的資訊，請參閱《 AWS Key Management Service 開發人員指南》中的[變更金鑰政策](https://docs.aws.amazon.com/kms/latest/developerguide/key-policy-modifying.html)。此外，若要防止跨服務模擬，請參閱 [中的跨服務混淆代理人預防 AWS](cross-service-confused-deputy-prevention.md) 以獲得您應該套用的範例政策。

## 啟用客戶設定檔，並指定無效字母佇列和 KMS 金鑰
<a name="enable-customer-profiles-step1"></a>

**資料存放區**

選擇是否啟用資料存放區。必須使用由 Spark SQL 和預測洞察提供支援的分段。如果您在建立網域時選擇不啟用資料存放區，您可以在建立和使用網域之後啟用它。您無法在啟用資料存放區之後將其關閉。

您可以按一下客戶設定檔頁面上藍色橫幅中的啟用按鈕來啟用資料存放區 （左側面板 > **客戶設定檔**)。建立網域後，您會看到此藍色橫幅。

資料存放區需要客戶受管金鑰 (CMK)，而且如果您尚未為網域啟用客戶受管金鑰 (CMK)，則會提示您建立該金鑰。

**重要**  
使用 Data Vault 時，Customer Profiles 會依物件類型存放您的資料，並使用 AWS KMS 金鑰對其進行加密。Customer Profiles 會透過以下方式標準化物件類型名稱：  
將名稱轉換為小寫
將連字號 - 轉換為底線 \$1
將「標準」附加至任何客戶設定檔標準物件類型
將「網域」附加至任何客戶設定檔網域物件類型
將「domain\$1standard」附加至任何客戶設定檔標準網域物件類型
如果客戶設定檔偵測到命名衝突，則無法啟用資料存放區。啟用 Data Store 之後，您無法在這些標準化規則下建立與現有物件類型名稱衝突的物件類型。

1. 在 [https://console.aws.amazon.com/connect/](https://console.aws.amazon.com/connect/) 開啟 Amazon Connect 主控台。

1. 在執行個體頁面上，選擇執行個體別名。執行個體別名也是您的**執行個體名稱**，它會出現在您的 Amazon Connect URL 中。下圖顯示 **Amazon Connect 虛擬聯絡中心執行個體**頁面，其中包含執行個體別名周圍的方塊。  
![\[Amazon Connect 虛擬聯絡中心執行個體頁面，即執行個體別名。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/instance.png)

1. 在導覽窗格中，選擇**客戶設定檔**。

   **客戶設定檔網域**頁面會列出可用於整合的應用程式。在下圖中，頁面顯示尚未啟用客戶設定檔網域。  
![\[「客戶設定檔」頁面，「啟用客戶設定檔」按鈕。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-domains-page.png)

1. 選擇**啟用客戶設定檔**以開始使用。

1. 在**客戶設定檔啟用**頁面上，選擇**建立新網域**。在**指定網域**下，輸入對您有意義的易記名稱，例如您的組織名稱，例如 *CustomerProfiles-ExampleCorp*。  
![\[「客戶設定檔啟用」頁面。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-enable-domain.png)

1. 在**指定無效字母佇列**下，選擇是否要將失敗的事件傳送至無效字母佇列。如果您想要獲得對無法擷取的資料的可見性，這樣會很有幫助。它還為您提供了將來重試這些失敗的資料擷取的選項。

   以下是建立無效字母佇列的步驟：
   + 在**客戶設定檔啟用**頁面上，選擇**建立新的或選擇現有的 SQS 佇列**，然後選擇**建立新的無效字母佇列**。  
![\[建立新佇列或選擇現有 SQS 佇列的選項。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-create-dlq-choose.png)
   + Amazon SQS 主控台會在瀏覽器中開啟新分頁。選擇**建立佇列**。
   + 在**建立佇列**頁面上，選擇**標準**，然後為佇列指派名稱。  
![\[「建立佇列」頁面。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-create-dlq-name.png)
   + 在**存取政策**中，選擇**進階**。

     版本名稱、策略 ID 和陳述式隨即出現。如果需要，請更新本區段，僅將存取權授予適當的角色。
   + 在「陳述式」區段的結尾處 (下圖中的第 15 行)，在 \$1 後面加上逗號，然後按下 `Enter`。  
![\[「存取政策」區段。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-create-dlq-statement.png)
   +  請複製貼上並執行以下程式碼：

     ```
     {
           "Sid": "Customer Profiles SQS policy",
           "Effect": "Allow",
           "Principal": {
             "Service": "profile.amazonaws.com"
           },
           "Action": "SQS:SendMessage",
           "Resource": "arn:aws:sqs:region:accountID:YourQueueName"
     }
     ```
   + 若要以您的資訊取代*區域*、*accountID* 和 *YourQueueName*，請複製並貼上第 14 行的 `Resource` 資訊。  
![\[「存取政策」區段中的「資源」資訊。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-create-dlq-copyandpaste.png)
   + 選擇**建立佇列**。
   + 返回瀏覽器中 Amazon Connect 主控台的分頁，**客戶設定檔啟用**頁面。按一下或點選**選擇現有 SQS 佇列**方塊，從下拉式清單中選擇剛建立的佇列。  
![\[來自下拉式清單中的 SQS 佇列。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-create-dlq-final.png)

1. 在**指定 KMS 金鑰**下，建立或輸入您自己的加密用 AWS KMS key 。使用下列步驟來建立您的 AWS KMS key：
   + 在**客戶設定檔啟用**頁面上，選擇**建立 AWS KMS key**。  
![\[「客戶設定檔啟用」頁面中的「建立 AWS KMS key 」按鈕。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-create-kms-key.png)
   + AWS Key Management Service (KMS) 主控台會在瀏覽器中開啟新分頁。在**設定金鑰**頁面上，選擇**對稱**，然後選擇**下一步**。  
![\[設定金鑰頁面，對稱選項。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-create-kms-key-configure-key.png)
   + 在**新增標籤**頁面中，輸入金鑰的名稱和說明，然後選擇**下一步**。  
![\[新增標籤頁面。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-create-kms-key-add-labels.png)
   + 在**定義金鑰管理許可**頁面上，選擇**下一步**。
   + 在**定義金鑰使用許可**頁面上，選擇**下一步**。
   + 在**檢閱並編輯金鑰政策**頁面上，選擇**完成**。

     在下列範例中，金鑰的名稱以 **bcb6fdd** 開頭：  
![\[客戶受管金鑰頁面。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-create-kms-key-note-key.png)
   + 返回瀏覽器中 Amazon Connect 主控台的分頁，**客戶設定檔啟用**頁面。針對您建立的金鑰顯示在下拉式清單中，按一下或點選**指定 KMS 金鑰**方塊。選擇您建立的金鑰。  
![\[「指定 KMS 金鑰」區段。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-create-kms-key-choose-key.png)

1. 在**資料存放**區下，選擇是否啟用資料存放區。必須使用由 Spark SQL 和預測洞察提供支援的分段。如果您在建立網域時選擇不啟用資料存放區，您可以在建立和使用網域之後啟用它。您無法在啟用資料存放區之後將其關閉。

   如果您有沒有資料存放區的現有網域，您可以按一下客戶設定檔頁面上藍色橫幅中的啟用按鈕來啟用它 （左側面板 > 客戶設定檔）

   資料存放區需要客戶受管金鑰 (CMK)，如果您尚未為網域啟用客戶受管金鑰 (CMK)，則會提示您建立該金鑰。

1. 選擇**提交**。完成的頁面與下圖類似。它會顯示客戶設定檔網域、無效字母佇列和 KMS 金鑰的名稱。  
![\[完成的客戶設定檔網域頁面。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-enable-final.png)

你完成了！Amazon Connect Customer Profiles 已啟用。現在，每當有新聯絡人時，Amazon Connect 都會建立客戶設定檔記錄。然後，它會跟蹤該電話號碼 (語音) 或電子郵件地址 (聊天) 的聯絡歷史記錄。

您的客服人員可以[建立新的客戶設定檔](ag-cp-create.md)並查看客戶的聯絡記錄。

## 後續步驟
<a name="cp-setup-nextsteps"></a>

1.  [讓整個客服人員應用程式都能使用客戶設定檔](customer-profile-access.md)。

1.  [指派客服人員在客服人員應用程式中存取客戶設定檔的權限](assign-security-profile-customer-profile.md)。

1. [與描述客戶設定檔資料的外部應用程式整合 (選用)](integrate-external-apps-customer-profiles.md)。

1. [啟用身分解析以識別兩個或多個類似的設定檔，並將它們合併](use-identity-resolution.md)。

# 產業資源範本入門
<a name="getting-started-industry-resource-templates"></a>

Amazon Connect Customer Profiles 提供產業資源範本，協助您以針對特定產業量身打造的計算屬性、客群和 Profile Explorer 配置，快速設定您的網域。

## 開始之前
<a name="industry-templates-before-you-begin"></a>

啟用產業資源範本之前，請確認：
+ 您的 Amazon Connect 執行個體已啟用客戶設定檔
+ 能在客戶設定檔網域中建立資源的適當權限

## 關於產業資源範本
<a name="about-industry-resource-templates"></a>

當您啟用產業範本時，客戶設定檔會自動在您的網域中建立下列資源：
+ 計算屬性定義 - 從您的客戶資料衍生的預先定義屬性
+ 客群定義 - 根據常見特性分類的客戶分群
+ Profile Explorer 配置 - 自訂儀表板視圖，用於視覺化客戶資訊

這些資源旨在協助您快速從客戶資料中獲得價值，而不必手動建立每個資源。

## 啟用產業資源範本
<a name="enable-industry-resource-templates"></a>

1. 在 [客戶設定檔] 首頁上，找到產業範本區段。
   + 如果這是您第一次設定客戶設定檔，則頁面頂端會顯示公告。  
![\[如果這是您第一次使用客戶設定檔，則會顯示啟用範本的橫幅。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/enable-industry-resource-templates-1.png)
   + 如果您的網域中已有資源，已啟用的範本清單會顯示在產業範本區段。  
![\[如果您之前已使用過客戶設定檔，則已啟用的範本清單會顯示在產業範本區段。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/enable-industry-resource-templates-2.png)

1. 若要啟用範本，請選擇**啟用範本**。

1. 在**選取範本**下拉式清單中，選擇最符合您的產業：
   + **航空業** - 航空旅遊業
   + **旅宿業** - 住宿業

1. 檢閱將在**檢閱資源**區段建立的資源。  
![\[檢閱要建立的資源。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/enable-industry-resource-templates-3.png)

1. 選擇**啟用範本**。

1. 等待建立資源。資源建立過程中，請務必保持瀏覽器索引標籤開啟。

1. 完成後，您會看到確認訊息，範本會出現在產業範本區段中，其中包含已建立的資源數量。  
![\[畫面即會顯示成功建立橫幅。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/enable-industry-resource-templates-4.png)

## 產業範本建立的資源
<a name="resources-created-by-industry-templates"></a>

### 航空業產業範本
<a name="airline-industry-template"></a>

#### 計算屬性
<a name="airline-calculated-attributes"></a>

航空業範本會跨數個類別建立計算屬性：


**航空業計算屬性**  

| 計算屬性名稱 | 顯示名稱 | Description | 物件類型 | 
| --- | --- | --- | --- | 
| air\$1airPreference\$1departure\$1airport\$1last\$1occurrence | 偏好出發機場 | 傳回客戶最近設定的偏好出發機場。 | \$1airPreference | 
| air\$1airPreference\$1arrival\$1airport\$1last\$1occurrence | 偏好抵達機場 | 傳回客戶最近設定的偏好抵達機場。 | \$1airPreference | 
| air\$1airPreference\$1travel\$1type\$1last\$1occurrence | 偏好旅遊類型 | 傳回客戶最近設定的偏好旅遊類型。 | \$1airPreference | 
| air\$1airPreference\$1marketing\$1opt\$1in\$1last\$1occurrence | 加入行銷偏好設定 | 傳回客戶最近設定的加入行銷設定。 | \$1airPreference | 
| air\$1airPreference\$1language\$1in\$1person\$1language\$1last\$1occurrence | 偏好的面對面互動語言 | 傳回客戶最近的偏好面對面互動語言。 | \$1airPreference | 
| air\$1airPreference\$1seat\$1location\$1last\$1occurrence | 偏好的座位位置 | 傳回客戶最近選擇的座位位置偏好設定。 | \$1airPreference | 
| air\$1airPreference\$1home\$1airport\$1last\$1occurrence | 偏好的母國機場 | 傳回客戶最近指定的母國機場。 | \$1airPreference | 
| air\$1airPreference\$1dining\$1dietary\$1restriction\$1last\$1occurrence | 偏好的餐飲限制 | 傳回客戶最近指定的餐飲限制。 | \$1airPreference | 
| air\$1airBookings\$1number\$1of\$1passengers\$1average | 每次預訂的平均乘客數 | 傳回所有客戶預訂的平均乘客人數。 | \$1airBooking | 
| air\$1airBookings\$1price\$1total\$1price\$1average | 平均預訂價格 | 傳回所有客戶預訂的平均價格。 | \$1airBooking | 
| air\$1airBookings\$1count | 預訂數量 | 傳回客戶的預訂數量。 | \$1airBooking | 
| air\$1airSegments\$1flight\$1delay\$1time\$1sum | 總航班延誤時長 | 傳回客戶經歷的航班延誤總時長。 | \$1airSegment | 
| air\$1airSegments\$1cancelled\$1flights\$1count\$130\$1days | 過去 30 天取消的航班 | 傳回過去 30 天取消的客戶航班數量。 | \$1airSegment | 
| air\$1airSegments\$1delayed\$1flights\$1count\$130\$1days | 過去 30 天的延誤航班 | 傳回過去 30 天延誤的客戶航班數量。 | \$1airSegment | 
| air\$1airSegments\$1completed\$1flights\$1count\$130\$1days | 過去 30 天完成的航班 | 傳回過去 30 天完成的客戶航班數量。 | \$1airSegment | 
| air\$1airSegments\$1completed\$1flights\$1count\$11\$1year | 去年完成的航班 | 傳回去年完成的客戶航班數量。 | \$1airSegment | 
| air\$1airSegment\$1departure\$1date\$1last\$1occurrence | 最後一個航班出發日期 | 傳回客戶最近航班的出發日期。 | \$1airSegment | 
| air\$1airSegments\$1miles\$1to\$1earn\$1sum | 飛行總英里 | 傳回客戶的飛行總里程 (英里)。 | \$1airSegment | 
| air\$1airSegments\$1miles\$1to\$1earn\$1sum\$11\$1year | 過去一年的飛行總英里 | 傳回客戶過去一年的飛行總里程 (英里)。 | \$1airSegment | 
| air\$1airSegments\$1business\$1first\$1class\$1count | 高級艙等航班數量 | 傳回預訂商務艙或頭等艙的客戶航段數量。 | \$1airSegment | 
| air\$1loyalties\$1points\$1redeemed\$1sum | 已兌換的忠誠度點數總和 | 傳回所有客戶忠誠度計劃所兌換的點數總和。 | \$1loyalty | 
| air\$1loyalties\$1count | 忠誠度會員數量 | 傳回客戶持有的忠誠度計劃會員資格數量。 | \$1loyalty | 
| air\$1loyalty\$1tier\$1points\$1to\$1next\$1tier\$1last\$1occurrence | 取得下一個忠誠度層級的所需點數 | 傳回客戶取得下一個忠誠度層級所需點數的最新記錄。 | \$1loyalty | 
| air\$1loyalty\$1points\$1balance\$1last\$1occurrence | 目前的剩餘忠誠度點數 | 傳回客戶目前的剩餘忠誠度點數。 | \$1loyalty | 
| air\$1loyalty\$1membership\$1id\$1last\$1occurrence | 目前的忠誠度會員資格 ID | 傳回客戶目前的忠誠度會員資格 ID。 | \$1loyalty | 
| air\$1loyalty\$1program\$1name\$1last\$1occurrence | 目前的忠誠度計劃名稱 | 傳回客戶目前的忠誠度計劃名稱。 | \$1loyalty | 
| air\$1loyalty\$1enrollment\$1date\$1last\$1occurrence | 最近的忠誠度計劃註冊日期 | 傳回客戶最近的忠誠度計劃註冊日期。 | \$1loyalty | 
| air\$1loyalty\$1tier\$1current\$1tier\$1last\$1occurrence | 目前的忠誠度層級 | 傳回客戶目前的忠誠度計劃層級狀態。 | \$1loyalty | 
| air\$1loyalties\$1silver\$1gold\$1platinum\$1tier\$1count | 高級會員資格數量 | 傳回具 Silver 忠誠度計劃的客戶數量 | \$1loyalty | 
| air\$1loyaltyPromotions\$1count | 忠誠度促銷活動數量 | 傳回客戶收到的忠誠度促銷活動總量。 | \$1loyaltyPromotion | 

#### 客群
<a name="airline-segments"></a>

航空業範本會建立下列客群：
+ [航空業] 行銷活動訂閱用戶
+ [航空業] 過去 30 天有航班取消的客戶
+ [航空業] 過去 30 天有航班延誤的客戶
+ [航空業] 過去 30 天有航班完成的客戶
+ [航空業] 不活躍的會員

#### Profile Explorer 配置
<a name="airline-profile-explorer-layout"></a>

使用配置名稱建立的 Profile Explorer 配置範例：`DEMO-Airline-Layout` 由下列小工具組成：
+ 客戶詳細資訊和聯絡資訊
+ 忠誠度計劃狀態和點數
+ 最近的預訂和航班
+ 客戶偏好設定
+ 客戶價值指標
+ 客戶滿意度指標

### 旅宿業產業範本
<a name="hotel-industry-template"></a>

#### 計算屬性
<a name="hotel-calculated-attributes"></a>

旅宿業範本會跨數個類別建立計算屬性：


**旅宿業計算屬性**  

| 計算屬性名稱 | 顯示名稱 | Description | 物件類型 | 
| --- | --- | --- | --- | 
| hotel\$1hotelPreference\$1location\$1room\$1type\$1last\$1occurrence | 偏好房型 | 傳回客戶最近設定的偏好房型。 | \$1hotelPreference | 
| hotel\$1hotelPreference\$1cleaning\$1time\$1last\$1occurrence | 偏好清理時間 | 傳回客戶最近設定的偏好房間清理時間。 | \$1hotelPreference | 
| hotel\$1hotelPreference\$1location\$1view\$1last\$1occurrence | 偏好視野 | 傳回客戶最近設定的偏好房間視野。 | \$1hotelPreference | 
| hotel\$1hotelPreference\$1check\$1in\$1type\$1last\$1occurrence | 偏好的入住辦理方式 | 傳回客戶最近設定的偏好入住辦理方式。 | \$1hotelPreference | 
| hotel\$1hotelPreference\$1check\$1out\$1type\$1last\$1occurrence | 偏好的退房辦理方式 | 傳回客戶最近設定的偏好退房辦理方式。 | \$1hotelPreference | 
| hotel\$1hotelPreference\$1special\$1request\$1last\$1occurrence | 最近的特殊要求類型 | 傳回客戶最近的特殊住宿要求類型。 | \$1hotelPreference | 
| hotel\$1hotelPreference\$1interest\$1name\$1of\$1interest\$1max\$1occurrence | 最常表現的興趣 | 傳回客戶最常表現的興趣或設施偏好。 | \$1hotelPreference | 
| hotel\$1hotelPreference\$1marketing\$1opt\$1in\$1last\$1occurrence | 加入行銷偏好設定 | 傳回客戶最近設定的加入行銷設定。 | \$1hotelPreference | 
| hotel\$1hotelReservations\$1number\$1of\$1nights\$1average | 平均停留時間 | 傳回所有客戶飯店預訂的平均停留時間。 | \$1hotelReservation | 
| hotel\$1hotelReservations\$1number\$1of\$1nights\$1completed\$1sum\$11\$1year | 去年的總住宿天數 | 傳回過去一年所有客戶預訂的總住宿天數。 | \$1hotelReservation | 
| hotel\$1hotelReservations\$1number\$1of\$1nights\$1completed\$1sum | 總停留天數 | 傳回所有客戶飯店預訂的總住宿天數。 | \$1hotelReservation | 
| hotel\$1hotelReservation\$1room\$1type\$1name\$1last\$1occurrence | 上次預訂的房型 | 傳回客戶最近預訂的房型。 | \$1hotelReservation | 
| hotel\$1hotelReservation\$1channel\$1method\$1last\$1occurrence | 上次使用的預訂管道 | 傳回客戶最近用於預訂飯店的管道。 | \$1hotelReservation | 
| hotel\$1hotelReservations\$1count | 預約數量 | 傳回客戶的飯店預訂數量。 | \$1hotelReservation | 
| hotel\$1hotelReservations\$1total\$1amount\$1after\$1tax\$1average | 平均預訂花費 | 傳回稅後每個飯店預訂的平均花費金額。 | \$1hotelReservation | 
| hotel\$1hotelReservations\$1total\$1amount\$1after\$1tax\$1sum | 住宿總花費 | 傳回稅後所有客戶飯店預訂的總花費。 | \$1hotelReservation | 
| hotel\$1hotelReservation\$1number\$1of\$1guests\$1max\$1occurrence | 最常見的客群大小 | 傳回所有住宿中最常見的預訂住宿人數。 | \$1hotelReservation | 
| hotel\$1hotelReservations\$1business\$1travel\$1count | 商務旅遊數量 | 傳回標記為商務旅遊的客戶預訂數量。 | \$1hotelReservation | 
| hotel\$1hotelReservations\$1missed\$1checkin\$1count | 錯過入住的數量 | 傳回客戶錯過入住的飯店預訂數量。 | \$1hotelReservation | 
| hotel\$1hotelReservation\$1cancelled\$1count | 取消預訂的數量 | 傳回客戶取消的飯店預訂數量。 | \$1hotelReservation | 
| hotel\$1hotelStayRevenues\$1amount\$1sum | 總收入 | 傳回由所有客戶飯店住宿所產生的總收入。 | \$1hotelStayRevenue | 
| hotel\$1hotelStayRevenues\$1amount\$1average | 每次停留的平均收入 | 傳回所有客戶停留的平均收入金額。 | \$1hotelStayRevenue | 
| hotel\$1hotelStayRevenues\$1amount\$1maximum | 最高收入金額 | 傳回由任何客戶停留所產生的最高單一收入金額。 | \$1hotelStayRevenue | 
| hotel\$1hotelStayRevenue\$1revenue\$1type\$1max\$1occurrence | 最常見的收入來源 | 傳回由客戶飯店住宿所產生最常見的收入類型。 | \$1hotelStayRevenue | 
| hotel\$1loyalties\$1points\$1redeemed\$1sum | 已兌換的忠誠度點數總和 | 傳回所有客戶忠誠度計劃所兌換的點數總和。 | \$1loyalty | 
| hotel\$1loyalties\$1count | 忠誠度會員數量 | 傳回客戶持有的忠誠度計劃會員資格數量。 | \$1loyalty | 
| hotel\$1loyalty\$1tier\$1points\$1to\$1next\$1tier\$1last\$1occurrence | 取得下一個忠誠度層級的所需點數 | 傳回客戶取得下一個忠誠度層級所需點數的最新記錄。 | \$1loyalty | 
| hotel\$1loyalty\$1points\$1balance\$1last\$1occurrence | 目前的剩餘忠誠度點數 | 傳回客戶目前的剩餘忠誠度點數。 | \$1loyalty | 
| hotel\$1loyalty\$1membership\$1id\$1last\$1occurrence | 目前的忠誠度會員資格 ID | 傳回客戶目前的忠誠度會員資格 ID。 | \$1loyalty | 
| hotel\$1loyalty\$1program\$1name\$1last\$1occurrence | 目前的忠誠度計劃名稱 | 傳回客戶目前的忠誠度計劃名稱。 | \$1loyalty | 
| hotel\$1loyalty\$1enrollment\$1date\$1last\$1occurrence | 最近的忠誠度計劃註冊日期 | 傳回客戶最近的忠誠度計劃註冊日期。 | \$1loyalty | 
| hotel\$1loyalty\$1tier\$1current\$1tier\$1last\$1occurrence | 目前的忠誠度層級 | 傳回客戶目前的忠誠度計劃層級狀態。 | \$1loyalty | 
| hotel\$1loyalties\$1silver\$1gold\$1platinum\$1tier\$1count | 高級會員資格數量 | 傳回具 Silver 忠誠度計劃的客戶數量 | \$1loyalty | 
| hotel\$1loyaltyPromotions\$1count | 忠誠度促銷活動數量 | 傳回客戶收到的忠誠度促銷活動總量。 | \$1loyaltyPromotion | 

#### 客群
<a name="hotel-segments"></a>

旅宿業範本會建立客群，例如：
+ [旅宿業] 偏好行銷活動訂閱用戶
+ [旅宿業] 單人旅客
+ [旅宿業] 雙人旅客
+ [旅宿業] 家庭或團體旅客
+ [旅宿業] 在 30 天內有預訂的客戶

#### Profile Explorer 配置
<a name="hotel-profile-explorer-layout"></a>

自訂配置，其中顯示：
+ 客戶詳細資訊和聯絡資訊
+ 房間偏好
+ 停留歷史記錄
+ 收入資訊
+ 忠誠度計劃會員狀態

## 停用產業範本
<a name="disable-industry-templates"></a>

您可以停用產業範本，從網域中移除其建立的資源。若要停用範本：

1. 在 [客戶設定檔] 首頁上，找到產業範本區段。

1. 找到您要停用的範本，然後選擇**停用**動作。

1. 檢閱確認訊息，然後選擇**確認**以停用範本。

**重要**  
停用範本時，該範本所建立的所有資源都會從您的網域中刪除。如果客戶客群、對外行銷活動或聯絡流程有使用這些資源，停用範本可能會影響這些項目。  
停用範本前，請檢閱使用中的資源，了解潛在影響。

## 疑難排解
<a name="troubleshooting-industry-templates"></a>


**產業範本疑難排解**  

| 錯誤 | 建議 | 
| --- | --- | 
| 無法建立範本資源 |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/getting-started-industry-resource-templates.html)  | 
| 已建立的資源不會出現在 Profile Explorer 中 |  [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/getting-started-industry-resource-templates.html)  | 
| 無法啟用多個範本 | 每個網域都可以啟用多個產業範本。如果您遇到問題，請檢查您是否達到網域中的資源限制。 | 
| 需要刪除範本資源 | 目前，入門功能無法自動刪除由範本建立的所有資源。您可以透過個別資源的管理頁面，手動刪除個別資源。 | 

## 後續步驟
<a name="next-steps-industry-templates"></a>

啟用產業範本後，您可以：
+ 前往 Profile Explorer，在動作中查看您的新配置
+ 檢視和編輯計算屬性，以滿足您的特定需求
+ 在 Amazon Connect 中管理客戶客群
+ 根據您的業務需求編輯 Profile Explorer 配置
+ 整合外部應用程式和 Amazon Connect Customer Profiles，開始填入設定檔

# 在客服人員工作區中存取 Amazon Connect Customer Profiles
<a name="customer-profile-access"></a>

啟用 Amazon Connect 客戶設定檔後，客服人員可以開始與客戶互動並存取[客戶資訊](https://docs.aws.amazon.com/connect/latest/adminguide/customer-profiles.html)，以提供個人化服務。本主題說明如何存取 Amazon Connect 客服人員工作區。

**提示**  
確定您的客服人員在其安全性設定檔中具有**客戶設定檔**權限，以便他們可以存取客戶設定檔。如需詳細資訊，請參閱[Amazon Connect Customer Profiles 的安全性設定檔權限](assign-security-profile-customer-profile.md)。

## 選項 1：使用客戶設定檔搭配現成的 CCP
<a name="customer-profile-access-out-of-the-box"></a>

Customer Profiles 已內嵌於「聯絡人控制面板」(CCP) 旁。您的客服人員可以在相同的瀏覽器視窗中存取 CCP、客戶設定檔和 Amazon Connect案例管理，方法是登入其 Amazon Connect 執行個體並選擇右上角的**客服人員工作區**按鈕，如下圖所示。

![\[「Customer Profiles」頁面和按鈕反白顯示，可開啟客服人員工作區。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-agent-workspace-open.png)


**注意**  
您也可以使用下列 URL 存取客服人員工作區：  
**https://*執行個體名稱*.my.connect.aws/agent-app-v2/**
如果您使用 **awsapps.com** 網域存取執行個體，請使用下列 URL：  
**https://*執行個體名稱*.awsapps.com/connect/agent-app-v2/**
如需尋找執行個體名稱的說明，請參閱 [尋找您的 Amazon Connect 執行個體名稱](find-instance-name.md)。

下面是客服人員工作區中客戶設定檔的外觀範例。

![\[Customer Profiles 分頁和客服人員工作區中的 CCP。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-agent-app.png)


## 選項 2：將客戶設定檔嵌入自訂客服人員工作區
<a name="customer-profile-access-embed"></a>

當您嵌入聯絡控制面板 (CCP) 時，您可以選擇顯示或隱藏預先建置的 CCP 使用者介面。例如，您可能想要開發具有您設計的使用者介面的自訂客服人員工作區，其中包含可以接受和拒絕通話的自訂按鈕。或者，您可能想要將 Amazon Connect 隨附的預先建置 CCP 內嵌到另一個自訂應用程式中。

無論您是顯示預先建立的 CCP 使用者介面，還是隱藏並建立自己的介面，都可以使用 [Amazon Connect Streams](https://github.com/aws/amazon-connect-streams) 程式庫將 CCP 和客戶設定檔內嵌到客服人員工作區中。如此一來，系統就會初始化 Amazon Connect Streams，而且客服人員可以連線到 Amazon Connect 和客戶設定檔並進行驗證。

如需嵌入客戶設定檔的相關資訊，請參閱 [CCP、客戶設定檔和 WISDOM 的初始化](https://github.com/amazon-connect/amazon-connect-streams/blob/master/Documentation.md#initialization-for-ccp-customer-profiles-and-wisdom)。

若要在使用客戶設定檔的原始資料時建立自己的小工具，請參閱 [Github](https://github.com/amazon-connect/amazon-connect-customer-profiles) 文件，了解如何使用 CustomerProfilesJS 開放原始碼程式庫。

**提示**  
當您自訂客服人員工作區時，會判斷 URL 客服人員將用來存取其客服人員工作區，而且可能與 Amazon Connect 提供的 URL 客服人員工作區有很大的不同。例如，您的 URL 可以是 https://example-corp.com/agent-support-app。

# 自動填寫客戶設定檔
<a name="auto-pop-customer-profile"></a>

根據預設，Amazon Connect Customer Profiles 會使用下列值在其使用者介面中搜尋並自動填入客戶設定檔：
+ 語音聯絡人：電話號碼
+ 聊天聯絡人：電子郵件

它會使用客戶設定檔流程區塊自動填入客戶設定檔。若要自訂此行為，請使用下列聯絡屬性的 [設定聯絡屬性](set-contact-attributes.md) 區塊 (請參閱下方)


| 屬性 | 描述 | Type | JSONPath 參考 | 
| --- | --- | --- | --- | 
| profileSearchKey | 您要用來搜尋設定檔的屬性名稱。  | 使用者定義 | 不適用 | 
| profileSearchValue | 您要搜尋的索引鍵的值，例如客戶名稱或帳號。  | 使用者定義 | 不適用 | 

例如，若要透過電子郵件搜尋聊天聯絡人，您可以將 `profileSearchKey` 屬性設定為 `_email` 搜尋索引鍵，並提供 `profileSearchValue` 作為電子郵件的值。

如果您已經在設定檔物件中定義了自訂索引鍵，您也可以使用這些搜尋索引鍵進行搜尋。若要確保您的自訂索引鍵可供搜尋，請參閱 [索引鍵定義詳細資訊](object-type-mapping-definition-details.md#key-definition-details)。

下圖展示了如何在 [設定聯絡屬性](set-contact-attributes.md) 區塊中使用這些屬性。

![\[設定聯絡屬性區塊的屬性頁面。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-attributes1.png)


## 自動將客戶設定檔與聯絡人建立關聯
<a name="cp-automatically-associate-contact"></a>

預設情況下，客服人員需要在驗證客戶身分後手動將客戶個人資料與聯絡人關聯。若要變更此行為，以根據電話號碼自動將聯絡人與設定檔關聯，請參閱 [在 Customer Profiles 中，將聯絡人記錄與使用 \$1phone 索引鍵找到的一個設定檔建立關聯](auto-associate-profile-using-phone-profile-key.md)。

如果多個設定檔與聯絡人的電話號碼相符，則多個符合的設定檔會顯示給客服人員。客服人員需要選擇要聯絡人關聯的設定檔。

# Amazon Connect Customer Profiles 的安全性設定檔權限
<a name="assign-security-profile-customer-profile"></a>

指派客服人員安全性設定檔的權限，以讓他們執行此類任務，例如搜尋設定檔和檢視客戶詳細資訊、將聯絡人記錄與設定檔建立關聯、編輯設定檔，以及建立和儲存新的設定檔。區段中的主題可以協助您更新客服人員許可、流程和計算屬性，藉以指派許可。其中還有一些資訊，可以協助您處理更新權限時遇到的錯誤。

**Topics**
+ [更新客服人員的客戶設定檔權限](security-profile-customer-profile-agent.md)
+ [更新流程的 Customer Profiles 權限](security-profile-customer-profile-contact-flows.md)
+ [更新計算屬性的權限](security-profile-customer-profile-calc-attribs.md)
+ [客戶客群的安全性設定檔權限](security-profile-customer-profile-segmentation.md)
+ [發生錯誤時指派新的客戶設定檔權限](security-profile-customer-profile-issues.md)

# 更新客服人員的客戶設定檔權限
<a name="security-profile-customer-profile-agent"></a>

視需要將下列**客戶設定檔**權限指派給客服人員的安全性設定檔：
+ **檢視**：可讓客服人員查看客戶設定檔應用程式。他們可以：
  + 檢視在客服人員應用程式中自動填入的設定檔。
  + 搜尋設定檔。
  + 檢視儲存在客戶設定檔中的詳細資訊 (例如姓名、地址)。
  + 將聯絡人記錄與設定檔關聯，如下圖所示。  
![\[客服人員工作區中的客戶設定檔索引標籤，關聯按鈕。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-associate.png)
+ **編輯**：可讓客服人員編輯客戶設定檔中的詳細資訊 (例如，變更地址)。依據預設，它們會繼承**檢視**權限。
+ **建立**：可讓客服人員建立並儲存新的設定檔。它們預設會繼承**檢視**權限，但不會繼承**編輯**權限。

如需如何將更多權限新增到現有安全性設定檔的詳細資訊，請參閱 [在 Amazon Connect 中更新安全性設定檔](update-security-profiles.md)。

根據預設，**管理員**安全性設定檔已具有執行所有客戶設定檔活動的權限。

# 更新流程的 Customer Profiles 權限
<a name="security-profile-customer-profile-contact-flows"></a>

1. 前往 [安全性設定檔] 頁面，選擇您要編輯的安全性設定檔，或選擇**新增新的安全性設定檔**。  
![\[安全性設定檔頁面。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/security-profile-customer-profile-contact-flows-1.png)

1. 選擇客戶設定檔的**檢視**權限。  
![\[在安全性設定檔主控台選取 [檢視權限]。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/security-profile-customer-profile-contact-flows-2.png)

1. 選擇**儲存**。您現在可以瀏覽至**使用者管理**區段，並將此安全性設定檔提供給您選擇的使用者。

# 更新 Amazon Connect Customer Profiles 中的計算屬性權限
<a name="security-profile-customer-profile-calc-attribs"></a>

1. 前往 [安全性設定檔] 頁面，選擇您要編輯的安全性設定檔，或選擇**新增新的安全性設定檔**。  
![\[安全性設定檔頁面。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/security-profile-customer-profile-contact-flows-1.png)

1. 選取計算屬性的**全部**或**檢視**、**編輯**、**建立**和**刪除**權限。  
![\[在安全性設定檔主控台中，選擇檢視、編輯、建立和刪除權限。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/security-profile-customer-profile-calc-attribs-2.png)

1. 選擇**儲存**。您現在可以瀏覽至**使用者管理**區段，並將此安全性設定檔提供給您選擇的使用者。

# 指派管理客戶客群的安全性設定檔權限
<a name="security-profile-customer-profile-segmentation"></a>

根據需要將下列客戶客群權限指派給使用者的安全性設定檔。如需詳細了解安全性設定檔，請參閱 [用於 Amazon Connect 和聯絡人控制台 (CCP) 存取的安全性設定檔](connect-security-profiles.md)。

1.  前往 [安全性設定檔] 頁面，選擇您要編輯的安全性設定檔，或選擇**新增新的安全性設定檔**。  
![\[安全性設定檔頁面，客戶設定檔區段。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/how-to-update-permissions-for-customer-segments-1.png)

1.  選取客戶客群的**全部**或**檢視**、**建立**、**刪除**和**匯出**權限。  
![\[客戶客群區段權限設為 [全部]。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/how-to-update-permissions-for-customer-segments-2.png)

1.  選擇**儲存**。您現在可以瀏覽至**使用者管理**區段，並將此安全性設定檔提供給您選擇的使用者。

# 發生錯誤時指派新的客戶設定檔權限
<a name="security-profile-customer-profile-issues"></a>

1.  若要在任何後端 APIs 發生 403 禁止呼叫錯誤時更新許可，請導覽至 Amazon Connect Customer Profiles 主控台的網域區段，然後選擇**檢視詳細資訊**。  
![\[Customer Amazon Connect Profiles 主控台的網域區段。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/security-profile-customer-profile-issues-403-1.png)

1.  在檢視網域詳細資訊區段中，選擇**更新權限**。  
![\[如果需要更新任何未完成的權限，更新權限按鈕就會在此出現。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/security-profile-customer-profile-issues-403-2.png)

1.  完成此作業後將成功更新權限，且**更新權限**按鈕將不再顯示在網域詳細資訊區段。這將減少 403 禁止錯誤問題，您將可以成功進行 API 調用。  
![\[動作成功完成後，更新權限按鈕就會消失。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/security-profile-customer-profile-issues-403-3.png)

# Amazon Connect Customer Profiles 資料過期
<a name="customer-profiles-data-expiration"></a>

如果設定檔未在指定時間內更新，則會過期。這會導致設定檔遭清除，並從 Customer Profiles 網域中移除。

Customer Profiles 資料的過期日期可以分成兩個不同類別：

## 透過 CreateProfile 建立的設定檔
<a name="profiles-created-via-createprofile"></a>

使用 `CreateProfile` API 建立的設定檔過期日期是依據 Customer Profiles 網域上 **DefaultExpirationDays** 指派的時間戳記。如果未設定過期日期，則預設為 365 天。

## 透過 PutProfileObject 建立或更新的設定檔
<a name="profiles-created-via-putprofileobject"></a>

使用 `PutProfileObject` 建立或更新的設定檔一律依據與之相關物件類型上所定義的 **ExpirationDays**。如果未定義物件類型的過期日期，則適用 Customer Profiles 網域過期日期。如果兩者都未定義，則設定檔或設定檔物件的過期日期為預設的 365 天。

## 視覺化心理模型
<a name="mental-model-visualized"></a>

![\[流程圖，其中顯示 Customer Profiles 過期邏輯。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-expiration-model.png)


## 匯入設定檔過期
<a name="import-profile-expiration"></a>

如果設定檔已使用區段匯入，來匯入至 Customer Profile 網域，其過期日期分為兩個不同情況。

1. **呼叫 CreateUploadJob 時的明確過期定義**

   如果未更新，根據預設，使用區段匯入來匯入的設定檔會在 14 天後過期。[可以使用 API ](customer-segments-imported-files.md#set-profile-expiry)定義此數字，或在匯入建立期間於管理網站內定義，最多 90 天。 Amazon Connect 

1. **從先前的匯入任務匯入已存在於 Customer Profiles 網域中的設定檔**

   如果已執行兩個匯入任務，並找到重複的設定檔，則 Customer Profiles 將一律適用最長的過期時間。

# 在 Amazon Connect 中使用身分解析來合併類似的設定檔
<a name="use-identity-resolution"></a>

當兩個或多個設定檔判斷為屬於同一聯絡人時，則是*類似的設定檔*。跨多個通道和應用程式擷取同一客戶的客戶記錄時，可能會有多個設定檔，而且這些檔案並不共用共同的唯一識別符。

身分解析會自動尋找類似的設定檔，並協助您將它們合併。它會每週執行「身分解析任務」，並執行下列步驟：

1. [自動設定檔比對](how-identity-resolution-works.md#auto-profile-matching) 

1. 根據您的合併條件[自動合併類似的設定檔](how-identity-resolution-works.md#auto-profile-merging) 

每次執行身分解析任務時，都會在**客戶設定檔**頁面上顯示指標。指標會顯示所檢閱的設定檔數目、找到的相符群組數目，以及合併的設定檔數目。

啟用身分解析功能可能需支付額外費用。如需詳細資訊，請參閱 [Amazon Connect 定價](https://aws.amazon.com/connect/pricing/)。

![\[Amazon Connect Customer Profiles 頁面，啟用身分解析按鈕。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-enable-ir.png)


# 為您的 Amazon Connect Customer Profiles 網域啟用身分解析
<a name="enable-identity-resolution"></a>

**重要**  
Amazon Connect 使用客服人員工作區時，案例與 Amazon Connect Customer Profiles 身分解析不完全相容。以下是合併設定檔時，現有案例會發生的情況：  
合併後，案例仍會與其原始設定檔 ID 繫結。
案例不會在合併的設定檔之間自動合併。
沒有支援的方法可將現有案例重新與另一個設定檔建立關聯。如果您需要手動合併案例，請使用 [CreateCase](https://docs.aws.amazon.com/connect/latest/APIReference/API_connect-cases_CreateCase.html) 和 [CreateRelatedItem](https://docs.aws.amazon.com/connect/latest/APIReference/API_connect-cases_CreateRelatedItem.html) 作為解決方法。

當您啟用身分解析時，會指定下列資訊：
+ 身分解析任務每週應該執行的時間。預設情況下，它會在星期六上午 12 點 UTC 執行。
+ 身分解析任務應寫入自動設定檔比對程序結果的 Amazon S3 儲存貯體。如果沒有 S3 儲存貯體，您可選擇在啟用程序期間建立一個 S3 儲存貯體。

  您可以查詢 Amazon S3 儲存貯體，或使用 [GetMatches](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_GetMatches.html) API 根據[可信度分數](how-identity-resolution-works.md#confidence-score)篩選結果。

啟用身分解析後，您會看到為選擇性自動合併程序[建立合併準則](create-consolidation-criteria.md)的選項。

**啟用身分解析**

1. 您必須為執行個體啟用客戶設定檔網域。如需說明，請參閱 [為您的 Amazon Connect 執行個體啟用客戶設定檔。](enable-customer-profiles.md)。

1. 在導覽窗格中，選擇**客戶設定檔**。

1. 在**身分解析**區段中，選擇**啟用身分解析**。  
![\[Amazon Connect Customer Profiles 頁面，啟用身分解析按鈕。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-enable-ir.png)

1. 在**身分解析**彈出式方塊中，選擇**啟用身分解析**。  
![\[Amazon Connect Customer Profiles 頁面，啟用身分解析按鈕。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-enable-ir-2.png)

1. 在**啟用身分解析**頁面上，指定您要執行身分解析任務的日期和時間。

1. 如果您想要從 Amazon S3 儲存貯體檢閱相符的設定檔 ID，請選擇 **將設定檔 ID 相符項目寫入 Amazon S3**。否則，您可以使用 [GetMatches](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_GetMatches.html) API 來查看相符的設定檔。
**注意**  
如果您自動啟用合併，您就不會收到相符設定檔的 ID。

   1. 指定身分解析任務應寫入設定檔相符項目的 Amazon S3 儲存貯體。

     我們建議套用政策，以防止出現混淆的客服人員人安全性問題。如需詳細資訊和範例清單，請參閱 [Amazon Connect Customer Profiles 跨服務混淆代理人預防](cross-service-confused-deputy-prevention.md#customer-profiles-cross-service)。

1. 完成後，選擇 **啟用身分解析**。啟用身分解析後，規則型比對和以 ML 為基礎的比對都會啟用。您可以從「身分解析」頁面停用其中一項，或兩者同時停用。如需詳細資訊，請參閱[在 Amazon Connect Customer Profiles 中停用身分解析](disable-identity-resolution.md)。

1. 規則型身分解析比對：

   1. 您啟用新網域的規則型比對之後，如果您設定了整合，且整合正在執行，則比對將立即開始。

   1. 啟用與現有網域的規則型比對之後，比對程序將在一小時內開始。

1. 以 ML 為基礎的身分解析比對：

   1. 啟用「身分解析」後，身分解析任務會在 24 小時內首次執行。
**注意**  
在新的客戶設定檔網域上首次執行身分解析任務之前，建議您先檢查您的設定檔指標，以確定已建立設定檔。否則，將不會有任何比對結果。

   1. 您可能想要設定自動合併相符設定檔的合併條件。如果是這樣，請參閱 [在 Amazon Connect 中設定身分解析的合併條件](create-consolidation-criteria.md)。

# 在 Amazon Connect 中設定身分解析的合併條件
<a name="create-consolidation-criteria"></a>

**注意**  
您必須[啟用身分解析](#create-consolidation-criteria)，才能使用 Amazon Connect 管理主控台存取建立合併條件的選項。

當身分解析任務偵測到類似的設定檔時，該程序可以根據您指定的合併條件，自動將其合併到統一的設定檔中。

您選擇的屬性會在相符群組中的所有類似設定檔中進行比較，以確保完全相符。例如，如果您在條件中指定 `email` 為屬性，則相符群組中具有完全相同 `email address` 值的所有類似設定檔都會合併到統一的設定檔中。

**提示**  
如果您想要設定自己的合併邏輯，請使用 [MergeProfiles](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_MergeProfiles.html) API。

## 限制
<a name="criteria-limitations"></a>

您可以從[標準設定檔](standard-profile-definition.md)中選擇任何屬性來比較類似的設定檔。例如，您可以選擇電話號碼、電子郵件地址和姓名，以及自訂屬性。

您最多可以指定：
+ 10 個合併標準
+  每個條件 20 個屬性

## 建立強大條件的提示
<a name="tips-for-creating-consolidation-criteria"></a>

若要改善對唯一設定檔的鎖定，並避免合併非重複的設定檔，建議您執行下列步驟：
+ 選擇可唯一識別客戶，且客戶之間不太可能相同的屬性，例如帳號或政府 ID 格式。
+ 避免使用單一屬性條件。選擇多個屬性建立屬性組合以改善鎖定目標。例如：
  + 帶有 **名字**、**中間名**、**姓氏** 的 **電話號碼** 是更強的條件

  相較於
  + 單獨使用 **電話號碼**，或 
  + 單獨使用 **名字，中間，名字，姓氏** 的組合
+ 選擇特定屬性群組內的所有屬性 (如果適用)。例如，如果您想要使用 name，請選擇所有相關的名稱屬性：**名字、中間名、姓氏**。如果您要使用公司地址，請選擇所有相關的公司地址屬性。
+ 包含下列其中一個屬性，當其與條件中的其他屬性結合時，也許可以唯一識別客戶：
  + 帳戶號碼
  + 電話號碼
  + Email

## 如何設定自動合併條件
<a name="howto-setup-automerging-criteria"></a>

在設定自動合併的合併條件之前，建議您先檢閱 [自動合併程序的運作方式](how-identity-resolution-works.md#consolidation-criteria-how-it-works)。

1. 啟用「身分解析」之後，在 **身分解析** 頁面上，您可以選擇設定自動合併條件。選擇 **建立合併條件**。

1. 如果您收到 **缺少時間戳記** 對話方塊，建議您先將新的時間戳記屬性新增至自訂物件類型，然後再繼續。請參閱 [設定檔衝突缺少時間戳記](#missing-timestamp-for-profile-conflicts)。

1. 在 **設定檔衝突** 區段中，選擇當兩筆或多筆記錄發生衝突時，應如何解決設定檔衝突。

1. 在 **合併條件** 區段中，建立一個或多個條件。我們建議每個條件至少包含兩個或多個屬性。

## 設定檔衝突缺少時間戳記
<a name="missing-timestamp-for-profile-conflicts"></a>

如果您有自訂物件類型對映，則會顯示**缺少時間戳記**訊息。

使用 [PutProfileObjectType](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_PutProfileObjectType.html) API，將下列新屬性新增至您的自訂物件類型：
+ `Fields.sourceLastUpdatedTimestamp`
+ `sourceLastUpdatedTimestampFormat`

如果未指定時間戳記屬性，您可以繼續建立合併條件，不過，系統會使用記錄擷取至客戶設定檔時的預設時間戳記。建議您在建立合併條件之前新增屬性。

如果您已經定義了自訂物件類型，並且想要更新您的自訂物件類型，我們每週都會使用 `Fields.sourceLastUpdatedTimestamp` 來執行排程回填。若要選擇加入排定的回填：

1. 使用 [PutProfileObjectType](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_PutProfileObjectType.html) API 更新您的自訂設定檔物件類型。

1. 更新自訂設定檔物件類型後，請開立 [支援 票證](https://console.aws.amazon.com/support/home)，我們會為您排程回填。排定的回填會執行至 2022 年 2 月底。

或者，您可以刪除，然後為您的網域 (使用自訂物件類型) 重新建立擷取/連接器。您的所有資料都將使用更新的物件類型重新導入，並將從其中解析出 `Fields.sourceLastUpdatedTimestamp`。

## 範例：如何套用範例條件
<a name="criteria-examples"></a>

在這個例子中有三個條件：
+ **解決設定檔衝突** 設定為 **使用上次更新的時間戳記**。這意味著當兩個欄位具有衝突的值時，身分解決將使用上次更新的時間戳記來決定要使用哪個值。
+ 準則一：
  + 名字、姓氏
  + Email
+ 準則二：
  + 電話號碼

這些條件會套用至下列設定檔：
+ 設定檔 A
  + John Doe [最後更新時間 **05:00**a]
  + doefamily@anyemail.com [最後更新時間 **05:00**a]
  + 555-555-5555 [最後更新時間 **07:00**a]
+ 設定檔 B
  + John Doe [最後更新時間 **04:00**a]
  + doefamily@anyemail.com [最後更新時間 **06:00**a]
  + 555-555-555**6** [最後更新時間 *04:00*a]
+ 設定檔 C
  + **Jane** Doe [最後更新時間 **06:00**a]
  + doefamily@anyemail.com [最後更新時間 **07:00**a]
  + 555-555-5555 [最後更新時間 **06:00**a]

以下是套用條件 1 時的結果：
+ 合併設定檔 A 與 B = 設定檔 AB

這樣會產生設定檔 AB，看起來像這樣：
+ John Doe [最後更新時間 **05:00**a]
+ doefamily@anyemail.com [最後更新時間 **07:00**a]
+ 555-555-555**5** [最後更新時間 **06:00**a]

由於電話號碼之間存在衝突，「身分解析」會使用最後一個時間戳記來選擇 555-555-555 號碼。

接下來，套用準則 2。以下是結果：
+ 合併設定檔 AB 與 C = 設定檔 ABC

這樣會產生設定檔 ABC，看起來像這樣：
+ **Jane** Doe [最後更新時間 **06:00**a]
+ doefamily@anyemail.com [最後更新時間 **07:00**a]
+ 555-555-555**5** [最後更新時間 **07:00**a]

身分解析會使用設定檔 C 的「名字」、「姓氏」和「電子郵件」，因為它們具有最新的時間戳記。

# Amazon Connect 中的身分解析機器學習
<a name="machine-learning-identity-resolution-customer-profiles"></a>

Amazon Connect 中的身分解析會自動尋找類似的設定檔，並協助您將它們合併。本章節的主題說明如何設定機器學習比對，將重複的設定檔合併，作為自動合併程序的一部分。

**Topics**
+ [機器學習身分解析的運作方式](how-identity-resolution-works.md)
+ [設定用於身分解析的機器學習](setup-machine-learning-matching.md)

# 機器學習身分解析在 Amazon Connect 中的運作方式
<a name="how-identity-resolution-works"></a>

本主題說明身分解析如何執行自動設定檔比對，以及如果被設定，會如何自動合併類似的設定檔。

## 自動設定檔比對
<a name="auto-profile-matching"></a>

為了識別類似的設定檔，身分解析會使用機器學習來檢閱每個設定檔中的下列個人身分識別資訊 (PII) 屬性：
+ 名稱：所有名稱都會進行相似性審核，包括名字，中間名和姓氏。
+ 電子郵件：所有電子郵件地址都經過審核，以確保相似性，包括個人電子郵件和商務電子郵件。不區分大小寫。
+ 電話號碼：所有電話號碼和格式都經過審查，以確保相似性，包括家庭電話，手機和商務電話。
+ 地址：審查所有地址類型和格式的相似性，包括公司地址，郵寄地址，送貨地址和帳單地址。
+ 出生日期：審查所有出生日期和格式的相似性。

它會使用此資訊來建立類似設定檔的相符群組。

### 匹配群組
<a name="match-groups"></a>

相符群組由代表同一客戶的所有類似設定檔組成。每個匹配群組都包含以下資訊：
+ 相符 ID，可唯一識別代表同一聯絡人的兩個或多個類似設定檔的群組
+ 相符群組中的設定檔 ID 數
+ 與相符群組關聯的可信度分數

### 可信度分數
<a name="confidence-score"></a>

自動比對程序執行後，您可以查詢 S3 儲存貯體或使用 [GetMatches](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_GetMatches.html) API 根據可信度分數篩選結果。例如，您可以篩選出高可信度匹配項目，以供進一步檢閱。

可信度分數是介於 0 到 1 之間的數字，代表將設定檔指派給相符群組的信賴等級。分數為 1 可能表示完全相符。

## 自動合併類似的設定檔
<a name="auto-profile-merging"></a>

比對設定檔後，身分解析任務可以根據您的條件選擇性地合併類似的設定檔。如果您刪除或更新條件，更新的條件會在下一次執行中套用至類似的設定檔。

**重要**  
您無法復原合併程序。我們強烈建議您在執行身分解析任務之前，使用 [GetAutoMergingPreview](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_GetAutoMergingPreview.html) API 來執行自動合併程序。

**注意**  
合併兩個設定檔時，透過 API 呼叫或客服人員工作區手動填入的設定檔欄位不會被整合或自訂物件類型映射自動擷取的設定檔欄位覆寫。  
例如，假設客服人員在客服人員工作區中使用「John」這個名字手動建立一個設定檔。再使用名字為「Peter」的 S3 整合來建立另一個設定檔。如果這些設定檔自動合併，則會保留名字「John」。

### 自動合併程序的運作方式
<a name="consolidation-criteria-how-it-works"></a>
+ **合併條件中的所有選擇屬性在合併之前，都會使用具有精確值比較的 `AND` 條件連結**。
  + 例如，如果在條件中指定了多個屬性，例如 `email address` 和 `phone number`，則相符群組中具有完全相同的 `email address` 和 `phone number` 值的所有類似設定檔都會被合併。
  + 如果相符群組中的一或多個類似設定檔在條件中的一或多個屬性具有不同的值或缺少值，則會合併類似的設定檔。

    例如，一個相符群組可能是五個相似的設定檔，其中三個設定檔已合併，因為這三個設定檔符合條件。其他兩個設定檔則不會合併，因為它們不符合條件。
+ **多個條件會以從條件 1 開始的優先順序評估**。
  +  套用合併條件的順序。它從最高優先級的條件 1 開始，直到最低優先級的條件 10。
  + 身分解析任務套用一個條件後，下一個條件會套用至合併的設定檔，以及相符群組中其餘的類似設定檔。
  + 您最多可以有 10 個合併條件。
+ **每個條件都會獨立執行，並以 `OR` 的形式與其他條件一同運作**。
  + 如果您有多個條件，則「身分解析任務」移至下一個條件之前，會個別套用每個條件，並依據優先順序順序套用。
  + 所有條件都會依照您列出的順序套用。合併相符群組中的類似設定檔時，條件是否失敗或成功並不重要。
+ **依據預設，設定檔衝突由時近來管理**。
  + 當相符群組中的兩個或多個類似設定檔符合合併條件時，會透過比較構成類似設定檔屬性的每個  值來建立所產生的合併設定檔。
  + 每個屬性的值都可能完全相符。在這種情況下，可以為該屬性選擇任何值。
  + 如果兩個或多個構成相似設定檔的值之間存在衝突，則會選擇最近更新的屬性。

    例如，如果 Jane Doe 在組成類似設定檔的 `Address` 屬性中有三個不同的值，則身分解析會挑選最近處理的值來建立統一設定檔。
  + 依據預設，上 **上次更新的時間戳記** 會用來決定最近更新的記錄。
+ **設定檔衝突由來源物件類型和時近來管理**。
  + 您也可以改變衝突解決的預設行為，從特定來源選擇類似的構成設定檔作為事實來源，以通知衝突解決方案。
  + 如果您要指定用於設定檔衝突的資料來源，若選擇 **具有上次更新時間戳記的來源**，則可以選擇其中一個物件類型作為資料來源。
  + 指定物件類型中最近更新的記錄可用於解決設定檔衝突。
+ **上次更新的時間戳記可識別最近更新的記錄**。
  + 與源記錄的對象類型關聯的 timestamp 屬性用於識別哪個記錄最近被更新。
  + 如果該物件類型無法使用 timestamp 屬性，則會使用該記錄擷取至客戶設定檔網域的時間戳記。
  + 如果您有自訂物件類型，則需要新增時間戳記。如需詳細資訊，請參閱[設定檔衝突缺少時間戳記](create-consolidation-criteria.md#missing-timestamp-for-profile-conflicts)。
+ **合併是單向程序，無法復原**。
  + 在開始合併程序之前，請仔細選擇您的條件。如需詳細資訊，請參閱[建立強大條件的提示](create-consolidation-criteria.md#tips-for-creating-consolidation-criteria)。
  + 使用 [GetAutoMergingPreview](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_GetAutoMergingPreview.html) API 來測試身分解析的自動合併設定，而不需要合併資料。

如需顯示如何套用條件的範例，請參閱 [範例：如何套用範例條件](create-consolidation-criteria.md#criteria-examples)。

# 設定 Amazon Connect 中的身分解析機器學習
<a name="setup-machine-learning-matching"></a>



## 編輯機器學習比對執行排程
<a name="machine-learning-matching-edit-run-schedule"></a>

![\[編輯機器學習比對執行排程。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/machine-learning-ir-edit-run-schedule.png)


## 編輯機器學習合併相符項目
<a name="machine-learning-matching-edit-merge-matches"></a>

![\[編輯機器學習合併相符項目。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/machine-learning-ir-edit-merge-matches.png)


## 編輯機器學習匹配位置
<a name="machine-learning-edit-match-location"></a>

![\[編輯機器學習匹配位置。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/machine-learning-ir-edit-match-location.png)


# Amazon Connect 中的身分解析規則式匹配流程
<a name="rule-based-identity-resolution-customer-profiles"></a>

AC 中的身分解析會自動尋找類似的設定檔，並協助您將它們合併。本章節的主題說明如何設定規則式身分解析，將重複的設定檔合併，作為自動合併程序的一部分。

**Topics**
+ [規則型身分解析的運作方式](how-rule-based-identity-resolution-works.md)
+ [設定身分解析用規則型比對](setup-rule-based-matching.md)
+ [設定規則型身分解析的比對規則](setup-matching-rule-examples.md)

# Amazon Connect 中規則型身分解析的運作方式
<a name="how-rule-based-identity-resolution-works"></a>

本主題說明規則型身分解析如何執行自動設定檔比對，以及它如何自動合併類似的設定檔。

## 自動設定檔比對
<a name="automatic-profile-matching"></a>

為了識別類似的設定檔，規則型身分解析會使用[相符規則屬性](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_MatchingRule.html)清單來比對每一份設定檔。[MatchingRules](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_RuleBasedMatchingRequest.html#customerprofiles-Type-RuleBasedMatchingRequest-MatchingRules) 中最多支援 15 個 MatchingRule 屬性。

### 比對規則
<a name="rule-based-matching-rules"></a>

以下是可以使用的 [MatchingRule](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_MatchingRule.html) 屬性清單。您最多可以設定 15 個比對規則層級。針對每個比對規則，您可以在每個設定檔中使用下列個人身分識別資訊 (PII) 屬性：
+ **AccountNumber**
+ **Address.Address**：[屬性類型選擇器](#rule-based-attribute-type-selector) 中指定的所有地址都會進行相似性審核，包括 Address、BusinessAddress、MaillingAddress 和 ShippingAddress
+ **Address.City**：[屬性類型選擇器](#rule-based-attribute-type-selector) 中指定的所有地址都會進行相似性審核，包括 Address、BusinessAddress、MaillingAddress 和 ShippingAddress
+ **Address.Country**：[屬性類型選擇器](#rule-based-attribute-type-selector) 中指定的所有地址都會進行相似性審核，包括 Address、BusinessAddress、MaillingAddress 和 ShippingAddress
+ **Address.County**：[屬性類型選擇器](#rule-based-attribute-type-selector) 中指定的所有地址都會進行相似性審核，包括 Address、BusinessAddress、MaillingAddress 和 ShippingAddress
+ **Address.PostalCode**：[屬性類型選擇器](#rule-based-attribute-type-selector) 中指定的所有地址都會進行相似性審核，包括 Address、BusinessAddress、MaillingAddress 和 ShippingAddress
+ **Address.State**：[屬性類型選擇器](#rule-based-attribute-type-selector) 中指定的所有地址都會進行相似性審核，包括 Address、BusinessAddress、MaillingAddress 和 ShippingAddress
+ **Address.Province**：[屬性類型選擇器](#rule-based-attribute-type-selector) 中指定的所有地址都會進行相似性審核，包括 Address、BusinessAddress、MaillingAddress 和 ShippingAddress
+ **PhoneNumber**：[屬性類型選擇器](#rule-based-attribute-type-selector) 中指定的電話號碼會進行相似性審核，包括 PhoneNumber、HomePhoneNumber 和 MobilePhoneNumber。
+ **EmailAddress**：[屬性類型選擇器](#rule-based-attribute-type-selector) 中指定的所有電子郵件地址都會進行相似性審核，包括 EmailAddress、BusinessEmailAddress 和 PersonalEmailAddress
+ **BirthDate**
+ **BusinessName**
+ **FirstName**
+ **LastName**
+ **MiddleName**
+ **Gender**
+ **任何具有 *Attributes* 字首的自訂設定檔屬性**

比對規則會依據優先順序處理。例如，第一個規則應該是您要定義的最佳化規則，應該用於獲得最準確的結果。

### 屬性類型選擇器
<a name="rule-based-attribute-type-selector"></a>

屬性類型選擇器會保留重要的組態資訊，供規則型身分解析使用，以便利設定檔比對。這可讓您微調跨屬性類型的設定檔比較，並選擇要在每個類型中比對的關鍵屬性。在此功能中，您可以靈活地設定三種不同的屬性類型，從而精確控制比對過程。
+ **電子郵件類型**
  + 您可以從 EmailAddress、BusinessEmailAddress 和 PersonalEmailAddress 中選擇
+ **PhoneNumber 類型**
  + 您可以從 PhoneNumberNumber、HomePhoneNumber 和 MobilePhoneNumber 中選擇
+ **Address 類型**
  + 您可以從 Address、BusinessAddress、MaillingAddress 和 ShippingAddress 中選擇

您可以選擇 `ONE_TO_ONE` 或 `MANY_TO_MANY` 作為 AttributeMatchingModel。選擇 `MANY_TO_MANY` 時，系統可以跨屬性類型的子類型比對屬性。例如，如果設定檔 A 的 EmailAddress 欄位的值與設定檔 B 的 BusinessEmailAddress 欄位的值相符，就會依據 EmailAddress 類型比對這兩個設定檔。選擇 `ONE_TO_ONE` 時，系統只有在子類型完全相符時匹配。例如，只有當設定檔 A 的 EmailAddress 欄位值與設定檔 B 的 EmailAddress 欄位值相符時，才會依據 EmailAddress 類型比對這兩個設定檔。

**比對允許的最大規則層級**

您可以設定用來比對類似設定檔的最大規則層級。例如，如果您允許的比對規則層級上限為 5，則系統將找不到使用規則層級 6 的類似設定檔。

### 匹配群組
<a name="rule-based-match-groups"></a>

相符群組由代表同一客戶的所有類似設定檔組成。每個匹配群組都包含以下資訊：
+ 相符 ID，可唯一識別代表同一聯絡人的兩個或多個類似設定檔的群組
+ 相符群組中的設定檔 ID 數

### 相符狀態
<a name="rule-based-match-status"></a>
+ **待定**

  規則型比對規則組態之後的第一個狀態。如果它是現有的網域，則規則型身分解析方案會等待 1 小時，然後再建立比對規則。如果是新網域，系統將跳過 **PENDING** 階段。
+ **IN\$1PROGRESS**

  系統正在建立規則型比對規則。在此狀態下，系統正在評估現有資料，您無法再變更規則型比對組態。
+ **ACTIVE**

  規則已做好使用準備。您可以在狀態處於 **ACTIVE** 狀態一天之後變更規則。

### 自動比對程序的運作方式
<a name="rule-based-how-auto-matching-works"></a>

使用規則型比對規則建立新的 Amazon Connect Customer Profiles 網域後，規則型身分解析將根據您在擷取設定檔時指定的規則來比對類似的設定檔。如果您更新規則型比對組態，Customer Profiles 將在一小時內開始使用新設定重新評估您網域中的設定檔。

如果您要啟用現有網域的規則型比對，系統會進入 **PENDING** 狀態，並在一小時內開始使用新的組態評估網域中的現有設定檔。完成評估設定檔所需的時間取決於存在的設定檔數目。
+ **依據預設，如果未指定自訂規則，則會套用預設規則。**
  + 如果您未提供自訂比對規則，Amazon Connect Customer Profiles 會提供預設的比對規則。您可以在此處查看自訂比對規則。
+ **所有記錄都將實施規則型比對規則。**
  + 系統會評估每個比對規則層級，直到找到相符項目或達到允許的比對規則層級上限為止。評估程序會從規則層級 1 開始，其中會分析記錄。如果找不到相符群組，系統會繼續評估後續的規則層級，搜尋相符群組，直到找到相符項目或達到允許比對的規則層級上限為止。
+ **單一比對規則層級中的所有屬性都會使用 *AND* 關係來連接**
  + 當單一規則層級中存在多個屬性時，這些屬性會由 AND 關係互連。在設定檔比對期間，所有屬性值都必須相符，才能將設定檔指派給相同的相符群組。例如，只有當所有屬性的值相同時，設定檔才會被視為相符並分組在一起，以供進一步處理。
+ **屬性類型選擇器中的所有屬性均以 *OR* 關係連接**
  + 在屬性類型選擇器中指定屬性時，相同類型的屬性會透過 OR 關係來連結。例如，考慮使用 HomePhoneNumber 和 BusinessPhoneNumber 的 PhoneNumber 類型。在這種情況下，如果兩個設定檔的 HomePhoneNumber 或 BusinessPhoneNumber 相同，則它們是相符的。因此，比對過程允許根據家庭或公司電話號碼進行靈活的比對。
+ **比對結果最終會進行最佳化。**
  + 由於系統中的設定檔比對性質近乎即時，您的設定檔的相符群組可能會出現在較低 (最佳化程度較低) 的規則層級。不過，如果在較高 (最佳化程度較高) 的規則層級可找到相符項目，則系統會將設定檔指派給該特定群組。

**注意**  
身分解析執行規則型比對時，您已設定的規則的處理順序，取決於擷取資料的方式。例如，如果您設定規則 1 和 2，則規則 2 可能會在規則 1 之前處理。處理順序可能會改變，但最終結果將永遠是相同的。

## 自動合併類似的設定檔
<a name="rule-based-automatic-merging-similar-profiles"></a>

比對設定檔之後，身分解析任務可以根據您在規則型比對組態中指定的 [MaxAllowedRuleLevelForMerging](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_RuleBasedMatchingRequest.html)，選擇性地合併類似的設定檔。

**重要**  
您無法復原合併程序。建議您僅先開啟比對，以使用 ListMatches 和 GetSimiliarProfiles API 評估比對結果。您可以使用 [UpdateDomain](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_UpdateDomain.html) API 設定 [MaxAllowedRuleLevelForMerging](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_RuleBasedMatchingRequest.html)，以開啟合併功能。

**注意**  
合併兩個設定檔時，透過 API 呼叫或客服人員工作區手動填入的設定檔欄位不會被整合或自訂物件類型映射自動擷取的設定檔欄位覆寫。  
例如，假設客服人員在客服人員工作區中使用「John」這個名字手動建立一個設定檔。再使用名字為「Peter」的 S3 整合來建立另一個設定檔。如果這些設定檔自動合併，則會保留名字「John」。

# 設定 Amazon Connect 中的身分解析規則式匹配流程
<a name="setup-rule-based-matching"></a>



本主題提供說明演練，說明您用來編輯規則式匹配流程屬性類型、規則、合併規則和位置的步驟。其中也說明如何重設規則式匹配流程規則。

## 編輯規則式匹配流程屬性類型
<a name="rule-based-matching-edit-attributes"></a>

![\[編輯規則式匹配流程屬性類型。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/rule-based-edit-attribute-types.png)


## 編輯規則式匹配流程規則
<a name="rule-based-matching-edit-rules"></a>

![\[編輯規則式匹配流程規則。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/rule-based-edit-matching-rules.png)


## 重設規則式匹配流程規則
<a name="rule-based-matching-reset-rules"></a>

![\[重設規則式匹配流程規則。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/rule-based-edit-reset-rules.png)


## 編輯規則式匹配流程合併規則
<a name="rule-based-matching-edit-merge-rules"></a>

![\[編輯規則式匹配流程合併規則\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/rule-based-edit-merge-rules.png)


## 編輯規則式匹配流程位置
<a name="rule-based-matching-edit-match-location"></a>

![\[編輯規則式匹配流程位置。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/rule-based-match-location.png)


# 設定 Amazon Connect 中的規則型身分解析的比對規則
<a name="setup-matching-rule-examples"></a>

## 限制
<a name="setup-matching-rule-example-limits"></a>

您可以從標準設定檔中選擇任何屬性來比較類似的設定檔。例如，您可以選擇電話號碼、電子郵件地址和姓名，以及自訂屬性。

您可以使用下列限制來建立規則式匹配流程規則：
+ 15 個規則層級
+ 每個規則層級最多可以包含 15 個設定檔屬性

## 提示
<a name="setup-matching-rule-example-tips"></a>

若要改善對唯一設定檔的鎖定，並避免合併非重複的設定檔，建議使用下列秘訣：
+ 納入至少一個可唯一識別客戶，且客戶之間不太可能相同的高基數屬性，例如電話號碼、電子郵件地址或帳號。
+ 如果設定檔屬性可能屬於不具高基數屬性的不同身分，請避免使用。
  + 帶有**名字**、**姓氏**的**電話號碼**，相較於只有**名字**、**姓氏**的組合而言是更強大的規則。
+ 如果在一個規則層級中，該規則的所有設定檔屬性都是低基數屬性 (可能屬於超過 500 個不同設定檔的屬性)，則 Customer Profiles 不會嘗試比對設定檔。如果您在網域建立期間設定規則，您的 DLQ 將會收到下列 SQS 訊息：
  + 規則層級 x 的所有屬性都與 500 筆以上的記錄關聯。
+ 始終先啟用 **僅限相符**，檢查相符結果，如果您滿意相符結果，則僅透過設定 **MaxAllowedRuleLevelForMerging** 來啟用合併。

## 解決設定檔合併中的設定檔衝突
<a name="setup-matching-rule-example-resolve-conflicts"></a>

您可以定義當來自兩個或多個類似設定檔的屬性值不同 (例如位址記錄衝突) 時使用哪個記錄。

**上次更新時間戳記**

依據預設，設定檔衝突由時近來管理。當兩個或兩個以上的類似設定檔的值之間發生衝突時，將會選擇最近更新的屬性。

**具有上次更新時間戳記的來源**

可讓您將特定物件類型的記錄排定為資料來源的優先順序，以管理設定檔衝突。當兩個或兩個以上類似的設定檔的值發生衝突時，會從指定的物件類型中選擇最近更新的屬性。

如果您的物件類型中未指定時間戳記，則會使用記錄擷取至客戶設定檔的日期。如果您未設定任何整合，則無法使用具有上次更新時間戳記的來源。當您新增整合時，您的物件類型將可作為此選項的來源使用。

## 設定檔衝突缺少時間戳記
<a name="setup-matching-rule-example-missing-timestamp-for-profile-conflicts"></a>

如果您有自訂物件類型對映，則會顯示「缺少時間戳記」訊息。

使用 [PutProfileObjectType](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_PutProfileObjectType.html) API，將下列新屬性新增至您的自訂物件類型：
+ `Fields.sourceLastUpdatedTimestamp`
+ `sourceLastUpdatedTimestampFormat`

如果未指定時間戳記屬性，您可以繼續建立合併條件，不過，系統會使用記錄擷取至客戶設定檔時的預設時間戳記。建議您在建立合併條件之前新增屬性。

如果您已經定義了自訂物件類型，並且想要更新您的自訂物件類型，我們每週都會使用 `Fields.sourceLastUpdatedTimestamp` 來執行排程回填。若要選擇加入排定的回填，請執行下列步驟：

1. 使用 [PutProfileObjectType](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_PutProfileObjectType.html) API 更新您的自訂設定檔物件類型。

1. 更新自訂設定檔物件類型後，請開立 [AWS Support 票證](https://console.aws.amazon.com/support/home)。

1. AWS 將代表您排程回填。排定的回填會執行至 2022 年 2 月底。

或者，您可以刪除，然後為您的網域 (使用自訂物件類型) 重新建立擷取/連接器。您的所有資料都將使用更新的物件類型重新導入，並將從其中解析出 `Fields.sourceLastUpdatedTimestamp`。

## 範例：比對的運作方式
<a name="setup-matching-rule-example-how-matching-works"></a>

### ONE\$1TO\$1ONE 的範例
<a name="setup-matching-rule-example-one-to-one"></a>

您可以選擇 `ONE_TO_ONE` 作為 `AttributeMatchingModel`。選擇 `ONE_TO_ONE` 時，系統只有在子類型完全相符時匹配。

**例如**：

您正在使用 `EmailAddress` 和 `BusinessEmailAddress` 來表示 `EmailAddress` 類型。`AttributeMatchingModel` 為 `ONE_TO_ONE`。

**您的比對規則為**：

```
Rule Level 1: EmailAddress, LastName, FirstName
Rule Level 2: AccountNumber
```

```
Profile A:
EmailAddress: 1@email.com
BusinessEmailAddress: john@company.com
LastName: Doe
FirstName: John
AccountNumber: account1234
```

```
Profile B:
EmailAddress: 2@email.com
BusinessEmailAddress: john@company.com
LastName: Doe
FirstName: John
AccountNumber: account1234
```

設定檔 A 和設定檔 B 在規則層級 1 相符，因為 `EmailAddress` 類型、`LastName` 和 `FirstName` 相符。

### MANY\$1TO\$1MANY 的範例
<a name="setup-matching-rule-example-many-to-many"></a>

您可以選擇 `MANY_TO_MANY` 作為 `AttributeMatchingModel`。選擇 `MANY_TO_MANY` 時，系統可以跨屬性類型的子類型比對屬性。

**例如**：

您正在使用 `EmailAddress` 和 `BusinessEmailAddress` 來表示 `EmailAddress` 類型。`AttributeMatchingModel` 為 `MANY_TO_MANY`。

**您的比對規則為**：

```
Rule Level 1: EmailAddress, LastName, FirstName
Rule Level 2: AccountNumber
```

```
Profile A:
EmailAddress: 1@email.com  (match with Profile B’s BusinessEmailAddress)
BusinessEmailAddress: john@company.com
LastName: Doe
FirstName: John
AccountNumber: account1234
```

```
Profile B:
EmailAddress: 2@email.com
BusinessEmailAddress: 1@email.com (match with Profile A's EmailAddress)
LastName: Doe
FirstName: John
AccountNumber: account1234
```

設定檔 A 和設定檔 B 在規則層級 1 相符，因為 `EmailAddress` 類型、`LastName` 和 `FirstName` 相符。

# 在 Amazon Connect Customer Profiles 中檢視身分解析指標
<a name="identity-resolution-metrics"></a>

每當身分解析比對或合併設定檔時，有關程序的指標都會顯示在客戶設定檔儀表板上。您可以在**身分解析**摘要頁面上檢閱過去一週的指標。

每次執行身分解析任務時，會產生下列指標：
+ **找到的相符群組**：找到的相符群組數目。
  + 適用於以 ML 為基礎和規則型身分解析。
+ **合併的設定檔**：合併的設定檔數目。
  + 適用於以 ML 為基礎和規則型身分解析。
+ **依規則相符群組**：每個規則層級所建立的相符群組數目。
  + 僅適用於規則型身分解析。

![\[Amazon Connect Customer Profiles 頁面，啟用身分解析按鈕。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/ir-metrics-example-1.png)


![\[Amazon Connect Customer Profiles 頁面，啟用身分解析按鈕。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-enable-ir.png)


# 在 Amazon Connect Customer Profiles 中停用身分解析
<a name="disable-identity-resolution"></a>

## 停用機器學習型
<a name="disable-identity-resolution-ml"></a>

當您不再希望自動尋找類似的設定檔時，您可以停用機器學習型比對。如果您有合併條件，您的所有條件都將被刪除，並且您的設定檔將不再自動合併。已合併的設定檔將保持合併狀態。

## 停用規則式匹配流程
<a name="disable-identity-resolution-rb"></a>

當您不想再自動尋找類似的設定檔時，您可以停用規則式匹配流程。如果您有自訂比對規則，您的比對規則將被刪除，且您的設定檔將不再自動合併。已合併的設定檔將保持合併狀態。

# 使用 AWS 實體解析進行解析
<a name="entity-resolution"></a>

 Amazon Connect Customer Profiles 提供*受管連接器*，可讓您直接從 AWS 實體解析匯入相符的結果。此整合可讓您利用 AWS Entity Resolution 強大的比對功能，同時在 Amazon Connect 中維護您的客戶設定檔。

 AWS Entity Resolution 使用靈活的比對技術，包括規則、機器學習或第三方資料提供者，協助您比對和連結各種資料來源的相關記錄。透過將實體解析結果連接到客戶設定檔，您可以：
+ 更準確地整合來自多個系統的客戶記錄
+ 根據您的特定業務需求套用複雜的比對邏輯
+ 使用來自各種應用程式和頻道的連結資料增強客戶設定檔
+ 在整個組織中維持一致的客戶檢視

 若要開始搭配客戶設定檔使用 AWS 實體解析，您必須先在 AWS 實體解析主控台中設定相符的工作流程。[進一步了解 AWS 實體解析](https://docs.aws.amazon.com/entityresolution/latest/userguide/create-matching-workflow.html)。

 若要設定此項目，您需要下列先決條件：
+ 啟用客戶設定檔的作用中 Amazon Connect 執行個體
+ 存放在 Amazon S3 中的客戶資料
+ 存取 AWS 實體解析的適當 IAM 許可

**若要設定 ，請依照下列步驟進行：**

1. 建立客戶設定檔網域
   + 如果您尚未建立客戶設定檔網域，請在 Connect 執行個體中建立
   + 導覽至 Amazon Connect 主控台中的客戶設定檔區段
   + 注意：建立網域後，您會看到 AWS 實體解析的新區段

1. 設定 AWS 實體解析
   + 在您的客戶設定檔網域中，找到 AWS 實體解析區段
   + 按一下「設定 AWS 實體解析」
   + 系統會將您重新導向至 AWS 實體解析主控台。
     + 建立相符的工作流程
     + 設定 S3 資料來源
     + 定義相符條件
     + 檢閱並啟用相符的工作流程

1. 將實體解析結果連接至客戶設定檔
   + 返回您的客戶設定檔網域
   + 選取您的實體解析工作流程
   + 設定如何合併相符的記錄
   + 啟用整合

# 將外部應用程式與 Amazon Connect Customer Profiles 整合
<a name="integrate-external-apps-customer-profiles"></a>

Amazon Connect 提供了一組由 Amazon AppFlow 和 Amazon EventBridge 支援的預建置整合。啟用 Amazon Connect Customer Profiles 後，您可以使用這些整合功能將來自外部應用程式 (例如 Salesforce 或 Zendesk) 的資訊與 Amazon Connect 的聯絡歷史記錄合併在一起。這樣會在單一位置建立一個客戶設定檔，其中包含客戶互動過程中客服人員需要的一切資訊。

您也可以在 Amazon AppFlow 中使用客戶設定檔。Amazon AppFlow 支援 `CustomerProfiles` 作為目的地。您可以使用 Amazon AppFlow API，並使用 `CustomerProfiles` 作為目的地名稱，將資料傳送至客戶設定檔。

開始之前，請確定您使用的是客戶託管金鑰。如需設定 KMS 金鑰的詳細資訊，請參閱 [建立 KMS 金鑰，供客戶設定檔用於加密資料 (必要)](enable-customer-profiles.md#enable-customer-profiles-awsmanagedkey)。

## 設定整合
<a name="setup-integrations-title-menu"></a>

您可以在下方選擇最適合您使用案例的方法，使用 Amazon Connect 中的特色應用程式或使用 Amazon AppFlow 的外部應用程式來設定整合。如需 ServiceNow 和 Slack 整合的詳細資訊，請參閱部落格文章 [Combine data from multiple sources using Amazon AppFlow and build a unified Amazon Connect Customer profile for contact center agents](https://aws.amazon.com/blogs/contact-center/unified-customer-data/)。

**Topics**
+ [設定整合](#setup-integrations-title-menu)
+ [在 Amazon Connect 中為特色應用程式設定整合](integrate-customer-profiles-appflow.md)
+ [使用 Amazon AppFlow 為外部應用程式設定整合](integrate-external-applications-appflow.md)
+ [刪除客戶設定檔或停止整合](delete-customer-profile-connection.md)

# 在 Amazon Connect 中為特色應用程式設定整合
<a name="integrate-customer-profiles-appflow"></a>

這些整合使用 Amazon Connect 特色應用程式，為 Amazon Connect Customer Profiles 提供定期更新。

## 開始之前
<a name="before-you-begin-cp-integration"></a>

### 大量擷取資料
<a name="bulk-ingestion"></a>

設定整合時，系統會提示您輸入要擷取多久以前日期的資料。如果您選擇的日期超過兩個月，Customer Profiles 會建立多個流程來自動啟用大量擷取。如此一來，您就不必計算擷取資料需要多少流程。

啟用自動大量擷取時，Customer Profiles 會執行下列動作：
+ 將批次大小設定為兩個月。
+ 在失敗之前，最多可重試三次暫時性故障。

您可以使用 [CreateIntegrationWorkflowRequest](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/CreateIntegrationWorkflowRequest .html) API 來呼叫您自己的批次大小。

### 為什麼要求我選擇或建立 IAM 角色？
<a name="why-create-iam-role"></a>

對於 Salesforce、Marketo 和 ServiceNow，Customer Profiles 可使用您的 IAM 角色建立多個工作流程，以快速有效率地擷取資料，協助改善這些來源的歷史擷取。

 對於這些來源，如果您在 **匯入記錄的日期** 日期選擇器中選擇超過 60 天的時間，系統會提示您建立新的 IAM 角色或選擇現有的 IAM 角色。此角色可讓客戶設定檔管理您的整合。它為客戶設定檔提供必要的權限，以便更新和建立工作流程以擷取您的資料。工作流程完成後，Customer Profiles 會建立標準的持續整合，以便來源中更新資料時擷取新資料。

在主控台中建立的角色只能由建立該角色的網域使用。這是因為 Amazon Connect 將角色的存取權限制為僅限該網域使用的 KMS 金鑰。

如需詳細資訊，請參閱[授予客戶設定檔執行角色最低權限存取權](#grant-least-privilege-cp)。

## 授予客戶設定檔執行角色最低權限存取權
<a name="grant-least-privilege-cp"></a>

如果您想要建立自己的 IAM 角色，建議您使用下列程式碼中顯示的權限，將角色限制為所需的最低權限。使用下面的程式碼片段手動建立您的角色。使用您自己的 KMS 金鑰，並在需要時指定您的區域。

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Condition": {
                "ForAnyValue:StringEquals": {
                    "aws:RequestTag/awsOwningService": "customer-profiles-integration-workflow"
                }
            },
            "Action": [
                "appflow:CreateFlow",
                "appflow:TagResource",
                "profile:TagResource",
                "profile:PutIntegration"
            ],
            "Resource": "*",
            "Effect": "Allow",
            "Sid": "CreateFlowResources"
        },
        {
            "Action": [
                "appflow:UseConnectorProfile"
            ],
            "Resource": "*",
            "Effect": "Allow",
            "Sid": "UseConnectorResources"
        },
        {
            "Condition": {
                "ForAnyValue:StringEquals": {
                    "aws:ResourceTag/awsOwningService": "customer-profiles-integration-workflow"
                }
            },
            "Action": [
                "appflow:DescribeFlow",
                "appflow:DescribeFlowExecutionRecords",
                "appflow:DeleteFlow",
                "appflow:StartFlow",
                "appflow:StopFlow",
                "appflow:UpdateFlow",
                "profile:DeleteIntegration"
            ],
            "Resource": "*",
            "Effect": "Allow",
            "Sid": "AccessFlowResources"
        },
        {
            "Action": [
                "kms:CreateGrant",
                "kms:ListGrants"
            ],
            "Resource": [
            "arn:aws:kms:us-east-1:111122223333:key/KeyId"
            ],
            "Condition": {
                "StringEquals": {
                    "kms:ViaService": [
                      "appflow.us-east-1.amazonaws.com"
                    ]
                }
            },
            "Effect": "Allow",
            "Sid": "KMSAppflow"
        },
        {
            "Action": [
                "kms:CreateGrant"
            ],
            "Resource": [
              "arn:aws:kms:us-east-1:111122223333:key/KeyId"
            ],
            "Condition": {
                "StringEquals": {
                    "kms:ViaService": [
                      "profile.us-east-1.amazonaws.com"
                    ]
                },
                "ForAllValues:StringEquals": {
                    "kms:GrantOperations": [
                        "Decrypt"
                    ]
                }
            },
            "Effect": "Allow",
            "Sid": "KMSCustomerProfiles"
        }
    ]
}
```

------

## 監控您的客戶設定檔整合
<a name="monitor-customer-profile-connection"></a>

建立連線後，如果停止運作，請刪除該整合，然後重新建立整合。

## 如果物件沒有傳送該怎麼辦
<a name="fix-customer-profile-connection"></a>

如果物件無法傳送，請選擇 **流程詳細資訊**，進一步了解發生錯誤的原因。

您可能需要刪除組態並重新連線至外部應用程式。

# 設定 Amazon Connect Cases 的整合
<a name="set-up-integration-for-amazon-connect-cases"></a>

若要更新 Amazon Connect Customer Profiles 中的 Amazon Connect 案例資料並使用計算屬性等功能，您可以使用 Amazon AppIntegrations 進行整合。首先設定 Cases 事件串流，將系統欄位傳送至 EventBridge 匯流排，然後使用 Amazon AppIntegrations 將這些事件轉送至 Customer Profiles。

## 將資料從 Amazon Connect Cases 串流至 Event Bridge
<a name="stream-data-from-connect-cases-to-event-bridge"></a>

1. 在 [https://console.aws.amazon.com/connect/](https://console.aws.amazon.com/connect/) 開啟 Amazon Connect 主控台。

1.  在執行個體頁面上，選擇執行個體別名。執行個體別名也是您的**執行個體名稱**，它會出現在您的 Amazon Connect URL 中。下圖顯示 **Amazon Connect 虛擬聯絡中心執行個體**頁面，其中包含執行個體別名周圍的方塊。

![\[執行個體的別名。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/stream-data-from-connect-cases-to-event-bridge-1.png)


1.  在導覽窗格中選擇 **Cases**，並記下**網域詳細資訊**區段中的 Cases 網域 ID。

![\[Cases 頁面、網域詳細資訊區段、指向網域 ID 的箭頭。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/stream-data-from-connect-cases-to-event-bridge-2.png)


1.  使用 AWS CLI建立案例事件組態，將 Amazon Connect Cases Events 傳送至 AWS 帳戶您預設的 Event Bridge 匯流排。

```
// set up Case Event Configuration including all system fields
aws connectcases put-case-event-configuration --domain-id <YOUR_CASES_DOMAIN_ID> --region <YOUR_AWS_REGION> --event-bridge "{                     
    \"enabled\": true,
    \"includedData\": {
       \"caseData\": {
          \"fields\": [
          {
          \"id\": \"status\"
          },
          {
          \"id\": \"title\"
          },
          {
          \"id\": \"summary\"
          },
          {
          \"id\": \"reference_number\"
          },
          {
          \"id\": \"created_datetime\"
          },
          {
          \"id\": \"last_updated_datetime\"
          },
          {
          \"id\": \"last_closed_datetime\"
          },      
          {
          \"id\": \"customer_id\"
          }
        ]
      }
    }
  }"
```

1.  開啟您 AWS 區域的 Event Bridge 主控台。例如，[https://us-west-2.console.aws.amazon.com/events/home?region=us-west-2\$1/eventbuses](https://us-west-2.console.aws.amazon.com/events/home?region=us-west-2#/eventbuses) 

1.  選擇**建立事件匯流排**。

![\[Amazon EventBridge 主控台的事件匯流排頁面，建立事件匯流排按鈕。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/stream-data-from-connect-cases-to-event-bridge-3.png)


1.  建立名為 `connect-cases-to-customer-profiles` 的事件匯流排。

![\[建立事件匯流排頁面，名稱方塊。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/stream-data-from-connect-cases-to-event-bridge-4.png)


1.  返回您的**預設事件匯流排**，並建立名為 `connect-cases-to-customer-profiles-rule` 的規則。

![\[預設事件匯流排，建立規則按鈕。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/stream-data-from-connect-cases-to-event-bridge-5.png)


![\[建置事件模式步驟。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/stream-data-from-connect-cases-to-event-bridge-6.png)

+  事件模式程式碼片段：

```
{
  "source": ["aws.cases"],
  "detail": {
    "eventType": ["CASE.UPDATED", "CASE.CREATED", "CASE.DELETED"]
  }
}
```

![\[建立方法區段、自訂模式 (JSON 編輯器) 選項、事件模式程式碼。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/stream-data-from-connect-cases-to-event-bridge-7.png)

+  選擇**跳至檢閱和建立**，然後選擇**建立規則**。

![\[跳至檢閱和建立按鈕。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/stream-data-from-connect-cases-to-event-bridge-8.png)


## 使用 AppIntegrations，將 Event Bridge 案例資料擷取至 Customer Profiles
<a name="ingest-event-bridge-case-data-to-customer-profiles-via-appintegrations"></a>

1.  使用 AWS CLI建立與 AppIntegrations 的事件整合，並記錄 ARN 輸出。  這表示 Amazon Connect 執行個體可以使用的來源資料。

```
aws appintegrations create-event-integration --region
    <YOUR_REGION> --name Connect-Cases-Event-Integration
    --event-bridge-bus connect-cases-to-customer-profiles --event-filter
    "{\"Source\": \"aws.cases\" }"
    --description "Event Integration for Cases Event Bus"
```

1.  使用 AWS CLI，使用 put-integration API 建立與客戶設定檔的整合。這動作將開始流向 Customer Profiles 的資料流，將預留位置值取代為您的事件整合 ARN 和 Customer Profile 網域名稱。

```
aws customer-profiles put-integration --region
    <YOUR_REGION> --domain-name <YOUR_CP_DOMAIN_NAME> 
    --uri <YOUR_EVENT_INTEGRATION_ARN> --object-type-name Connect-case
```

## 確認您的 Cases 整合
<a name="verify-your-cases-integration"></a>

1.  在 Amazon Connect Cases 中建立案例。

1.  事件傳送應該幾乎是即時的，但需要一分鐘的時間才能交付並與客戶設定檔建立關聯。

1.  使用 AWS CLI，在設定檔下尋找 Connect-case 物件，以正確的值取代預留位置。

```
aws customer-profiles list-profile-objects --domain-name
    <YOUR_CP_DOMAIN_NAME> --region <YOUR_REGION> 
    --object-type-name Connect-case --profile-id <YOUR_PROFILE_ID>
```

1.  如果您在上述 API 呼叫的回應中找不到項目，則表示您的整合出現問題。若要疑難排解：

   1.  前往 Amazon EventBridge 主控台。

   1.  請檢查 EventSource 是否處於作用中狀態，以及相符的 EventBus 是否存在且正在執行。

   1.  檢查是否正確設定您的案例事件組態。

   1.  如果這些項目有效，請聯絡 支援 以取得調查問題的協助。

# 設定 Amazon Connect 與 Salesforce、ServiceNow、Marketo 或 Zendesk 的整合
<a name="steps-integrate-cp-salesforce-servicenow"></a>

若要定期更新 Amazon Connect Customer Profiles，您可以使用 Amazon AppFlow 與 Salesforce、ServiceNow、Marketo 或 Zendesk 整合。您首先在 Amazon Connect 和您選擇的應用程式中設定連線，然後驗證整合。

## 在 Amazon Connect 和 Salesforce、ServiceNow、Marketo 或 Zendesk 中設定連線
<a name="setup-connection-segment"></a>

1. 在 [https://console.aws.amazon.com/connect/](https://console.aws.amazon.com/connect/) 開啟 Amazon Connect 主控台。

1. 在執行個體頁面上，選擇執行個體別名。執行個體別名也是您的**執行個體名稱**，它會出現在您的 Amazon Connect URL 中。下圖顯示 **Amazon Connect 虛擬聯絡中心執行個體**頁面，其中包含執行個體別名周圍的方塊。  
![\[Amazon Connect 虛擬聯絡中心執行個體頁面，即執行個體別名。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/instance.png)

1. 在導覽窗格中，選擇**客戶設定檔**。

1. 在 **客戶設定檔組態** 頁面上，選擇 **新增整合**，如下圖所示。  
![\[「客戶設定檔組態」頁面，「新增整合」按鈕。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-enable-addintegration.png)

1. 在 **選擇資料來源** 頁面上，選擇要從哪個外部應用程式取得客戶設定檔資料。您可以檢視[整合需求](https://docs.aws.amazon.com/appflow/latest/userguide/requirements.html)，進一步了解應用程式所需的連線需求。  
![\[「選擇資料來源」頁面。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-cp-salesforce-source.png)

1. 在 **建立連線** 頁面上，選擇下列其中一項：
   + **使用現有連線**：這可讓您重複使用在 AWS 帳戶中建立的現有 Amazon AppFlow 資源。
   + **建立新連線**：輸入外部應用程式所需的資訊。  
![\[「建立連線」頁面。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-enable-establish-connection.png)

1. 在 **整合選項** 頁面上，選擇要內嵌的來源物件，然後選擇其物件類型。

   物件類型會儲存您擷取的資料。它們也會定義整合中的物件被擷取時如何映射至設定檔。Customer Profiles 提供預設物件型態範本，您可以使用此範本來定義來源物件中的屬性如何映射到客戶設定檔中的標準物件。您也可以使用從 [PutProfileObjectType](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_PutProfileObjectType.html) 建立的物件對映。為使用者建立的資料對映新增或建立 Salesforce 整合時，您需要指定特定的資料對映，否則會針對物件類型選擇 Salesforce 預設資料對映。您可以建立資料對映，並在設定特色資料連接器時使用它。  
![\[「整合選項」頁面。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-integration-options.png)

1. 對於 **擷取開始日期**，Customer Profiles 會開始擷取在此日期之後建立的記錄。依據預設，匯入記錄的日期設定為 30 天前。

1. 在 **檢閱與整合** 頁面上，檢查 **連線狀態** 是否顯示 **已連線**，然後選擇 **建立整合**。  
![\[「檢閱與整合」頁面。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-enable-review-and-integrate.png)

1. 設定整合之後，請返回**客戶設定檔組態**頁面，選擇**檢視物件**，以查看正在批次處理和傳送的資料。目前，此程序會擷取過去 30 天內建立或修改的記錄。  
![\[「客戶設定檔組態」頁面。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-enable-objects.png)

# 設定 Segment 的整合，以定期更新 Amazon Connect Customer Profiles
<a name="integrate-customer-profiles-segment"></a>

若要定期更新 Amazon Connect Customer Profiles，您可以使用 Amazon AppFlow 與 Segment 進行整合。您首先在 Amazon Connect 和 Segment 中設定連線，然後驗證 Segment 整合。

## 在 Amazon Connect 和 Segment 中設定連線
<a name="setup-connection-segment"></a>

1. 在 [https://console.aws.amazon.com/connect/](https://console.aws.amazon.com/connect/) 開啟 Amazon Connect 主控台。

1. 在執行個體頁面上，選擇執行個體別名。執行個體別名也是您的**執行個體名稱**，它會出現在您的 Amazon Connect URL 中。下圖顯示 **Amazon Connect 虛擬聯絡中心執行個體**頁面，其中包含執行個體別名周圍的方塊。  
![\[Amazon Connect 虛擬聯絡中心執行個體頁面，即執行個體別名。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/instance.png)

1. 在導覽窗格中，選擇**客戶設定檔**。

1. 在 **客戶設定檔組態** 頁面上，選擇 **新增整合**。  
![\[「客戶設定檔組態」頁面，「新增整合」按鈕。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-enable-addintegration.png)

1. 在 **選擇資料來源** 頁面上，選擇 **區段**。檢閱 **選擇應用程式** 頁面上列出的應用程式需求。  
![\[「選擇資料來源」頁面。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-cp-segment-source.png)

1. 在 **建立連線** 頁面上，選擇下列其中一項：
   + **使用現有連線**：這可讓您重複使用您可能已在 中建立的現有 Amazon EventBridge 資源 AWS 帳戶。
   + **建立新連線**：輸入外部應用程式所需的資訊。  
![\[「建立連線」頁面。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-enable-segment-establish-connection.png)
     + **連線名稱**：提供您連線的名稱。使用此連線的整合會參考連線名稱。
     + **連線 URL**：輸入您的應用程式連線 URL。此 URL 用於深層連結到外部應用程式中建立的物件。連線 URL 是應用程式網站上提供的 Segment 工作區 URL。

       若要尋找您的工作區 URL：

       1. 登入您的 segment.com 帳戶。

       1. 前往**設置**，**一般設定**。

       1. 從瀏覽器複製 URL。

1. Customer Profiles 使用 Amazon EventBridge 與 Segment 進行整合。在**來源設定**頁面上，將您的 AWS 帳戶 ID 複製到剪貼簿，然後選擇**登入客群**來設定 Amazon EventBridge。

1. 請使用下列指示來設定 Segment：

   1. 登入 Segment。

   1. 在您的應用程式中，選擇一個來源，將目的地設定為 Amazon EventBridge。

   1. 貼上您的 AWS 帳戶 ID 並選取您的 AWS 區域。

   1. 切換 **開啟** 以啟用您的合作夥伴事件來源。

1. 前往 **事件測試儀**，並傳送測試事件以完成啟動您的合作夥伴事件源。

1. **用戶端 ID**：這是一個字串，用於唯一區分外部應用程式中的客戶端。此用戶端 ID 是應用程式網站上提供的來源名稱。您可以使用指定的 ID 來識別您希望客戶設定檔從中擷取物件的用戶端。

   尋找您的來源 ID：

   1. 前往 **資源**，然後選擇一個來源。

   1. 前往 **設定**，**API 金鑰**。

   1. 複製您的 **來源 ID**。

   設定事件來源目的地後，請返回客戶設定檔主控台並貼上用戶端 ID。

1. 您將看到一個警報，指示 Amazon Connect 已成功與 Segment 連線。

1. 在 **整合選項** 頁面上，選擇要內嵌的來源物件，然後選擇其物件類型。

   物件類型會儲存您擷取的資料。它們也會定義整合中的物件被擷取時如何映射至設定檔。Customer Profiles 提供預設物件型態範本，您可以使用此範本來定義來源物件中的屬性如何映射到客戶設定檔中的標準物件。您也可以使用從 [PutProfileObjectType](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_PutProfileObjectType.html) 建立的物件對映。  
![\[「整合選項」頁面，「物件類型」區段。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-integration-options-segment.png)

1. 對於 **擷取開始日期**，Customer Profiles 會開始擷取新增整合後建立的記錄。
**注意**  
如果您需要歷史記錄，可以[使用 Amazon S3 做為匯入記錄的整合來源](customer-profiles-object-type-mappings.md)。

1. 在 **檢閱與整合** 頁面上，檢查 **連線狀態** 是否顯示 **已連線**，然後選擇 **新增整合**。

1. 整合設定完成後，返回 **客戶設定檔組態** 頁面，**整合** 頁面會顯示目前設定的整合。**上次執行** 和 **整合運作狀態** 目前不適用於此類整合。  
![\[「客戶設定檔組態」頁面，「整合」區段。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-enable-shopify-integrations-view-card.png)

   若要查看正在傳送的資料，請選擇整合與 \$1，然後選擇**檢視物件**。

## 驗證您的 Segment 整合
<a name="verify-customer-profile-segment-connection"></a>

若要執行此步驟，您需要下列先決條件：
+ 存取您的 Segment 工作區。
+ [存取 Amazon Connect 聯絡人控制面板](amazon-connect-contact-control-panel.md)。

**若要驗證您的 Segment 整合**

1. 前往 Segment 工作區儀表板並選擇 **目的地**。  
![\[區段概觀頁面。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-enable-segment-1.png)

1. 您會看到 Segment 傳送資料的目的地清單。選擇客戶設定檔的 EventBridge 目的地。  
![\[目的地清單頁面。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-enable-segment-2.png)

1. 選擇 **事件測試儀** 標籤。從此頁面，您將傳送測試事件到客戶設定檔。該事件會被擷取並轉換為客戶設定檔，您可以在 Amazon Connect 客服人員應用程式中檢視該檔案。  
![\[事件測試器索引標籤。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-enable-segment-3.png)

1. 選擇 **身分** 做為事件類型，然後選擇 **事件建置器** 作為輸入方法。

1. 您可以指定 **使用者 ID** 和某些特徵。客服人員可以在客服人員應用程式中搜尋這些特徵。

1. 選擇 **傳送事件**。

1. 事件傳送應該幾乎是即時的，但請稍等一分鐘，以便交付並建立客戶個人資料。

1. 打開 Amazon Connect 客服人員應用程式。搜尋您在 **事件建置器** 中輸入的使用者 ID。您應能夠查看客戶個人資料，其中包含使用者 ID 和您輸入的特徵。

1. 如果您看不到客戶設定檔，表示您的整合發生問題。若要疑難排解：

   1. 前往 Amazon EventBridge 主控台。

   1. 請檢查 EventSource 是否處於作用中狀態，以及相符的 EventBus 是否存在且正在執行。

   如果這些項目有效，請聯絡 支援 以取得調查問題的協助。

## 監控您的客戶設定檔整合
<a name="monitor-customer-profile-connection-segment"></a>

建立連線後，如果停止運作，請刪除該整合，然後重新建立整合。

## 如果物件沒有傳送該怎麼辦
<a name="fix-customer-profile-connection-segment"></a>

如果物件無法傳送，請選擇 **流程詳細資訊**，進一步了解發生錯誤的原因。

您可能需要刪除組態並重新連線至外部應用程式。

# 設定 Shopify 的整合，以定期更新 Amazon Connect Customer Profiles
<a name="integrate-customer-profiles-shopify"></a>

若要定期更新 Amazon Connect Customer Profiles，您可以使用 Amazon AppIntegrations 與 Shopify 進行整合。您先在 Amazon Connect 和 Shopify 中設定連線，然後驗證 Shopify 整合。

## 在 Amazon Connect 和 Shopify 中設定連線
<a name="setup-connection-shopify"></a>

1. 在 [https://console.aws.amazon.com/connect/](https://console.aws.amazon.com/connect/) 開啟 Amazon Connect 主控台。

1. 在執行個體頁面上，選擇執行個體別名。執行個體別名也是您的**執行個體名稱**，它會出現在您的 Amazon Connect URL 中。下圖顯示 **Amazon Connect 虛擬聯絡中心執行個體**頁面，其中包含執行個體別名周圍的方塊。  
![\[Amazon Connect 虛擬聯絡中心執行個體頁面，即執行個體別名。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/instance.png)

1. 在導覽窗格中，選擇**客戶設定檔**。

1. 在 **客戶設定檔組態** 頁面上，選擇 **新增整合**。  
![\[「客戶設定檔組態」頁面，「新增整合」按鈕。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-enable-addintegration.png)

1. 在 **選擇來源** 頁面上，選擇 **Shopify**。檢閱 **選擇應用程式** 頁面上列出的應用程式需求。  
![\[選擇來源頁面。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-cp-shopify-source.png)

1. 在 **建立連線** 頁面上，選擇下列其中一項：
   + **使用現有連線**：這可讓您重複使用您可能已在 中建立的現有 Amazon EventBridge 資源 AWS 帳戶。
   + **建立新連線**：輸入外部應用程式所需的資訊。  
![\[「建立連線」頁面。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-enable-shopify-establish-connection.png)
     + **連線名稱**：提供您連線的名稱。使用此連線的整合會參考連線名稱。
     + **連線 URL**：輸入您的應用程式連線 URL。此 URL 用於深層連結到外部應用程式中建立的物件。連線 URL 是應用程式網站上提供的 Shopify Partner 應用程式 URL。

       若要尋找您的 Shopify Partner 應用程式 URL：
       + 登入您的 partners.shopify.com 帳戶。
       + 前往您的應用程式。
       + 從瀏覽器複製 URL。
     + **用戶端 ID**：輸入您的應用程式用戶端 ID。這是一個字串，用於唯一區分外部應用程式中的客戶端。此用戶端 ID 是應用程式網站上提供的來源名稱。您可以使用在此處指定的 ID 來識別您希望客戶設定檔從中擷取物件的用戶端。按照來源設定步驟後，您的客戶端 ID 也許可以使用。

       若要尋找您的來源名稱：
       + 登入您的 partners.shopify.com 帳戶。
       + 前往您的應用程式。
       + 從您的 Amazon EventBridge 事件來源複製來源名稱。

1. 在**來源設定**頁面上，將您的 AWS 帳戶 ID 複製到剪貼簿，然後選擇**登入 Shopify**。

1. 請遵循下列指示來設定 Shopify：

   1. 登入 partners.shopify.com。

   1. 在 Amazon EventBridge 下，選擇 **建立來源**。

   1. 貼上您的 AWS 帳戶 ID 並選取您的 AWS 區域。

   1. 設定事件來源目的地之後，請返回客戶設定檔。您將看到一條提示，指示 Amazon Connect 已成功與 Shopify 連線。

1. 在 **整合選項** 頁面上，選擇要內嵌的來源物件，然後選擇其物件類型。

   物件類型會儲存您擷取的資料。它們也會定義整合中的物件被擷取時如何映射至設定檔。Customer Profiles 提供預設物件型態範本，您可以使用此範本來定義來源物件中的屬性如何映射到客戶設定檔中的標準物件。您也可以使用從 [PutProfileObjectType](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_PutProfileObjectType.html) 建立的物件對映。  
![\[「整合選項」頁面。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-integration-options-shopify.png)

1. 對於 **擷取開始日期**，Customer Profiles 會開始擷取新增整合後建立的記錄。
**注意**  
如果您需要歷史記錄，可以[使用 Amazon S3 做為匯入記錄的整合來源](customer-profiles-object-type-mappings.md)。

1. 在 **檢閱與整合** 頁面上，檢查 **連線狀態** 是否顯示 **已連線**，然後選擇 **新增整合**。
**注意**  
 新增此整合之後，您需要[設定 Webhook 訂閱](#shopify-webhook-subscriptions)，以允許事件開始流入此整合。  
![\[「檢閱與整合」頁面。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-enable-shopify-webhook.png)

1. 整合設定完成後，返回 **客戶設定檔組態** 頁面，**整合** 區段會顯示目前設定的整合。**上次執行** 和 **整合運作狀態** 目前不適用於此類整合。  
![\[「整合」區段。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-enable-shopify-integrations-view-card.png)

   若要查看正在傳送的資料，請選擇整合，然後選擇**檢視物件**。

1. 請前往下一個步驟，使用 API 來設定 **Webhook 訂閱**，讓事件可以開始流入此整合。

## 設定 Webhook 訂閱
<a name="shopify-webhook-subscriptions"></a>

1. 使用以下 URL，確保您的應用具有必要的權限：

   ```
   https://{shop}.myshopify.com/admin/oauth/authorize?client_id={api_key}&scope={scopes}&redirect_uri={redirect_uri}&state={nonce}
   ```

   其中：
   + `shop` 是您的 Shopify 商店名稱。
   + `api_key` 是您 Shopify 應用程式的 API 金鑰。您可以在 Shopify **應用程式** 的詳細資訊頁面上找到此資訊。
   + `scopes` 的值應該是 `read_customers,read_orders,read_draft_orders`。
   + `redirect_uri` 是您在建立應用程式時為應用指定的重定向 URL。對於我們的目的，它可以是任何有效的 URL。
   + `nonce` 可以是任何能識別特定授權請求的唯一值。建議您使用時間戳記。

   在您建立 URL 之後，將其貼到瀏覽器中。會顯示類似下圖的安裝/授權頁面，要求商店擁有者授予所定義範圍的權限。  
![\[安裝和授權應用程式的 Shopify 頁面範例。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-enable-shopify-webhook-embedded-app.png)

1. 選擇 **安裝未公開的應用程式**，以代表您的商店安裝並授權應用程式。

   您將被帶到您輸入的重定向 URI，有一授權碼會附加到重定向 URI，作為查詢參數。例如：

   ```
   https://example.org/some/redirect/uri?code={authorization_code}&hmac=da9d83c171400a41f8db91a950508985&host={base64_encoded_hostname}&timestamp=1409617544&state={nonce}&shop={shop_origin}&host={host}
   ```

1. 從此 URI 複製 `authorization_code`。在接下來的步驟中，您將使用它來獲取永久存取權杖。

1. 前往您用來進行 API 呼叫的任何工具。例如，[CURL](https://curl.se/) 或 [POSTMAN](https://www.postman.com/)。

1. 若要取得永久存取權杖，請針對此端點向 Shopify `Admin` API 提出 POST 要求：

   ```
   https://{shop}.myshopify.com/admin/oauth/access_token
   ```

   使用以下請求內文：

   ```
   {
       "code": "authorization_code_received_from_redirect_uri",
       "client_id": "your_app_api_key",
       "client_secret": "your_app_api_secret"
   }
   ```

   此次請求將得到以下回應：

   ```
   {
       "access_token": "permanent_access_token",
       "scope": "read_customers,read_orders,read_draft_orders"
   }
   ```

1. 請記下 `access_token`。這是一個永久權杖，具有上一步提供的範圍。現在您已開始建立 Webhook 訂閱。

1. 對於以下 API 呼叫，請確保將 HTTP 標頭密鑰 `X-Shopify-Access-Token` 設定為從先前呼叫的回應中接收到的 `access_token`。

1. 要設置 Webhook 訂閱，請對下一步列出的每個 `topic` 值進行以下 POST 請求：

   端點：`https://{shop}.myshopify.com/admin/api/2021-04/webhooks.json`

   請求內文：

   ```
   {
       "webhook": {
           "topic": "replace_this_with_one_of_the_topics_in_the_list_below",
           "address": "this_is_the_event_source_arn_generated_when_you_created_the_event_integration",
           "format": "json"
       }
   }
   ```

1. 對於每個訂閱，將 `topic` 的值取代為下列值：
   + `customers/create`
   + `customers/enable`
   + `customers/update`
   + `draft_orders/create`
   + `draft_orders/update`
   + `orders/cancelled`
   + `orders/create`
   + `orders/fulfilled`
   + `orders/paid`
   + `orders/partially_fulfilled`
   + `orders/updated`

您現在已準備好接收來自 Shopify 商店的活動了。接下來，請驗證您的 Shopify 整合。

## 驗證您的 Shopify 整合
<a name="verify-customer-profile-shopify-connection"></a>

1. 以管理員身分登入 Shopify Store。

1. 在左側導覽功能表中，選擇 **客戶**。

1. 選擇 **新增客戶**。

1. 輸入您的客戶詳細資訊。請務必輸入電話號碼和電子郵件。這些不必屬於真正的客戶。驗證整合後，您將刪除此客戶項目。

1. 儲存客戶物件。

1. 事件傳送應該幾乎是即時的，但需要一分鐘的時間才能交付並建立客戶個人資料。

1. 開啟 Amazon Connect 客服人員體驗，並透過您在 Shopify Store 中輸入的電子郵件或電話號碼查詢使用者。您應該能夠使用相同的電子郵件或電話號碼查看客戶個人資料。

1. 如果您看不到客戶設定檔，表示您的整合發生問題。若要疑難排解：

   1. 前往 Amazon EventBridge 主控台。

   1. 請檢查 EventSource 是否處於作用中狀態，以及相符的 EventBus 是否存在且正在執行。

    如果這些項目有效，請聯絡 支援 以取得調查問題的協助。

## 監控您的客戶設定檔整合
<a name="monitor-customer-profile-connection-shopify"></a>

建立連線後，如果停止運作，請刪除該整合，然後重新建立整合。

## 如果物件沒有傳送該怎麼辦
<a name="fix-customer-profile-connection-shopify"></a>

如果物件無法傳送，請選擇 **流程詳細資訊**，進一步了解發生錯誤的原因。

您可能需要刪除組態並重新連線至外部應用程式。

# 使用 Amazon AppFlow 為外部應用程式設定整合
<a name="integrate-external-applications-appflow"></a>

這些整合使用 Amazon AppFlow 為 Amazon Connect Customer Profiles 提供定期更新。以下步驟提供有關使用 Amazon AppFlow 設定您選擇的連接器、設定資料對映，以及設定整合以擷取客戶資料的指導。

如需 Amazon AppFlow 定價的詳細資訊，請參閱 Amazon AppFlow [定價](https://aws.amazon.com/appflow/pricing/)。

如需 Amazon AppFlow 支援連接器的詳細資訊，請參閱[支援的來源和目標應用程式](https://docs.aws.amazon.com/appflow/latest/userguide/app-specific.html)。

## 開始之前
<a name="integrate-ea-appflow-pre-req"></a>

啟用 Amazon Connect Customer Profiles 時，您會建立客戶設定檔網域，該網域是所有資料的容器，例如客戶設定檔、物件類型、設定檔金鑰和加密金鑰。以下是建立客戶設定檔網域的準則：
+ 每個 Amazon Connect 執行個體只能與一個網域關聯。
+ 您可以建立多個網域，但這些網域不會彼此共用外部應用程式整合或客戶資料。
+ 您建立的所有外部應用程式整合都位於網域層級。與網域關聯的所有 Amazon Connect 執行個體都會繼承該網域的整合。

**先決條件：在 Amazon Connect 執行個體中啟用客戶設定檔**

1. 在 [https://console.aws.amazon.com/connect/](https://console.aws.amazon.com/connect/) 開啟 Amazon Connect 主控台。

1. 在執行個體頁面上，選擇執行個體別名。執行個體別名也是您的**執行個體名稱**，它會出現在您的 Amazon Connect URL 中。下圖顯示 **Amazon Connect 虛擬聯絡中心執行個體** 頁面，其中執行個體別名周圍有一方框。

1. 在導覽窗格中，選擇**客戶設定檔**。

1. 選擇啟用客戶設定檔

在表單中，您必須按照以下步驟完成所有必要欄位，才能建立客戶設定檔網域：

1. **網域設定**。您可以建立新網域並提供名稱。

1. **加密**。在「指定 KMS 金鑰」下，您可以選擇現有的 AWS KMS key、建立新的 AWS KMS key，或選擇 **選擇現有網域** 來啟用加密。

1. **錯誤報告**。您可以提供無效字母佇列，此佇列是用來處理客戶設定檔錯誤的 SQS 佇列

1. 選擇**提交**，將使用您執行個體的聯絡歷史記錄資訊建立客戶設定檔。

### 使用 Amazon AppFlow 設定外部應用程式
<a name="integrate-ea-appflow-data-source"></a>

您可以按照以下步驟，使用 Amazon AppFlow 將外部應用程式整合新增至 Amazon Connect Customer Profiles 網域。您必須在 Amazon AppFlow 主控台中為資料來源建立流程，並將 Amazon Connect Customer Profiles 設定為目的地，才能在客戶設定檔主控台中繼續執行。如果您在超過 14 天前建立了流程，則該流程已過期，您將需要為整合建立新流程。

在擷取之前使用 CloudFormation `AWS::AppFlow::Flow Task` 資源`Validate`時`Arithmetic`，您可以選擇執行資料轉換，例如 `Truncate`、、`Filter``Map``Map_all``Mask`、`Merge`、、 和 。

1. 登入您的 AWS 管理主控台，選取 Amazon AppFlow，然後選擇**建立流程**。  
![\[Amazon AppFlow 頁面。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-ea-create-flow-step1.png)

1. 輸入名稱和描述 (選用)。  
![\[「流程詳細資訊」頁面。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-ea-create-flow-step2.png)

1. 您可以保留原狀**的資料加密**區段，因為 Amazon Connect Customer Profiles 網域已有將用於此流程的現有 AWS KMS 金鑰。您可以選擇性地建立標籤，然後選擇**下一步**。  
![\[資料加密區段。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-ea-create-flow-step3.png)

1. 在**來源名稱**下拉式清單中選擇您選擇的外部應用程式，然後選擇下一個相關欄位。例如，如果您想要設定 Slack，請從**來源名稱**下拉式清單中選擇 Slack。然後，您可以選擇現有的 Slack 流程或建立新的連線。  
![\[「設定流程」頁面。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-ea-create-flow-step4.png)

1. 如果您選擇建立新的連線，則可輸入外部應用程式的詳細資訊，例如使用者名稱、密碼和子網域。您也可以選取資料加密的 AWS KMS 金鑰，然後輸入連線名稱以識別此連線。  
![\[「連線到 Slack」頁面。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-ea-create-flow-step5.png)

1. 如果您選擇使用現有的連線，您可以從下拉式清單中選擇特定的外部應用程式物件。例如，如果選擇現有的 Slack 連線，則可選擇**對話**作為物件，然後選擇要使用的特定 Slack 頻道。  
![\[「來源詳細資訊」頁面。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-ea-create-flow-step6.png)

1. 在**目的地詳細資訊**區段中，在下拉式清單中選擇 Amazon Connect 作為目的地名稱，然後選擇在上一個先決條件步驟中建立的客戶設定檔網域。  
![\[目的地詳細資訊區段。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-ea-create-flow-step7.png)

1. 選擇**隨需執行**或**依排程執行流程**，以選擇流程觸發程式。選擇**下一步**。
   + **隨需執行**只會在您觸發時才執行流程。
   + **按排程執行流程**會使用排程，在特定時間執行流程。排程頻率限制為 5 分鐘、15 分鐘或 1 小時。  
![\[「流程觸發」區段。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-ea-create-flow-step8.png)

1. 選擇**對映方法**下的**手動對映欄位**。從外部應用程式選擇來源欄位，然後選擇 **直接對映欄位**。  
![\[映射方法區段。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-ea-create-flow-step9.png)

1. 檢閱並選擇**建立流程**。

如需在 Amazon AppFlow 主控台中建立流程的詳細資訊，請參閱[在 Amazon AppFlow 中建立流程](https://docs.aws.amazon.com/appflow/latest/userguide/create-flow.html)。

如需在 Amazon AppFlow 中設定外部應用程式和許多其他受支援應用程式的詳細資訊，請參閱[支援的 Amazon AppFlow 來源和目標應用程式](https://docs.aws.amazon.com/appflow/latest/userguide/app-specific.html)。

### 設定資料對映，以定義外部應用模組資料對映到客戶設定檔的方式
<a name="integrate-ea-appflow-mappings"></a>

設定 Amazon AppFlow 整合後，您需要在客戶設定檔中設定資料對映，以定義來自外部應用程式的資料如何映射到客戶設定檔。這將允許您自訂要用於構建統一客戶個人資料的資料。請謹慎選擇您的映射，因為您在建立整合後將無法選擇不同的映射。

如需有關資料對映的詳細資訊，請參閱[物件類型對映](https://docs.aws.amazon.com/connect/latest/adminguide/customer-profiles-object-type-mapping.html)。

1. 登入您的 AWS 管理主控台，選取 **Amazon Connect**。然後在連線執行個體別名下選擇客戶設定檔。  
![\[「Amazon Connect Customer Profiles」頁面。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-ea-mapping-step1.png)

1. 選擇**資料對映**，然後選擇**建立資料對映**。提供資料對映名稱和說明。  
![\[「資料對映」標籤，「建立資料對映」按鈕。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-ea-mapping-step2.png)  
![\[「設定資料對映」頁面。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-ea-mapping-step2_2.png)

1. 在**對映選項**下，您可以選擇**資料來源**作為外部應用程式、在上一節中建立的**流程名稱**，以及將**資料定義方法**選擇為 *對映目的地*。在**對映目標**下，您可以選擇希望為統一客戶設定檔定義的客戶資料類型。選擇**下一步**。  
![\[映射選項區段。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-ea-mapping-step3.png)

1. 新增具有來源、目標和內容類型的客戶、產品、案例和訂單屬性，然後選擇**下一步**。  
![\[映射訂單屬性頁面。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-ea-mapping-step4.png)

1. 在**指定識別碼**下，您可以從資料來源物件中選擇各種屬性，以協助您區分資料與其他資料來源物件。您可以從唯一、客戶、產品、案例和訂單識別符中選擇屬性。如需取得識別碼的詳細資訊，請參閱 [Customer Profiles 中，索引鍵上設定屬性的標準識別符](standard-identifiers.md)。  
![\[「標準識別符」頁面。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-ea-mapping-step5.png)

1. 檢閱並選擇**建立資料對映**。資料對映狀態將顯示為*作用中*。  
![\[「步驟 6：指定識別符」頁面上的識別符。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-ea-mapping-step6.png)

### 設定整合以從外部應用程式擷取客戶資料
<a name="integrate-ea-appflow-integ"></a>

為外部應用程式完成資料對映設定後，您將設定資料來源整合以擷取客戶資料。

1. 登入您的 AWS 管理主控台，選擇 **Amazon Connect**，然後在您的連線執行個體別名下選擇客戶設定檔。

1. 在**資料來源整合**區段下選擇**新增資料來源整合**。  
![\[「資料來源整合」標籤，「添加資料來源整合」按鈕。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-ea-data-source-integ-step2.png)

1. 在**資料來源**下拉式清單下，選擇外部應用程式，並選擇**下一步**。您也可以選擇**建立新流程**，這樣會在新分頁中開啟 Amazon AppFlow 主控台。  
![\[「資料來源」區段。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-ea-data-source-integ-step3.png)

1. 在**流程名稱**下拉式清單下，從資料來源中選擇要使用的流程，然後選擇**下一步**。  
![\[選取流程名稱以建立連線。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-ea-data-source-integ-step4.png)

1. 在**資料對映**下拉式清單下，選擇物件的外部應用程式資料對映，以定義資料來源對映至設定檔的方式。選擇**下一步**。  
![\[選擇資料映射頁面，映射下拉式方塊。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-ea-data-source-integ-step5.png)

1. 檢閱並選擇**新增資料來源整合**。在進入 ACTIVE 狀態之前，外部應用程式的資料來源整合最初會顯示為 PENDING。  
![\[「查看和整合」頁面，「添加資料來源整合」按鈕。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-ea-data-source-integ-step6.png)

### 在 Amazon Connect Customer Profile Agent CCP 中檢視統一的客戶設定檔
<a name="integrate-ea-appflow-view"></a>

您的客服人員現在可以登入 Amazon Connect Agent CCP，以檢視從外部應用程式匯入的客戶資料。如需有關連線至 Amazon Connect Agent CCP 的詳細資訊，請參閱[客服人員應用程式：一切都集中在一個位置](https://docs.aws.amazon.com/connect/latest/adminguide/amazon-connect-contact-control-panel.html#use-agent-application)。

您的客服人員必須擁有適當的安全性設定檔權限，才能檢視客戶設定檔，並且能夠使用設定檔搜尋列中的索引名稱和值來執行搜尋。

如需安全性設定檔權限的詳細資訊，請參閱[安全性設定檔](https://docs.aws.amazon.com/connect/latest/adminguide/connect-security-profiles.html)。

希望構建自己的自訂客服人員應用程式和嵌入式客戶設定檔的高級使用者可以使用 [StreamsJS](https://github.com/amazon-connect/amazon-connect-customer-profiles)，它將透過客服人員應用程式提供更多的自訂內容。

# 刪除客戶設定檔或停止整合
<a name="delete-customer-profile-connection"></a>

**注意**  
刪除映射只會刪除與該特定映射關聯的物件和資料。如果有多個物件與設定檔相關聯，則刪除特定對應可能不會清除設定檔資料。如果您要刪除特定資料，則應刪除對應，但如果設定檔包含來自其他對應的資料，則設定檔可能仍然存在。這可能會導致現有設定檔的額外費用。您可以使用 [Amazon Connect 主控台](delete-customer-profiles-domain.md)或 [DeleteDomain](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_DeleteDomain.html) API 來刪除網域和客戶設定檔中的所有資料，包括所有設定檔。

**主控台方法**
+ 如果您想要隨時停止擷取客戶設定檔資料，請選擇整合/對映，然後選擇**刪除**。
+ 若要刪除整合、客戶設定檔和所有客戶設定檔資料，您可以在 Amazon Connect 主控台中刪除客戶設定檔網域。如需詳細資訊，請參閱[刪除 Amazon Connect Customer Profiles 網域](delete-customer-profiles-domain.md)。

**API 方法**
+ 若要刪除特定整合的客戶設定檔資料，請使用 `DeleteProfileObjectType` API。
+ 若要刪除整合、客戶設定檔和所有客戶設定檔資料，請使用 `DeleteDomain` API。

若要重新啟用擷取客戶設定檔資料，請再次執行設定步驟。

# Amazon Connect Customer Profiles 中的物件類型映射
<a name="customer-profiles-object-type-mapping"></a>

物件類型映射會告訴客戶設定檔如何擷取特定類型的資料。它向 Customer Profiles 提供必要資訊，例如：
+ 應如何從物件填入資料並擷取至標準設定檔物件。
+ 物件中的哪些欄位應該建立索引，以及應該如何使用這些欄位將此類型的物件指派給特定設定檔。

本章節的主題提供資訊和步驟，協助您設定物件類型映射，包括如何建立物件類型映射、映射定義詳細資訊，以及關鍵概念和術語。

**Topics**
+ [客戶物件類型映射的術語和概念](customer-profiles-terminology.md)
+ [建立物件類型映射](create-object-type-mapping.md)
+ [Amazon Connect Customer Profiles 中的物件類型映射定義詳細資訊](object-type-mapping-definition-details.md)
+ [Customer Profiles 中物件類型的其他屬性](additional-properties-object-types.md)
+ [推斷的設定檔](inferred-profiles.md)
+ [聯絡人記錄範本](ctr-contact-record-template.md)
+ [在 Customer Profiles 中，將聯絡人記錄與使用 \$1phone 索引鍵找到的一個設定檔建立關聯](auto-associate-profile-using-phone-profile-key.md)
+ [Amazon Connect Customer Profiles 中的物件類型映射範例](examples-object-type-mappings.md)
+ [Amazon Connect Customer Profiles 中的隱含設定檔物件類型](implicit-profile-object-types.md)
+ [生成式 AI 支援的資料映射](genai-powered-data-mapping.md)
+ [Customer Profiles 資料限制](customer-profiles-data-limits.md)

# 客戶物件類型映射的術語和概念
<a name="customer-profiles-terminology"></a>

下列術語和概念對於您了解自訂物件類型對應非常重要：

**標準設定檔物件**  <a name="StandardProfileObject"></a>
*標準設定檔物件*是所有設定檔包含的預先定義物件。  
標準設定檔物件包含標準欄位，例如電話號碼、電子郵件地址、姓名和其他標準資料。無論來源為何 (例如 Salesforce、ServiceNow 或 Marketo)，都可以使用標準格式擷取此資料。

**設定檔物件**  <a name="ProfileObject"></a>
*設定檔物件*是關於設定檔已知資訊的單一單位。例如，有關電話、票證、案例，甚至網站點擊流記錄的資訊。  
單一設定檔物件最多可達 250 KB，而且可以是任何結構化 JSON 文件。  
+ 每個設定檔物件都有一個類型。例如，設定檔物件可以是 Amazon Connect 聯絡人記錄、ServiceNow Users 或 Marketo Leads。
+ 類型會參照物件類型對應。
+ 物件類型對應會定義如何將該特定物件擷取至客戶設定檔。

**設定檔**  <a name="Profile"></a>
*設定檔*包含特定客戶或聯絡人的所有已知資訊。它包括單一標準設定檔物件和任意數目的其他設定檔物件。

**物件類型映射**  <a name="ObjectTypeMapping"></a>
*物件類型對映*會告訴客戶設定檔如何擷取特定類型的資料。它向客戶設定檔提供下列資訊：  
+ 應如何從物件填入資料並擷取至標準設定檔物件。
+ 物件中的哪些欄位應該建立索引，以及應該如何使用這些欄位將此類型的物件指派給特定設定檔。

**映射範本**  <a name="MappingTemplate"></a>
*對映範本*是包含在客戶設定檔服務中的預先定義物件類型對映。  
Customer Profiles 包括 Amazon Connect 聯絡人記錄、Salesforce Accounts、ServiceNow Users 和 Marketo Leads 的對應範本。如需可用對映範本的完整清單，請使用 [ListProfileObjectTypeTemplates](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_ListProfileObjectTypeTemplates.html) API。  
透過對應範本，您可以快速擷取眾所周知來源的資料，而無需指定任何其他資訊。

# 建立 Amazon Connect Customer Profiles 中的物件類型映射
<a name="create-object-type-mapping"></a>

物件類型對應可告知客戶設定檔如何從來源應用程式 (例如 Salesforce、Zendesk 或 S3) 內嵌特定類型的資料至統一的標準設定檔物件中。然後，您可以使用 [Amazon Connect 客服人員應用程式](customer-profile-access.md) 向客服人員顯示該物件中的資料 (例如，客戶地址和電子郵件)。

物件類型對應會提供客戶設定檔下列資訊：
+ 應如何從物件填入資料並擷取至標準設定檔物件。
+ 物件中的哪些欄位應該建立索引，以及應該如何使用這些欄位將此類型的物件指派給特定設定檔。

建立物件類型對應的方法有兩種：
+ 使用 Amazon Connect 主控台。使用者介面可讓您輕鬆存取資料對映功能。例如，您可以新增自訂屬性，並定義聯絡人模型的搜尋和唯一識別符。不必寫程式！
+ 使用客戶設定檔 API。如需詳細資訊，請參閱 [Amazon Connect Customer Profiles API Reference](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/Welcome.html)。

本主題介紹如何使用 Amazon Connect 主控台建立對應。

## 使用 Amazon Connect 主控台建立資料對映
<a name="create-object-type-mapping-ui"></a>

Amazon Connect 提供無程式碼的體驗，可將自家開發和第三方應用程式的客戶資料與 Amazon S3、Salesforce、ServiceNow、Zendesk 和 Marketo 對應。

若要建立資料對映，您可以定義描述自訂設定檔物件外觀的物件類型對應。此對應定義了如何使用資料中的欄位來填入標準設定檔中的欄位，或如何使用這些欄位將資料指派給特定設定檔。

### 步驟 1：設定資料對映
<a name="step1-how-to-set-up-data-mapping"></a>

1. 在 [https://console.aws.amazon.com/connect/](https://console.aws.amazon.com/connect/) 開啟 Amazon Connect 主控台。

1. 在執行個體頁面上，選擇執行個體別名。執行個體別名也是您的**執行個體名稱**，它會出現在您的 Amazon Connect URL 中。下圖顯示 **Amazon Connect 虛擬聯絡中心執行個體**頁面，其中包含執行個體別名周圍的方塊。  
![\[Amazon Connect 虛擬聯絡中心執行個體頁面，即執行個體別名。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/instance.png)

1. 在導覽窗格中，選擇**客戶設定檔**、**資料對映**。

1. 選擇**建立資料對映**以便開始。

1. 在**設定資料對映**頁面的**描述**區段中，新增可協助您識別此對映的來源或用途的名稱。這是物件類型的中繼資料。

1. 在**資料來源**區段中：

   1. 選擇資料來自何處，例如 Salesforce 或 Zendesk。Amazon Connect 會根據您的選擇，根據預先定義的範本自動選擇可用的目的地。

   1. 選擇來源物件。這會用來建立統一的設定檔。

   1. 在**對映目標**區段中，選擇您要用來建立統一客戶設定檔的資料。此資訊可以浮現在您的流程和客服人員中，使得與聯絡人的互動個人化。

      如需受支援對映目的地的詳細資訊，請參閱 [關於 Amazon Connect 中的映射目的地](about-mapping-destinations.md)。

   1. 在**其他選項**區段中，您可以選擇停止建立新設定檔的時間，以及保留這些設定檔的時間長度。這些選項可協助您管理成本。
**注意**  
在預設情況下，網域保留期間為 366 天。若要變更網域上設定的保留期限，請使用 [UpdateDomain](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_UpdateDomain.html) API。

1. 如果您選擇 S3 以外的來源，請在**建立連線***應用程式*區段中，選擇現有的 Amazon AppFlow 或 Amazon EventBridge 連線來連接您的資料，或建立新的連線。您可以輸入有關此資料來源帳戶的詳細資訊，以建立新連線。

   建立連線後，您將選擇要從資料來源擷取的物件。

1. 選擇**下一步**。

### 步驟 2：對應屬性
<a name="step2-how-to-map-attributes"></a>

在**對映*類型*屬性**頁面上，您會看到根據對映目的地填入預先定義範本的欄位對映表格。例如，它填滿了客戶、產品、案例或訂單屬性。您可以選擇屬性 (例如 AccountNumber)，然後選擇不同的目的地，或輸入您自己的自訂屬性，來變更預先定義的範本。

下圖顯示頁面範例，其中包含範本中的客戶屬性。

![\[Amazon Connect 導覽選單，映射客戶屬性頁面。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-data-mapping-2.png)


您可以移除不想在客戶設定檔中填入的內容、變更來源，以及新增自訂屬性。

此對應會使用您的資料來源來填入客戶聯絡資訊，例如客戶設定檔中的電話號碼。它使用標準設定檔範本中的屬性。

**提示**  
如果您選擇新增自訂屬性，目的地一律會新增字首 `Attributes.`。這使 Amazon Connect 能夠識別出它是一個自訂屬性。  

![\[客戶屬性映射介面，其中顯示映射至目的地欄位的來源欄位。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/custom-attribute-cp.png)

客服人員現在可以在**其他資訊**標籤下的「Connect 客服人員應用程式」中按字母順序排序檢視。您可以使用下列格式，為每個要向客服人員顯示的屬性建立您選擇的名稱：`/^Attributes\.[a-zA-Z0-9]+(?:[ _\-]+[a-zA-Z0-9]+)*$/`
所有擷取的自訂屬性都會顯示在 Connect 客服人員應用程式中。如果您不希望向客服人員顯示特定資訊，請不要在此時擷取自訂屬性。

### 步驟 3：指定識別符
<a name="step3-how-to-specify-identifiers"></a>

在**指定識別碼**頁面上，完成下列各節。視您要對應的資料而定，這些資料可能並非全部都會出現在您的頁面上。

**注意**  
名稱 `_profileId`、`_orderId`、`_caseId` 和 `_assetId` 係保留供內部使用。如果您決定使用這些名稱作為識別碼名稱之一，則必須將其聲明為 `LOOKUP_ONLY`，這意味著我們的系統不會保存它們以比對設定檔、標準資產、標準訂單、標準案例，或保存它們以搜索您的個人資料、資產、案例或訂單。如果您希望這些索引鍵可用於搜尋和比對，您必須重新命名您的索引鍵。如需 `LOOKUP_ONLY` 標準識別碼的詳細資訊，請參閱 [Customer Profiles 中，索引鍵上設定屬性的標準識別符](standard-identifiers.md)。
+ **唯一識別碼**：您的資料必須具有唯一識別碼，以避免在擷取資料時發生錯誤。此識別符也稱為唯一索引鍵。Customer Profiles 使用它來區分此資料與其他資料來源物件，並為搜尋和更新資料建立索引。

  只能有一個唯一識別符。
+ **客戶識別碼**：您的資料必須至少有一個客戶識別碼，以避免在擷取時發生錯誤。該識別符也稱為設定檔索引鍵。

  Customer Profiles 會使用它來判斷資料案例是否與現有設定檔相關聯，還是透過搜尋此識別符的其他設定檔來建立新的設定檔。

  您可以擁有多個客戶識別符。
**提示**  
客服人員可以使用 Agent Workspace 中的任何客戶識別符來尋找互動中屬於客戶的設定檔。
+ **產品識別碼**：您的資料必須至少有一個產品識別碼，以避免在擷取時發生錯誤。該識別符也稱為資產索引鍵。

  Customer Profiles 使用它來區分此資料與其他客戶產品購買資料。它還用於透過搜索此識別符的其他設定檔，以確定資料是否可與現有設定檔關聯或用於建立新設定檔。

  您可以擁有多個產品識別符。
+ **案例識別碼**：您的資料必須至少有一個案例識別碼，以避免在擷取時發生錯誤。該識別符也稱為案例索引鍵。

  Customer Profiles 使用它來區分此資料與其他與其他客戶案例資料。它還用於透過搜索此識別符的其他設定檔，以確定資料是否可與現有設定檔關聯或用於建立新設定檔。

  您可以有多個案例識別符。
+ **訂單識別碼**：您的資料必須至少有一個訂單識別碼，以避免擷取時發生錯誤。該識別符也稱為訂單索引鍵。

  Customer Profiles 使用它來區分此資料與其他客戶訂單資料。它還用於透過搜索此識別符的其他設定檔，以確定資料是否可與現有設定檔關聯或用於建立新設定檔。

  您可以有多個訂單識別符。
+ **其他搜尋屬性 – 選用**：您可以在資料來源物件中選擇要索引以供搜尋的屬性。預設情況下，您的所有識別符都會建置索引。
**提示**  
如果資料來源物件中的搜尋屬性大部分包含相同的值，可能導致資料擷取速度變慢。建議您在資料來源物件中建立不重複的搜尋屬性。
+ **資料物件時間戳記**：當啟用身分解析以合併類似設定檔時，資料物件時間戳記會用於解決設定檔衝突。當兩個或兩個以上的類似設定檔具有衝突的記錄時，將會使用具有最近更新時間戳記的設定檔中的記錄。

  您可以在物件中選擇一個屬性，以便參考物件上次更新的時間。

### 步驟 4：檢閱和建立
<a name="step4-how-to-review"></a>

建立資料對映之後，您可以選擇**新增資料來源整合**，以使用此物件類型。

![\[Amazon Connect Customer Profiles 介面，其中顯示範例資料映射詳細資訊和整合狀態。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-data-mapping-3.png)


# 關於 Amazon Connect 中的映射目的地
<a name="about-mapping-destinations"></a>

映射目的地是您從來源到 Amazon Connect 中已定義之標準定義的映射。

下表列出支援的映射目的地。


| 來源物件 | 目的地：客戶、產品、訂單、案例 | 
| --- | --- | 
|  S3  | 任何  | 
|  Salesforce-Account  | 客戶  | 
|  Salesforce-Contact  | 客戶  | 
|  Salesforce-Asset  | 產品  | 
|  Zendesk-users  | 客戶  | 
|  Marketo-leads  | 客戶  | 
|  Servicenow-sys\$1user  | 客戶  | 
|  Segment-Identify  | 客戶  | 
|  Segment-Customer  | 客戶  | 
|  Shopify-Customer  | 客戶  | 
|  Shopify-DraftOrder  | 順序  | 
|  Zendesk-tickets  | 案例  | 
|  Servicenow-task  | 案例  | 
|  Servicenow-incident  | 案例  | 

# Customer Profiles 的物件類型映射要求
<a name="object-type-mapping-requirements"></a>

您的物件類型映射中必須包含下列資訊，以便客戶設定檔可以處理傳入資料：
+ 擷取物件中應對應到標準設定檔，或用於將資料指派給設定檔的所有欄位的定義。這會告訴客戶設定檔，擷取**來源**物件中的哪些欄位應映射到標準設定檔物件中的指定欄位。
+ 應該為自訂資料中的來源物件中的哪些欄位建立索引，以及如何建立。

  當客戶設定檔擷取來源資料時，索引欄位會決定下列項目：
  + 特定物件所屬的設定檔。
  + 哪些物件彼此相關，應該放在同一設定檔中。例如，聯絡人記錄中的帳戶號碼或聯絡人 ID。
  + 可以使用哪些值來尋找設定檔。例如，聯絡人的名稱可以編製索引。這將允許客服人員找到屬於具有特定名稱之客戶的所有設定檔。

## 索引鍵要求
<a name="key-requirements"></a>

您必須至少定義一個索引鍵。Customer Profiles 使用此索引鍵將您的自訂設定檔物件映射至設定檔。

自訂設定檔物件對應還需要至少一個可唯一識別物件的索引鍵，以便透過指定此欄位的相同值來更新物件 (這些要求可以透過單一索引鍵滿足)。

每個索引鍵可以由一個或多個欄位組成。

## 欄位要求
<a name="field-requirements"></a>

欄位定義指定如何從來源物件讀取該欄位名稱的值。欄位定義也會指定欄位中儲存的資料類型。

物件類型名稱可以是任何字母數字字串或 '-' 和 '\$1' 字元，但不能以 '\$1' 字元開頭 (用於保留的標準物件類型)。

# Amazon Connect Customer Profiles 中的物件類型映射定義詳細資訊
<a name="object-type-mapping-definition-details"></a>

物件類型對應定義有兩個部分：欄位定義和索引鍵定義。

**提示**  
若要了解如何建立物件類型對應器，請參閱此部落格文章：[Unify and organize customer information with Amazon Connect Customer Profiles with the pre-built Amazon S3 connector](https://aws.amazon.com/blogs/contact-center/unify-and-organize-customer-information-with-amazon-connect-customer-profiles-with-the-pre-built-amazon-s3-connector/)。或者，您也可以在 YouTube 上觀看這部影片：[How to Integrate Customer Profile Data into your Contact Center Experiences](https://www.youtube.com/watch?v=LLIEwFel_7c&t=1767s)。

## 欄位定義詳細資訊
<a name="field-definition-details"></a>

欄位定義會定義欄位的來源、目的地 (目標) 和類型。例如：

```
"Fields": {
        "{fieldName}": {
            "Source": "{source}",
            "Target": "{target}",
            "ContentType": "{contentType}"
        }, ...
    }, ...
```
+ `Source`：這可以是欄位的 JSON 存取子，也可以是用於產生欄位值的 Handlebar 巨集。

  被解析的來源物件被命名為 ` _source`，因此來源欄位中的所有欄位都需要以此字串開頭。僅支援 `_source` 物件。

  使用 Handlebar 巨集解決方案來產生常數，並將多個來源物件欄位合併為單一欄位。這對於索引非常有用。
+ `Target`：指定標準物件類型中此欄位資料的對應位置。

  填入標準設定檔可讓您將從任何資料來源擷取的資料與以客戶設定檔為基礎建置的應用程式一起使用，而無需對所擷取資料的格式有任何特定知識。

  此欄位為選用欄位。您可能只想要定義欄位，以便將它們包含在索引鍵中。

  此欄位的格式永遠是 JSON 存取子。唯一支援的目標物件是 `_profile`。
+ `ContentType`：支援以下各值：STRING、NUMBER、PHONE\$1NUMBER、EMAIL\$1ADDRESS、NAME。如果沒有指定 `ContentType`，則假設為 STRING。

  `ContentType` 用於決定如何為值建立索引，以便客服人員可以搜尋該值。例如，如果設定 `ContentType` 為 PHONE\$1NUMBER，則會處理電話號碼，以便客服人員可以使用任何格式進行搜尋：字串「\$115551234567」與「(555) -123-4567」相符。

## 索引鍵定義詳細資訊
<a name="key-definition-details"></a>

索引鍵包含一個或多個欄位，這些欄位共同定義一個索引鍵，該索引鍵可用於使用 [SearchProfiles](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_SearchProfiles.html) API 搜尋物件 (或它們所屬的設定檔)。也可以定義索引鍵，以唯一識別設定檔或唯一識別物件本身。

```
"Keys": {
        "{keyName}": [{
            "StandardIdentifiers": [...],
            "FieldNames": [ "{fieldname}", ...]
        }], ...
    }, ...
```

索引鍵名稱是網域的全域名稱。如果您有兩個索引鍵，在兩個不同的物件類型對應中具有相同名稱：
+ 這些索引鍵應該佔用相同的命名空間
+ 它們可用於將不同物件之間的設定檔連結在一起。如果它們在物件之間相符，則客戶設定檔會將這兩個物件放在同一個設定檔中。

以另一種方式來表達：索引鍵在網域中應具有相同的索引鍵名稱，若且唯若相同的值意味著它們是相關的。例如，某種物件類型中指定的電話號碼會與另一種物件類型中指定的相同電話號碼相關。針對從 Salesforce 匯入的物件指定的內部識別符可能與從 Marketo 匯入的另一個物件無關，即使它們具有完全相同的值也一樣。

索引鍵定義的使用方式有兩種：
+ 在擷取期間，Customer Profiles 內部會使用這些索引鍵找出物件應指派給哪些設定檔。
+ 它們允許您使用 [SearchProfiles](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_SearchProfiles.html) API 來搜索鍵值並尋找設定檔。

## 預設搜尋索引鍵
<a name="object-type-mapping-default-search-keys"></a>

預設搜尋索引鍵 (例如 `_phone` 和 `_email`) 是由[標準設定檔](standard-profile-definition.md)、[標準資產](standard-asset-definition.md)、[標準訂單](standard-order-definition.md)和[標準案例](standard-case-definition.md)物件範本預先定義。您可以使用預設搜尋索引鍵作為索引鍵名稱，搭配 [SearchProfiles API](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_SearchProfiles.html) 來尋找設定檔。

# Customer Profiles 中，索引鍵上設定屬性的標準識別符
<a name="standard-identifiers"></a>

標準識別符可讓您設定索引鍵的屬性。根據您希望資料在設定檔中擷取的方式，決定要使用哪些識別符。例如，您可以使用識別符 PROFILE 標記電話號碼。這表示電話號碼將被視為唯一識別符。如果客戶設定檔取得兩個擁有相同電話號碼的聯絡人，則這些聯絡人將會合併至單一設定檔內。


| 識別符名稱 | Description | 
| --- | --- | 
|  AIR\$1PREFERENCE  |  此識別符表示此索引鍵可唯一識別航空偏好設定。指定此識別符時，表示在擷取期間，Customer Profiles 會尋找與此索引鍵關聯的任何航空偏好設定。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/standard-identifiers.html)  | 
|  AIR\$1BOOKING  |  此識別符表示此索引鍵可唯一識別航空預訂內容。指定此識別符後，表示在擷取期間，Customer Profiles 會尋找與此索引鍵關聯的任何航空預訂內容。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/standard-identifiers.html)  | 
|  AIR\$1SEGMENT  |  此識別符表示此索引鍵唯一識別航空業客群。指定此識別符後，表示在擷取期間，Customer Profiles 會尋找與此索引鍵關聯的任何航空業客群。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/standard-identifiers.html)  | 
|  HOTEL\$1PREFERENCE  |  此識別符表示此索引鍵可唯一識別住宿偏好設定。指定此識別符時，表示在擷取期間，Customer Profiles 會尋找與此索引鍵關聯的任何住宿偏好設定。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/standard-identifiers.html)  | 
|  HOTEL\$1STAY\$1REVENUE  |  此識別符表示此索引鍵唯一識別飯店住宿收入。指定此識別符時，表示在擷取期間，Customer Profiles 會尋找與此索引鍵關聯的任何飯店住宿收入。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/standard-identifiers.html)  | 
|  HOTEL\$1RESERVATION  |  此識別符表示此索引鍵唯一識別飯店住宿預訂。指定此識別符時，表示在擷取期間，Customer Profiles 會尋找與此索引鍵關聯的任何飯店住宿預訂。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/standard-identifiers.html)  | 
|  LOYALTY  |  此識別符表示此索引鍵唯一識別忠誠度。指定此識別符時，表示在擷取期間，Customer Profiles 會尋找與此索引鍵關聯的任何忠誠度。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/standard-identifiers.html)  | 
|  LOYALTY\$1TRANSACTION  |  此識別符表示此索引鍵唯一識別忠誠度交易。指定此識別符時，表示在擷取期間，Customer Profiles 會尋找與此索引鍵關聯的任何忠誠度交易。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/standard-identifiers.html)  | 
|  LOYALTY\$1PROMOTION  |  此識別符表示此索引鍵唯一識別忠誠度促銷活動。指定此識別符時，表示在擷取期間，Customer Profiles 會尋找與此索引鍵關聯的任何忠誠度促銷活動。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/standard-identifiers.html)  | 
|  UNIQUE  | 每個物件類型必須只有一個索引來指定此識別符。此索引鍵可用來唯一識別物件類型的物件，以便擷取物件，或在需要時在稍後更新已提交的物件。 構成 UNIQUE 索引鍵的所有欄位都需要在提交新物件時指定，否則該物件會被拒絕。  | 
|  PROFILE  | 此識別符表示此索引鍵可唯一識別設定檔。指定此識別符時，表示在擷取期間，客戶設定檔會尋找與此索引鍵關聯的任何設定檔。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/standard-identifiers.html)  | 
|  LOOKUP\$1ONLY  | 此識別符表示擷取物件後未儲存索引鍵。索引鍵僅用於在擷取期間決定設定檔。 索引鍵值在擷取期間不與設定檔關聯，表示它無法用於搜尋，或將稍後擷取的物件與同一索引鍵進行比對。    您無法將索引鍵同時指定為 `UNIQUE` 識別符和 `LOOKUP_ONLY` 識別符。   如果至少有一個其他索引鍵具有 `PROFILE` 識別符，但沒有 `NEW_ONLY` 或 `LOOKUP_ONLY` 識別符時，您才能將 `PROFILE` 與 `LOOKUP_ONLY` 一起使用。唯一例外是 `_profileId` 索引鍵，它可以單獨擁有 `PROFILE` 和 `LOOKUP_ONLY` 識別符組合。     | 
|  NEW\$1ONLY  | 如果設定檔在物件擷取之前尚未存在，則索引鍵會與該設定檔關聯。否則，該索引鍵僅用於比對物件和設定檔。    您無法將索引鍵同時指定為 `UNIQUE` 識別符和 `NEW_ONLY` 識別符。   如果至少有一個其他索引鍵具有 `PROFILE` 識別符，但沒有 `NEW_ONLY` 或 `LOOKUP_ONLY` 識別符時，您才能將 `PROFILE` 與 `NEW_ONLY` 一起使用。     | 
|  SECONDARY  | Customer Profiles 比對物件和設定檔時，會先查詢一切沒有 SECONDARY 識別符的 PROFILE 索引鍵。這些索引鍵會優先考慮。只有在使用這些索引鍵找不到相符的設定檔時，才會考慮 SECONDARY 索引鍵。  | 
|  ASSET  | 此識別符表示此索引鍵可唯一識別資產。指定此識別符後，表示在擷取期間，Customer Profiles 會尋找與此索引鍵關聯的任何資產。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/standard-identifiers.html)  | 
|  ORDER  | 此識別符表示此索引鍵可唯一識別訂單。指定此識別符時，表示在擷取期間，客戶設定檔會尋找與此索引鍵關聯的任何訂單。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/standard-identifiers.html)  | 
|  CASE  | 此識別符表示此金鑰唯一識別案例。指定此識別符時，表示在擷取期間，Customer Profiles 會尋找與此索引鍵關聯的任何案例。 [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/standard-identifiers.html)  | 

## 相容的識別符
<a name="standard-identifiers-compatibility"></a>

![\[矩陣，其中顯示不同資料類型的允許和限制識別符和金鑰名稱。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/standard-identifiers-compatibility-image.png)


# Customer Profiles 如何處理索引鍵定義
<a name="how-profile-assignment-works"></a>

當 Customer Profiles 擷取自訂物件映射時，會處理索引鍵定義。下圖顯示如何處理索引鍵定義中的標準識別符，以決定要將物件指派給哪個設定檔。

![\[流程圖，其中顯示用於指派或佇列物件的設定檔索引鍵檢查程序。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-template1.png)


# Customer Profiles 如何將索引鍵新增至索引，以進行查詢
<a name="how-keys-are-added-index"></a>

下圖顯示客戶設定檔如何處理標準識別符，以判斷是否保留索引鍵。

![\[檢閱流程圖，其中顯示根據查詢和新物件條件，在 Customer Profiles 中保留索引鍵的決策程序。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-template2.png)


流程圖顯示下列步驟：

1. 索引鍵是否已 `LOOKUP_ONLY` 指定？
   + 如果是，請勿保留該索引鍵。

1. 如果否，索引鍵是否已 `NEW_ONLY` 指定？
   + 如果否，請將索引鍵儲存在索引中，可以將其用於查詢。

1. 如果是，擷取物件是否會建立新的設定檔？ 
   + 如果是，請將索引鍵儲存在索引中，可以將其用於查詢。
   + 如果否，請勿將索引鍵保留在索引供未來查詢。

# Amazon Connect Customer Profiles 中，標準設定檔的物件類型映射
<a name="object-type-mapping-standard-profile"></a>

本節中的主題提供標準設定檔定義，以及從外部應用程式到標準設定檔的物件類型映射。

**Topics**
+ [Amazon AppFlow 存取要求](appflow-access-requirements-profile.md)
+ [Amazon AppIntegrations 存取要求](standard-profile-appintegrations-requirements.md)
+ [客戶設定檔中的 Amazon EventBridge 存取要求](standard-profile-eventbridge-requirements.md)
+ [標準設定檔定義](standard-profile-definition.md)
+ [映射 Salesforce 物件](mapping-salesforce-objects.md)
+ [映射 Zendesk 物件](mapping-zendesk-objects.md)
+ [映射 Marketo 物件](mapping-marketo-objects.md)
+ [對應 ServiceNow 物件](mapping-servicenow-objects.md)
+ [對應 Segment 物件](mapping-segment-objects.md)
+ [對應 Shopify 物件](mapping-shopify-objects.md)

# Customer Profiles 中的 Amazon AppFlow 存取要求
<a name="appflow-access-requirements-profile"></a>

使用以下 Amazon AppFlow 存取要求，來建立和刪除 Zendesk、Marketo、Salesforce 和 ServiceNow 與 Amazon Connect Customer Profiles 的整合：
+ appflow:CreateFlow
+ appflow:DeleteFlow

# Customer Profiles 中的 Amazon AppIntegrations 存取要求
<a name="standard-profile-appintegrations-requirements"></a>

使用以下 Amazon AppIntegrations 存取要求，來建立和刪除 Segment 和 Shopify 與 Amazon Connect Customer Profiles 的整合：


+ app-integrations:GetEventIntegration
+ app-integrations:ListEventIntegrationAssociations
+ app-integrations:CreateEventIntegrationAssociation
+ app-integrations:DeleteEventIntegrationAssociation

# 客戶設定檔中的 Amazon EventBridge 存取要求
<a name="standard-profile-eventbridge-requirements"></a>

使用以下 Amazon EventBridge 存取要求，來建立和刪除 Segment 和 Shopify 與 Amazon Connect Customer Profiles 的整合：
+ `events:ListTargetsByRule`
+ `events:PutRule`
+ `events:PutTargets`
+ `events:DeleteRule`
+ `events:RemoveTargets`

# Amazon Connect Customer Profiles 中的標準設定檔定義
<a name="standard-profile-definition"></a>

下表列出 Customer Profiles 標準設定檔物件中的所有欄位。


| 標準設定檔欄位 | 資料類型 | Description | 
| --- | --- | --- | 
|  ProfileId  | String  | 客戶設定檔的唯一識別符。  | 
|  AccountNumber  | String  | 您提供給客戶的唯一帳號。 | 
|  AdditionalInformation  | String  | 與客戶設定檔相關的任何其他資訊。 | 
|  PartyType  | String  | 用來描述客戶的設定檔類型。 有效值：INDIVIDUAL \$1 BUSINESS \$1 OTHER | 
|  BusinessName  | String  | 客戶的業務名稱。 | 
|  FirstName  | String  | 客戶的名字。 | 
|  MiddleName  | String  | 客戶的中間名。 | 
|  LastName  | String  | 客戶的姓氏。 | 
|  BirthDate  | String  | 客戶的出生日期。 | 
|  Gender  | String  | 客戶認同的性別。 | 
|  PhoneNumber  | String  | 尚未指定為行動電話號碼、住家或公司號碼的客戶電話號碼。 | 
|  MobilePhoneNumber  | String  | 客戶的行動電話號碼。 | 
|  HomePhoneNumber  | String  | 客戶的住家電話號碼。 | 
|  BusinessPhoneNumber  | String  | 客戶的公司電話號碼。 | 
|  EmailAddress  | String  | 尚未指定為個人或公司地址的客戶電子郵件地址。 | 
|  PersonalEmailAddress  | String  | 客戶的個人電子郵件地址。 | 
|  BusinessEmailAddress  | String  | 客戶的公司電子郵件地址。 | 
|  地址  | 地址  | 與客戶相關聯，且非用於郵寄、送貨或帳單的一般地址。 | 
|  ShippingAddress  | 地址  | 客戶的運送地址。 | 
|  MailingAddress  | 地址  | 客戶的電子郵件地址。 | 
|  BillingAddress  | 地址  | 客戶的帳單地址。 | 
|  屬性  | 字串對字串對應  | 客戶設定檔屬性的鍵值對。 | 
|  ProfileType  | String  | 設定檔類型。 有效值：PROFILE \$1 ACCOUNT\$1PROFILE  | 
|  EngagementPreferences  | EngagementPreferences  | 客戶或帳戶的參與偏好設定。 | 

標準設定檔物件會依據下表的索引鍵編製索引。


| 標準索引名稱 | 標準設定檔欄位 | 
| --- | --- | 
| \$1phone | PhoneNumber、MobilePhoneNumber、HomePhoneNumber 或 BusinessPhoneNumber | 
| \$1email | EmailAddress、PersonalEmailAddress 或 BusinessEmailAddress | 
| \$1account | AccountNumber | 
| \$1profileId | ProfileId | 
| \$1fullName | "FirstName MiddleName LastName" | 

例如，您可以使用 `_phone` 作為索引鍵名稱，搭配 [SearchProfiles API](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_SearchProfiles.html) 來尋找 PhoneNumber、MobilePhoneNumber、HomePhoneNumber 或 BusinessPhoneNumber 屬性符合搜尋值的設定檔。

## Address 資料類型
<a name="address-data-type"></a>


| 標準設定檔欄位 | 資料類型 | Description | 
| --- | --- | --- | 
|  Address1  | String  | 客戶地址的第一行。  | 
|  Address2  | String  | 客戶地址的第二行。  | 
|  Address3  | String  | 客戶地址的第三行。  | 
|  Address4  | String  | 客戶地址的第四行。  | 
|  City  | String  | 客戶居住的城市。  | 
|  Country  | String  | 客戶居住的國家/地區。  | 
|  County  | String  | 客戶居住的縣。  | 
|  PostalCode  | String  | 客戶地址的郵遞區號。  | 
|  Province  | String  | 客戶居住的省份。  | 
|  State  | String  | 客戶居住的州。  | 

## EngagementPreferences 資料類型
<a name="engagement-preferences-data-type"></a>


| 標準設定檔欄位 | 資料類型 | Description | 
| --- | --- | --- | 
|  Email  |  ContactPreference 物件陣列  |  與電子郵件相關的聯絡偏好設定清單。  | 
|  Phone  |  ContactPreference 物件陣列  |  與電話相關的聯絡偏好設定清單。  | 

## ContactPreference 資料類型
<a name="contact-preference-data-type"></a>


| 標準設定檔欄位 | 資料類型 | Description | 
| --- | --- | --- | 
|  KeyName  |  String  |  可供搜尋的客戶設定檔唯一識別符。  | 
|  KeyValue  |  String  |  用來根據 keyName 查詢設定檔的索引鍵值。  | 
|  ProfileId  |  String  |  客戶設定檔的唯一識別符。  | 
|  ContactType  |  String  |  用於參與的聯絡類型。有效值：PhoneNumber \$1 MobilePhoneNumber \$1 HomePhoneNumber \$1 BusinessPhoneNumber \$1 EmailAddress \$1 PersonalEmailAddress \$1 BusinessEmailAddress  | 

# 在 Amazon Connect Customer Profiles 中，將 Salesforce 物件映射至標準設定檔
<a name="mapping-salesforce-objects"></a>

本主題列出 Salesforce 物件中的哪些欄位會映射到客戶設定檔中標準設定檔物件中的欄位。

## Salesforce-Account 物件
<a name="salesforceaccountobject"></a>

以下是 Salesforce-Account 物件中所有欄位的清單。Salesforce-Account 物件中的欄位可能會因 Salesforce 執行個體的組態而有所不同。
+ Id
+ IsDeleted
+ MasterRecordId
+ 名稱
+ Type
+ ParentId
+ BillingStreet
+ BillingCity
+ BillingState
+ BillingPostalCode
+ BillingCountry
+ BillingLatitude
+ BillingLongitude
+ BillingGeocodeAccuracy
+ BillingAddress.City
+ BillingAddress.Country
+ BillingAddress.geocodeAccuracy
+ BillingAddress.latitude
+ BillingAddress.longitude
+ BillingAddress.postalCode
+ BillingAddress.state
+ BillingAddress.street
+ ShippingStreet
+ ShippingCity
+ ShippingState
+ ShippingPostalCode
+ ShippingCountry
+ ShippingLatitude
+ ShippingLongitude
+ ShippingGeocodeAccuracy
+ ShippingAddress.city
+ ShippingAddress.country
+ ShippingAddress.latitude
+ ShippingAddress.longitude
+ ShippingAddress.postalCode
+ ShippingAddress.state
+ ShippingAddress.street
+ Phone
+ Fax
+ AccountNumber
+ Website
+ PhotoUrl
+ Sic
+ Industry
+ AnnualRevenue
+ NumberOfEmployees
+ Ownership
+ TickerSymbol
+ Description
+ Rating
+ Site
+ OwnerId
+ CreatedDate
+ CreatedById
+ LastModifiedDate
+ LastModifiedId
+ SystemModstamp
+ LastActivityDate
+ LastViewedDate
+ LastReferencedDate
+ Jigsaw
+ JigsawCompanyId
+ CleanStatus
+ AccountSource
+ DunsNumber
+ Tradestyle
+ NaicsCode
+ NaicsDesc
+ YearStarted
+ SicDesc
+ DandbCompanyId
+ IsBuyer

## 將 Salesforce-Account 物件對應到標準設定檔
<a name="mapping-salesforceaccountobject"></a>

Salesforce-Account 物件中欄位的子集會對應到客戶設定檔中的標準設定檔物件。

下表列出了哪些欄位可以從 Salesforce-Account 物件對應到標準設定檔。(此表格包含已設定為包含 Person 欄位之 Salesforce 執行個體的對應。)


| Salesforce-Account 來源欄位 | 標準設定檔目標欄位 | 
| --- | --- | 
|  Id  | Attributes.sfdcAccountId  | 
|  名稱  | BusinessName  | 
|  Phone  | PhoneNumber  | 
|  BillingStreet  | BillingAddress.Address1  | 
|  BillingCity  | BillingAddress.City  | 
|  BillingState  | BillingAddress.State  | 
|  BillingCountry  | BillingAddress.Country  | 
|  BillingPostalCode  | BillingAddress.PostalCode  | 
|  ShippingStreet  | ShippingAddress.Address1  | 
|  ShippingCity  | ShippingAddress.City  | 
|  ShippingState  | ShippingAddress.State  | 
|  ShippingCountry  | ShippingAddress.Country  | 
|  ShippingPostalCode  | ShippingAddress.PostalCode  | 
|  IsPersonAccount  | PartyType  | 
|  PersonMobilePhone  | MobilePhoneNumber  | 
|  PersonHomePhone  | HomePhoneNumber  | 
|  PersonEmail  | PersonalEmailAddress  | 
|  PersonMailingAddress.Street  | MailingAddress.Address1  | 
|  PersonMailingAddress.City  | MailingAddress.City  | 
|  PersonMailingAddress.State  | MailingAddress.State  | 
|  PersonMailingAddress.Country  | MailingAddress.Country  | 
|  PersonMailingAddress.PostalCode  | MailingAddress.PostalCode  | 
|  PersonBirthDate  | BirthDate  | 
|  PersonOtherStreet  | Address.Address1  | 
|  PersonOtherCity  | Address.City  | 
|  PersonOtherState  | Address.State  | 
|  PersonOtherCountry  | Address.Country  | 
|  PersonOtherPostalCode  | Address.PostalCode  | 
|  FirstName  | FirstName  | 
|  LastName  | LastName  | 
|  MiddleName  | MiddleName  | 
|  AccountNumber  | AccountNumber  | 

Salesforce 物件中的 Salesforce-Account 客戶資料會使用下表中的索引與 Amazon Connect Customer Profiles 關聯。


| 標準索引名稱 | Salesforce-Account 來源欄位 | 
| --- | --- | 
|  \$1salesforceAccountId  | Id  | 

例如，您可以使用 `_salesforceAccountId` 作為索引鍵名稱，搭配 [SearchProfiles](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_SearchProfiles.html) API 來尋找設定檔。您可以使用 [ListProfileObjects](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_ListProfileObjects.html) API，並將 `ProfileId` 和 `ObjectTypeName` 設定為 `Salesforce-Account`，以尋找與特定設定檔關聯的 Salesforce-Account 物件。

## Salesforce-Contact 物件
<a name="salesforcecontactobject"></a>

以下是 Salesforce-Contact 物件中所有欄位的清單。
+ Id
+ IsDeleted
+ MasterRecordId
+ Accountd
+ LastName
+ FirstName
+ Salutation
+ 名稱
+ OtherStreet
+ OtherCity
+ OtherState
+ OtherPostalCode
+ OtherCountry
+ OtherLatitude
+ OtherLongitude
+ OtherGeocodeAccuracy
+ OtherAddress.city
+ OtherAddress.country
+ OtherAddress.geocodeAccuracy
+ OtherAddress.latitude
+ OtherAddress.postalCode
+ OtherAddress.state
+ OtherAddress.street
+ MailingStreet
+ MailingCity
+ MailingState
+ MailingPostalCode
+ MailingCountry
+ MailingLatitude
+ MailingLongitude
+ MailingGeocodeAccuracy
+ MailingAddress.city
+ MailingAddress.country
+ MailingAddress.geocodeAccuracy
+ MailingAddress.latitude
+ MailingAddress.longitude
+ MailingAddress.postalCode
+ MailingAddress.state
+ MailingAddress.street
+ Phone
+ Fax
+ MobilePhone
+ HomePhone
+ OtherPhone
+ AssistantPhone
+ ReportsToId
+ Email
+ Title
+ Department
+ AssistantName
+ LeadSource
+ Birthdate
+ Description
+ OwnerId
+ CreatedDate
+ CreatedById
+ LastModifiedDate
+ LastModifiedById
+ SystemModstamp
+ LastActivityDate
+ LastCURequestDate
+ LastCUUpdateDate
+ LastViewedDate
+ LastReferencedDate
+ EmailBouncedReason
+ EmailBouncedDate
+ IsEmailBounced
+ PhotoUrl
+ Jigsaw
+ JigawContactId
+ CleanStatus
+ IndividualId

## 將 Salesforce-Contact 物件對應到標準設定檔
<a name="mapping-salesforcecontactobject"></a>

Salesforce-Contact 物件中欄位的子集會對應到客戶設定檔中的標準設定檔物件。下表列出了哪些欄位可以從 Salesforce-Contact 物件對應到標準設定檔物件。


| Salesforce-Contact 來源欄位 | 標準設定檔目標欄位 | 
| --- | --- | 
|  Id  | Attributes.sfdcContactId  | 
|  AccountId  | Attributes.sfdcAccountId  | 
|  LastName  | LastName  | 
|  FirstName  | FirstName  | 
|  MiddleName  | MiddleName  | 
|  OtherStreet  | Address.Address1  | 
|  OtherCity  | Address.City  | 
|  OtherState  | Address.State  | 
|  OtherCountry  | Address.Country  | 
|  OtherPostalCode  | Address.PostalCode  | 
|  MailingStreet  | MailingAddress.Address1  | 
|  MailingCity  | MailingAddress.City  | 
|  MailingState  | MailingAddress.State  | 
|  MailingCountry  | MailingAddress.Country  | 
|  MailingPostalCode  | MailingAddress.PostalCode  | 
|  Phone  | PhoneNumber  | 
|  HomePhone  | HomePhoneNumber  | 
|  MobilePhone  | MobilePhoneNumber  | 
|  Email  | EmailAddress  | 
|  Birthdate  | BirthDate  | 

Salesforce 物件中的 Salesforce-Contact 客戶資料會使用下表中的索引與 Amazon Connect Customer Profiles 關聯。


| 標準索引名稱 | Salesforce-Contact 來源欄位 | 
| --- | --- | 
|  \$1salesforceContactId  | Id  | 
|  \$1salesforceAccountId  | AccountId  | 

例如，您可以使用 `_salesforceAccountId` 和 `_salesforceContactId` 作為索引鍵名稱，搭配 [SearchProfiles](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_SearchProfiles.html) API 來尋找設定檔。您可以使用 [ListProfileObjects](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_ListProfileObjects.html) API，並將 `ProfileId` 和 `ObjectTypeName` 設定為 `Salesforce-Contact`，以尋找與特定設定檔關聯的 Salesforce-Contact 物件。

# 在 Amazon Connect Customer Profiles 中，將 Zendesk 物件映射至標準設定檔
<a name="mapping-zendesk-objects"></a>

本主題列出 Zendesk 物件中的哪些欄位映射到客戶設定檔中標準設定檔的欄位。

## Zendesk-users 物件
<a name="zendeskusersobject"></a>

以下是 Zendesk-users 物件中所有欄位的清單。
+ id
+ url
+ external\$1id
+ email
+ active
+ chat\$1only
+ customer\$1role\$1id
+ role\$1type
+ 詳細資訊
+ last\$1login\$1at
+ locale
+ locale\$1id
+ moderator
+ notes
+ only\$1private\$1comments
+ default\$1group\$1id
+ phone
+ shared\$1phone\$1number
+ photo
+ restricted\$1agent
+ role
+ shared
+ 標籤
+ signature
+ suspended
+ ticket\$1restriction
+ time\$1zone
+ two\$1factor\$1auth\$1enabled
+ user\$1fields
+ verified
+ report\$1csv
+ created\$1at
+ updated\$1at

## 將 Zendesk 使用者對應到標準設定檔
<a name="mapping-zendeskusersobject"></a>

Zendesk-users 物件中的欄位子集會對應到客戶設定檔中的標準設定檔。下表列出了可從 Zendesk-users 物件對應到標準設定檔的欄位。


| Zendesk-users 來源欄位 | 標準設定檔目標欄位 | 
| --- | --- | 
|  id  | Attributes.ZendeskUserId  | 
|  external\$1id  | Attributes.ZendeskExternalId  | 
|  email  | EmailAddress  | 
|  phone  | PhoneNumber  | 

Zendesk 物件中的 Zendesk-users 客戶資料與使用下列索引與 Amazon Connect Customer Profiles 關聯。


| 標準索引名稱 | Zendesk-user 來源欄位 | 
| --- | --- | 
|  \$1zendeskUserId  | Id  | 
|  \$1zendeskExternalId  | external\$1id  | 

例如，您可以使用 `_zendeskUserId` 和 `_zendeskExternalId` 作為索引鍵名稱，並搭配 [SearchProfiles](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_SearchProfiles.html) API 來尋找 Amazon Connect Customer Profiles。您可以使用 [ListProfileObjects](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_ListProfileObjects.html) API，並將 `ProfileId` 和 `ObjectTypeName` 設定為 `Zendesk-users`，以尋找與特定客戶設定檔關聯的 Zendesk-users 物件。

# 在 Amazon Connect Customer Profiles 中，將 Marketo 物件映射至標準設定檔
<a name="mapping-marketo-objects"></a>

本主題列出 Marketo 物件中的哪些欄位映射到客戶設定檔標準設定檔物件中的欄位。

## Marketo-leads 物件
<a name="marketo-objects"></a>

以下是 Marketo-leads 物件中所有欄位的清單
+ id
+ firstName
+ lastName
+ middleName
+ email
+ phone
+ mobilePhone
+ billingStreet
+ billingCity
+ billingState
+ billingCountry
+ billingPostalCode
+ address
+ 城市
+ state
+ 國家/地區
+ postalcode
+ gender
+ dateOfBirth

## 將 Marketo-leads 對應到標準設定檔
<a name="mapping-marketo-leads-object"></a>

Marketo-leads 物件中的欄位子集會對應到標準設定檔。


| Marketo-leads 來源欄位 | 標準設定檔目標欄位 | 
| --- | --- | 
|  id  | Attributes.MarketoLeadId  | 
|  sfdcAccountId  | Attributes.sfdcAccountId  | 
|  sfdcContactId  | Attributes.sfdcContactId  | 
|  firstName  | FirstName  | 
|  lastName  | LastName  | 
|  middleName  | MiddleName  | 
|  email  | EmailAddress  | 
|  phone  | PhoneNumber  | 
|  mobilePhone  | MobilePhoneNumber  | 
|  mobilePhone  | MobilePhoneNumber  | 
|  billingStreet  | BillingAddress.Address1  | 
|  billingCity  | BillingAddress.City  | 
|  billingState  | BillingAddress.State  | 
|  billingCountry  | BillingAddress.Country  | 
|  billingPostalCode  | BillingAddress.PostalCode  | 
|  address  | Address.Address1  | 
|  城市  | Address.City  | 
|  state  | Address.State  | 
|  國家/地區  | Address.Country  | 
|  postalcode  | Address.PostalCode  | 
|  gender  | Gender  | 
|  dataOfBirth  | BirthDate  | 

Marketo-leads 客戶資料會使用下表中的索引與 Amazon Connect Customer Profiles 關聯。


| 標準索引名稱 | Marketo-leads 來源欄位 | 
| --- | --- | 
|  \$1marketoLeadId  | id  | 
|  \$1salesforceAccountId  | sfdcAccountId  | 
|  \$1salesforceContactId  | sfdcContactId  | 

例如，您可以使用 `_marketoLeadId`、`_salesforceAccountId` 和 `_salesforceContactId` 作為索引鍵名稱，並搭配 [SearchProfiles](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_SearchProfiles.html) API 來尋找 Amazon Connect Customer Profiles。您可以使用 [ListProfileObjects](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_ListProfileObjects.html) API，並將 `ProfileId` 和 `ObjectTypeName` 設定為 `Marketo-leads`，以尋找與特定客戶設定檔關聯的 Marketo-leads 物件。

# 在 Amazon Connect Customer Profiles 中，將 ServiceNow 物件映射至標準設定檔物件
<a name="mapping-servicenow-objects"></a>

本主題列出 ServiceNow 物件中的哪些欄位對應到 Amazon Connect Customer Profiles 標準設定檔物件中的欄位。

## Servicenow-sys\$1user 物件
<a name="servicenow-sys-user-object"></a>

以下是 Servicenow-sys\$1user 物件中所有欄位的清單
+ sys\$1id
+ active
+ building
+ calendar\$1integration
+ 城市
+ company
+ cost\$1center
+ 國家/地區
+ date\$1format
+ default\$1perspective
+ department
+ edu\$1status
+ email
+ employee\$1number
+ enable\$1multifactor\$1authn
+ failed\$1attempts
+ first\$1name
+ gender
+ home\$1phone
+ internal\$1integration\$1user
+ introduction
+ last\$1login
+ last\$1login\$1device
+ last\$1login\$1time
+ last\$1name
+ last\$1password
+ ldap\$1server
+ location
+ locked\$1out
+ manager
+ middle\$1name
+ mobile\$1phone
+ name
+ notification
+ password\$1needs\$1reset
+ phone
+ photo
+ preferred\$1language
+ roles
+ schedule
+ source
+ state
+ street
+ sys\$1class\$1name
+ sys\$1created\$1by
+ sys\$1created\$1on
+ sys\$1domain.link
+ sys\$1domain.value
+ sys\$1domain\$1path
+ sys\$1id
+ sys\$1mod\$1count
+ sys\$1updated\$1by
+ sys\$1udpated\$1on
+ time\$1format
+ time\$1zone
+ 標題
+ user\$1name
+ user\$1password
+ web\$1service\$1access\$1only
+ zip

## 將 Servicenow-sys\$1users 對應到標準設定檔物件
<a name="mapping-servicenow-sys-user-object"></a>

Servicenow-sys\$1users 物件中欄位的子集會對應到客戶設定檔中的標準設定檔物件。

下表列出哪些欄位可以從 Servicenow-sys\$1users 物件對應到標準設定檔。


| Servicenow-sys\$1users 來源欄位 | 客戶設定檔目標欄位 | 
| --- | --- | 
|  sys\$1id  | Attributes.ServiceNowSystemId  | 
|  first\$1name  | FirstName  | 
|  last\$1name  | LastName  | 
|  middle\$1name  | MiddleName  | 
|  gender  | Gender  | 
|  email  | EmailAddress  | 
|  phone  | PhoneNumber  | 
|  home\$1phone  | HomePhoneNumber  | 
|  mobile\$1phone  | MobilePhoneNumber  | 
|  street  | Address.Address1  | 
|  城市  | Address.City  | 
|  state  | Address.State  | 
|  國家/地區  | Address.Country  | 
|  zip  | Address.PostalCode  | 

來自 Servicenow 物件的 Servicenow-sys\$1user 客戶資料會使用下表中的索引與 Amazon Connect Customer Profiles 關聯。


| 標準索引名稱 | Servicenow-sys\$1user 來源欄位 | 
| --- | --- | 
|  \$1serviceNowSystemId  | sys\$1id  | 

例如，您可以使用 `_serviceNowSystemId` 和 `_serviceNowIncidentId` 作為索引鍵名稱，並搭配 [SearchProfiles](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_SearchProfiles.html) API 來尋找 Amazon Connect Customer Profiles。您可以使用 [ListProfileObjects](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_ListProfileObjects.html) API，並將 `ProfileId` 和 `ObjectTypeName` 設定為 `Servicenow-sys_user`，以尋找與特定設定檔關聯的 Servicenow-sys\$1user 物件。

# 在 Amazon Connect Customer Profiles 中，將 Segment 物件映射至標準設定檔物件
<a name="mapping-segment-objects"></a>

本主題列出 Segment 物件中的哪些欄位對應到 Amazon Connect Customer Profiles 標準設定檔物件中的欄位。

## Segment-Identity 物件
<a name="segment-identify-object"></a>

以下是 Segment-Identity 物件中所有欄位的清單。
+ userId
+ 常用欄位 - 請參閱 Segment 文件中的 [Spec：常用欄位](https://segment.com/docs/connections/spec/common/)
+ Segment 保留特徵 - 請參閱 Segment 文件中的[特徵](https://segment.com/docs/connections/spec/identify/#traits)
+ traits.address.street 
+ traits.address.city
+ traits.address.state
+ traits.address.postalCode
+ traits.address.country
+ traits.age
+ traits.avatar
+ traits.birthday
+ traits.company.name
+ traits.company.id
+ traits.company.industry
+ traits.company.employee\$1count
+ traits.company.plan
+ traits.createdAt
+ traits.description
+ traits.email
+ traits.firstName
+ traits.gender
+ traits.id
+ traits.lastName
+ traits.name
+ traits.phone
+ traits.title
+ traits.username
+ traits.website

## 將 Segment-Identity 對應到標準設定檔物件
<a name="mapping-segment-identify-object"></a>

Segment-Identity 物件中欄位的子集會對應到客戶設定檔中的標準設定檔物件。

下表列示了可以從 Segment-Identity 物件對應到標準設定檔的欄位。


| Segment-Identify 來源欄位 | 標準設定檔目標欄位 | 
| --- | --- | 
|  | 標準設定檔目標欄位 | 
| userId | Attributes.SegmentUserId | 
| traits.company.name | BusinessName | 
| traits.firstName | FirstName | 
| traits.lastName | LastName | 
| traits.birthday | BirthDate | 
| traits.gender | Gender | 
| traits.phone | PhoneNumber | 
| traits.email | EmailAddress | 
| traits.address.street | Address.Address1 | 
| traits.address.city | Address.City | 
| traits.address.state | Address.State | 
| traits.address.country | Address.Country | 
| traits.address.postalCode | Address.PostalCode | 

### 範例
<a name="example-mapping-segment-identify-object"></a>

下列範例顯示如何將原始欄位對應到目標欄位。

```
"segmentUserId": {
    "Source": "_source.detail.event.detail.userId",
    "Target": "_profile.Attributes.SegmentUserId"
}
```

Segment 物件中的 Segment-Identity 客戶資料會使用下列索引與 Amazon Connect Customer Profiles 關聯。


| 標準索引名稱 | Segment-Identify 來源欄位 | 
| --- | --- | 
|  \$1segmentUserId  |  userId  | 

例如，您可以使用 `_segmentUserId` 作為索引鍵名稱，並搭配 [SearchProfiles](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_SearchProfiles.html) API 來尋找 Amazon Connect Customer Profiles。您可以使用 [ListProfileObjects](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_ListProfileObjects.html) API，並將 `ProfileId` 和 `ObjectTypeName` 設定為 `Segment-Identify`，以尋找與特定設定檔關聯的 Segment-Identity 物件。

# 在 Amazon Connect Customer Profiles 中，將 Shopify 物件映射至標準設定檔物件
<a name="mapping-shopify-objects"></a>

本主題列出 Shopify 物件中的哪些欄位會對應到 Amazon Connect Customer Profiles 標準設定檔物件中的欄位。

## Shopify-Customer 物件
<a name="shopify-identify-object"></a>

以下是 Shopify-Customer 物件中所有欄位的清單。


+ accepts\$1marketing
+ accepts\$1marketing\$1updated\$1at
+ 地址
+ currency
+ created\$1at
+ default\$1address.address1
+ default\$1address.address2
+ default\$1address.city
+ default\$1address.company
+ default\$1address.country
+ default\$1address.country\$1code
+ default\$1address.country\$1name
+ default\$1address.customer\$1id
+ default\$1address.default
+ default\$1address.first\$1name
+ default\$1address.id
+ default\$1address.last\$1name
+ default\$1address.name
+ default\$1address.phone
+ default\$1address.province
+ default\$1address.province\$1code
+ default\$1address.zip
+ email
+ first\$1name
+ id
+ last\$1name
+ last\$1order\$1id
+ last\$1order\$1name
+ metafield.key
+ metafield.value
+ metafield.namespace
+ metafield.value\$1type
+ marketing\$1opt\$1in\$1level
+ multipass\$1identifier
+ note
+ orders\$1count
+ phone
+ sms\$1marketing\$1consent.state
+ sms\$1marketing\$1consent.opt\$1in\$1level
+ sms\$1marketing\$1consent.consent\$1updated\$1at
+ sms\$1marketing\$1consent.consent\$1collected\$1from
+ state
+ 標籤
+ tax\$1exempt
+ tax\$1exemptions
+ total\$1spent
+ updated\$1at
+ verified\$1email

## 將 Shopify-Customer 物件對應到標準設定檔
<a name="mapping-shopify-customer-object"></a>

Shopify-Customer 物件中欄位的子集會對應到客戶設定檔中的標準設定檔物件。

下表列出了哪些欄位可以從 Shopify-Customer 物件對應到標准設定檔。


| Shopify-Customer 來源欄位 | 標準設定檔目標欄位 | 
| --- | --- | 
| id | Attributes.ShopifyCustomerId | 
| email | EmailAddress | 
| first\$1name | FirstName | 
| last\$1name | LastName | 
| note | AdditionalInformation | 
| phone | PhoneNumber | 
| default\$1address.address1 | Address.Address1 | 
| default\$1address.address2 | Address.Address2 | 
| default\$1address.city | Address.City | 
| default\$1address.province | Address.Province | 
| default\$1address.country | Address.Country | 
| default\$1address.zip | Address.PostalCode | 

### 範例
<a name="example-mapping-shopify-customer-object"></a>

下列範例顯示如何將原始欄位對應到目標欄位。

```
"shopifyCustomerId": {
    "Source": "_source.detail.event.detail.payload.id",
    "Target": "_profile.Attributes.ShopifyCustomerId"
}
```

Shopify 物件中的 Shopify-Customer 客戶資料會使用下列索引與 Amazon Connect Customer Profiles 關聯。


| 標準索引名稱 | Shopify-Customer 來源欄位 | 
| --- | --- | 
| \$1shopifyCustomerId | id | 

例如，您可以使用 `_shopifyCustomerId` 作為索引鍵名稱，並搭配 [SearchProfiles](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_SearchProfiles.html) API 來尋找 Amazon Connect Customer Profiles。您可以使用 [ListProfileObjects](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_ListProfileObjects.html) API，並將 `ProfileId` 和 `ObjectTypeName` 設定為`Shopify-Customer`，以尋找與特定設定檔關聯的 Shopify-Customer 物件。

# Amazon Connect Customer Profiles 中，標準訂單的物件類型映射
<a name="object-type-mapping-standard-order"></a>

本節中的主題提供標準訂單定義，以及從外部應用程式到標準訂單的物件類型對應。

**Topics**
+ [Amazon AppIntegrations 存取要求](standard-order-appintegrations-requirements.md)
+ [Amazon EventBridge 存取要求](standard-order-eventbridge-requirements.md)
+ [標準訂單定義](standard-order-definition.md)
+ [對應 Shopify 物件](mapping-shopify-objects-standard-order.html.md)

# Amazon AppIntegrations 存取要求
<a name="standard-order-appintegrations-requirements"></a>

使用以下 Amazon AppIntegrations 存取要求，來建立和刪除 Shopify 與 Amazon Connect Customer Profiles 的整合：
+ app-integrations:GetEventIntegration
+ app-integrations:ListEventIntegrationAssociations
+ app-integrations:CreateEventIntegrationAssociation
+ app-integrations:DeleteEventIntegrationAssociation

# Amazon EventBridge 存取要求
<a name="standard-order-eventbridge-requirements"></a>

使用以下 Amazon EventBridge 存取要求，來建立和刪除 Shopify 與 Amazon Connect Customer Profiles 的整合：
+ `events:ListTargetsByRule`
+ `events:PutRule`
+ `events:PutTargets`
+ `events:DeleteRule`
+ `events:RemoveTargets`

# Customer Profiles 標準訂單物件欄位
<a name="standard-order-definition"></a>

下表列出 Customer Profiles 標準訂單物件中的所有欄位。


| 標準訂單欄位 | 資料類型 | Description | 
| --- | --- | --- | 
| OrderId | String | 標準訂單的唯一識別符。 | 
| CustomerEmail | String | 客戶的電子郵件地址。 | 
| CustomerPhone | String | 客戶的電話號碼。 | 
| CreatedDate | String | 訂單建立日期。 | 
| UpdatedDate | String | 訂單更新日期。 | 
| ProcessedDate | String | 訂單處理日期。 | 
| ClosedDate | String | 訂單關閉日期。 | 
| CancelledDate | String | 訂單取消日期。 | 
| CancelReason | String | 訂單取消原因。 | 
| Name | String | 訂單名稱。 | 
| AdditionalInformation | String | 與訂單有關的任何其他資訊。 | 
| 閘道 | String | 訂單的付款方式。 | 
| 狀態 | String | 訂單狀態。 | 
| StatusCode | String | 訂單的狀態代碼。有效值：DRAFT \$1 ACTIVATED | 
| StatusUrl | String | 訂單的狀態 URL。 | 
| CreditCardNumber | String | 客戶的信用卡末四碼。 | 
| CreditCardCompany | String | 客戶的信用卡公司。 | 
| FulfillmentStatus | String | 訂單履行狀態。 | 
| TotalPrice | String | 訂單總額。 | 
| TotalTax | String | 訂單總稅額。 | 
| TotalDiscounts | String | 訂單總折扣。 | 
| TotalItemsPrice | String | 訂單總項目額。 | 
| TotalShippingPrice | String | 訂單總運費。 | 
| TotalTipReceived | String | 訂單收到的小費總額。 | 
| Currency | String | 訂單所用貨幣。 | 
| TotalWeight | String | 訂單總重量。 | 
| BillingAddress | OrderAddress | 客戶的帳單地址。 | 
| ShippingAddress | OrderAddress | 客戶的運送地址。 | 
| OrderItems | OrderItem 清單 | 訂單項目。 | 
| 屬性 | 字串對字串對應 | 標準訂單屬性的鍵值對。 | 

標準訂單物件會依據下表的索引鍵編製索引。


| 標準索引名稱 | 標準訂單欄位 | 
| --- | --- | 
| \$1orderId | OrderId | 

例如，您可以使用 `_orderId` 作為索引鍵名稱，搭配 [SearchProfiles API](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_SearchProfiles.html) 來尋找具有與搜尋值相符訂單 ID 之訂單的設定檔。您可以使用 [ListProfileObjects API](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_ListProfileObjects.html)，並將 `ProfileId` 和 `ObjectTypeName` 設定為 `_order`，以尋找與特定設定檔關聯的標準訂單物件。

## OrderAddress 資料類型
<a name="orderaddress-data-type"></a>


| 標準訂單欄位 | 資料類型 | Description | 
| --- | --- | --- | 
| Name | String | 與訂單地址相關聯的名稱。 | 
| Address1 | String | 訂單地址的第一行。 | 
| Address2 | String | 訂單地址的第二行。 | 
| Address3 | String | 訂單地址的第三行。 | 
| Address4 | String | 訂單地址的第四行。 | 
| City | String | 訂單地址的城市。 | 
| County | String | 訂單地址的郡/縣。 | 
| State | String | 訂單地址的州別。 | 
| Province | String | 訂單地址的省份。 | 
| Country | String | 訂單地址的國家。 | 
| PostalCode | String | 訂單地址的郵遞區號。 | 

## OrderItem 資料類型
<a name="orderitem-data-type"></a>


| 標準訂單欄位 | 資料類型 | Description | 
| --- | --- | --- | 
| Title | String | 訂單項目的標題。 | 
| Price | String | 訂單項目的價格。 | 
| 數量 | String | 訂單項目的數量。 | 

# 在 Amazon Connect Customer Profiles 中，將 Shopify 物件映射至標準訂單
<a name="mapping-shopify-objects-standard-order.html"></a>

本主題列出 Shopify 物件中的哪些欄位會對應到客戶設定檔中標準訂單物件中的欄位。

## Shopify-DraftOrder 物件
<a name="shopify-draftorder-object.html"></a>

如需 Shopify-DraftOrder 物件中所有欄位的清單，請參閱 Shopify 文件中的 [DraftOrder 物件](https://shopify.dev/api/admin-rest/2021-10/resources/draftorder#resource_object)。

## 將 Shopify-DraftOrder 物件對應到標準訂單
<a name="shopify-draftorder-object-standardorder.html"></a>

Shopify-DraftOrder 物件中欄位的子集會對應到客戶設定檔中的標準訂單物件。

下表列出了哪些欄位可以從 Shopify-DraftOrder 物件對應到標準訂單。

 如果來源中存在 `order_status_url`，則 `StatusCode` 為 `ACTIVATED`。否則 `StatusCode` 為 `DRAFT`。


|  Shopify-DraftOrder 來源欄位  |  標準訂單目標欄位  | 
| --- | --- | 
| id | Attributes.ShopifyOrderId | 
| customer.id | Attributes.ShopifyCustomerId | 
| note | AdditionalInformation | 
| email | CustomerEmail | 
| currency | Currency | 
| created\$1at | CreatedDate | 
| updated\$1at | UpdatedDate | 
| name | Name | 
| status | 狀態 | 
| order\$1status\$1url | StatusCode | 
| billing\$1address.address1 | BillingAddress.Address1 | 
| billing\$1address.address2 | BillingAddress.Address2 | 
| billing\$1address.city | BillingAddress.City | 
| billing\$1address.zip | BillingAddress.PostalCode | 
| billing\$1address.province | BillingAddress.Province | 
| billing\$1address.country | BillingAddress.Country | 
| billing\$1address.name | BillingAddress.Name | 
| shipping\$1address.address1 | ShippingAddress.Address1 | 
| shipping\$1address.address2 | ShippingAddress.Address2 | 
| shipping\$1address.city | ShippingAddress.City | 
| shipping\$1address.zip | ShippingAddress.PostalCode | 
| shipping\$1address.province | ShippingAddress.Province | 
| shipping\$1address.country | ShippingAddress.Country | 
| shipping\$1address.name | ShippingAddress.Name | 
| invoice\$1url | StatusUrl | 
| total\$1price | TotalPrice | 
| total\$1tax | TotalTax | 
| line\$1items[].title | OrderItems[].Title | 
| line\$1items[].price | OrderItems[].Price | 
| line\$1items[].quantity | OrderItems[].Quantity | 

### 範例
<a name="example-shopify-draftorder-object-standardorder.html"></a>

下列範例顯示如何將原始欄位對應到目標欄位。

```
"shopifyOrderId": {
    "Source": "_source.detail.event.detail.payload.id",
    "Target": "_order.Attributes.ShopifyOrderId"
}
```

來自 Shopify 物件的 Shopify-DraftOrder 客戶資料會使用下列索引與 Amazon Connect 標準訂單關聯。


| 標準索引名稱  | Shopify-DraftOrder 來源欄位  | 
| --- | --- | 
| \$1shopifyOrderId | id | 

例如，您可以使用 `_shopifyOrderId` 作為 `ObjectFilter.KeyName`，搭配 [ListProfileObjects](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_ListProfileObjects.html) API 來尋找標準訂單。您可以使用 [ListProfileObjects](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_ListProfileObjects.html) API，並將 `ProfileId` 和 `ObjectTypeName` 設定為 `Shopify-DraftOrder`，以尋找與特定設定檔關聯的 Shopify-DraftOrder 物件。

## Shopify-Order 物件
<a name="shopify-order-object.html"></a>

如需 Shopify-Order 物件中所有欄位的清單，請參閱 Shopify 文件中的[訂單物件](https://shopify.dev/api/admin-rest/2021-10/resources/order#resource_object)。

## 將 Shopify-Order 物件對應到標準訂單
<a name="mapping-shopify-order-object-standarorder.html"></a>

Shopify-Order 物件中的欄位的子集會對應到客戶設定檔中的標準訂單物件。

下表列出了哪些欄位可以從 Shopify-Order 物對應到標準訂單。

如果來源中存在 `order_status_url`，則 `StatusCode` 為 `ACTIVATED`。否則 `StatusCode` 為 `DRAFT`。


| Shopify-Order 來源欄位 | 標準訂單目標欄位 | 
| --- | --- | 
| id | Attributes.ShopifyOrderId | 
| customer.id | Attributes.ShopifyCustomerId | 
| cancelled\$1at | CancelledDate | 
| cancel\$1reason | CancelReason | 
| closed\$1at | ClosedDate | 
| created\$1at | CreatedDate | 
| currency | Currency | 
| email | CustomerEmail | 
| financial\$1status | 狀態 | 
| order\$1status\$1url | StatusCode | 
| fulfillment\$1status | FulfillmentStatus | 
| 閘道 | 閘道 | 
| name | 名稱 | 
| note | AdditionalInformation | 
| order\$1status\$1url | StatusUrl | 
| phone | CustomerPhone | 
| processed\$1at | ProcessedDate | 
| total\$1discounts | TotalDiscounts | 
| total\$1line\$1items\$1price | TotalItemsPrice | 
| total\$1price | TotalPrice | 
| total\$1shipping\$1price\$1set.shop\$1money.amount | TotalShippingPrice | 
| total\$1tax | TotalTax | 
| total\$1tip\$1received | TotalTipReceived | 
| total\$1weight | TotalWeight | 
| updated\$1at | UpdatedDate | 
| billing\$1address.address1 | BillingAddress.Address1 | 
| billing\$1address.address2 | BillingAddress.Address2 | 
| billing\$1address.city | BillingAddress.City | 
| billing\$1address.zip | BillingAddress.PostalCode | 
| billing\$1address.province | BillingAddress.Province | 
| billing\$1address.country | BillingAddress.Country | 
| billing\$1address.name | BillingAddress.Name | 
| payment\$1details.credit\$1card\$1number | CreditCardNumber | 
| payment\$1details.credit\$1card\$1company | CreditCardCompany | 
| shipping\$1address.address1 | ShippingAddress.Address1 | 
| shipping\$1address.address2 | ShippingAddress.Address2 | 
| shipping\$1address.city | ShippingAddress.City | 
| shipping\$1address.zip | ShippingAddress.PostalCode | 
| shipping\$1address.province | ShippingAddress.Province | 
| shipping\$1address.country | ShippingAddress.Country | 
| shipping\$1address.name | ShippingAddress.Name | 
| line\$1items[].title | OrderItems[].Title | 
| line\$1items[].price | OrderItems[].Price | 
| line\$1items[].quantity | OrderItems[].Quantity | 

### 範例
<a name="example-shopify-draftorder-object-standardorder.html"></a>

下列範例顯示如何將原始欄位對應到目標欄位。

```
"shopifyOrderId": {
    "Source": "_source.detail.event.detail.payload.id",
    "Target": "_order.Attributes.ShopifyOrderId"
}
```

來自 Shopify 物件的 Shopify-Order 客戶資料會使用下列索引與 Amazon Connect 標準訂單關聯。


| 標準索引名稱 | Shopify-Order 來源欄位 | 
| --- | --- | 
| \$1shopifyOrderId | id | 

例如，您可以使用 `_shopifyOrderId` 作為 `ObjectFilter.KeyName`，搭配 [ListProfileObjects](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_ListProfileObjects.html) API 來尋找標準訂單。您可以使用 [ListProfileObjects](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_ListProfileObjects.html) API，並將 `ProfileId` 和 `ObjectTypeName` 設定為 `Shopify-Order`，以尋找與特定設定檔關聯的 Shopify-Order 物件。

# 標準通訊記錄的物件類型映射
<a name="object-type-mapping-standard-communiction-record"></a>

本章節的主題提供標準通訊記錄定義，以及從行銷活動事件到標準通訊記錄的物件類型映射。

**Topics**
+ [Customer Profiles 標準通訊記錄物件欄位](customer-profiles-standard-communication-record-object-fields.md)
+ [在 Amazon Connect Customer Profiles 中，將 Campaign 物件映射至標準通訊記錄](mapping-campaign-objects-to-the-standard-communication-record-in-amazon-connect-customer-profiles.md)

# Customer Profiles 標準通訊記錄物件欄位
<a name="customer-profiles-standard-communication-record-object-fields"></a>

 下表列出 Customer Profiles 標準通訊記錄物件中的所有欄位。


|  標準 communicationRecord 欄位  |  資料類型  |  Description  | 
| --- | --- | --- | 
|  CommunicationRecordId  |  String  |  標準通訊記錄的唯一識別符。 | 
|  Channel  |  String  |  用於聯絡您的聯絡中心的方式。例如：VOICE、CHAT、EMAIL  | 
|  ConnectInstanceArn  |  String  |  AWS Connect 執行個體的 ARN。 | 
|  CreatedDate  |  String  |  指出通訊記錄建立時間的時間戳記。 | 
|  UpdatedDate  |  String  |  指出通訊記錄最後更新時間的時間戳記。 | 
|  LastEventType  |  String  |  此通訊所擷取最後一個事件的事件類型。 | 
|  行銷活動  |  行銷活動  |  與此通訊相關的行銷活動詳細資訊。 | 
|  Endpoint  |  Endpoint  |  用於此通訊之端點的相關資訊。 | 
|  事件  |  Map<String, Event>  |  事件映射，其中索引鍵是事件類型，例如已傳送、已開啟或已點選的電子郵件。這會追蹤此通訊期間所發生每個唯一事件類型的最後一個事件。 | 
|  屬性  |  Map<String, String>  |  標準通訊記錄屬性的鍵值對。 | 

 標準通訊記錄物件會依據下表的索引鍵編製索引。


|  標準索引名稱  |  標準通訊記錄欄位  | 
| --- | --- | 
|  \$1communicationRecordId  |  CommunicationRecordId  | 

 例如，您可以使用 `_communicationRecordId` 作為索引鍵名稱，搭配 [SearchProfiles](https://docs.aws.amazon.com/connect/latest/APIReference/API_connect-customer-profiles_SearchProfiles.html) API 來尋找具有與搜尋值相符 `CommunicationRecordId` 之通訊記錄的設定檔。您可以使用 [ListProfileObjects](https://docs.aws.amazon.com/connect/latest/APIReference/API_connect-customer-profiles_ListProfileObjects.html) API，並將 `ProfileId` 和 `ObjectTypeName` 設定為 `_communicationRecord`，以尋找與特定設定檔關聯的標準 `communicationRecord` 物件。

## Campaign 資料類型
<a name="campaign-data-type"></a>


|  欄位  |  資料類型  |  Description  | 
| --- | --- | --- | 
|  CampaignId  |  String  |  對外行銷活動的唯一 ID。 | 
|  CampaignName  |  String  |  對外行銷活動的名稱。 | 
|  CampaignRunId  |  String  |  行銷活動特定執行的唯一 ID。 | 
|  CampaignActivityId  |  String  |  行銷活動內的活動唯一 ID。 | 
|  SegmentArn  |  String  |  使用者區段的 ARN。 | 

## Endpoint 資料類型
<a name="endpoint-data-type"></a>


|  欄位  |  資料類型  |  Description  | 
| --- | --- | --- | 
|  EndpointAddress  |  String  |  端點的地址 (例如電子郵件地址、電話號碼)。 | 
|  EndpointType  |  String  |  端點的類型，例如預設電子郵件或商業電子郵件。 | 

## Event 資料類型
<a name="event-data-type"></a>


|  欄位  |  資料類型  |  Description  | 
| --- | --- | --- | 
|  UpdatedDate  |  String  |  指出通訊事件發生時間的時間戳記。 | 
|  EventId  |  String  |  每個通訊事件的唯一識別符。 | 
|  EventType  |  String  |  特定的通訊事件類型。 | 
|  屬性  |  Map<String, String>  |  事件類型特有的屬性鍵值對。 | 

# 在 Amazon Connect Customer Profiles 中，將 Campaign 物件映射至標準通訊記錄
<a name="mapping-campaign-objects-to-the-standard-communication-record-in-amazon-connect-customer-profiles"></a>

 本主題列出 Campaign 物件中的哪些欄位會映射到 Customer Profiles 中標準通訊記錄物件中的欄位。

## Campaign-Email 物件
<a name="campaign-email-object"></a>

 如需 Campaign-Email 物件中所有欄位的清單，請參閱 Amazon SES 文件中的[電子郵件物件](https://docs.aws.amazon.com/ses/latest/dg/event-publishing-retrieving-sns-contents.html)。

**將 Campaign-Email 物件映射至標準通訊記錄**

 Campaign-Email 物件中的欄位的子集會映射到 Customer Profiles 中的標準通訊記錄物件。

 下表列出了哪些欄位可以從 Campaign-Email 物件映射到標準通訊記錄。


|  Campaign-Email 來源欄位  |  標準通訊記錄目標欄位  | 
| --- | --- | 
|  campaign\$1event\$1id  |  Attributes.LastCampaignEventId  | 
|  outbound\$1request\$1id  |  Attributes.OutboundCampaignRequestId  | 
|  campaign\$1message\$1id  |  Attributes.CampaignMessageId  | 
| channel.name  |  Channel  | 
|  channel.subtype  |  Attributes.ChannelSubType  | 
|  endpoint\$1address  |  Endpoint.EndpointAddress  | 
|  endpoint\$1type  |  Endpoint.EndpointType  | 
|  instance\$1arn  |  ConnectInstanceArn  | 
|  campaign\$1name  |  Campaign.CampaignName  | 
|  campaign\$1id  |  Campaign.CampaignId  | 
|  campaign\$1run\$1id  |  Campaign.CampaignRunId  | 
|  campaign\$1activity\$1id  |  Campaign.CampaignActivityId  | 
|  segment\$1arn  |  Campaign.SegmentArn  | 
|  outbound\$1request\$1creation\$1timestamp  |  CreatedDate  | 
|  campaign\$1event\$1timestamp  |  UpdatedDate  | 
|  campaign\$1event\$1type  |  LastEventType  | 
|  campaign\$1event\$1timestamp  |  Events.\$1\$1campaign\$1event\$1type\$1\$1.UpdatedDate  | 
|  campaign\$1event\$1id  |  Events.\$1\$1campaign\$1event\$1type\$1\$1.EventId  | 
|  campaign\$1event\$1type  |  Events.\$1\$1campaign\$1event\$1type\$1\$1.EventType  | 
|  email.bounce.bounceType  |  Events.Bounce.Attributes.BounceType  | 
|  email.bounce.bounceSubType  |  Events.Bounce.Attributes.BounceSubType  | 
|  email.click.link  |  Events.Click.Attributes.Link  | 
|  email.click.ipAddress  |  Events.Click.Attributes.IpAddress  | 
|  email.open.ipAddress  |  Events.Open.Attributes.IpAddress  | 
|  email.reject.reason  |  Events.Reject.Attributes.Reason  | 
|  email.renderingFailure.templateName  |  Events.RenderingFailure.Attributes.TemplateName  | 
|  email.renderingFailure.errorMessage  |  Events.RenderingFailure.Attributes.ErrorMessage  | 
|  email.deliveryDelay.delayType  |  Events.DeliveryDelay.Attributes.DelayType  | 
|  email.complaint.complaintFeedbackType  |  Events.Complaint.Attributes.ComplaintFeedbackType  | 
|  email.complaint.complaintSubType  |  Events.Complaint.Attributes.ComplaintSubType  | 
|  email.mail.commonHeaders.subject  |  Attributes.Subject  | 

## Campaign-SMS 物件
<a name="campaign-sms-object"></a>

 如需 Campaign-SMS 物件中所有欄位的清單，請參閱AWS 終端使用者簡訊 SMS 文件中的 [SMS 物件](https://docs.aws.amazon.com/sms-voice/latest/userguide/configuration-sets-event-format.html)。

**將 Campaign-SMS 物件映射至標準通訊記錄**

 Campaign-SMS 物件中的欄位的子集會映射到 Customer Profiles 中的標準通訊記錄物件。

 下表列出了哪些欄位可以從 Campaign-SMS 物件映射到標準通訊記錄。


|  Campaign-SMS 來源欄位  |  標準通訊記錄目標欄位  | 
| --- | --- | 
|  campaign\$1event\$1id  |  Attributes.LastCampaignEventId  | 
|  outbound\$1request\$1id  |  Attributes.OutboundCampaignRequestId  | 
|  campaign\$1message\$1id  |  Attributes.CampaignMessageId  | 
| channel.name  |  Channel  | 
|  channel.subtype  |  Attributes.ChannelSubType  | 
|  endpoint\$1address  |  Endpoint.EndpointAddress  | 
|  endpoint\$1type  |  Endpoint.EndpointType  | 
|  instance\$1arn  |  ConnectInstanceArn  | 
|  campaign\$1name  |  Campaign.CampaignName  | 
|  campaign.campaign\$1id  |  Campaign.CampaignId  | 
|  campaign.campaign\$1run\$1id  |  Campaign.CampaignRunId  | 
|  campaign\$1activity\$1id  |  Campaign.CampaignActivityId  | 
|  segment\$1arn  |  Campaign.SegmentArn  | 
|  outbound\$1request\$1creation\$1timestamp  |  CreatedDate  | 
|  campaign\$1event\$1timestamp  |  UpdatedDate  | 
|  campaign\$1event\$1type  |  LastEventType  | 
|  campaign\$1event\$1timestamp  |  Events.\$1\$1campaign\$1event\$1type\$1\$1.UpdatedDate  | 
|  campaign\$1event\$1id  |  Events.\$1\$1campaign\$1event\$1type\$1\$1.EventId  | 
|  campaign\$1event\$1type  |  Events.\$1\$1campaign\$1event\$1type\$1\$1.EventType  | 
|  sms.messageType  |  Events.\$1\$1campaign\$1event\$1type\$1\$1.Attributes.MessageType  | 
|  sms.messageStatus  |  Events.\$1\$1campaign\$1event\$1type\$1\$1.Attributes.MessageStatus  | 
|  sms.messageStatusDescription  |  Events.\$1\$1campaign\$1event\$1type\$1\$1.Attributes.MessageStatusDescription  | 
|  sms.totalMessagePrice  |  Events.\$1\$1campaign\$1event\$1type\$1\$1.Attributes.TotalMessagePrice  | 
|  sms.totalCarrierFee  |  Events.\$1\$1campaign\$1event\$1type\$1\$1.Attributes.TotalCarrierFee  | 
|  sms.isoCountryCode  |  Events.\$1\$1campaign\$1event\$1type\$1\$1.Attributes.IsoCountryCode  | 

## Campaign-Telephony 物件
<a name="campaign-telephony-object"></a>

如需 Campaign-Telephony 物件中所有欄位的清單，請參閱 AWS 最終使用者傳訊簡訊文件中的[語音物件](https://docs.aws.amazon.com/sms-voice/latest/userguide/configuration-sets-event-format.html)。

**將 Campaign-Telephony 物件映射至標準通訊記錄**

Campaign-Telephony 物件中的欄位的子集會映射到 Customer Profiles 中的標準通訊記錄物件。

下表列出了哪些欄位可以從 Campaign-Telephony 物件映射到標準通訊記錄。


| Campaign-Telephony 來源欄位 | 標準通訊記錄目標欄位 | 
| --- | --- | 
| campaign\$1event\$1id | Attributes.LastCampaignEventId | 
| outbound\$1request\$1id | Attributes.OutboundCampaignRequestId | 
| campaign\$1message\$1id | Attributes.CampaignMessageId | 
| channel.name | Channel | 
| channel.subtype | Attributes.ChannelSubType | 
| endpoint.endpoint\$1address | Endpoint.EndpointAddress | 
| endpoint.endpoint\$1type | Endpoint.EndpointType | 
| instance\$1arn | ConnectInstanceArn | 
| campaign.campaign\$1name | Campaign.CampaignName | 
| campaign.campaign\$1id | Campaign.CampaignId | 
| campaign.campaign\$1run\$1id | Campaign.CampaignRunId | 
| campaign.campaign\$1activity\$1id | Campaign.CampaignActivityId | 
| campaign.segment\$1arn | Campaign.SegmentArn | 
| outbound\$1request\$1creation\$1timestamp | CreatedDate | 
| campaign\$1event\$1timestamp | UpdatedDate | 
| campaign\$1event\$1type | LastEventType | 
| campaign\$1event\$1timestamp | Events.\$1\$1campaign\$1event\$1type\$1\$1.UpdatedDate | 
| campaign\$1event\$1id | Events.\$1\$1campaign\$1event\$1type\$1\$1.EventId | 
| campaign\$1event\$1type | Events.\$1\$1campaign\$1event\$1type\$1\$1.EventType | 
| voice.agentInfo.connectedToAgentTimestamp | Events.\$1\$1campaign\$1event\$1type\$1\$1.Attributes.ConnectedToAgentTimestamp | 
| voice.customerVoiceActivity.greetingEndTimestamp | Events.\$1\$1campaign\$1event\$1type\$1\$1.Attributes.GreetingEndTimestamp | 
| voice.answeringMachineDetectionStatus | Events.\$1\$1campaign\$1event\$1type\$1\$1.Attributes.AnsweringMachineDetectionStatus | 
| campaign\$1event\$1timestamp | SourceLastUpdatedTimestamp | 

## Campaign-Orchestration 物件
<a name="campaign-orchestration-object"></a>

**將 Campaign-Orchestration 物件映射至標準通訊記錄**

Campaign-Orchestration 物件中的欄位的子集會映射到 Customer Profiles 中的標準通訊記錄物件。

下表列出了哪些欄位可以從 Campaign-Orchestration 物件映射到標準通訊記錄。


| Campaign-Orchestration 來源欄位 | 標準通訊記錄目標欄位 | 
| --- | --- | 
| campaign\$1event\$1id | Attributes.LastCampaignEventId | 
| channel.name | Channel | 
| channel.subtype | Attributes.ChannelSubType | 
| instance\$1arn | ConnectInstanceArn | 
| campaign.campaign\$1name | Campaign.CampaignName | 
| campaign.campaign\$1id | Campaign.CampaignId | 
| campaign.campaign\$1run\$1id | Campaign.CampaignRunId | 
| campaign.campaign\$1activity\$1id | Campaign.CampaignActivityId | 
| campaign.segment\$1arn | Campaign.SegmentArn | 
| campaign\$1event\$1timestamp | UpdatedDate | 
| campaign\$1event\$1type | LastEventType | 
| campaign\$1event\$1timestamp | Events.\$1\$1campaign\$1event\$1type\$1\$1.UpdatedDate | 
| campaign\$1event\$1id | Events.\$1\$1campaign\$1event\$1type\$1\$1.EventId | 
| campaign\$1event\$1type | Events.\$1\$1campaign\$1event\$1type\$1\$1.EventType | 
| campaign\$1event\$1timestamp | SourceLastUpdatedTimestamp | 

## 範例
<a name="example"></a>

 下列範例顯示如何將原始欄位對應到目標欄位：

```
"channel": {
    "source": "_source.engagement.channel.name",
    "target": "_communicationRecord.Channel"
}
```

# Customer Profiles 中標準資產的物件類型映射。
<a name="object-type-mapping-standard-asset"></a>

本節的主題提供標準資產定義，以及從外部應用程式到標準資產的物件類型對應。

**Topics**
+ [Amazon AppFlow 存取要求](appflow-access-requirements-asset.md)
+ [標準資產定義](standard-asset-definition.md)
+ [將 Salesforce 物件對應到標準資產](mapping-salesforce-objects-to-asset.md)

# Customer Profiles 中的 Amazon AppFlow 存取要求
<a name="appflow-access-requirements-asset"></a>

使用以下 Amazon AppFlow 存取要求，來建立和刪除 Salesforce 與 Amazon Connect Customer Profiles 的整合：
+ `appflow:CreateFlow`
+ `appflow:DeleteFlow`

# Amazon Connect Customer Profiles 中的標準資產定義
<a name="standard-asset-definition"></a>

下表列出 Customer Profiles 標準資產物件中的所有欄位。


| 標準資產欄位 | 資料類型 | Description | 
| --- | --- | --- | 
|  AssetId  | String  | 標準資產的唯一識別符。  | 
|  AssetName  | String  | 資產的名稱。  | 
|  SerialNumber  | String  | 資產的序號。  | 
|  ModelNumber  | String  | 資產的模型號碼。  | 
|  ModelName  | String  | 資產的模型名稱。  | 
|  ProductSKU  | String  | 資產的庫存單位。  | 
|  PurchaseDate  | String  | 資產的購買日期。  | 
|  UsageEndDate  | String  | 資產的使用結束日期。  | 
|  狀態  | String  | 資產的狀態。  | 
|  Price  | String  | 資產的價格。  | 
|  數量  | String  | 資產的數量。  | 
|  Description  | String  | 資產的說明。  | 
|  AdditionalInformation  | String  | 任何與資產相關的其他資訊。  | 
|  資料來源  | String  | 資產的資料來源。  | 
|  屬性  | 字串對字串對應  | 標準資產屬性的鍵值對。  | 

標準資產物件會依據下表的索引鍵編製索引。


| 標準索引名稱 | 標準資產欄位 | 
| --- | --- | 
| \$1assetId | AssetId | 
| \$1assetName | AssetName | 
| \$1serialNumber | SerialNumber | 

例如，您可以使用 `_assetName` 作為索引鍵名稱，搭配 [SearchProfiles API](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_SearchProfiles.html) 來尋找具有與搜尋值相符資產名稱之資產的設定檔。您可以使用 [ListProfileObjects API](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_ListProfileObjects.html)，並將 `ProfileId` 和 `ObjectTypeName` 設定為 `_asset`，以尋找與特定設定檔關聯的標準資產物件。

# 在 Customer Profiles 中將 Salesforce 物件映射到標準資產
<a name="mapping-salesforce-objects-to-asset"></a>

本主題列出 Salesforce 物件中的哪些欄位會對應到客戶設定檔標準資產物件中的欄位。

## Salesforce-Asset 物件
<a name="salesforceaccountobject-asset"></a>

以下是 Salesforce-Asset 物件中所有欄位的清單。
+ Id
+ ContactId
+ AccountId
+ ParentId
+ RootAssetId
+ Product2Id
+ ProductCode
+ IsCompetitorProduct
+ CreatedDate
+ CreatedById
+ LastModifiedDate
+ LastModifiedById
+ SystemModstamp
+ IsDeleted
+ 名稱
+ SerialNumber
+ InstallDate
+ PurchaseDate
+ UsageEndDate
+ LifecycleStartDate
+ LifecycleEndDate
+ 狀態
+ Price
+ 數量
+ Description
+ OwnerId
+ AssetProvidedById
+ AssetServiceById
+ IsInternal
+ AssetLevel
+ StockKeepingUnit
+ HasLifecycleManagement
+ CurrentMrr
+ CurrentLifecycleEndDate
+ CurrentQuantity
+ CurrentAmount
+ LastViewedDate
+ LastReferencedDate

## 將 Salesforce-Asset 物件對應到標準資產
<a name="mapping-salesforceaccountobject"></a>

Salesforce-Asset 物件欄位中的子集會對應到客戶設定檔標準資產物件。

下表列出了哪些欄位可以從 Salesforce-Asset 物件對應到標準資產。


| Saleforce-Asset 來源欄位 | 標準資產目標欄位 | 
| --- | --- | 
|  Id  | Attributes.sfdcAssetId  | 
|  ContactId  | Attributes.sfdcContactId  | 
|  AccountId  | Attributes.sfdcAccountId  | 
|  SerialNumber  | SerialNumber  | 
|  StockKeepingUnit  | ProductSKU  | 
|  UsageEndDate  | UsageEndDate  | 
|  狀態  | 狀態  | 
|  Price  | Price  | 
|  數量  | 數量  | 
|  Description  | Description  | 

Salesforce 物件中的銷售資產客戶資料會使用下表中的索引，與 Amazon Connect 標準資產關聯。


| 標準索引名稱 | Salesforce-Asset 來源欄位 | 
| --- | --- | 
|  \$1salesforceAssetId  | Id  | 
|  \$1salesforceContactId  | ContactId  | 
|  \$1salesforceAccountId  | AccountId  | 

例如，您可以使用 `_salesforceAssetId` 和 `_salesforceAccountId` 作為 `ObjectFilter.KeyName`，搭配 [ListProfileObjects](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_ListProfileObjects.html) API 來尋找標準資產。您可以使用 [ListProfile 物件](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_ListProfileObjects.html) API，並將 `ProfileId` 和 `ObjectTypeName` 設定為 `Salesforce-Asset`，以尋找與特定設定檔關聯的 Salesforce-Asset 物件。

# Customer Profiles 中標準案例的物件類型映射。
<a name="object-type-mapping-standard-case"></a>

本節中的主題提供標準案例定義，以及從外部應用程式到標準案例的物件類型對應。

**Topics**
+ [Amazon AppFlow 存取要求](appflow-access-requirements-case.md)
+ [標準案例定義](standard-case-definition.md)
+ [對應 Zendesk 物件](mapping-zendesk-objects-case.md)
+ [對應 ServiceNow 物件](mapping-servicenow-objects-standard-case.md)

# Customer Profiles 中的 Amazon AppFlow 存取要求
<a name="appflow-access-requirements-case"></a>

使用以下 Amazon AppFlow 存取要求，來建立和刪除 Zendesk 和 ServiceNow 與 Amazon Connect Customer Profiles 的整合：
+ `appflow:CreateFlow`
+ `appflow:DeleteFlow`

# Customer Profiles 標準案例物件欄位
<a name="standard-case-definition"></a>

下表列出 Customer Profiles 標準案例物件中的所有欄位。


| 標準案例欄位 | 資料類型 | Description | 
| --- | --- | --- | 
|  CaseId  | String  | 標準案例的唯一識別符。  | 
|  Title  | String  | 案件標題  | 
|  摘要  | String  | 案件摘要。  | 
|  狀態  | String  | 案件的狀態。  | 
|  Reason  | String  | 案件的原因。  | 
|  CreatedBy  | String  | 案件的建立者。  | 
|  CreatedDate  | String  | 案例的建立日期。  | 
|  UpdatedDate  | String  | 案例的更新日期。  | 
|  ClosedDate  | String  | 案件的結束日期。  | 
|  AdditionalInformation  | String  | 與案件有關的任何其他資訊。  | 
|  資料來源  | String  | 案例的資料來源。  | 
|  屬性  | 字串對字串對應  | 標準案例屬性的鍵值對。  | 

標準案例物件會依據下表的索引鍵編製索引。


| 標準索引名稱 | 標準案例欄位 | 
| --- | --- | 
| \$1caseId | CaseId | 

例如，您可以使用 `_caseId` 作為索引鍵名稱，搭配 [SearchProfiles API](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_SearchProfiles.html) 來尋找具有與搜尋值相符案例 ID 之案例的設定檔。您可以使用 [ListProfileObjects API](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_ListProfileObjects.html)，並將 `ProfileId` 和 `ObjectTypeName` 設定為 `_case`，以尋找與特定設定檔關聯的標準案例物件。

# 在 Amazon Connect Customer Profiles 中，將 Zendesk 物件映射至標準案例
<a name="mapping-zendesk-objects-case"></a>

本主題列出 Zendesk 物件中的哪些欄位對應到客戶設定檔標準案例中的欄位。

## Zendesk-tickets 物件
<a name="zendeskticketsobject"></a>

以下是在 Zendesk-tickets 物件中所有欄位的清單。
+ id
+ url
+ type
+ subject
+ raw\$1subject
+ description
+ priority
+ status
+ recipient
+ requester\$1id
+ submitter\$1id
+ assignee\$1id
+ organization\$1id
+ group\$1id
+ collaborator\$1ids
+ email\$1cc\$1ids
+ follower\$1ids
+ forum\$1topic\$1id
+ problem\$1id
+ has\$1incidents
+ due\$1at
+ 標籤
+ via.channel
+ custom\$1fields
+ satisfaction\$1rating
+ sharing\$1agreement\$1ids
+ followup\$1ids
+ ticket\$1form\$1id
+ brand\$1id
+ allow\$1channelback
+ allow\$1attachments
+ is\$1public
+ created\$1at
+ updated\$1at

## 將 Zendesk-tickets 物件對應到標準案例
<a name="mapping-zendeskticketsobject-case"></a>

Zendesk-tickets 物件中欄位的子集會對應到客戶設定檔中的標準案例。下表列出了哪些欄位可以從 Zendesk-tickets 物件對應到標準案例。


| Zendesk-tickets 來源欄位 | 標準案例目標欄位 | 
| --- | --- | 
|  requester\$1id  | Attributes.ZendeskUserId  | 
|  id  | Attributes.ZendeskTicketId  | 
|  subject  | Title  | 
|  description  | Summary  | 
|  status  | 狀態  | 
|  requester\$1id  | CreatedBy  | 
|  created\$1at  | CreatedDate  | 
|  updated\$1at  | UpdatedDate  | 

Zendesk 物件中的 ZENDESK 客戶資料使用下列索引與 Amazon Connect 標準案例關聯。


| 標準索引名稱 | Zendesk-tickets 來源欄位 | 
| --- | --- | 
|  \$1zendeskUserId  | requester\$1id  | 
|  \$1zendeskTicketId  | id  | 

例如，您可以使用 `_zendeskUserId` 和 `_zendeskTicketId` 作為 `ObjectFilter.KeyName`，並搭配 [ListProfileObjects](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_ListProfileObjects.html) API 來尋找標準案例。您可以使用 [ListProfileObjects](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_ListProfileObjects.html) API，並將 `ProfileId` 和 `ObjectTypeName` 設定為 `Zendesk-tickets`，以尋找與特定設定檔關聯的 Zendesk-tickets 物件。

# 在 Amazon Connect Customer Profiles 中，將 ServiceNow 物件映射至標準案例
<a name="mapping-servicenow-objects-standard-case"></a>

本主題列出 ServiceNow 物件中的哪些欄位對應到 Amazon Connect Customer Profiles 中標準案例中的欄位。

## Servicenow-task 物件
<a name="servicenow-task-object"></a>

以下是 Servicenow-task 物件中所有欄位的清單。
+ sys\$1id
+ active
+ activity\$1due
+ additional\$1assignee\$1list
+ approval
+ approval\$1history
+ approval\$1set
+ assigned\$1to
+ assignment\$1group
+ business\$1duration
+ business\$1service
+ calendar\$1duration
+ closed\$1at
+ closed\$1by
+ cmdb\$1ci.display\$1value
+ cmdb\$1ci.link
+ comments
+ comments\$1and\$1work\$1notes
+ company
+ contact\$1type
+ contract
+ correlation\$1display
+ active
+ correlation\$1id
+ delivery\$1plan
+ delivery\$1task
+ description
+ due\$1date
+ escalation
+ expected\$1start
+ follow\$1up
+ group\$1list
+ impact
+ knowledge
+ location
+ made\$1sla
+ number
+ opened\$1at
+ opened\$1by.display\$1value
+ order
+ parent
+ priority
+ reassignment\$1count
+ service\$1offering
+ short\$1description
+ sla\$1due
+ state
+ sys\$1class\$1name
+ sys\$1created\$1by
+ sys\$1created\$1on
+ active
+ sys\$1domain.global
+ sys\$1domain.link
+ sys\$1domain\$1path
+ sys\$1mod\$1count
+ sys\$1updated\$1by
+ sys\$1updated\$1on
+ time\$1worked
+ upon\$1approval
+ upon\$1reject
+ urgency
+ user\$1input
+ watch\$1list
+ work\$1end
+ work\$1notes
+ work\$1notes\$1list
+ work\$1start

## 將 Servicenow-task 對應到標準案例
<a name="mapping-servicenow-task-case"></a>

Servicenow-task 物件中欄位的子集會對應到客戶設定檔中的標準案例。

下表列出哪些欄位可以從 Servicenow-task 物件對應到標準案例。


| Servicenow-task 來源欄位 | 標準案例目標欄位 | 
| --- | --- | 
|  sys\$1id  | Attributes.ServiceNowTaskId  | 
|  opened\$1by.link  | Attributes.ServiceNowSystemUserId  | 
|  short\$1description  | Title  | 
|  description  | Summary  | 
|  status  | Status  | 
|  sys\$1created\$1by  | CreatedBy  | 
|  sys\$1created\$1on  | CreatedDate  | 
|  sys\$1updated\$1on  | UpdatedDate  | 

來自 Servicenow 的 Servicenow-task 客戶資料使用下表中的索引與 Amazon Connect 標準案例關聯。


| 標準索引名稱 | Servicenow-task 來源欄位 | 
| --- | --- | 
|  \$1serviceNowTaskId  | sys\$1id  | 
|  \$1serviceNowSystemId  | open\$1by.link  | 

例如，您可以使用 `_serviceNowTaskId` 和 `_serviceNowSystemId` 作為 `ObjectFilter.KeyName`，並搭配 [ListProfileObjects](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_ListProfileObjects.html) API 來尋找標準案例。您可以使用 [ListProfileObjects](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_ListProfileObjects.html) API，並將 `ProfileId` 和 `ObjectTypeName` 設定為 `Servicenow-task`，以尋找與特定設定檔關聯的 Servicenow-task 物件。

## Servicenow-incident 物件
<a name="servicenowincident-object"></a>

以下是 Servicenow-incident 物件中所有欄位的清單。
+ sys\$1id
+ business\$1stc
+ calendar\$1stc
+ caller\$1id.link
+ caller\$1id.value
+ category
+ caused\$1by
+ child\$1incidents
+ close\$1code
+ hold\$1reason
+ incident\$1state
+ notify
+ parent\$1incident
+ problem\$1id
+ reopened\$1by
+ reopened\$1time
+ reopen\$1count
+ resolved\$1at
+ resolved\$1by.link
+ resolved\$1by.value
+ rfc
+ severity
+ subcategory

## 將 Servicenow-incident 對應到標準案例
<a name="mapping-servicenowincident-case"></a>

Servicenow-incident 物件中欄位的子集會對應到客戶設定檔中的標準案例。

下表列出哪些欄位可以從 Servicenow-incident 物件對應到標準案例。


| Servicenow-Incident 來源欄位 | 標準案例目標欄位 | 
| --- | --- | 
| sys\$1id  |  Attributes\$1ServiceNowIncidentId  | 
| caller\$1id.link  |  Attributes\$1ServiceNowSystemUserId  | 
| incident\$1status  |  狀態  | 
| caller\$1id.link  |  CreatedBy  | 
| resolved\$1at  |  ClosedDate  | 
| category  |  Reason  | 

使用下表中的索引，來自 Servicenow 物件的 Servicenow-incident 客戶資料與 Amazon Connect 標準案例關聯。


| 標準索引名稱 | Servicenow 來源欄位 | 
| --- | --- | 
| \$1serviceNowIncidentId  |  sys\$1id  | 
| \$1serviceNowSystemId  |  caller\$1id.link  | 

例如，您可以使用 `_serviceNowIncidentId` 和 `_serviceNowSystemId` 作為 ObjectFilter.KeyName 搭配 [ListProfileObjects](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_ListProfileObjects.html) API 來尋找標準案例。您可以使用 [ListProfileObjects](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_ListProfileObjects.html) API，並將 `ProfileId` 和 `ObjectTypeName` 設定為 `Servicenow-incident`，以尋找與特定設定檔關聯的 Servicenow-incident 物件。

# 標準航空偏好設定的物件類型映射
<a name="object-type-mapping-standard-air-preference"></a>

本章節的主題提供標準航空偏好設定的定義。

**Topics**
+ [Customer Profiles 標準航空偏好設定物件欄位](standard-air-preference-object-fields.md)

# Customer Profiles 標準航空偏好設定物件欄位
<a name="standard-air-preference-object-fields"></a>

下表列出 Customer Profiles 標準航空偏好設定物件中的所有欄位。


**航空偏好設定**  

| 標準 airPreference 欄位 | 資料類型 | Description | 
| --- | --- | --- | 
| PreferenceId | String | 標準航空偏好設定的唯一識別符 | 
| Name | String | 偏好設定的名稱 | 
| CreatedDate | String | 偏好設定的建立日期 | 
| CreatedBy | String | 建立者的識別符 | 
| UpdatedDate | String | 上次更新日期 | 
| UpdatedBy | String | 上次更新人員的識別符 | 
| StartDate | String | 偏好設定開始日期 | 
| EndDate | String | 偏好設定結束日期 | 
| 狀態 | String | 偏好設定的目前狀態 | 
| ReferenceId | String | 偏好物件的 ID | 
| ReferenceType | String | 偏好物件的類型 | 
| TravelType | String | 旅程類型 (例如，直飛航班) | 
| 轉移 | String | 偏好的轉機類型 | 
| ArrivalAirport | String | 偏好抵達機場 | 
| ArrivalTerminal | String | 偏好的抵達機場航廈 | 
| DepartureAirport | String | 偏好出發機場 | 
| DepartureTerminal | String | 偏好的出發機場航廈 | 
| HomeAirport | String | 母國機場 | 
| CheckInChannel | String | 入住辦理模式 | 
| CheckInChannelDevice | String | 用於辦理入住的裝置 | 
| Language | Language | 通訊偏好語言的詳細資訊 | 
| Seat | Seat | 座位選擇的詳細資訊 | 
| Journey | Journey | 旅程偏好設定 | 
| Accessibility | Accessibility | 無障礙要求的詳細資訊 | 
| Insurance | Insurance | 保險詳細資訊 | 
| Interest | Interest | 興趣詳細資訊 | 
| Loyalty | Loyalty | 忠誠度詳細資訊 | 
| Dining | Dining | 餐飲偏好設定 | 
| MediaEntertainment | MediaEntertainment | 媒體和娛樂偏好設定 | 
| PaymentForm | PaymentForm | 付款方式偏好設定 | 
| PetInfo | PetInfo | 寵物詳細資訊 | 
| SpecialRequest | SpecialRequest | 特殊要求詳細資訊 | 
| TicketDistribution | TicketDistribution | 分票偏好設定 | 
| Marketing | Marketing | 行銷活動偏好設定 | 
| Medical | Medical | 醫療相關偏好設定 | 
| Baggage | Baggage | 行李相關偏好設定 | 
| ContactDetail | ContactDetail | 偏好設定中的聯絡人詳細資訊 | 
| ContactDetailAddress | ContactDetailAddress | 聯絡人詳細資訊的地址 | 
| ContactDetailCommunication | ContactDetailCommunication | 通訊偏好設定 | 
| 屬性 | Map<String, String> | 航空偏好設定的屬性鍵值對 | 

標準航空偏好設定物件會依據下表的索引鍵編製索引。


**標準索引欄位**  

| 標準索引名稱 | 標準偏好設定記錄欄位 | 
| --- | --- | 
| \$1airPreferenceId | PreferenceId | 
| \$1airReferenceId | ReferenceId | 

例如，您可以使用 `_airPreferenceId` 作為索引鍵名稱，搭配 [SearchProfiles API](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_SearchProfiles.html) 來尋找具有與搜尋值相符偏好設定 ID 之航空偏好設定的設定檔。您可以使用 [ListProfileObjects API](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_ListProfileObjects.html)，並將 `ProfileId` 和 `ObjectTypeName` 設定為 `_airPreference`，以尋找與特定設定檔關聯的標準航空偏好設定物件。


**ContactDetail 資料類型**  

| 標準 airPreference 欄位 | 資料類型 | 說明 | 
| --- | --- | --- | 
| Type | String | 聯絡類型 (例如個人、緊急) | 
| PreferenceLevel | String | 此聯絡的優先順序層級 | 
| PhoneNumber | String | 電話號碼 | 
| 關係 | String | 與設定檔的關係 | 
| EmailAddress | String | 電子郵件地址 | 
| EmailLanguage | String | 聯絡詳細資訊電子郵件通訊的偏好語言 | 
| PhoneLanguage | String | 聯絡詳細資訊電話通訊的偏好語言 | 


**ContactDetailAddress 資料類型**  

| 標準 airPreference 欄位 | 資料類型 | 說明 | 
| --- | --- | --- | 
| Type | String | 聯絡人的地址類型 | 
| Address1 | String | 聯絡人地址的第一行。 | 
| Address2 | String | 聯絡人地址的第二行。 | 
| Address3 | String | 聯絡人地址的第三行。 | 
| Address4 | String | 聯絡人地址的第四行。 | 
| City | String | 聯絡人地址的城市。 | 
| Country | String | 聯絡人地址的國家。 | 
| County | String | 聯絡人地址的郡/縣。 | 
| PostalCode | String | 聯絡人地址的郵遞區號。 | 
| Province | String | 聯絡人地址的省份。 | 
| State | String | 聯絡人地址的州別。 | 


**ContactDetailCommunication 資料類型**  

| 標準 airPreference 欄位 | 資料類型 | Description | 
| --- | --- | --- | 
| Method | String | 通訊方式 (例如 SMS、電子郵件) | 
| PreferenceLevel | String | 通訊方式的偏好程度 | 


**Language 資料類型**  

| 標準 airPreference 欄位 | 資料類型 | Description | 
| --- | --- | --- | 
| PhoneLanguage | String | 電話通訊的偏好語言 | 
| EmailLanguage | String | 電子郵件通訊的偏好語言 | 
| InPersonLanguage | String | 實體溝通的偏好語言 | 
| PreferenceLevel | String | 語言的偏好程度 | 


**Seat 資料類型**  

| 標準 airPreference 欄位 | 資料類型 | Description | 
| --- | --- | --- | 
| PreferenceLevel | String | 座位偏好設定的優先順序 | 
| Direction | String | 偏好的座位方向 (例如前、後) | 
| Location | String | 偏好的座位位置 (例如靠窗、靠走道) | 
| 位置 | String | 座位位置 (例如左、右) | 
| Row | String | 想要的座位列 | 
| ClassOfService | String | 艙等 (例如經濟艙、商務艙) | 
| NeighborFree | String | 無鄰座的偏好設定 | 
| Infant | String | 嬰兒座位的偏好設定 | 
| ExtraSeat | String | 額外座位的偏好設定 | 


**Journey 資料類型**  

| 標準 airPreference 欄位 | 資料類型 | Description | 
| --- | --- | --- | 
| MaxConnections | String | 允許的最多轉機次數 | 
| PreferredAirline | String | 偏好的航空公司 | 
| UpgradeAuction | String | 選擇加入升級競拍賣 | 
| FlightTime | String | 偏好的飛行時間 | 
| FlightMaxDuration | String | 偏好的旅程連續時長上限 | 


**Accessibility 資料類型**  

| 標準 airPreference 欄位 | 資料類型 | Description | 
| --- | --- | --- | 
| Wheelchair | String | 輪椅無障礙資訊 | 
| Bathroom | String | 浴室無障礙資訊 | 
| Assistance | String | 協助資訊 | 
| DisabilityType | String | 失能相關資訊 | 
| SupportAnimal | String | 輔助動物資訊 | 
| ProximityToFacilities | String | 需要靠近設施 | 


**Insurance 資料類型**  

| 標準 airPreference 欄位 | 資料類型 | Description | 
| --- | --- | --- | 
| Name | String | 保險商或方案名稱 | 
| PreferenceLevel | String | 保險的偏好程度 | 


**Interest 資料類型**  

| 標準 airPreference 欄位 | 資料類型 | Description | 
| --- | --- | --- | 
| Name | String | 特定感興趣的領域 | 
| PreferenceLevel | String | 此興趣的優先順序 | 


**Loyalty 資料類型**  

| 標準 airPreference 欄位 | 資料類型 | Description | 
| --- | --- | --- | 
| Name | String | 忠誠度計劃的名稱 | 
| MembershipId | String | 忠誠度計劃中的會員 ID | 
| PreferenceLevel | String | 忠誠度計劃的偏好程度 | 


**Dining 資料類型**  

| 標準 airPreference 欄位 | 資料類型 | Description | 
| --- | --- | --- | 
| MealType | String | 偏好的餐飲類型 | 
| FavoriteCuisine | String | 最愛的美饌類型 | 
| Beverage | String | 偏好的飲料 | 
| DietaryRestriction | String | 餐飲限制 | 
| AllergyInfo | String | 過敏相關詳細資訊 | 
| PreferenceLevel | String | 餐飲的偏好程度 | 


**媒體和娛樂資料類型**  

| 標準 airPreference 欄位 | 資料類型 | Description | 
| --- | --- | --- | 
| Name | String | 偏好的娛樂名稱 | 
| PreferenceLevel | String | 媒體/娛樂的偏好程度 | 


**PaymentForm 資料類型**  

| 標準 airPreference 欄位 | 資料類型 | Description | 
| --- | --- | --- | 
| Name | String | 付款方式名稱 | 
| Type | String | 付款類型 (例如信用卡、PayPal) | 
| PreferenceLevel | String | 付款方式的偏好程度 | 
| UsageContext | String | 該付款方式的使用時機 | 


**PetInfo 資料類型**  

| 標準 airPreference 欄位 | 資料類型 | 說明 | 
| --- | --- | --- | 
| Type | String | 寵物類型 | 
| PreferenceLevel | String | 寵物的偏好程度 | 


**SpecialRequest 資料類型**  

| 標準 airPreference 欄位 | 資料類型 | 說明 | 
| --- | --- | --- | 
| Type | String | 特殊要求的類型 | 
| Name | String | 要求名稱或說明 | 
| PreferenceLevel | String | 要求的優先順序層級 | 


**TicketDistribution 資料類型**  

| 標準 airPreference 欄位 | 資料類型 | Description | 
| --- | --- | --- | 
| PreferenceLevel | String | 分票的偏好程度 | 
| Method | String | 票證交付方式 (例如電子郵件、實體票證) | 
| TicketTime | String | 票證交付的偏好時間 | 


**Marketing 資料類型**  

| 標準 airPreference 欄位 | 資料類型 | Description | 
| --- | --- | --- | 
| ChannelType | String | 行銷管道的類型 (例如 SMS、電子郵件) | 
| OptIn | String | 行銷活動的選擇加入狀態 | 
| Frequency (頻率) | String | 行銷通訊的頻率 | 
| StartDate | String | 行銷活動偏好設定的開始日期 | 
| EndDate | String | 行銷活動偏好設定的結束日期 | 


**Medical 資料類型**  

| 標準 airPreference 欄位 | 資料類型 | Description | 
| --- | --- | --- | 
| Oxygen | String | (由航空公司提供、乘客自有、濃縮器等) | 
| MedicalEquipment | String | 醫療設備的詳細資訊 (例如 CPAP 機器、氧氣濃縮器)。 | 
| Assistance | String | 說明旅客在旅途中是否需要一般醫療協助 (例如機上支援、藥物協助)。 | 
| Stretcher | String | 旅客在飛行期間是否需要擔架；通常用於醫療運輸情況。 | 
| WheelChair | String | 輪椅詳細資訊 (非溢漏式電池、濕電池、固定、需要斜板、需要上下樓輔助、由航空公司提供等) | 


**Baggage 資料類型**  

| 標準 airPreference 欄位 | 資料類型 | Description | 
| --- | --- | --- | 
| Animal | String | 說明旅客是否攜帶輔助動物或寵物，以及相關規格或限制 (例如手拿、寵物籠) | 
| BaggageType | String | 說明偏好的行李類型 (例如僅限手提、託運、超大行李)。 | 
| Assistance | String | 說明旅客是否需要協助運送或管理其行李，例如機場運輸服務或路邊包車協助。 | 
| PreferenceLevel | String | 行李欄位的偏好程度 | 

# 標準住宿偏好設定的物件類型映射
<a name="object-type-mapping-standard-hotel-preference"></a>

本章節的主題提供標準住宿偏好設定的定義。

**Topics**
+ [Customer Profiles 標準住宿偏好設定物件欄位](standard-hotel-preference-object-fields.md)

# Customer Profiles 標準住宿偏好設定物件欄位
<a name="standard-hotel-preference-object-fields"></a>

下表列出 Customer Profiles 標準住宿偏好設定物件中的所有欄位。


**住宿偏好設定**  

| 標準 hotelPreference 欄位 | 資料類型 | Description | 
| --- | --- | --- | 
| PreferenceId | String | 標準住宿偏好設定的唯一識別符 | 
| Name | String | 偏好設定的名稱 | 
| CreatedDate | String | 偏好設定的建立日期 | 
| CreatedBy | String | 建立者的識別符 | 
| UpdatedDate | String | 上次更新日期 | 
| UpdatedBy | String | 上次更新人員的識別符 | 
| StartDate | String | 偏好設定開始日期 | 
| EndDate | String | 偏好設定結束日期 | 
| 狀態 | String | 偏好設定的目前狀態 | 
| Smoking | String | 吸菸偏好設定 | 
| CleaningTime | String | 清理時間 | 
| CheckInType | String | 入住辦理類型 | 
| CheckOutType | String | 退房辦理類型 | 
| ReferenceId | String | 偏好物件的 ID | 
| ReferenceType | String | 偏好物件的類型 | 
| Location | Location | 飯店房間位置的偏好設定 | 
| Bedding | Bedding | 寢具偏好設定 | 
| Tour | Tour | 導覽偏好設定 | 
| ContactDetail | ContactDetail | 偏好設定中的聯絡人詳細資訊 | 
| ContactDetailAddress | ContactDetailAddress | 聯絡人詳細資訊的地址 | 
| ContactDetailCommunication | ContactDetailCommunication | 通訊偏好設定 | 
| Language | Language | 語言偏好設定 | 
| CarRental | CarRental | 汽車租賃偏好設定 | 
| Accessibility | Accessibility | 無障礙偏好設定 | 
| Interest | Interest | 興趣相關詳細資訊 | 
| Loyalty | Loyalty | 忠誠度偏好設定 | 
| Dining | Dining | 餐飲偏好設定 | 
| MediaEntertainment | MediaEntertainment | 媒體和娛樂偏好設定 | 
| PaymentForm | PaymentForm | 付款方式偏好設定 | 
| PetInfo | PetInfo | 寵物資訊偏好設定 | 
| SpecialRequest | SpecialRequest | 特殊要求的詳細資訊 | 
| Marketing | Marketing | 行銷活動偏好設定 | 
| Medical | Medical | 醫療偏好設定 | 
| Baggage | Baggage | 行李偏好設定 | 
| 屬性 | Map<String, String> | 住宿偏好設定的屬性鍵值對 | 

標準住宿偏好設定物件會依據下表的索引鍵編製索引。


**標準索引欄位**  

| 標準索引名稱 | 標準偏好設定記錄欄位 | 
| --- | --- | 
| \$1hotelPreferenceId | PreferenceId | 
| \$1hotelReferenceId | ReferenceId | 

例如，您可以使用 `_hotelPreferenceId` 作為索引鍵名稱，搭配 [SearchProfiles API](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_SearchProfiles.html) 來尋找具有與搜尋值相符偏好設定 ID 之住宿偏好設定的設定檔。您可以使用 [ListProfileObjects API](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_ListProfileObjects.html)，並將 `ProfileId` 和 `ObjectTypeName` 設定為 `_hotelPreference`，以尋找與特定設定檔關聯的標準住宿偏好設定物件。


**ContactDetail 資料類型**  

| 標準 airPreference 欄位 | 資料類型 | 說明 | 
| --- | --- | --- | 
| Type | String | 聯絡類型 (例如個人、緊急) | 
| PreferenceLevel | String | 此聯絡的優先順序層級 | 
| PhoneNumber | String | 電話號碼 | 
| 關係 | String | 與設定檔的關係 | 
| EmailAddress | String | 電子郵件地址 | 
| EmailLanguage | String | 聯絡詳細資訊電子郵件通訊的偏好語言 | 
| PhoneLanguage | String | 聯絡詳細資訊電話通訊的偏好語言 | 


**ContactDetailAddress 資料類型**  

| 標準 airPreference 欄位 | 資料類型 | 說明 | 
| --- | --- | --- | 
| Type | String | 聯絡人的地址類型 | 
| Address1 | String | 聯絡人地址的第一行。 | 
| Address2 | String | 聯絡人地址的第二行。 | 
| Address3 | String | 聯絡人地址的第三行。 | 
| Address4 | String | 聯絡人地址的第四行。 | 
| City | String | 聯絡人地址的城市。 | 
| Country | String | 聯絡人地址的國家。 | 
| County | String | 聯絡人地址的郡/縣。 | 
| PostalCode | String | 聯絡人地址的郵遞區號。 | 
| Province | String | 聯絡人地址的省份。 | 
| State | String | 聯絡人地址的州別。 | 


**ContactDetailCommunication 資料類型**  

| 標準 hotelPreference 欄位 | Type | 說明 | 
| --- | --- | --- | 
| Method | String | 通訊方式 | 
| PreferenceLevel | String | 通訊方式的偏好程度 | 
| Frequency (頻率) | String | 通訊頻率 | 


**Language 資料類型**  

| 標準 hotelPreference 欄位 | Type | 說明 | 
| --- | --- | --- | 
| PhoneLanguage | String | 偏好的通話語言 | 
| EmailLanguage | String | 偏好的電子郵件語言 | 


**CarRental 資料類型**  

| 標準 hotelPreference 欄位 | Type | 說明 | 
| --- | --- | --- | 
| 廠商 | String | 偏好的租車廠商 | 
| VehicleType | String | 偏好的車輛類型 | 
| PreferenceLevel | String | 汽車租賃的偏好程度 | 


**Location 資料類型**  

| 標準 hotelPreference 欄位 | Type | 說明 | 
| --- | --- | --- | 
| PreferredFloor | String | 房間樓層的偏好設定 | 
| ElevatorProximity | String | 靠近電梯的偏好設定 | 
| QuietZone | String | 安靜區域的偏好設定 | 
| LobbyProximity | String | 靠近大廳的偏好設定 | 
| 檢視 | String | 想要的房間景觀 | 
| RoomType | String | 偏好房型 | 
| PreferenceLevel | String | 位置的偏好程度 | 


**Bedding 資料類型**  

| 標準 hotelPreference 欄位 | Type | 說明 | 
| --- | --- | --- | 
| BedType | String | 偏好床型 | 
| MattressType | String | 偏好床墊類型 | 
| PillowType | String | 偏好枕頭類型 | 
| NumberOfPillows | String | 偏好的枕頭數量 | 
| BeddingMaterial | String | 寢具材料 | 
| Allergy | String | 過敏相關寢具偏好設定 | 


**Tour 資料類型**  

| 標準 hotelPreference 欄位 | Type | 說明 | 
| --- | --- | --- | 
| City | String | 偏好的旅遊城市 | 
| Cultural | String | 文化導覽興趣 | 
| Adventure | String | 冒險旅程興趣 | 
| Nightlife | String | 夜生活探索興趣 | 
| GuideLanguage | String | 旅遊導覽的偏好語言 | 
| StartTime | String | 偏好的導覽開始時間 | 
| GroupSize | String | 偏好的導覽團體規模 | 
| PreferenceLevel | String | 導覽偏好的重要性 | 


**Accessibility 資料類型**  

| 標準 airPreference 欄位 | 資料類型 | Description | 
| --- | --- | --- | 
| Wheelchair | String | 輪椅無障礙資訊 | 
| Bathroom | String | 浴室無障礙資訊 | 
| Assistance | String | 協助資訊 | 
| DisabilityType | String | 失能相關資訊 | 
| SupportAnimal | String | 輔助動物資訊 | 
| ProximityToFacilities | String | 需要靠近設施 | 


**Interest 資料類型**  

| 標準 hotelPreference 欄位 | Type | 說明 | 
| --- | --- | --- | 
| NameOfInterest | String | 興趣的名稱 | 
| PreferenceLevel | String | 興趣的偏好程度 | 


**Loyalty 資料類型**  

| 標準 hotelPreference 欄位 | Type | 說明 | 
| --- | --- | --- | 
| LoyaltyName | String | 忠誠度計劃的名稱 | 
| MembershipId | String | 忠誠度會員資格 ID | 
| PreferenceLevel | String | 忠誠度的偏好程度 | 
| PriorityServices | String | 優先服務的偏好設定 | 


**Dining 資料類型**  

| 標準 hotelPreference 欄位 | Type | 說明 | 
| --- | --- | --- | 
| MealType | String | 偏好的餐飲類型 | 
| FavoriteCuisine | String | 最愛的美饌偏好 | 
| Beverage | String | 飲料偏好設定 | 
| DietaryRestriction | String | 餐飲限制 | 
| AllergyInfo | String | 過敏相關資訊 | 
| PreferenceLevel | String | 餐飲的偏好程度 | 


**MediaEntertainment 資料類型**  

| 標準 hotelPreference 欄位 | Type | 說明 | 
| --- | --- | --- | 
| Name | String | 偏好的媒體或娛樂名稱 | 
| PreferenceLevel | String | 媒體或娛樂的偏好程度 | 


**PaymentForm 資料類型**  

| 標準 hotelPreference 欄位 | Type | 說明 | 
| --- | --- | --- | 
| Name | String | 與付款方式相關的名稱 | 
| Type | String | 付款方式類型 | 
| PreferenceLevel | String | 付款方式的偏好程度 | 
| UsageContext | String | 該付款方式的使用時機 | 


**PetInfo 資料類型**  

| 標準 hotelPreference 欄位 | Type | 說明 | 
| --- | --- | --- | 
| Type | String | 寵物類型 | 
| PreferenceLevel | String | 寵物的偏好程度 | 


**特殊要求資料類型**  

| 標準 hotelPreference 欄位 | Type | 說明 | 
| --- | --- | --- | 
| Type | String | 特殊要求的類型 | 
| Name | String | 特殊要求的名稱 | 
| PreferenceLevel | String | 要求的偏好程度 | 


**Marketing 資料類型**  

| 標準 hotelPreference 欄位 | Type | 說明 | 
| --- | --- | --- | 
| ChannelType | String | 行銷管道的類型 (例如 SMS、電子郵件) | 
| OptIn | String | 行銷活動的選擇加入狀態 | 
| Frequency (頻率) | String | 行銷通訊的頻率 | 
| StartDate | String | 行銷活動偏好設定的開始日期 | 
| EndDate | String | 行銷活動偏好設定的結束日期 | 


**Medical 資料類型**  

| 標準 hotelPreference 欄位 | Type | 說明 | 
| --- | --- | --- | 
| Oxygen | String | 氧氣供應偏好設定 | 
| MedicalEquipment | String | 醫療設備的詳細資訊 | 
| Assistance | String | 所需醫療協助類型 | 
| Stretcher | String | 擔架使用者需求 | 
| WheelChair | String | 所需輪椅類型和協助 | 


**Baggage 資料類型**  

| 標準 hotelPreference 欄位 | Type | 說明 | 
| --- | --- | --- | 
| Bicycle | String | 自行車行李需求 | 
| BaggageType | String | 行李詳細資訊 (例如重荷行李) | 
| Courier | String | 快遞相關行李偏好設定 | 
| Fragile | String | 易碎項目偏好設定 | 
| 偏好程度 | String | 行李偏好程度 | 

# 標準航空預訂的物件類型映射
<a name="object-type-mapping-standard-air-booking"></a>

本章節的主題提供標準航空預訂的定義。

**Topics**
+ [Customer Profiles 標準航空預訂物件欄位](standard-air-booking-object-fields.md)

# Customer Profiles 標準航空預訂物件欄位
<a name="standard-air-booking-object-fields"></a>

下表列出 Customer Profiles 標準航空預訂物件中的所有欄位。


**AirBooking**  

| 標準 airBooking 欄位 | Type | 說明 | 
| --- | --- | --- | 
| BookingId | String | 標準航空預訂的唯一識別符 | 
| ContextId | String | 用於追蹤預訂來源的內容特定識別符 | 
| PreferenceRef | String | 參照預訂偏好設定物件的識別符 | 
| BookingName | String | 與預訂相關的名稱 | 
| PassengerIndex | String | 預訂中乘客的索引 | 
| TravellerId | String | 預訂相關旅客的唯一識別符 | 
| GroupBooking | String | 說明該預訂是否為團體預訂 | 
| NumberOfPassengers | String | 預訂中乘客的總數 | 
| NumberOfAdults | String | 預訂中成人的總數 | 
| NumberOfChildren | String | 預訂中孩童的總數 | 
| ProcessedDate | String | 預訂處理日期 | 
| CreatedDate | String | 預訂建立日期 | 
| CreatedBy | String | 建立者的身分 | 
| UpdatedDate | String | 上次更新日期 | 
| UpdatedBy | String | 上次更新預訂者的識別符 | 
| 狀態 | String | 目前的預訂狀態 | 
| PriorityStatus | String | 預訂的優先順序層級 | 
| ReservationStatus | String | 預訂的保留狀態 | 
| MarketingCode | String | 代表行銷活動來源或行銷活動的代碼 | 
| MarketingName | String | 行銷活動名稱 | 
| TravelAgent | String | 預訂相關旅行社 | 
| TravelAgency | String | 旅行社名稱 | 
| TravelCorpNumber | String | 公司客戶號碼 | 
| Booker | String | 說明該人員是否為進行預訂的人員 | 
| AdditionalInformation | String | 其他資訊 (不限格式) | 
| Email | String | 取得旅遊日更新的聯絡電子郵件 | 
| PhoneNumber | String | 取得旅遊日更新的聯絡電話 | 
| CancelledDate | String | 取消預訂的日期 (如適用) | 
| Diplomat | String | 說明其外交身分 | 
| Child | String | 說明該乘客是否為孩童 | 
| Disabled | String | 說明失能狀態 | 
| Oxygen | String | 表示需要氧氣支援 | 
| PetOnly | String | 該預訂僅用於運送寵物 | 
| CancellationCharge | String | 取消費用 (若適用)。0 表示不收費 | 
| Refundable | String | 預訂退款相關詳細資訊 | 
| Inventory | Inventory | 預訂清查詳細資訊 | 
| Loyalty | Loyalty | 預訂忠誠度詳細資訊 | 
| Channel | Channel | 預訂管道詳細資訊 | 
| Payment | Payment | 預訂付款詳細資訊 | 
| BillingAddress | 地址 | 預訂的帳單地址詳細資訊 | 
| Price | Price | 預訂價格詳細資訊 | 
| PaymentStatus | PaymentStatus | 預訂的付款狀態 | 
| 屬性 | Map<String, String> | 自訂或延伸屬性 | 


**標準索引欄位**  

| 標準索引名稱 | 標準偏好設定記錄欄位 | 
| --- | --- | 
| \$1airBookingId | BookingId | 
| \$1airPreferenceRef | PreferenceRef | 


**Loyalty 資料類型**  

| 標準 airBooking 欄位 | Type | 說明 | 
| --- | --- | --- | 
| ProgramName | String | 忠誠度計劃的名稱 | 
| MembershipId | String | 忠誠度計劃會員號碼 | 
| Tier | String | 忠誠度會員資格等級 | 


**Channel 資料類型**  

| 標準 airBooking 欄位 | Type | 說明 | 
| --- | --- | --- | 
| CreationChannelId | String | 用來建立預訂的管道 ID | 
| LastUpdatedChannelId | String | 用來更新預訂的管道 ID | 
| Method | String | 管道使用方式 (例如網站、應用程式、電話) | 


**Payment 資料類型**  

| 標準 airBooking 欄位 | Type | 說明 | 
| --- | --- | --- | 
| Type | String | 付款方式類型 (例如卡片、折價券) | 
| CreditCardToken | String | 用於安全參考的字符化卡片 | 
| CreditCardType | String | 使用的卡片類型 | 
| CreditCardExpiration | String | 卡片到期日期 | 
| Cvv | String | CVV 號碼 | 
| NameOnCreditCard | String | 持卡人名稱 | 
| RoutingNumber | String | 銀行匯款路徑號碼 (如適用) | 
| AccountNumber | String | 銀行帳戶號碼 (如適用) | 
| VoucherId | String | 用於付款的折價券 | 
| DiscountCode | String | 已套用的促銷折扣代碼 | 
| DiscountPercent | String | 套用至款項的折扣百分比 | 


**帳單地址資料類型**  

| 標準 airPreference 欄位 | 資料類型 | Description | 
| --- | --- | --- | 
| Address1 | String | 客戶地址的第一行。 | 
| Address2 | String | 客戶地址的第二行。 | 
| Address3 | String | 客戶地址的第三行。 | 
| Address4 | String | 客戶地址的第四行。 | 
| City | String | 客戶地址的城市。 | 
| Country | String | 客戶地址的國家。 | 
| County | String | 客戶地址的郡/縣。 | 
| PostalCode | String | 客戶地址的郵遞區號。 | 
| Province | String | 客戶地址的省份。 | 
| State | String | 客戶地址的州別。 | 


**Price 資料類型**  

| 標準 airBooking 欄位 | Type | 說明 | 
| --- | --- | --- | 
| TotalPrice | String | 預訂總價格 | 
| BasePrice | String | 預訂基本價格 | 
| TravellerPrice | String | 每位旅客所支付的價格 | 
| DiscountAmount | String | 套用至基本票價的折扣 | 
| Currency | String | 付款貨幣 | 


**付款狀態資料類型**  

| 標準 airBooking 欄位 | Type | 說明 | 
| --- | --- | --- | 
| PaidAt | String | 付款完成時的時間戳記 | 
| AwaitingPayment | String | 表示付款審核中 | 
| RequiredBy | String | 付款到期日期 | 


**Inventory 資料類型**  

| 標準 airBooking 欄位 | Type | 說明 | 
| --- | --- | --- | 
| Seats | String | 預訂座位總數 | 

# 標準航空客群的物件類型映射
<a name="object-type-mapping-standard-air-segment"></a>

本章節的主題提供標準航空客群的定義。

**Topics**
+ [Customer Profiles 標準航空客群物件欄位](standard-air-segment-object-fields.md)

# Customer Profiles 標準航空客群物件欄位
<a name="standard-air-segment-object-fields"></a>

下表列出 Customer Profiles 標準航空客群物件中的所有欄位。


**航空客群**  

| 標準 airSegment 欄位 | Type | 說明 | 
| --- | --- | --- | 
| SegmentId | String | 標準航空客群的唯一識別符 | 
| BookingRef | String | 預訂參考識別符 | 
| SegmentName | String | 客群名稱/說明 | 
| PassengerIndex | String | 乘客的索引號碼 | 
| SegmentIndex | String | 客群的索引號碼 | 
| SeatSelection | String | 選位詳細資訊 | 
| NumberOfPassengers | String | 乘客總數 | 
| NumberOfLegs | String | 飛行趟數 | 
| Tier | String | 乘客層級/狀態等級 | 
| Origin | String | 出發機場代碼 | 
| OriginCountryCode | String | 出發國家代碼 | 
| Dest | String | 目的地機場代碼 | 
| DestCountryCode | String | 目的地國家代碼 | 
| ProcessedDate | String | 客群處理日期 | 
| CreatedDate | String | 記錄建立日期 | 
| CreatedBy | String | 記錄建立者 | 
| UpdatedDate | String | 記錄上次更新日期 | 
| UpdatedBy | String | 記錄上次更新者 | 
| 狀態 | String | 客群的目前狀態 | 
| FlightNumber | String | 航班號碼 | 
| Carrier | String | 航空公司代碼 | 
| CarrierType | String | 航空公司類型 | 
| IsInternational | String | 說明該航班是否為國際線 | 
| IsEticket | String | 說明是否為電子票證 | 
| IsArmed | String | 說明是否為武裝乘客 | 
| LapInfant | String | 不佔位嬰兒的詳細資訊 | 
| Pet | String | 指出是否攜帶寵物 | 
| PrisonerOrGuard | String | 指出監禁或戒護狀態 | 
| Child | String | 說明乘客是否為孩童 | 
| Married | String | 指出是否已婚 | 
| CheckinEligible | String | 表示入住資格 | 
| InEligibleReason | String | 不符合入住資格的原因 | 
| UnEscortedMinor | String | 表示無陪同未成年人的狀態 | 
| PremiumAccess | String | 表示為付費資格購買 | 
| MissingData | String | 表示遺失的資料 | 
| CurrentClassOfService | String | 目前的服務等級 | 
| BookedClassOfService | String | 原始預訂的服務等級 | 
| CodeShare | String | 表示共掛航班 | 
| ReverseCodeShare | String | 表示反向班號共用 | 
| MarketCarrierCode | String | 銷售航空公司代碼 | 
| OpCarrierCode | String | 航空公司代碼 | 
| InConnection | String | 進站航班詳細資訊 | 
| OutConnection | String | 出站航班詳細資訊 | 
| MilesToEarn | String | 可賺取的里程數 | 
| 持續時間 | String | 飛行持續時間 | 
| DurationTimeUnit | String | 持續時間的時間單位 | 
| 距離 | String | 飛行距離 | 
| DistanceUnit | String | 飛行距離的距離單位 | 
| SellType | String | 表示這是否為強賣 | 
| GoShow | String | 表示這是否為即時搭機 | 
| Incapacitated | String | 指出乘客是否無行為能力 | 
| Upgraded | String | 指出該航班是否已升等 | 
| Downgraded | String | 指出該航班是否已降等 | 
| BaggageInsurance | String | 行李保險 | 
| MaxAllowedBaggage | String | 允許的行李上限 | 
| BaggageQuantity | String | 行李數量 | 
| BaggageFee | String | 總行李費用 | 
| 抵達 | 站點 | 客群的抵達詳細資訊 | 
| 出發 | 站點 | 客群的出發詳細資訊 | 
| Seat | Seat | 座位詳細資訊 | 
| Priority | Priority | 優先順序詳細資訊 | 
| Doc | Doc | 旅行隨附文件的資訊 | 
| Baggage | 行李清單 | 行李詳細資訊 | 
| Pets | 寵物清單 | 寵物詳細資訊 | 
| OtherServices | 其他服務清單 | 其他服務詳細資訊 | 
| 屬性 | Map<String, String> | 其他屬性 | 


**標準索引欄位**  

| 標準索引名稱 | 標準偏好設定記錄欄位 | 
| --- | --- | 
| \$1airSegmentId | SegmentId | 
| \$1airBookingRef | BookingRef | 


**Baggage 資料類型**  

| 標準 airSegment 欄位 | Type | 說明 | 
| --- | --- | --- | 
| Id | String | 行李識別符 | 
| TagNumber | String | 行李標籤號碼 | 
| DepartureDate | String | 出發日期 | 
| BaggageType | String | 行李類型 | 
| Weight (粗細) | String | 行李重量 | 
| Length | String | 行李長度 | 
| Width | String | 行李寬度 | 
| Height | String | 行李高度 | 
| PriorityBagDrop | String | 行李優先放置服務 | 
| PriorityBagReturn | String | 行李優先取回服務 | 
| HandsFreeBaggage | String | 免持行李服務 | 
| Fee | String | 行李費用 | 
| IsGateBag | String | 表示登機門檢查行李 | 
| IsHeavy | String | 表示重荷行李 | 


**Seat 資料類型**  

| 標準 airSegment 欄位 | Type | 說明 | 
| --- | --- | --- | 
| SeatNumber | String | 座位號碼 | 
| SeatZone | String | 座位區域 | 
| SeatType | String | 座位類型 | 
| Price | String | 座位價格 | 
| NeighborFree | String | 指出鄰座是否為空位 | 
| UpgradeAuction | String | 表示是否可以競價升等 | 
| Available | String | 表示座位是否開放 | 
| ExtraSeat | String | 表示額外座位 | 
| AdditionalInformation | String | 額外座位資訊 | 


**Port 資料類型**  

| 標準 airSegment 欄位 | Type | 說明 | 
| --- | --- | --- | 
| Location | String | 位置名稱 | 
| Code | String | 機場代碼 | 
| 終端機 | String | 機場航廈 | 
| Country | String | 機場國家 | 
| Date | String | Date | 
| 時間 | String | 時間 | 
| EstimatedTime | String | 預估時間 | 
| ScheduledTime | String | 排定時間 | 


**Priority 資料類型**  

| 標準 airSegment 欄位 | Type | 說明 | 
| --- | --- | --- | 
| TransactionId | String | 交易識別碼 | 
| PriorityServiceType | String | 優先服務的類型 | 
| LoungeAccess | String | 表示於機場大廳取得 | 
| Price | String | 優先服務價格 | 
| AdditionalInformation | String | 額外優先資訊 | 


**Pet 資料類型**  

| 標準 airSegment 欄位 | Type | 說明 | 
| --- | --- | --- | 
| Species | String | 寵物種類 | 
| Breed | String | 寵物品種 | 
| Weight (粗細) | String | 寵物重量 | 
| WeightUnit | String | 重量計算單位 | 
| TransportType | String | 寵物運輸類型 | 


**OtherService 資料類型**  

| 標準 airSegment 欄位 | Type | 說明 | 
| --- | --- | --- | 
| ServiceType | String | 服務類型 | 
| Description | String | 服務說明 | 
| Price | String | 服務價格 | 


**Doc 資料類型**  

| 標準 airSegment 欄位 | Type | 說明 | 
| --- | --- | --- | 
| DocType | String | 文件類型 | 
| DocTypeNeeded | String | 指出是否為必要文件 | 
| Nationality | String | 文件上的國籍 | 
| DateOfBirth | String | 出生日期 | 
| AppId | String | 應用程式識別符 | 
| AgentId | String | 客服人員識別符 | 
| VerifiedDateTime | String | 文件驗證時間 | 

# 標準飯店預訂的物件類型映射
<a name="object-type-mapping-standard-hotel-reservation"></a>

本章節的主題提供標準飯店預訂的定義。

**Topics**
+ [Customer Profiles 標準飯店預訂物件欄位](standard-hotel-reservation-object-fields.md)

# Customer Profiles 標準飯店預訂物件欄位
<a name="standard-hotel-reservation-object-fields"></a>

下表列出 Customer Profiles 標準飯店預訂物件中的所有欄位。


**飯店預訂**  

| 標準 hotelReservation 欄位 | Type | 說明 | 
| --- | --- | --- | 
| ReservationId | String | 標準飯店預訂的唯一識別符 | 
| ConfirmationNumber | String | 飯店或預訂引擎提供的確認號碼 | 
| PreferenceRef | String | 參照預訂偏好設定物件的識別符 | 
| 狀態 | String | 預訂的目前狀態 (例如已確認、已取消) | 
| TripType | String | 旅遊目的或性質 (例如休閒、商務) | 
| BrandCode | String | 代表飯店品牌的代碼 | 
| HotelCode | String | 識別特定飯店的代碼 | 
| PhoneNumber | String | 預訂聯絡人電話號碼 | 
| EmailAddress | String | 預訂聯絡人電子郵件地址 | 
| GroupId | String | 將預訂連結至團體預訂的 ID | 
| ContextId | String | 用於追蹤預訂來源的內容特定識別符 | 
| ProcessedDate | String | 處理預訂時的時間戳記 | 
| CreatedDate | String | 建立預訂時的時間戳記 | 
| CreatedBy | String | 建立預訂的使用者/系統識別符 | 
| UpdatedDate | String | 上次更新預訂時的時間戳記 | 
| UpdatedBy | String | 更新預訂的使用者/系統識別符 | 
| AgentId | String | 處理預訂的客服人員 ID | 
| Reserver | String | 表示該設定檔是否為預訂人 | 
| SameDayRate | String | 表示是否在同一天進行預訂 | 
| Refundable | String | 指出預訂是否可退款 | 
| CancellationCharge | String | 取消費用 (若適用)。0 表示不收費 | 
| TransactionId | String | 交易的唯一識別符 | 
| AmountPerNight | String | 房間每晚金額 | 
| AdditionalNote | String | 特殊備註或指示 | 
| NumberOfNights | String | 預訂天數 | 
| NumberOfGuests | String | 預訂貴賓總數 | 
| TotalAmountBeforeTax | String | 稅前總費用 | 
| TotalAmountAfterTax | String | 稅後總費用 | 
| Checkout | CheckOut | 結帳詳細資訊 | 
| Loyalty | Loyalty | 忠誠度詳細資訊 | 
| Room | Room | 房間詳細資訊 | 
| CheckIn | CheckIn | 入住辦理詳細資訊 | 
| Payment | Payment | 付款詳細資訊 | 
| Currency | Currency | 貨幣詳細資訊 | 
| Cancellation | Cancellation | 取消詳細資訊 | 
| Channel | Channel | 管道詳細資訊 | 
| RatePlan | RatePlan | 計費方案詳細資訊 | 
| Guests | Guests | 貴賓詳細資訊 | 
| 服務 | 服務清單 | 服務清單 | 
| 屬性 | Map<String, String> | 其他屬性 | 


**標準索引欄位**  

| 標準索引名稱 | 標準偏好設定記錄欄位 | 
| --- | --- | 
| \$1hotelReservationId | ReservationId | 
| \$1hotelPreferenceRef | preferenceRef | 


**Checkout 資料類型**  

| 標準 hotelReservation 欄位 | Type | 說明 | 
| --- | --- | --- | 
| Early | String | 已排程或要求提早結帳 | 
| Late | String | 已排程或要求延後結帳 | 
| Self | String | 已排程或要求自助結帳 | 
| Date | String | 預訂的結帳日期 | 


**Loyalty 資料類型**  

| 標準 hotelReservation 欄位 | Type | 說明 | 
| --- | --- | --- | 
| ProgramName | String | 忠誠度計劃的名稱 | 
| MembershipId | String | 忠誠度計劃中的會員 ID | 
| Tier | String | 忠誠度層級 | 


**Room 資料類型**  

| 標準 hotelReservation 欄位 | Type | 說明 | 
| --- | --- | --- | 
| TypeCode | String | 房間類型/類別的代碼 | 
| TypeName | String | 房型名稱 | 
| TypeDesc | String | 房型描述 | 
| Number | String | 指派的房號 | 
| Capacity | String | 房間容納人數上限 | 
| AccessibilityType | String | 無障礙功能 | 
| SmokingAllowed | String | 表示是否可以在房間內抽菸 | 


**CheckIn 資料類型**  

| 標準 hotelReservation 欄位 | Type | 說明 | 
| --- | --- | --- | 
| Date | String | 預訂的入住日期 | 
| DigitalKey | String | 表示是否已提供數位房間鑰匙 | 
| Early | String | 指出是否已要求提早入住 | 
| Late | String | 指出是否已要求延後入住 | 
| RoomKeys | String | 提供的房間鑰匙數量 | 
| UserSelectedRoom | String | 如果房客自己選擇房間，則為 true | 


**Payment 資料類型**  

| 標準 hotelReservation 欄位 | Type | 說明 | 
| --- | --- | --- | 
| Type | String | 付款方式類型 (例如信用卡、金融卡、折價券) | 
| CreditCardToken | String | 字符化的信用卡號碼 | 
| CreditCardType | String | 信用卡類型 (例如 Visa、Amex) | 
| CreditCardExpiration | String | 信用卡到期日 | 
| Cvv | String | 卡片驗證值 | 
| NameOnCreditCard | String | 信用卡上的姓名 | 
| RoutingNumber | String | 銀行匯款路線號碼 | 
| AccountNumber | String | 銀行帳戶號碼 | 
| VoucherId | String | 折價券識別符 (如適用) | 
| DiscountCode | String | 已套用的折扣代碼 | 
| DiscountPercent | String | 已套用的折扣百分比 | 


**Currency 資料類型**  

| 標準 hotelReservation 欄位 | Type | 說明 | 
| --- | --- | --- | 
| Code | String | 貨幣的 ISO 代碼 (例如 USD) | 
| Name | String | 貨幣全名 (例如美元) | 
| Symbol | String | 貨幣符號 (例如 \$1) | 


**Cancellation 資料類型**  

| 標準 hotelReservation 欄位 | Type | 說明 | 
| --- | --- | --- | 
| Reason | String | 取消原因 | 
| Comment | String | 其他取消備註 | 


**Channel 資料類型**  

| 標準 hotelReservation 欄位 | Type | 說明 | 
| --- | --- | --- | 
| CreationChannelId | String | 預訂管道的 ID | 
| LastUpdatedChannelId | String | 上次更新預訂的管道 ID | 
| Method | String | 預訂方法 (例如網站、行動應用程式) | 


**RatePlan 資料類型**  

| 標準 hotelReservation 欄位 | Type | 說明 | 
| --- | --- | --- | 
| Code | String | 預訂計費方案的代碼識別符 | 
| Name | String | 預訂計費方案的名稱 | 
| Description | String | 計費方案的說明 | 


**Service 資料類型**  

| 標準 hotelReservation 欄位 | Type | 說明 | 
| --- | --- | --- | 
| ServiceType | String | 服務類型 (例如 SPA、早餐) | 
| Description | String | 服務說明 | 
| Cost | String | 服務費用 | 


**Guest 資料類型**  

| 標準 hotelReservation 欄位 | Type | 說明 | 
| --- | --- | --- | 
| Adults | String | 成人人數 | 
| Children | String | 孩童人數 | 

# 標準忠誠度的物件類型映射
<a name="object-type-mapping-standard-loyalty"></a>

本章節的主題提供標準忠誠度的定義。

**Topics**
+ [Customer Profiles 標準忠誠度物件欄位](standard-loyalty-object-fields.md)

# Customer Profiles 標準忠誠度物件欄位
<a name="standard-loyalty-object-fields"></a>

下表列出 Customer Profiles 標準忠誠度物件中的所有欄位。


**Loyalty**  

| 標準 loyalty 欄位 | Type | 說明 | 
| --- | --- | --- | 
| LoyaltyId | String | 標準忠誠度的唯一識別符 | 
| ProgramId | String | 忠誠度計劃的識別符 | 
| MembershipId | String | 計劃中的替代識別符 | 
| ProgramName | String | 忠誠度計劃的名稱 | 
| Group | String | 忠誠度計劃的群組或類別 | 
| Channel | String | 存取忠誠度計劃的管道 | 
| CreatedDate | String | 忠誠度帳戶的建立日期 | 
| EnrollmentDate | String | 計劃的註冊日期 | 
| CreatedBy | String | 建立忠誠度帳戶的使用者或系統 | 
| UpdatedDate | String | 上次更新忠誠度帳戶的日期 | 
| LastUpdatedBy | String | 上次更新忠誠度帳戶的使用者或系統 | 
| UpgradeDate | String | 上次升級方案的日期 | 
| RenewalDate | String | 忠誠度會員資格的續約日期 | 
| AdditionalInformation | String | 任何其他資訊 | 
| EmailAddress | String | 客戶的電子郵件地址 | 
| EmailAddressVerified | String | 標示是否已驗證電子郵件的旗標 | 
| PhoneNumber | String | 客戶的電話號碼 | 
| PhoneNumberVerified | String | 表示是否已驗證電話號碼的旗標 | 
| 狀態 | String | 忠誠度帳戶的目前狀態 | 
| Tier | Tier | 層級詳細資訊 | 
| Points | Points | 點數詳細資訊 | 
| PointExpirations | PointExpiration 清單 | 點數過期詳細資訊 | 
| Payment | Payment | 付款詳細資訊 | 
| PaymentInformation | PaymentInformation | 付款資訊詳細資訊 | 
| BillingAddress | 忠誠度地址 | 地址詳細資訊 | 
| 屬性 | Map<String, String> | 未涵蓋的其他屬性 | 


**標準索引欄位**  

| 標準索引名稱 | 標準偏好設定記錄欄位 | 
| --- | --- | 
| \$1loyaltyId | LoyaltyId | 
| \$1loyaltyMembershipId | membershipId | 


**忠誠度地址資料類型**  

| 標準 airPreference 欄位 | 資料類型 | Description | 
| --- | --- | --- | 
| Address1 | String | 客戶地址的第一行。 | 
| Address2 | String | 客戶地址的第二行。 | 
| Address3 | String | 客戶地址的第三行。 | 
| Address4 | String | 客戶地址的第四行。 | 
| City | String | 客戶居住的城市。 | 
| Country | String | 客戶居住的國家/地區。 | 
| County | String | 客戶居住的縣。 | 
| PostalCode | String | 客戶地址的郵遞區號。 | 
| Province | String | 客戶居住的省份。 | 
| State | String | 客戶居住的州。 | 


**Tier 資料類型**  

| 標準 loyalty 欄位 | Type | 說明 | 
| --- | --- | --- | 
| CurrentTier | String | 客戶目前的忠誠度層級 | 
| NextTier | String | 客戶的下一個可能層級 | 
| PointsToNextTier | String | 達到下一個層級所需的點數 | 


**Points 資料類型**  

| 標準 loyalty 欄位 | Type | 說明 | 
| --- | --- | --- | 
| Points.Unit | String | 點數計算單位 | 
| Points.Lifetime | String | 獲得的終身點數總數 | 
| Points.Balance | String | 目前的點數餘額 | 
| Points.Redeemed | String | 已兌換的總點數 | 


**PointExpiration 資料類型**  

| 標準 loyalty 欄位 | Type | 說明 | 
| --- | --- | --- | 
| Points | String | 點數即將到期 | 
| Date | String | 點數的過期日期 | 


**Payment 資料類型**  

| 標準 loyalty 欄位 | Type | 說明 | 
| --- | --- | --- | 
| Type | String | 付款類型 | 
| CreditCardToken | String | 字符化信用卡參考號碼 | 
| CreditCardType | String | 信用卡類型 (例如 Visa) | 
| CreditCardExpiration | String | 信用卡到期日 | 
| Cvv | String | 卡片驗證值 | 
| NameOnCreditCard | String | 卡片上的名稱 | 
| RoutingNumber | String | 銀行匯款路線號碼 | 
| AccountNumber | String | 銀行帳戶號碼 | 
| VoucherId | String | 折價券識別符 | 


**PaymentInformation 資料類型**  

| 標準 loyalty 欄位 | Type | 說明 | 
| --- | --- | --- | 
| Schedule | String | 付款排程 | 
| LastPaymentDate | String | 上次付款日期 | 
| NextPaymentDate | String | 下次付款日期 | 
| NextBillAmount | String | 下次帳單金額 | 
| CurrencyCode | String | 貨幣代碼 (例如 USD) | 
| CurrencyName | String | 貨幣全名 | 
| CurrencySymbol | String | 貨幣符號 (例如 \$1) | 

# 標準忠誠度交易的物件類型映射
<a name="object-type-mapping-standard-loyalty-transaction"></a>

本章節的主題提供標準忠誠度交易的定義。

**Topics**
+ [Customer Profiles 標準忠誠度交易物件欄位](standard-loyalty-transaction-object-fields.md)

# Customer Profiles 標準忠誠度交易物件欄位
<a name="standard-loyalty-transaction-object-fields"></a>

下表列出 Customer Profiles 標準忠誠度交易物件中的所有欄位。


**忠誠度交易**  

| 標準 loyaltyTransaction 欄位 | Type | 說明 | 
| --- | --- | --- | 
| TransactionId | String | 標準忠誠度交易的唯一識別符。 | 
| TransactionName | String | 交易名稱或標籤。 | 
| TransactionType | String | 交易類型 (例如獲得、兌換、調整)。 | 
| ProgramRef | String | 相關忠誠度計劃的參考號碼。 | 
| MembershipRef | String | 交易所使用忠誠度會員資格參考號碼。 | 
| PromotionRef | String | 影響此交易的促銷活動參考號碼。 | 
| CreatedDate | String | 交易建立日期。 | 
| TransactionDate | String | 交易發生日期。 | 
| Industry | String | 交易相關產業 (例如航空公司、旅宿業)。 | 
| Location | String | 交易發生位置。 | 
| CreatedBy | String | 交易建立者的識別符。 | 
| UpdatedDate | String | 交易上次更新的日期。 | 
| UpdatedBy | String | 交易上次更新者的識別符。 | 
| 狀態 | String | 交易的目前狀態。 | 
| AccrualType | String | 累積方式 (手動、自動等)。 | 
| Category | String | 交易類別 (例如航班、住宿)。 | 
| Channel | String | 啟動交易的管道 (例如線上、實體)。 | 
| ProductId | String | 繫結至交易的產品或服務之識別符。 | 
| Amount | String | 交易的花費或交易金額。 | 
| OriginValue | String | 任何轉換或抵銷前的原始值。 | 
| OriginValueCurrency | String | 原始交易值所用貨幣。 | 
| OriginValueOffset | String | 調整促銷活動、退款等的原始值。 | 
| PointsEarned | String | 從此交易獲得的總點數。 | 
| PointOffset | String | 已調整的點數 (例如獎勵點數、處罰點數)。 | 
| QualifyingPointsEarned | String | 計入層級資格的點數。 | 
| TierBefore | String | 交易前的客戶層級。 | 
| TierAfter | String | 交易後的客戶層級。 | 
| Brand | String | 交易相關品牌。 | 
| Description | String | 交易的敘述性描述。 | 
| AdditionalInformation | String | 交易相關其他資訊 (自由格式)。 | 
| PaymentMethod | String | 所使用付款方式 (例如卡片、折價券)。 | 
| PointTransfer | PointTransfer | 點數轉移詳細資訊 | 
| 屬性 | Map<String, String> | 其他屬性。 | 


**標準索引欄位**  

| 標準索引名稱 | 標準偏好設定記錄欄位 | 
| --- | --- | 
| \$1loyaltyTransactionId | TransactionId | 


**PointTransfer 資料類型**  

| 標準 loyaltyTransaction 欄位 | Type | 說明 | 
| --- | --- | --- | 
| TransferId | String | 轉移交易的識別碼。 | 
| SourceProgramId | String | 來源忠誠度計劃的 ID。 | 
| DestinationProgrmId | String | 目的地忠誠度計劃的 ID。 | 
| SourceMembershipId | String | 來源計劃中的會員 ID。 | 
| DestinationMembershipId | String | 目的地計劃中的會員 ID。 | 
| PointsTransferred | String | 從來源計劃扣除的點數。 | 
| PointsReceived | String | 計入目的地計劃的點數。 | 

# 標準忠誠度促銷活動的物件類型映射
<a name="object-type-mapping-standard-loyalty-promotion"></a>

本章節的主題提供標準忠誠度促銷活動的定義。

使用

**Topics**
+ [Customer Profiles 標準忠誠度促銷活動物件欄位](standard-loyalty-promotion-object-fields.md)

# Customer Profiles 標準忠誠度促銷活動物件欄位
<a name="standard-loyalty-promotion-object-fields"></a>

下表列出 Customer Profiles 標準忠誠度促銷活動物件中的所有欄位。


**忠誠度促銷活動**  

| 標準 loyaltyPromotion 欄位 | Type | 說明 | 
| --- | --- | --- | 
| PromotionId | String | 標準忠誠度促銷活動的唯一識別符。 | 
| PromotionName | String | 顯示促銷活動的名稱。 | 
| PromotionType | String | 促銷活動類型或類別 (例如獎勵、提升層級、折價券)。 | 
| ProgramType | String | 指出該促銷活動所繫結的忠誠度計劃類型。 | 
| ProgramRef | String | 相關忠誠度計劃的參考 ID。 | 
| PartnerId | String | 參與促銷活動之合作夥伴組織的參考 ID。 | 
| PartnerNumber | String | 合作夥伴相關識別符或號碼。 | 
| Tier | String | 促銷活動的目標層級或受其影響的層級。 | 
| StartDate | String | 促銷活動開始日期。 | 
| EnrolledDate | String | 使用者註冊促銷活動的日期。 | 
| EndDate | String | 促銷活動結束日期。 | 
| Amount | String | 促銷活動相關金額或點數。 | 
| Period | String | 促銷活動期間 (例如每週、每月、以行銷活動為基礎)。 | 
| 狀態 | String | 促銷活動的目前狀態 (例如開放中、過期、已完成)。 | 
| CreatedDate | String | 促銷活動記錄的建立日期。 | 
| CreatedBy | String | 建立促銷活動記錄的使用者或系統。 | 
| UpdatedDate | String | 促銷活動記錄上次更新日期。 | 
| UpdatedBy | String | 上次更新促銷活動的使用者或系統。 | 
| CampaignRef | String | 此促銷活動所屬活動的外部參考號碼。 | 
| AdditionalInformation | String | 促銷活動相關其他備註或行銷副本。 | 
| TriggerLimit | TriggerLimit | 觸發限制的詳細資訊 | 
| Usage | Usage | 用量詳細資訊 | 
| Rules | Rules | 促銷活動規則詳細資訊 | 
| Incentive | Incentive | 促銷活動獎勵詳細資訊 | 
| 屬性 | Map<String, String> | 其他中繼資料或計劃特定值。 | 


**標準索引欄位**  

| 標準索引名稱 | 標準偏好設定記錄欄位 | 
| --- | --- | 
| \$1loyaltyPromotionId | PromotionId | 


**Rules 資料類型**  

| 標準 loyaltyPromotion 欄位 | Type | 說明 | 
| --- | --- | --- | 
| Name | String | 促銷活動規則中的規則名稱。 | 
| Description | String | 促銷活動規則中的規則說明。 | 


**Incentive 資料類型**  

| 標準 loyaltyPromotion 欄位 | Type | 說明 | 
| --- | --- | --- | 
| Type | String | 獎勵類型 (例如獎勵點數、折價券、層級升級)。 | 
| Value | String | 獎勵的值，例如點數或折價金額。 | 
| 單位 | String | 獎勵值的單位 (例如點數、百分比、美元)。 | 


**TriggerLimit 資料類型**  

| 標準 loyaltyPromotion 欄位 | Type | 說明 | 
| --- | --- | --- | 
| Times | String | 促銷活動可以觸發的次數。 | 
| Interval | String | 觸發限制的間隔。 | 


**Usage 資料類型**  

| 標準 loyaltyPromotion 欄位 | Type | 說明 | 
| --- | --- | --- | 
| UsageProgressPercent | String | 促銷活動使用量的進度百分比。 | 
| UsageCompleted | String | 已完成的使用量數量。 | 
| UsageTarget | String | 目標使用量。 | 

# Web Analytics 物件的物件類型映射
<a name="standard-loyalty-promotion-object-mapping-web-analytics"></a>


**WebAnalytics 標準物件結構描述**  

| 欄位 | Type | 說明 | 
| --- | --- | --- | 
|  事件屬性  | 
|  EventId  |  String  |  Web 分析事件的唯一識別符。  | 
|  EventType  |  String  | Web 分析事件的類型，例如 - Page View、表單提交、按一下按鈕、s提取主線\$1u0000搜尋列互動、應用程式錯誤提示、購物車互動、購買、捲動等。 | 
|  EventTimestamp  |  Number  |  事件的 Epoch 毫秒時間戳記。  | 
|  EventDuration  |  Number  |  EventDuration 代表使用者在特定互動期間花費的時間量，以秒為單位。常見的使用案例包括：檢視產品所花費的時間、特定頁面上的瀏覽工作階段長度、功能所花費的時間等。  | 
|  EventValue  |  Number  |  EventValue 是數值屬性，代表互動事件的值或重要性。常見使用案例包括：交易事件的購買金額、產品評分的評分值、影片檢視的完成百分比等。  | 
|  工作階段屬性  | 
|  Session.Id  |  String  |  工作階段的唯一識別符。  | 
|  Session.StartTimestamp  |  Number  |  Epoch 毫秒表示工作階段的開始時間戳記。  | 
|  頁面/畫面屬性  | 
|  Page.Title  |  String  |  行動應用程式的 Web 應用程式/畫面名稱標題。  | 
|  Page.Location  |  String  |  網頁的 URL。對於行動裝置，可能是螢幕的深層連結或路由。  | 
|  Page.Referrer  |  String  |  上一個畫面/頁面。  | 
|  Page.Category  |  String  |  畫面/頁面的邏輯分組。可能有助於將巢狀 URLs/應用程式位置分組。  | 
|  HTML/DOM 元素  | 
|  Element.Id  |  String  |  HTML 元素 ID  | 
|  Element.Type  |  String  |  元素類型 - 按鈕、錨點連結、等  | 
|  Element.Classes  |  String  |  元素的 CSS 樣式類別  | 
|  Element.Text  |  String  |  元素文字 （適用於按鈕、輸入欄位預留位置等）。  | 
|  Element.AltText  |  String  |  HTML 元素的 AltText （通常用於影像）。  | 
|  Element.Source  |  String  |  影片、影像等的來源  | 
|  表格  | 
|  Form.Id  |  String  |  輸入表單的唯一識別符  | 
|  Form.Name  |  String  |  表單的名稱  | 
|  Form.Length  |  String  |  表單中的輸入欄位數目。  | 
|  Form.ValidationErrors  |  Number  |  表單中的驗證錯誤數目。  | 
|  Form.FieldsCompleted  |  Number  |  完成的欄位數量。  | 
|  Form.FieldsRequired  |  Number  |  必要欄位的數量。  | 
|  搜尋  | 
|  Search.Query  |  String  |  輸入中使用的查詢字串  | 
|  Search.TotalMatchingResults  |  Number  |  搜尋結果的總數。  | 
|  Search.ResultsPerPage  |  Number  |  每頁顯示的結果數量。  | 
|  Search.CurrentResultsPage  |  Number  |  使用者正在檢視的目前結果頁面。  | 
|  Search.FilterExpression  |  String  |  使用的任何其他篩選條件表達式。  | 
|  Search.SortCriteria  |  String  |  排序搜尋結果的條件。例如 - 相關性、價格等。  | 
|  Search.SortOrder  |  String  |  搜尋結果的排序順序 - 遞增/遞減。  | 
|  項目/項目清單  | 
|  項目  |  項目  |  事件中的聚焦項目，指出新增至購物車的項目、檢視的項目等。  | 
|  ItemsList  |  List<Item>  |  事件中的項目聚焦清單，指出購買的項目、購物車中的項目、項目搜尋結果等。  | 
|  項目印象  | 
|  AdditionalItemImpressions  |  List<Item>  |  其他項目印模清單  | 
|  購物車  | 
|  Cart.Id  |  String  |  購物車的唯一識別符。  | 
|  Cart.ItemsCount  |  Number  |  購物車中的項目數量。  | 
|  Cart.Currency  |  String  |  購物車值的貨幣。  | 
|  Cart.Value  |  Number  |  購物車中項目的貨幣值。  | 
|  訂單資訊  | 
|  OrderId  |  String  |  訂單的唯一識別符。我們只會將訂單識別符存放在此處，與訂單相關的其他資訊會存放在標準訂單物件中。  | 
|  裝置  | 
|  DeviceId  |  String  |  使用者裝置的唯一識別符。  | 
|  捲動屬性  | 
|  Scroll.DepthPercentage  |  String  |  垂直捲動深度百分比。這有助於了解使用者捲動網頁的程度。  | 
|  Scroll.PositionX  |  Number  |  從左側以像素為單位的水平捲動位置。  | 
|  Scroll.PositionY  |  Number  |  從頂端以像素為單位的垂直捲動位置。  | 
|  錯誤  | 
|  Error.Description  |  String  |  錯誤的簡短描述。  | 
|  Error.Type  |  String  |  使用者輸入錯誤/伺服器錯誤。  | 
|  使用者  | 
|  User.Id  |  String  |  使用者的唯一識別符  | 
|  User.AnonymousId  |  String  |  匿名 UserId。當使用者未登入時，這會是指派給使用者uniqueId。  | 
|  User.IsReturning  |  String  |  布林值，指出使用者是否正在重新檢視。  | 
|  User.IsLoggedIn  |  String  |  指出使用者是否登入的布林值。  | 
|  活動位置  | 
|  Location.Country  |  String  |  使用者活動國家/地區。  | 
|  Location.State  |  String  |  使用者活動狀態。  | 
|  位置.省  |  String  |  使用者活動省份。  | 
|  Location.County  |  String  |  使用者活動郡。  | 
|  Location.City  |  String  |  使用者活動城市。  | 
|  Location.Latitude  |  String  |  使用者活動位置座標  | 
|  Location.Longitude  |  String  |  使用者活動位置座標  | 
|  應用程式屬性  | 
|  Application.Name  |  String  |  應用程式名稱。  | 
|  Application.Version  |  String  |  如果裝置是 Mobile，我們可以在此處擷取應用程式版本。使用者也可以考慮將此用於人口 A/B 測試或實驗屬性。  | 
|  Application.Environment  |  String  |  應用程式環境，例如 - Beta、Gamma、Prod。  | 
|  自訂屬性  | 
|  屬性  |  Map<String, String>  |  要新增至事件的任何自訂屬性或中繼資料。  | 


**WebAnalytics 項目物件結構描述**  

| 欄位 | Type | 說明 | 
| --- | --- | --- | 
|  Id  |  String  |  項目的唯一識別符。  | 
|  Title  |  String  |  項目的標題。  | 
|  Category  |  String  |  項目的類別。  | 
|  Value  |  String  |  項目的貨幣值。  | 
|  Currency  |  String  |  項目的貨幣。  | 
|  數量  |  Number  |  項目的數量。  | 
|  ImpressionType  |  String  |  識別事件印模類型的字串。例如 - 精選、贊助、最佳挑選等。  | 
|  ImpressionId  |  String  |  用於唯一識別印模的字串識別符。  | 


**裝置標準物件結構描述**  

| 欄位 | Type | 說明 | 
| --- | --- | --- | 
|  DeviceId  |  String  |  裝置的唯一識別符。  | 
|  Type  |  String  |  裝置類型 （例如桌上型電腦、行動裝置）  | 
|  模型  |  String  |  裝置模型，例如 - Macbook Pro/Air、IPhone 16 等。  | 
|  製造商  |  String  |  裝置製造商。  | 
|  OperatingSystem  |  String  |  指出 Windows、MacOs、IOS、Android。  | 
|  OperatingSystemVersion  |  String  |  作業系統版本  | 
|  ScreenWidth  |  Number  |  Screen ViewPort 的寬度  | 
|  ScreenHeight  |  Number  |  Screen ViewPort 的高度  | 
|  瀏覽器  |  String  |  使用者與之互動的瀏覽器名稱。  | 
|  BrowserVersion  |  String  |  瀏覽器版本  | 
|  Locale  |  String  |  裝置或應用程式地區設定。  | 
|  屬性  |  Map<String, String>  |  裝置的任何自訂屬性。  | 

# Item Catalog 的物件類型映射
<a name="standard-loyalty-promotion-object-mapping-item-catalog"></a>


| 欄位 | Type | 說明 | 
| --- | --- | --- | 
|  Id  | String | 目錄中項目的唯一識別符。 | 
|  Name  | String | 項目的名稱 | 
|  Code  | String | 目錄項目的程式碼 | 
|  Type  | String | 目錄項目的類型 | 
|  Category  | String | 目錄中項目的類別 | 
|  Description  | String | 項目描述 | 
|  AdditionalInformation  | String | 與該項目有關的任何其他資訊。 | 
|  ImageLink  | String | 連結至項目的影像 | 
|  連結  | String | 項目 URL | 
|  Price  | String | 項目的價格 | 
|  CreatedAt  | Long | 建立項目的 Epoch 時間戳記 | 
|  UpdatedAt  | Long | 已更新項目的 Epoch 時間戳記 | 
| 屬性 | Map<String, String> | 其他項目屬性 | 

**注意**  
您只能透過 APIs刪除網域物件類型。在先刪除所有建議者之後，您可以刪除項目目錄整合。這可防止資料相依性問題。  
**刪除的步驟：**  
1. 刪除您網域中的所有現有推薦者  
2. 導覽至項目目錄整合。  
3. 選取刪除選項。

# 標準飯店住宿收入的物件類型映射
<a name="object-type-mapping-standard-hotel-stay-revenue"></a>

本章節的主題提供標準飯店住宿收入的定義。

**Topics**
+ [Customer Profiles 標準飯店住宿收入物件欄位](standard-hotel-stay-revenue-object-fields.md)

# Customer Profiles 標準飯店住宿收入物件欄位
<a name="standard-hotel-stay-revenue-object-fields"></a>

下表列出 Customer Profiles 標準飯店住宿收入物件中的所有欄位。


**飯店住宿收入**  

| 標準 hotelStayRevenue 欄位 | Type | 說明 | 
| --- | --- | --- | 
| StayRevenueId | String | 標準飯店住宿收入的唯一識別符。 | 
| CurrencyCode | String | 貨幣的 ISO 代碼 (例如 USD) | 
| CurrencyName | String | 貨幣全名 (例如美元) | 
| CurrencySymbol | String | 貨幣符號 (例如 \$1) | 
| ReservationId | String | 飯店預訂的唯一識別符 | 
| GuestId | String | 訪客的唯一識別符 | 
| LastUpdatedOn | String | 上次更新住宿記錄的時間戳記 | 
| CreatedOn | String | 建立住宿記錄的時間戳記 | 
| LastUpdatedBy | String | 上次更新住宿記錄的使用者/系統識別符 | 
| CreatedBy | String | 建立住宿記錄的使用者/系統識別符 | 
| StartDate | String | 住宿開始日期 | 
| HotelCode | String | 識別特定飯店的代碼 | 
| Type | String | 收入類型 (例如房價、雜費、稅金) | 
| Description | String | 收入項目說明 | 
| Amount | String | 收入項目的金額 | 
| ProcessedDate | String | 處理收入的日期 | 
| 狀態 | String | 收入項目的狀態 | 
| 屬性 | Map<String, String> | 其他中繼資料或計劃特定值。 | 


**標準索引欄位**  

| 標準索引名稱 | 標準偏好設定記錄欄位 | 
| --- | --- | 
| \$1hotelStayRevenueId | StayRevenueId | 

# Customer Profiles 中物件類型的其他屬性
<a name="additional-properties-object-types"></a>

屬性類型會定義應該使用哪個金鑰來加密物件類型的任何資料。

有一個選項可以定義是否能夠透過擷取此物件來建立新的設定檔。通常，當擷取的物件與現有設定檔不相符時，只要此選項為真，就會建立新的設定檔。如果不是 true，則會建立擷取的物件，並將其寫入網域無效字母佇列。

它也包含此物件類型的資料在客戶設定檔中應該保留的時間長度。

**注意**  
個別物件的保留是在擷取資料時設定的。變更特定物件類型的保留只會套用至要擷取的新資料。它不適用於已經擷取的現有資料。

**注意**  
如果此物件與現有設定檔相符，則不會覆寫透過 API 呼叫或客服人員工作區手動填入的欄位，以防止自動擷取覆寫手動欄位。  
例如，假設客服人員在客服人員工作區中使用「John」這個名字手動建立一個設定檔。系統會擷取標準設定檔「名字」欄位的物件映射資料。如果此物件與設定檔相關，則不會覆寫「John」這個名字。

# 推斷的設定檔
<a name="inferred-profiles"></a>

如果擷取沒有欄位的物件建立了設定檔，則此新設定檔的標準設定檔物件為空白。這個空的標準設定檔物件是**推斷的設定檔**。

建立推論的設定檔時，以下兩個欄位會從設定檔物件移植至標準物件 (如果可用)。
+ 擷取的物件中如果有以 `EMAIL_ADDRESS` 內容類型定義的任何欄位，則此值會填入標準設定檔的 `EmailAddress` 欄位中。
+ 擷取的物件中如果有任何 `PHONE_NUMBER` 內容類型的欄位，則此值會填入標準設定檔的 `PhoneNumber` 欄位中。

即使欄位沒有在欄位定義中定義的目標，這些欄位的值也會填入標準設定檔中。

若要進一步了解聯絡人記錄範本類型，以及如何調整網域所使用的範本，請參閱 [聯絡人記錄範本使用範例](ctr-contact-record-template.md#ctr-contact-record-template-usage-examples)。

# Amazon Connect Customer Profiles 中的聯絡人記錄範本
<a name="ctr-contact-record-template"></a>

聯絡人記錄作為設定檔物件，可以捕獲來自各種聯絡人事件 (例如通話或聊天) 的基本中繼資料。它在記錄和分析與客戶的互動方面具有至關重要的作用。

當聯絡事件發生時，有三種不同的預設範本，可以應用於您的網域。這些範本可作為組態選項，用來控制聯絡人事件在系統內的處理方式。每個範本都會定義特定的規則和動作，讓您根據業務需求量身打造聯絡人事件的處理方式。

**Topics**
+ [建立推論的設定檔和自動關聯設定檔 (CTR-NoInferred)](#ctr-contact-record-template-no-inferred)
+ [僅自動關聯設定檔 (CTR-AutoAssociateOnly)](#ctr-contact-record-template-auto-associate)
+ [僅建立推斷的設定檔 (CTR)](#ctr-contact-record-template-inferred-only)
+ [聯絡人記錄範本使用範例](#ctr-contact-record-template-usage-examples)
+ [如何在 AWS 主控台更新聯絡人記錄類型](#ctr-contact-record-template-usage-examples-console)
+ [自動將名稱從電子郵件聯絡人新增至設定檔](#add-email-names-to-profile)

## 建立推論的設定檔和自動關聯設定檔 (CTR-NoInferred)
<a name="ctr-contact-record-template-no-inferred"></a>

**Description**

使用 CTR-NoInferred 範本並發生聯絡事件 (例如通話) 時，就會啟動特定程序來處理資料。一開始，系統會使用 `_ctrContactId` 索引鍵來搜尋與聯絡人事件關聯的現有設定檔。如果找到相符的設定檔，聯絡人事件將自動與該設定檔關聯。但是，如果使用 `_ctrContactId` 索引鍵找不到現有的設定檔，系統會繼續使用名為 `_phone` 的次要索引鍵來搜尋設定檔。此索引鍵是用於根據與聯絡人事件關聯的電話號碼找到現有的設定檔。找到相符的設定檔時，聯絡人事件將自動與該設定檔關聯。

如果 `_ctrContactId` 索引鍵和 `_phone` 索引鍵都不產生現有的設定檔，則系統會建立新的推斷設定檔。然後，此推斷的設定檔會填入來自聯絡人事件的中繼資料，以確保資訊會擷取並儲存在系統中。

此程序可確保有效處理聯絡人事件、促進與現有設定檔的自動關聯，並在必要時建立推斷的設定檔。組織可以利用這些機制，維護客戶互動的全面記錄，並有效地管理系統內的聯絡人事件資料。

建議使用 CTR-NoInferred 範本作為預設行為，因為它具有顯著的優點，特別是在減少重複的設定檔時

![\[聯絡人記錄 CTR-NoInferred 範本圖表。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/ctr-contact-record-template-no-inferred.png)


## 僅自動關聯設定檔 (CTR-AutoAssociateOnly)
<a name="ctr-contact-record-template-auto-associate"></a>

**Description**

CTR-AutoAssociateOnly 範本的功能與 CTR-NoInferred 範本類似，但有一個重要的區別：當找不到現有的設定檔進行自動關聯時，它不會建立推斷的設定檔。

發生聯絡事件 (例如通話) 時，CTR-AutoAssociateOnly 範本會利用 `_ctrContactId` 索引鍵來搜尋符合的現有設定檔。如果找到設定檔，則聯絡人事件會自動與該設定檔關聯。

但是，如果使用 `_ctrContactId` 索引鍵找不到現有的設定檔，範本會採用使用 `_phone` 索引鍵的次要搜尋機制。它會搜尋與聯絡人事件相同電話號碼關聯的現有設定檔。如果找到相符的設定檔，則聯絡人事件會自動與該設定檔關聯。

使用 CTR-AutoAssociateOnly 範本的目的在於啟用與現有設定檔的自動關聯，同時保持對設定檔建立的嚴格控制。與 CTR-NoInferred 範本不同，此範本可防止在找不到相符項目時建立推論的設定檔。它可確保只能手動建立設定檔，為組織提供更大程度的設定檔管理控制和準確性。

通過使用 CTR-AutoAssociateOnly 範本，組織既能遵守有關設定檔建立的特定規則，又可以利用自動關聯。這種方法可以簡化聯絡人事件處理，以及對設定檔生態系統的精確控制，進而確保準確的資料表示，並促進有效的客戶管理。

![\[聯絡人記錄 CTR-AutoAssociateOnly 範本圖表。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/ctr-contact-record-template-auto-associate.png)


## 僅建立推斷的設定檔 (CTR)
<a name="ctr-contact-record-template-inferred-only"></a>

**Description**

CTR 範本僅依賴 `_ctrContactId` 索引鍵來搜索現有的設定檔，而且如果找到相符的設定檔，會自動將聯絡人事件與設定檔關聯。但是，在找不到現有設定檔的情況下，範本會建立推斷的設定檔，並將聯絡人事件中繼資料填入。

雖然此行為可確保即使沒有預先存在的設定檔存在，也可能會擷取聯絡人事件，但可能會導致建立大量的推斷設定檔。如此豐富的推斷設定檔可能會導致系統內設定檔重複的問題。

為了解決此問題並促進更好的設定檔管理實務，我們強烈建議使用 CTR-NoInferred 範本作為預設選項。透過使用 CTR-NoInferred 範本，系統即可免於建立推論的設定檔，從而減少重複設定檔的出現。此範本可讓您更精簡且有效率地處理聯絡人事件，進而改善資料的完整性和準確性。

透過採用 CTR-NoInferred 範本作為預設選項，組織可以將其設定檔管理程序最佳化、減少重複資料，並確保更可靠地呈現客戶互動。

![\[聯絡人記錄 CTR 範本圖。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/ctr-contact-record-template-inferred-only.png)


## 聯絡人記錄範本使用範例
<a name="ctr-contact-record-template-usage-examples"></a>

**Amazon Connect 管理員網站**
+ 在 Amazon Connect 管理員網站中，建立新網域時，您可以選擇所需的 CTR 行為。這可以透過 **設定檔建立和自動關聯** 區段中可用的選項按鈕選項來完成。同樣地，當選擇現有網域時，選項按鈕選項也會反映先前與該網域關聯的行為。
+ 編輯目前啟用的網域時，「網域詳細資訊」頁面會在 **設定檔建立和自動關聯** 區段中顯示目前套用的行為。選擇此區段標題中的 **編輯** 按鈕，系統會將您重新導向至 **編輯** **設定檔建立和自動關聯** 頁面。在這裡，您可以根據需求選擇不同的行為。
+ 或者，如果您正在從**資料對映**頁面檢視 CTR 對映，則可選擇**變更範本**按鈕。此動作也會帶您前往 **編輯** **設定檔建立和自動關聯** 頁面，您可以在其中選擇符合您需求的不同行為。

這些選項為您提供了管理網域 CTR 行為的靈活性，使您可以根據特定的偏好或不斷變化的業務需求輕鬆自訂和修改設定。

**AWS CLI**
+ 若要使用 **CTR-NoInferred** 範本，請在 CLI 上執行下列命令：

  `aws customer-profiles put-profile-object-type --domain-name {domain} --object-type-name CTR --description "Creates inferred profiles and auto-associates profiles" --template-id CTR-NoInferred `
+ 若要使用 **CTR-AutoAssociateOnly** 範本，請在 CLI 上執行下列命令：

  `aws customer-profiles put-profile-object-type --domain-name {domain} --object-type-name CTR --description "Auto-associate with profiles only" --template-id CTR-AutoAssociateOnly `
+ 若要使用 **CTR** 範本，請在 CLI 上執行下列命令：

  `aws customer-profiles put-profile-object-type --domain-name {domain} --object-type-name CTR --description "Creates inferred profiles only" --template-id CTR `

**API**

如需有關使用 API 的資訊，請參閱 [PutProfileObjectType](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_PutProfileObjectType.html)

## 如何在 AWS 主控台更新聯絡人記錄類型
<a name="ctr-contact-record-template-usage-examples-console"></a>

1. 在 Customer Profiles 主控台選取 **Customer Profiles 網域**區段中的**檢視詳細資訊**。  
![\[在 Customer Profiles 網域選擇檢視詳細資訊。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/ctr-contact-record-template-usage-examples-console-1.png)

1. 在**網域詳細資訊**頁面上，選擇**設定檔建立和自動關聯**區段的**編輯**。  
![\[在設定檔建立和自動關聯區段中選擇編輯。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/ctr-contact-record-template-usage-examples-console-2.png)

1. 選取您要套用至網域的聯絡人記錄行為，然後選擇**儲存**。  
![\[選取您要套用至網域的聯絡人記錄行為，然後選擇儲存。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/ctr-contact-record-template-usage-examples-console-3.png)

## 自動將名稱從電子郵件聯絡人新增至設定檔
<a name="add-email-names-to-profile"></a>

您可以設定流程，將電子郵件聯絡人的名稱填入到客戶的設定檔。使用 [客戶設定檔](customer-profiles-block.md) 區塊，其設定為使用[更新設定檔](customer-profiles-block.md#customer-profiles-block-properties-update-profile)動作。

# 在 Customer Profiles 中，將聯絡人記錄與使用 \$1phone 索引鍵找到的一個設定檔建立關聯
<a name="auto-associate-profile-using-phone-profile-key"></a>

您可以自動將聯絡人記錄與使用 `_phone` 索引鍵找到的一個設定檔關聯。

**範例**

在網域中，`CreateProfile` API 會建立下列設定檔：

```
            {
                "FirstName": "John",
                "LastName": "Doe",
                "PhoneNumber": "+11234567890"
            }
```

當使用預設 CTR 範本從 `PhoneNumber` \$111234567890 接收來電時，聯絡人記錄將不會自動與上述設定檔關聯，除非客服人員已將聯絡人記錄與同一來電者手動關聯到上述設定檔。如果沒有手動或自動關聯聯絡人記錄，客戶設定檔會建立一個推斷的設定檔，其中包含聯絡人記錄中的資訊。

若要自動將上述設定檔與聯絡人記錄關聯，而無需客服人員手動介入，您可以使用 CTR-NoInferred 範本。使用 CTR-NoInferred 範本時，若從 `PhoneNumber`\$111234567890 接收到來電，聯絡人記錄會使用 `_phone` 設定檔索引鍵自動與上述設定檔關聯。

在兩種情況下，Customer Profiles 將*不會*自動使聯絡人記錄與設定檔關聯：
+ 如果使用 `_phone` 設定檔索引鍵找到多個設定檔，則客戶設定檔無法將聯絡人記錄與唯一的設定檔關聯，且此要求會被拒絕。
+ 如果 `_phone` 設定檔索引鍵找不到設定檔，則客戶設定檔將建立推斷的設定檔。

若要使用 CTR-NoInferred 範本來取代預設的 CTR 範本，請在 CLI 上執行下列命令：

`aws customer-profiles put-profile-object-type --domain-name {domain} --object-type-name CTR --description "No inferred contact record profiles" --template-id CTR-NoInferred`

若要還原為預設行為，請在 CLI 上執行下列命令：

`aws customer-profiles put-profile-object-type --domain-name {domain} --object-type-name CTR --description "Revert to inferred contact record profiles" --template-id CTR`

# Amazon Connect Customer Profiles 中的物件類型映射範例
<a name="examples-object-type-mappings"></a>

## 產生設定檔的物件類型對應
<a name="profile-generating-example"></a>

下列範例顯示填入標準設定檔的資料。

以下是傳入的物件：

```
{
  "account": 1234,
  "email": "john@examplecorp.com",
  "address": {
     "address1": "Street",
     "zip": "Zip",
     "city": "City"
  },
  "firstName": "John",
  "lastName": "Doe"
}
```

下列程式碼展示傳入物件對映到標準設定檔物件，並針對 `PersonalEmailAddress`、`fullName` 和 `accountId` (唯一索引鍵) 建立索引。

```
{
    "Fields": {
        "accountId": {
            "Source": "_source.account",
            "Target": "_profile.AccountNumber",
            "ContentType": "NUMBER"
        },
        "shippingAddress.address1": {
            "Source": "_source.address.address1",
            "Target": "_profile.ShippingAddress.Address1"
        },
        "shippingAddress.postalCode": {
            "Source": "_source.address.zip",
            "Target": "_profile.ShippingAddress.PostalCode"
        },
        "shippingAddress.city": {
            "Source": "_source.address.city",
            "Target": "_profile.ShippingAddress.City"
        },
        "personalEmailAddress": {
            "Source": "_source.email",
            "Target": "_profile.PersonalEmailAddress",
            "ContentType": "EMAIL_ADDRESS"
        },
        "fullName": {
            "Source": "{{_source.firstName}} {{_source.lastName}}"
        },
        "firstName": {
            "Source": "_source.firstName",
            "Target": "_profile.FirstName"
        },
        "lastName": {
            "Source": "_source.lastName",
            "Target": "_profile.LastName"
        }
    },
    "Keys": {
        "_email": [
            {
                "FieldNames": ["personalEmailAddress"]
            }
        ],
        "_fullName": [
            {
                "FieldNames": ["fullName"]
            }
        ],
        "_account": [
            {
                "StandardIdentifiers": ["PROFILE","UNIQUE"],
                "FieldNames": ["accountId"]
            }
        ]
    }
}
```

請注意，`email` 和 `fullname` 已編製索引，但它們不會用於搜尋設定檔。該帳戶是唯一索引鍵。需要指定物件。每當擷取具有相同帳戶 ID 的物件時，它都會以相同的帳號 ID 覆寫先前的物件。

標準設定檔物件中會填入數個欄位 (請參閱已定義 `Target` 的欄位)。

## 不填入標準設定檔的物件類型對應
<a name="ticket-issue-example"></a>

此範例顯示更複雜的使用案例。它會擷取與設定檔相關的資料，但不一定會填入標準設定檔物件。

以下是傳入的物件：

```
{
  "email": "john@examplecorp.com",
  "timestamp": "2010-01-01T12:34:56Z",
  "subject": "Whatever this is about",
  "body": "Body of ticket"
}
```

以下是對應此資料的一種方法：

```
{
    "Fields": {
        "email": {
            "Source": "_source.email",
            "ContentType": "EMAIL_ADDRESS"
        },
        "timestamp": {
            "Source": "_source.timestamp"
        }
    },
    "Keys": {
        "_email": [
            {
                "StandardIdentifiers": ["PROFILE","LOOKUP_ONLY"],
                "FieldNames": ["email"]
            }
        ],
        "ticketEmail": [
            {
                "StandardIdentifiers": ["PROFILE","SECONDARY","NEW_ONLY"],
                "FieldNames": ["email"]
            }
        ],
        "uniqueTicket": [
            {
                "StandardIdentifiers": ["UNIQUE"],
                "FieldNames": ["email","timestamp"]
            }
        ]
    }
}
```

此範例會擷取資料，並在第一次查詢時擷取電子郵件地址。
+ 如果電子郵件地址與單一設定檔相符，則會用來將資料附加至該特定設定檔。票證的唯一識別符由電子郵件和時間戳組成，因為沒有其他唯一識別符存在。
+ 如果指定的電子郵件中沒有設定檔，則會建立一個新的設定檔，並填入單一欄位 `EmailAddress`。擷取的物件會附加至此新的**推論設定檔**。可以找到設定檔的兩個可搜尋索引鍵是 `_email` 和 `uniqueTicket`。
+ 如果指定的電子郵件地址存在多個設定檔，則會建立新的設定檔，以單一 `EmailAddress` 欄位填入，並將物件附加至此新設定檔。除了 `_email` 和 `uniqueTicket` 之外，此設定檔建立時還會定義 `ticketEmail` 索引鍵。該電子郵件中的任何後續票證都會指派給此一新的**推斷設定檔**。原因是 ` _email` 索引鍵參照到三個設定檔，因此被丟棄，但是 `ticketEmail` 索引鍵僅參照單一設定檔 (新的推斷設定檔)，並且仍然有效。
+ 在建立新的**推論設定檔**的情況下，會從建立該設定檔的第一個物件填入 `EmailAddress` 欄位。

# Amazon Connect Customer Profiles 中的隱含設定檔物件類型
<a name="implicit-profile-object-types"></a>

您可以使用符合範本 ID 名稱的任何物件類型 (如 [ListProfileObjectTypeTemplates](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_ListProfileObjectTypeTemplates.html) API 所傳回)，而無需明確定義它。物件類型將完全符合此物件類型的範本定義。如果定義了明確的物件類型，它會取代隱含的物件類型。

隱含的物件類型包含在 [ListProfileObjectTypes](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_ListProfileObjectTypes.html) API 中，或由 [GetProfileObjectType](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_GetProfileObjectType.html) 作業傳回，但是如果您想要移除從該物件類型擷取的所有資料，仍然可以刪除它們。

# Amazon Connect 中，生成式 AI 支援的資料映射
<a name="genai-powered-data-mapping"></a>

Amazon Connect Customer Profiles 提供生成式 AI 支援的客戶資料映射功能，可大幅減少建立統一設定檔所需的時間，讓您能夠協助提供更個人化的客戶體驗。

使用此功能時，當聯絡中心管理員從 Adobe Analytics、Salesforce 或 Amazon Simple Storage Service (S3) 等 70\$1 個可用無程式碼資料連接器中新增客戶資料時， Amazon Connect Customer Profiles 會分析來自這些來源的資料，以自動判斷如何將不同來源之間存在不同格式的資料組織和合併到其中的統一設定檔 Amazon Connect。聯絡中心管理員就可以查看並完成客戶設定檔的設定，讓他們可以提供客服人員相關的客戶資續，並動態個人化 IVR 和聊天機器人，以提高客戶滿意度和客服人員生產力。

生成式 AI 支援的客戶資料映射可在下列區域中使用：
+ 美國東部 (維吉尼亞北部)
+ 美國西部 (奧勒岡)
+ 非洲 (開普敦)
+ 亞太地區 (新加坡)
+ 亞太地區 (雪梨)
+ 亞太地區 (東京)
+ 亞太地區 (首爾)
+ 加拿大 (中部)
+ 歐洲 (法蘭克福)
+ 歐洲 (倫敦)

## 設定生成式 AI 支援的資料對映
<a name="set-up-genai-powered-data-mapping"></a>

1. 開啟 Amazon Connect 客戶設定檔主控台。

1. 在 **資料來源整合** 索引標籤，選擇 **新增資料來源整合**。

1. 設定連線。從有所有支援連接器可用的下拉式清單中選擇資料來源。  
![\[從有所有支援連接器可用的下拉式清單中選擇資料來源。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/genai-augmented-data-mapping-1.png)

1. 地圖資料。選擇自動產生資料對映的選項，或選擇已存在的對映範本或從頭開始建立對映範本。  
![\[地圖資料。選擇自動產生資料對映的選項，或選擇已存在的對映範本或從頭開始建立對映範本。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/genai-augmented-data-mapping-2.png)

1. 查看對映摘要。查看顯示所有客戶屬性的自動產生對映結果摘要。編輯擷取的金鑰，並在開始資料擷取前確認。如需詳細了解欄位映射和金鑰，請參閱 [Amazon Connect Customer Profiles 中的物件類型映射定義詳細資訊](object-type-mapping-definition-details.md)。  
![\[查看對映摘要。查看顯示所有客戶屬性的自動產生對映結果摘要。編輯擷取的金鑰，並在開始資料擷取前確認。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/genai-augmented-data-mapping-3.png)

## 運作方式
<a name="genai-powered-data-mapping-how-it-works"></a>

該系統分四個階段工作。第一階段，「客戶設定檔」會擷取來源屬性，如果有，會從您的資料來源取樣資料，然後決定最適合目標的物件類型。對於 Amazon S3 資料來源，在所選 Amazon S3 儲存貯體和前置詞中找到的第一個 CSV 檔案將作為範例資料使用。對於其他資料來源，客戶設定檔會透過 AppFlow 擷取來源屬性。第二階段，利用大型語言模型 (LLM) 進一步處理每個自訂屬性並對映到標準客戶設定檔屬性。第三階段會再次使用 LLM，以選擇可以座為金鑰的合適屬性，例如客戶識別碼。最後，第四階段，時間戳記格式偵測器解析時間戳記以保持記錄的正確時間順序。在合併預測結果後，系統可以在 20 秒內產生最多 120 個屬性的對映。

## 生成式 AI 支援的資料對映疑難排解
<a name="genai-powered-data-mapping-troubleshooting"></a>

以下各節顯示您可能遇到的可能錯誤訊息。它還提供了每個問題的原因和解決方案。

### 錯誤：無法剖析物件字串至 JSON
<a name="genai-powered-data-mapping-parse-object-error"></a>

請求中的物件字串不是有效的 JSON。查看請求中的物件字串，並確認其是有效的 JSON。

### 錯誤：「objects」值無法滿足限制條件：成員的長度必須小於或等於 5
<a name="genai-powered-data-mapping-failed-constraint-error"></a>

請求中有太多物件。請求中最多允許五個物件。將物件數量減少到五個以下。

### 錯誤：超過 120 個屬性上限
<a name="genai-powered-data-mapping-breached-limit"></a>

一個 JSON 物件最多允許 120 個屬性，包括巢狀 JSON 屬性。刪除一些不需要從 JSON 物件對映的屬性。

![\[一個 JSON 物件最多允許 120 個屬性，包括巢狀 JSON 屬性。刪除一些不需要從 JSON 物件對映的屬性。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/genai-augmented-data-mapping-breached-limit.png)


### 警告：我們找不到區分您的資料的**唯一金鑰**。我們找不到可識別您的設定檔的**設定檔金鑰**。
<a name="genai-powered-data-mapping-unique-key-warning"></a>

模型在指定物件中找不到有效的物件類型。按照建議變更輸入或使用手動對映方法。

![\[模型在指定物件中找不到有效的物件類型。按照建議變更輸入或使用手動對映方法。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/genai-augmented-data-mapping-unique-key-warning.png)


# Amazon Connect Customer Profiles 資料限制
<a name="customer-profiles-data-limits"></a>

Amazon Connect Customer Profiles 可讓您自訂資料上線，方法是針對不同用於建立統一設定檔的客戶資料類型設定資料擷取限制。設定資料映射限制，讓您優先考慮要跨映射擷取的資料量。每個設定檔的所有映射預設上限為 1000。

**注意**  
資料限制是估計值，可能略有不同，在單一設定檔的高擷取期間，任一方向均可能有數單位誤差。

## 如何設定 Customer Profiles 資料限制
<a name="customer-profiles-data-limits-configure"></a>

1. 開啟 Amazon Connect 客戶設定檔主控台。

1. 選擇**資料限制**索引標籤來設定資料物件的限制。  
![\[前往 [資料限制] 索引標籤來設定資料物件的限制。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-data-limits-setup-1.png)

1. 將游標暫留在所需資料物件限制，然後選擇編輯圖示。  
![\[將游標暫留在所需資料物件限制，然後選擇編輯圖示。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-data-limits-setup-2.png)

1. 輸入限制，然後選擇核取記號圖示以儲存或更新限制。  
![\[影像會顯示您輸入的新限制，並反白顯示用於儲存或更新限制的核取記號圖示。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-data-limits-setup-3.png)

## 如何清除 Customer Profiles 資料限制
<a name="customer-profiles-data-limits-clear"></a>

1. 選取您要清除其限制的資料物件選項按鈕。然後，您可以選擇**清除限制**。  
![\[反白顯示資料限制頁面上資料物件左側的選項按鈕。在此選取選項按鈕，您就可以為物件資料限制啟用清除按鈕。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-data-limits-clear-1.png)

1. 輸入*確認*以清除您所選資料物件限制值。  
![\[彈出式方塊，要求您確認是否要清除資料物件的限制值。您可以以小寫英文字母輸入「confirm」來確認清除動作。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-data-limits-clear-2.png)

# 建立客戶資料並將其擷取至 Customer Profiles
<a name="customer-profiles-object-type-mappings"></a>

您可以使用 Amazon S3 定義來自任何來源的資料，並順暢地為客戶設定檔添加內容，而不需要自訂或預先建置的整合。例如，假設您想要向客服人員提供相關的購買歷史記錄資訊。您可以從內部應用程式將購買交易資料匯入 S3 上的試算表檔案，然後將其連結至客戶設定檔。

若要進行設定，您需要定義描述自訂設定檔物件外觀的[物件類型對映](customer-profiles-object-type-mapping.md)。此對應定義了如何使用資料中的欄位來填入標準設定檔中的欄位，或如何用來將資料指派給特定設定檔。

建立物件類型對映之後，您可以使用 [PutProfileObject](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_PutProfileObject.html) API 將自訂設定檔資料從 CRM 上傳至自訂設定檔物件。

**注意**  
Customer Profiles 不支援從包含點符號的 CSV 標頭擷取資料。

如需 Customer Profiles 從 Amazon S3 儲存貯體存取資料以進行資料映射所需的 IAM 許可清單，請參閱 [Amazon Connect Customer Profiles 定義的動作](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonconnectcustomerprofiles.html#amazonconnectcustomerprofiles-actions-as-permissions)中表格的 `PutProfileObject`。

## 客戶設定檔擷取
<a name="customer-profiles-ingesting-account-based-profiles"></a>

**擷取帳戶型設定檔**

1. 將資料檔案上傳至 S3。帳戶型設定檔所參考設定檔以及帳戶設定檔本身的擷取應分開進行。

1. 用於帳戶設定檔擷取的新檔案應包含新的屬性：設定檔類型，以及電子郵件和電話的參與偏好設定。

1. 使用 AWS 主控台，從 S3 擷取檔案至客戶設定檔

   **範例設定檔 (在下列帳戶型設定檔中參考) CSV**    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/customer-profiles-object-type-mappings.html)

   **帳戶型設定檔範例 CSV**    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/customer-profiles-object-type-mappings.html)

   **電子郵件的參與偏好設定範例**：

   ```
   [ 
    {"KeyName": "CustomerId", "KeyValue": "456", "ContactType": "PersonalEmailAddress"}, 
    {"KeyName": "CustomerId", "KeyValue": "789", "ContactType": "PersonalEmailAddress"} 
   ]
   ```

   **電話的參與偏好設定範例**：

   ```
   [ 
    {"KeyName": "CustomerId", "KeyValue": "456", "ContactType": "PhoneNumber"}, 
    {"KeyName": "CustomerId", "KeyValue": "789", "ContactType": "PhoneNumber"} 
   ]
   ```
**注意**  
針對 **ProfileType** `PROFILE`，您可以透過相同方式，擷取和新增參與偏好設定。

1. 建立兩個資料映射 - 一個用於子設定檔，另一個用於帳戶型設定檔。  
![\[建立兩個資料來源整合，每個整合都會根據所描述的關係建立映射。例如，帳戶/設定檔。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-ingesting-account-based-profiles-1.png)

1. 接著，映射客戶設定檔屬性。請留意，目的地為 `ProfileType`。  
![\[接著，映射客戶設定檔屬性。請留意，目的地為 ProfileType。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-ingesting-account-based-profiles-2.png)

   **用於擷取帳戶型設定檔所參考設定檔的物件類型映射範例**

   ```
   {
       "AllowProfileCreation": true,
       "Description": "Standard Profile Object Type",
       "Fields": {
           "FirstName": {
               "ContentType": "STRING",
               "Source": "_source.FirstName",
               "Target": "_profile.FirstName"
           },
           "LastName": {
               "ContentType": "STRING",
               "Source": "_source.LastName",
               "Target": "_profile.LastName"
           },
           "PhoneNumber": {
               "ContentType": "PHONE_NUMBER",
               "Source": "_source.PhoneNumber",
               "Target": "_profile.PhoneNumber"
           },
           "PersonalEmailAddress": {
               "ContentType": "EMAIL_ADDRESS",
               "Source": "_source.PersonalEmailAddress",
               "Target": "_profile.PersonalEmailAddress"
           },
           "State": {
               "ContentType": "STRING",
               "Source": "_source.State",
               "Target": "_profile.Address.State"
           },
           "CustomerId": {
               "ContentType": "STRING",
               "Source": "_source.CustomerId",
               "Target": "_profile.Attributes.CustomerId"
           },
           "ProfileType": {
               "ContentType": "STRING",
               "Source": "_source.ProfileType",
               "Target": "_profile.ProfileType"
           }
       },
       "Keys": {
           "CustomerId": [
               {
                   "FieldNames": [
                       "CustomerId"
                   ],
                   "StandardIdentifiers": [
                       "PROFILE",
                       "UNIQUE"
                   ]
               }
           ]
       }
   }
   ```

1. 請重複此程序，以擷取帳戶型設定檔。記下 EngagementPreferences.Email 和 EngagementPreference.Phone。  
![\[請重複此程序，以擷取帳戶型設定檔。記下 EngagementPreferences.Email 和 EngagementPreference.Phone。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-ingesting-account-based-profiles-3.png)

   **用於擷取帳戶型設定檔的物件類型映射範例**

   ```
   {
       "AllowProfileCreation": true,
       "Description": "Account-based profiles Object Type",
       "Fields": {
           "AccountNumber": {
               "ContentType": "STRING",
               "Source": "_source.AccountId",
               "Target": "_profile.AccountNumber"
           },
           "PrimaryOwner": {
               "ContentType": "STRING",
               "Source": "_source.PrimaryOwner",
               "Target": "_profile.Attributes.PrimaryOwner"
           },
           "SecondaryOwner": {
               "ContentType": "STRING",
               "Source": "_source.SecondaryOwner",
               "Target": "_profile.Attributes.SecondaryOwner"
           },
           "ProfileType": {
               "ContentType": "STRING",
               "Source": "_source.ProfileType",
               "Target": "_profile.ProfileType"
           },
           "EmailEngagementPreferences": {
               "ContentType": "STRING",
               "Source": "_source.EmailEngagementPreferences",
               "Target": "_profile.EngagementPreferences.Email"
           },
           "PhoneEngagementPreferences": {
               "ContentType": "STRING",
               "Source": "_source.PhoneEngagementPreferences",
               "Target": "_profile.EngagementPreferences.Phone"
           }
       },
       "Keys": {
           "Account": [
               {
                   "FieldNames": [
                       "AccountNumber"
                   ],
                   "StandardIdentifiers": [
                       "PROFILE",
                       "UNIQUE"
                   ]
               }
           ]
       }
   }
   ```

1. 建立兩個資料來源整合，每個整合都會根據所描述的關係建立映射。例如，帳戶/設定檔。

**注意**  
只有使用 Amazon Connect Customer Profiles 主控台的 [SearchProfiles](https://docs.aws.amazon.com/connect/latest/APIReference/API_connect-customer-profiles_SearchProfiles.html) API 或 [設定檔] 指標，確認成功擷取帳戶型設定檔所參考設定檔之後，才能擷取帳戶型設定檔。
自動產生映射不適用於擷取帳戶型設定檔及其子設定檔。
聯絡偏好設定的電子郵件和電話清單可以有 `KeyName` 和 `KeyValue` 或 `ProfileId` 來參考子設定檔。`KeyName` 應為唯一的識別符。
更新子設定檔時，不會更新帳戶型設定檔的參與偏好設定。必須透過擷取路徑更新。

# 建立 Amazon Connect Customer Profiles 與 Kinesis 的整合
<a name="customer-profiles-kinesis-integration"></a>

 下列步驟概述將物件從 Amazon Kinesis Data Stream 串流到 Amazon Connect Customer Profiles 的程序。整合過程包含兩個主要步驟：

1.  設定 EventBridge 管道，將資料從 Kinesis Data Stream，串流到 EventBridge 匯流排。

1.  使用您建立的 EventBridge 管道，設定與 Kinesis Data Stream 的 Customer Profiles 資料整合 

## 步驟 1：將資料從 Kinesis 串流至 EventBridge
<a name="step-1-stream-data-from-kinesis-to-eventbridge"></a>

1.  前往 [https://console.aws.amazon.com/events/](https://console.aws.amazon.com/events/) 開啟 Amazon EventBridge 主控台 

1.  在導覽窗格中，選擇**事件匯流排**。

1.  選擇**建立事件匯流排**。

1.  在**事件匯流排詳細資訊**區段中，提供描述性名稱。例如 `kinesis-to-customer-profiles`。

1.  選擇**建立**。

1.  前往 Kinesis Data Stream 詳細資訊頁面。

1.  選取 **EventBridge 管道**索引標籤，然後選擇**將 Kinesis Data Stream 連線至管道**。

1.  為您的 EventBridge 管道命名。

1.  遵循設定精靈，直到您抵達**目標設定**頁面。

1.  針對目標，選取步驟 1 中建立的事件匯流排。例如 `kinesis-to-customer-profiles`。

1.  在**目標**區段之後，展開**目標輸入轉換器**摺疊式功能表。

1.  如下步驟設定目標輸入轉換器：

```
{
    "data": <$.data>
}
```

1.  選擇**建立管道**以完成設定。

 此時，您已成功設定 Kinesis 事件至 EventBridge 的路線。接下來，我們將建立與 Customer Profiles 的整合。

## 步驟 2：將 EventBridge 資料擷取至 Customer Profiles
<a name="step-2-ingest-eventbridge-data-into-customer-profiles"></a>

1.  前往 Amazon Connect 主控台的 **Customer Profiles**。

1.  選取**資料來源整合**索引標籤，然後選擇**新增資料來源整合**。

1.  從**資料來源**下拉式清單中選取 **Kinesis** 

1.  在 **EventBridge 管道名稱**下拉式清單，選取步驟 1 建立的管道，然後選擇**下一步**。

1.  在**映射資料**頁面上，選取適當的物件類型映射，然後選擇**下一步**。

1.  在**檢閱與整合**頁面上檢閱您的設定，然後選擇**新增資料來源整合**以完成設定。

 您的 Kinesis Data Stream 已與 Amazon Connect Customer Profiles 整合，您現在可以將事件從 Kinesis 傳送至 Customer Profiles。

# 匯出統一的客戶設定檔資料
<a name="set-up-real-time-export"></a>

Amazon Connect 客戶設定檔可將統一客戶設定檔的即時資料匯出至 Amazon Kinesis Data Stream。您可以啟用資料串流，並自動接收新設定檔的資料，以及 Amazon Kinesis Data Stream 中現有設定檔的更新。

您可以讓來源系統資料，例如 CRMs和行銷自動化工具， up-to-date 隨時掌握 Amazon Connect 客戶設定檔的最新資訊。例如，當客戶致電您的聯絡中心更新地址時，客服人員可以進行變更以新增新的客戶地址，而更新的設定檔資訊會即時傳送至 Kinesis Data Stream。

若要進行設定，您必須在客戶設定檔主控台中啟用**資料匯出**功能。

## 啟用即時匯出
<a name="enable-real-time-export"></a>

**啟用網域的資料串流**

1. 開啟 Amazon Connect 客戶設定檔主控台。

1. 選擇**資料匯出**標籤，然後選擇**啟用資料流**  
![\[即時資料匯出功能會啟用 Kinesis 資料串流。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/enable-real-time-export-1.png)

1. 選擇**啟用資料串流**，然後從下拉式功能表中選擇現有的 Kinesis 資料串流，或選擇**建立新的 Kinesis 資料串流**以開啟 Kinesis 主控台並建立串流。如需詳細資訊，請參閱[建立和管理串流](https://docs.aws.amazon.com/streams/latest/dev/working-with-streams.html)。  
![\[即時資料匯出功能會啟用 Kinesis 資料串流。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/enable-real-time-export-2.png)

1. 選擇**啟用資料串流**按鈕以儲存設定。

## 啟用即時匯出
<a name="disable-real-time-export"></a>

**若要停用網域的資料串流**

1. 開啟 Amazon Connect 客戶設定檔主控台。

1. 選擇**資料匯出**標籤，然後選擇**停用資料串流**。  
![\[即時資料匯出功能會停用 Kinesis 資料串流。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/disable-real-time-export-1.png)

## 即時匯出 Kinesis 承載
<a name="real-time-export-kinesis-payload"></a>

**JSON 格式的範例輸出事件**

```
{
    "SchemaVersion": 0,
    "EventId": "eventId",
    "EventTimestamp": "2020-01-01T00:00:00Z",
    "EventType": "CREATED",
    "DomainName": "domainName",
    "ObjectTypeName": "objectTypeName",
    "AssociatedProfileId": "associatedProfileId",
    "ProfileObjectUniqueKey": "profileObjectUniqueKey",
    "Object": {
        "map": {
            "k1": [
                "a",
                "b",
                "c"
            ]
        }
    },
    "IsMessageRealTime": true
}
```

**SchemaVersion**  
結構描述的目前版本。

**EventId**  
唯一的事件識別符。

**EventTimestamp**  
使用 ISO8601 標準的事件時間戳記。

**EventType**  
匯出的事件的類型。  
值：CREATED、UPDATED、HEALTH\$1CHECK  
+ CREATED：匯出事件適用於 CreateProfile。
+ UPDATED：匯出事件適用於 UpdateProfile。
+ HEALTH\$1CHECK：匯出事件用於 HealthCheck 事件，以確保客戶設定檔可以在 Kinesis 串流中成功 `putEvent`。

**DomainName**  
事件所屬的網域。事件的 `/Domain`

**ObjectTypeName**  
事件的物件類型  
值：`_profile`、`_asset`、`_order`、`_case`。您也可以使用預先定義的範本名稱 (例如 `Salesforce-Account`)，或使用 [PutProfileObjectType](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_PutProfileObjectType.html) API 建立的自訂已定義物件名稱。

**AssociatedProfileId**  
與物件關聯的標準設定檔的 ID。僅當物件類型不是 `_profile` 時才存在

**ProfileObjectUniqueKey**  
服務所產生之 ProfileObject 物件的唯一識別符。  
類型：字串

**Object**  
標準設定檔或標準設定檔物件本身。

**IsMessageRealTime**  
此旗標可通知訊息是即時或已重新導向。

**JSON 形式的範例承載**

```
{
    "SchemaVersion": 0,
    "EventId": "6049bf39-0000-0000-0000-b75656dd51a8",
    "EventTimestamp": "2023-02-24T07:17:05.356Z",
    "EventType": "UPDATED",
    "DomainName": "SampleDomain",
    "ObjectTypeName": "Salesforce-Account",
    "AssociatedProfileId": "5ffcee99ab0000000000b3ae01225e40",
    "ProfileObjectUniqueKey": "cNo77ZI0000000000pCPB7RQcqfeBaRfBwrzW2MMbws=",
    "Object": {
        "Id": "0012v00002kVKVuAAO",
        "IsDeleted": false,
        "Name": "Company A",
        "Phone": "+12065551234",
        "PhotoUrl": "/services/images/photo/0012v00002kVKVuAAO",
        "OwnerId": "0052v00000fmQ7sAAE",
        "CreatedDate": "2019-12-13T07:56:04.000+0000",
        "CreatedById": "0052v00000fmQ7sAAE",
        "LastModifiedDate": "2023-02-22T20:29:43.000+0000",
        "LastModifiedById": "0052v00000fmQ7sAAE",
        "SystemModstamp": "2023-02-22T20:29:43.000+0000",
        "LastActivityDate": "2020-03-18",
        "LastViewedDate": "2023-02-23T00:09:49.000+0000",
        "LastReferencedDate": "2023-02-23T00:09:49.000+0000",
        "CleanStatus": "Pending"
    },
    "IsMessageRealTime": true
}
```

# 疑難排解匯出至 Kinesis Data Stream 的即時事件
<a name="real-time-export-troubleshooting"></a>

第一次將事件匯出至 Kinesis Data Stream 時，可能會產生延遲。這是因為需要些時間為服務連結角色傳播 IAM 權限。實際發生問題時，串流狀態可能進入錯誤狀態。

![\[事件無法到達目的地 Kinesis Data Stream，進入錯誤狀態。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/real-time-export-troubleshooting.png)


以下各節顯示您可能遇到的可能錯誤訊息。它還提供了每個問題的原因和解決方案。

## 錯誤：Kinesis 資料串流未處於作用中狀態。請檢查組態並稍後重新建立事件流
<a name="real-time-export-kinesis-not-active"></a>

目的地 Kinesis 資料串流未處於 `ACTIVE` 狀態。建立或刪除 Kinesis 資料串流時，可能會發生這種情況。若要解決錯誤，請確定 Kinesis 資料串流處於作用中狀態，並重新啟用資料串流設定。

## 錯誤：Kinesis 資料串流不存在。請使用有效的 Kinesis 資料串流目的地重新建立事件串流
<a name="real-time-export-kinesis-not-found"></a>

目的地 Kinesis 資料串流已刪除。若要解決錯誤，請以現有 Kinesis 資料串流作為目的地重新啟用資料串流。

## 錯誤：Kinesis 資料串流被限流。請考慮適當地提供較高的 Kinesis 輸送量
<a name="real-time-export-kinesis-throttling"></a>

目的地 Kinesis 資料串流被限流 (佈建不足)。若要解決錯誤，請確定目的地 Kinesis 資料串流有足夠的碎片計數，然後重新啟用資料串流。

## 錯誤：用來加密 Kinesis 資料串流的 KMS 金鑰被限流。請考慮適當地增加 KMS 要求配額
<a name="real-time-export-kms-throttling"></a>

Kinesis 資料串流使用的 KMS 金鑰被限流。若要解決錯誤，請重新啟用資料串流。

## 錯誤：檢查 Kinesis 資料串流的 KMS 金鑰設定
<a name="real-time-export-kms-error"></a>

Customer Profiles 無法存取 Kinesis 資料串流使用的 KMS 金鑰。當您的 KMS 金鑰具有拒絕從客戶設定檔服務連結角色存取的金鑰政策，或金鑰未處於「已啟用」狀態時，可能會發生這種情況。若要解決錯誤，請確定 KMS 金鑰政策不會拒絕來自客戶設定檔服務連結角色的存取，且金鑰處於「已啟用」狀態。重新啟用資料串流以解決錯誤。

# 為所有的統一客戶設定檔資料設定大量匯出
<a name="set-up-bulk-export"></a>

**注意**  
若要完成本主題中的步驟，您需要具備開發人員技能，並具備使用 AWS KMS 和 Amazon S3 的經驗。

Amazon Connect Customer Profiles 建立統一的客戶設定檔時，會結合來自第一方和第三方來源的資料，以增強、精簡和改善原始資料和資訊，使其為更準確的設定檔。Customer Profiles 也會新增資料來改善資料集的品質。您可以將已改進的資料集用於其他使用案例，例如制定更明智和精準的行銷、銷售和客服策略。例如，您可能想善用統一的客戶設定檔，以：
+ 稽核您在整個網域中擁有的客戶資料。
+ 執行內部分析，例如分析銷售和行銷報告。
+ 將資料匯出至您的自有工具或第三方產品，以制定個人化廣告和瞄準客戶。

若要將統一的客戶設定檔資料用於其他使用案例，您可以將其大量匯出至 Amazon S3。本主題說明如何執行此操作。

**Topics**
+ [步驟 1：設定 KMS 金鑰和 S3 儲存貯體](#enable-cpbulk-export)
+ [步驟 2：建立大量匯出任務](#create-bulk-export-job)
+ [步驟 3：檢查大量匯出任務的狀態](#check-status-bulk-cp-export)
+ [步驟 4：在 S3 中檢視匯出的資料](#view-bulk-cp-export)
+ [更新大量匯出任務](#update-bulk-cp-export)
+ [刪除或取消大量匯出任務 - 不支援](#delete-bulk-cp-export)

## 步驟 1：設定 KMS 金鑰和 S3 儲存貯體
<a name="enable-cpbulk-export"></a>

若要為您的網域啟用大量匯出，您需要設定下列資源：
+  [具特定資源政策的 KMS 金鑰](#cp-kms)
+ [具特定資源政策的目的地 S3 儲存貯體](#cp-s3-bulk)。請勿在儲存貯體上設定[存取控制清單 (ACL)](https://docs.aws.amazon.com/AmazonS3/latest/userguide/acls.html)。

接下來會說明這些步驟。

### 建立新的 KMS 金鑰或重複使用現有 KMS 金鑰
<a name="cp-kms"></a>

若要設定大量匯出的 KMS 金鑰，您必須建立或重複使用與您計劃設定為大量匯出目的地的 Amazon S3 儲存貯體位於相同 AWS 區域中的現有 KMS 金鑰。您必須允許 Amazon Connect AppIntegrations 服務針對金鑰執行 KMS 動作。

將下列陳述式新增至您的**金鑰政策**。

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "Enable AppIntegrations access to KMS key",
            "Effect": "Allow",
            "Principal": {
                "AWS": [
                    "arn:aws:iam::111122223333:root"
                ],
                "Service": [
                    "app-integrations.amazonaws.com"
                ]
            },
            "Action": [
                "kms:Encrypt*",
                "kms:Describe*",
                "kms:Decrypt*",
                "kms:GenerateDataKey*"
            ],
            "Resource": "*"
        }
    ]
}
```

------

### 設定 S3 目的地儲存貯體
<a name="cp-s3-bulk"></a>

您必須在與 KMS 金鑰相同的區域中設定新的或現有的儲存貯 AWS 體，並在 S3 儲存貯體上設定資源政策。

設定儲存貯體時，請務必選取**以 SSE-KMS 加密**，並使用先前程序的相同 KMS 金鑰。此外，請勿在 S3 儲存貯體上啟用 ACL。

以下是資源政策的範例。

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Sid": "Allow AppIntegrations to write data to destination bucket",
            "Effect": "Allow",
            "Principal": {
                 "Service": [
                    "app-integrations.amazonaws.com"
                ]
            },
            "Action": [
                "s3:GetObject",
                "s3:ListBucket",
                "s3:PutObject",
                "s3:PutObjectAcl"
            ],
            "Resource": [
                "arn:aws:s3:::{{amzn-s3-demo-bucket1}}",
                "arn:aws:s3:::{{amzn-s3-demo-bucket2}}/*"
            ],
            "Condition": {
                "StringEquals": {
                    "aws:SourceAccount": "{{AwsAccountId}}"
                },
                "ArnEquals": {
                    "aws:SourceArn": "arn:aws:*-*:{us-east-1}:{{AwsAccountId}}:data-integration/*" 
                }
            }
        }
    ]
}
```

------

## 步驟 2：建立大量匯出任務
<a name="create-bulk-export-job"></a>

若要建立大量匯出任務，請調用下列 Amazon Connect AppIntegrations API：

1. [CreateDataIntegration](https://docs.aws.amazon.com/connect/latest/APIReference/API_connect-app-integrations_CreateDataIntegration.html)：此 API 會建立與資料來源的整合 (例如 Customer Profiles)。

1. [CreateDataIntegrationAssociation](https://docs.aws.amazon.com/connect/latest/APIReference/API_connect-app-integrations_CreateDataIntegrationAssociation.html)：此 API 會使用資料來源，將資料寫入目的地 (例如 S3 儲存貯體)。

以下詳細說明如何呼叫這些 API。

### 建立資料整合
<a name="create-dataintegration"></a>

資料整合代表您資料的*資料來源*。您可以呼叫 [CreateDataIntegration](https://docs.aws.amazon.com/connect/latest/APIReference/API_connect-app-integrations_CreateDataIntegration.html) API 或執行 [create-data-integration](https://docs.aws.amazon.com/cli/latest/reference/appintegrations/create-data-integration.html) CLI 命令來建立資料整合。您必須提供 Customer Profiles *物件類型*和 Customer Profiles *網域*。

如果您要匯出多個物件類型，則您需要為每個物件類型建立個別的資料整合。例如，如果您要同時匯出 `_profile` 和 `_asset` 物件，您需要建立兩個不同的資料整合。

**注意**  
過去 30 分鐘內擷取的任何資料均可能不會包含在匯出中。

下列程式碼範例示範如何執行 [create-data-integration](https://docs.aws.amazon.com/cli/latest/reference/appintegrations/create-data-integration.html) CLI 命令。

```
aws appintegrations create-data-integration \ 
--region "us-west-2" \
--name "bulk-export-job-01" \ 
--description "Data integration for _profile objects" \
--kms-key "arn:aws:kms:us-west-2:123456789012:key/123456789012-1234-1234-123456789012" \ 
--source-uri "AmazonConnect://AppIntegrations" \ 
--object-configuration '{"CustomerProfiles":{"domainName":["my-domain-pdx"],"objectType":["_profile"]}}'
```

下列程式碼範例示範如何呼叫 [CreateDataIntegration](https://docs.aws.amazon.com/connect/latest/APIReference/API_connect-app-integrations_CreateDataIntegration.html) API。

```
{
    "Description": "Data integration for _profile objects",
    "KmsKey": "arn:aws:kms:us-west-2:123456789012:key/123456789012-1234-1234-123456789012",
    "Name": "unique-data-integration-name-01",
    "SourceURI": "AmazonConnect://AppIntegrations",
    "ObjectConfiguration": {
        "CustomerProfiles": {
            "domainName": [
                "my-domain-pdx"
            ],
            "objectType": [
                "_profile"
            ]
        }
    }
}
```

### 建立資料整合關聯
<a name="create-dataintegration"></a>

資料整合關聯代表您要匯出資料的目的地，以及選擇匯出資料的時間範圍。您可以呼叫 [CreateDataIntegrationAssociation](https://docs.aws.amazon.com/connect/latest/APIReference/API_connect-app-integrations_CreateDataIntegrationAssociation.html) API 或執行 [create-data-integration-association](https://docs.aws.amazon.com/cli/latest/reference/appintegrations/create-data-integration-association.html) CLI 命令來建立資料整合。您可以使用 `StartTime` 和 `EndTime` 屬性來設定時間範圍。此時間範圍對應至 Customer Profiles 中上次更新物件的時間。

您指定的目的地 S3 儲存貯體可以只是儲存貯體名稱，也可以包含要匯出資料的其他資料夾或 S3 字首。

**注意**  
如需了解**並行大量匯出任務**的配額，請參閱 [Amazon Connect Customer Profiles 服務配額](amazon-connect-service-limits.md#customer-profiles-quotas)。無論大量匯出任務完成或失敗，往後不會再計入並行配額。

下列程式碼範例示範如何執行 [create-data-integration-association](https://docs.aws.amazon.com/cli/latest/reference/appintegrations/create-data-integration-association.html) CLI 命令。

```
aws appintegrations create-data-integration-association \
--region "us-west-2" \
--data-integration-identifier "unique-data-integration-name-01" \
--destination-uri "s3://amzn-s3-demo-bucket1" \
--execution-configuration '{"ExecutionMode": "ON_DEMAND", "OnDemandConfiguration": {"StartTime":"1715278292014", "EndTime":"1715364692014"}}'
```

下列程式碼範例示範如何呼叫 [CreateDataIntegrationAssociation](https://docs.aws.amazon.com/connect/latest/APIReference/API_connect-app-integrations_CreateDataIntegrationAssociation.html) API。

```
{
    "DataIntegrationIdentifier": "arn:aws:app-integrations:us-west-2:123456789012:data-integration/123456789012-1234-1234-123456789012",
    "DestinationURI": "s3://amzn-s3-demo-bucket1",
    "ExecutionConfiguration": {
        "ExecutionMode": "ON_DEMAND",
        "OnDemandConfiguration": {
            "StartTime": "1713565000004",
            "EndTime": "1713565000005"
        }
    }
}
```

## 步驟 3：檢查大量匯出任務的狀態
<a name="check-status-bulk-cp-export"></a>

若要檢視大量匯出任務的狀態，您可以呼叫 [ListDataIntegrationAssociations](https://docs.aws.amazon.com/connect/latest/APIReference/API_connect-app-integrations_ListDataIntegrationAssociations.html) API，或執行 [list-data-integration-associations](https://docs.aws.amazon.com/cli/latest/reference/appintegrations/list-data-integration-associations.html) CLI 命令。

下列程式碼範例示範如何執行 [list-data-integration-associations](https://docs.aws.amazon.com/cli/latest/reference/appintegrations/list-data-integration-associations.html) CLI 命令。

```
aws appintegrations list-data-integration-associations \
--region "us-west-2" \
--data-integration-identifier "unique-data-integration-name-01"
```

## 步驟 4：在 S3 中檢視匯出的資料
<a name="view-bulk-cp-export"></a>

資料整合關聯在 `IN_PROGRESS` 當中時，您會開始看到資料複製到 S3 儲存貯體。

匯出的資料使用下列路徑結構寫入：
+ \$1BucketNameAndFolderName\$1
  + \$1AwsAccountId\$1
    + \$1DomainName\$1
      + \$1RequestTimestamp\$1
        + \$1lStartTime\$1-\$1EndTime\$1
          + \$1ObjectTypeName\$1
            + <filename: uuid>

以下是路徑範例：

`amzn-s3-demo-bucket1/123456789012/my-domain-pdx/20240607T175023/20240101T235959-20240430T235959/_profile/123456789012-1234-1234-123456789012`

## 更新大量匯出任務
<a name="update-bulk-cp-export"></a>

任務完成後，您可以使用不同的資料提取開始時間和結束時間，更新資料整合關聯。這會建立新的大量匯出任務。如果您過去曾執行大量匯出，並且只想匯出自上次匯出以來更新的資料，您可以執行此操作。例如，如果您的最後一個大量匯出任務是在三個月前，您可以更新資料整合關聯的時間範圍為 3 個月前。

您可以呼叫 [UpdateDataIntegrationAssociation](https://docs.aws.amazon.com/connect/latest/APIReference/API_connect-app-integrations_UpdateDataIntegrationAssociation.html) API，或執行 [update-data-integration-association](https://docs.aws.amazon.com/cli/latest/reference/appintegrations/update-data-integration-association.html) CLI 命令來更新匯出任務。

下列程式碼範例示範如何執行 [update-data-integration-association](https://docs.aws.amazon.com/cli/latest/reference/appintegrations/update-data-integration-association.html) CLI 命令。

```
aws appintegrations update-data-integration-association \
--region "us-west-2" \
--data-integration-identifier "unique-data-integration-name-01" \
--data-integration-association-identifier "arn:aws:app-integrations:us-west-2:123456789012:data-integration-association/123456789012-1234-1234-123456789012/123456789012-1234-1234-123456789012" \ 
--execution-configuration '{"ExecutionMode": "ON_DEMAND", "OnDemandConfiguration": {"StartTime":"1715278292014", "EndTime":"1715364692014"}}'
```

## 刪除或取消大量匯出任務 - 不支援
<a name="delete-bulk-cp-export"></a>

您無法刪除或取消大量匯出。完成的匯出任務不會計入匯出配額。

# 刪除 Amazon Connect Customer Profiles 網域
<a name="delete-customer-profiles-domain"></a>

刪除對應只會刪除與該特定對應關聯的物件和資料。如果有多個物件與設定檔相關聯，則刪除特定對應可能不會清除設定檔資料。如果您想要刪除特定資料，您可以刪除對應，但如果設定檔包含來自其他對應的資料，則設定檔可能仍然存在。這可能會導致現有設定檔的額外費用。若要避免發生這種情況，您可以依照下列步驟，使用 Amazon Connect 主控台刪除客戶設定檔網域。

1. 登入 Amazon Connect 主控台，然後從左側導覽窗格中選取客戶設定檔。選擇您的客戶設定檔網域，然後選擇**檢視詳細資訊**。  
![\[「Amazon Connect Customer Profiles 刪除網域」頁面，檢視詳細資訊網域按鈕。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/delete-customer-profiles-domain-step1.png)

1. 選擇**刪除網域**。  
![\[「Amazon Connect Customer Profiles 刪除網域」頁面上的「刪除網域」按鈕。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/delete-customer-profiles-domain-step2.png)

1. 若要刪除您的網域，請在方塊中輸入*確認*，然後選擇**刪除網域**。  
![\[「Amazon Connect Customer Profiles 刪除網域」頁面，手動輸入確認後會顯示刪除網域確認按鈕。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/delete-customer-profiles-domain-step3.png)

# 設定 Amazon Connect Customer Profiles 中的計算屬性
<a name="customerprofiles-calculated-attributes"></a>

*計算屬性*是使用公式，衍生自其他屬性的值。您可以使用計算屬性來識別使用者的彙總行為。

您可以建立計算屬性，以定義自己的商業邏輯，使客戶設定檔資料為可轉換為實際行動的資料點。如此一來，您可以個人化自動化體驗，例如互動式語音回應。

透過計算屬性，您可以識別客戶過去行為的相關關鍵屬性。例如：
+ 上次造訪的網站或上次交談的客服人員
+ 行為模式，例如偏好的管道和聯絡頻率
+ 客戶價值，例如新客戶和平均交易規模

您可以使用計算屬性 API，使用常見的彙總作業 (例如平均值、計數、最小值、最大值與總和) 來建立新屬性。

計算屬性會自動將原始資料即時轉換為可轉換為實際行動的資料點和指標。聯絡中心管理員能夠根據客戶設定檔中可用的原始資料來定義和設定計算。這些計算屬性可讓您更輕鬆地構建自動化體驗，例如交互式語音回應 (IVR) 或聊天機器人。您可以構建個人化體驗，並幫助客服人員更快地了解客戶情境。

如需可使用計算屬性 APIs AWS 的區域清單，請參閱 [客戶設定檔計算屬性 API 可用性 (按區域)](regions.md#customerprofiles_calculatedattributesregion)。

**Topics**
+ [計算屬性入門](customerprofiles-calculated-attributes-admin-website.md)
+ [計算屬性 API](customerprofiles-calculated-attributes-apis.md)
+ [建立自訂計算屬性定義](customerprofiles-calculated-attributes-creating-definition.md)
+ [驗證計算屬性值](customerprofiles-calculated-attributes-validating-values.md)
+ [預設計算屬性](customerprofiles-default-calculated-attributes.md)
+ [錯誤訊息和解決方案](customerprofiles-calculated-attributes-troubleshooting.md)

# Amazon Connect 客戶設定檔中的計算屬性入門
<a name="customerprofiles-calculated-attributes-admin-website"></a>

使用計算屬性來定義自己的商業邏輯，將您的客戶設定檔資料轉換為可轉換為實際行動的資料點，以個人化自動化體驗 (例如互動式語音回應)。

透過計算屬性，您可以識別客戶過去行為、行為模式和客戶價值的相關關鍵屬性。

本章節的主題說明如何建立、檢視、編輯和刪除計算屬性。

**Topics**
+ [建立計算屬性](calculated-attributes-admin-website-create.md)
+ [設定事件篩選條件](calculated-attributes-admin-website-event-filters.md)
+ [檢視計算屬性](calculated-attributes-admin-website-view.md)
+ [編輯計算屬性](calculated-attributes-admin-website-edit.md)
+ [刪除計算屬性](calculated-attributes-admin-website-delete.md)

# 在 Amazon Connect 中建立計算屬性
<a name="calculated-attributes-admin-website-create"></a>

1. 先決條件：請確認您具有必要的安全性設定檔權限。如需詳細資訊，請參閱[更新 Amazon Connect Customer Profiles 中的計算屬性權限](security-profile-customer-profile-calc-attribs.md)。

1. 在 Amazon Connect 管理員網站中，導覽至**客戶設定檔**、**計算屬性**，然後在**計算屬性**資料表檢視中選擇**建立**屬性。  
![\[客服人員工作區中的客戶設定檔索引標籤，關聯按鈕。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/calculated-attributes-admin-website-create-1.png)

1. 若要建立計算屬性，請指定描述性名稱、新增有關屬性詳細資訊的說明 (選用)，然後設定必要欄位：
   + **計算：**定義屬性的計算方式 (平均值/計數/總和/最小值/第一次出現/上次出現/最大值)。
   + **屬性：**客戶設定檔資料的資料點。
**注意**  
如果您要從標準物件類型 (`_asset`、`_case`、`_order`) 中選取屬性，則屬性必須位於 PascalCase。這表示屬性名稱中每個單字的第一個字母都會大寫，例如 `_case.CreatedBy` 或 `_order.TotalPrice`。  
![\[客服人員工作區中的客戶設定檔索引標籤，關聯按鈕。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/calculated-attributes-admin-website-create-2.png)

1. 此外，您可以選擇*加號*圖示以新增其他屬性。您最多可以選擇兩個屬性來進行計算，並由運算子合併。指定運算子 (例如*加號*或*減號*) 以合併屬性值。  
![\[客服人員工作區中的客戶設定檔索引標籤，關聯按鈕。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/calculated-attributes-admin-website-create-3.png)

1. 選取計算之後，您可以選擇設定事件數量、期間和來源時間戳記。根據預設，計算屬性設為使用無限事件、無限期間，以及根據擷取日期的時間戳記。

   當在指定的時段內至少有一個事件時，系統會傳回一個輸出。
   + **事件數量：**設定限制或使用無限 (預設)
   + **期間：**設定特定時間範圍或使用無限 (預設)
   + **來源時間戳記：**選擇特定時間戳記欄位或擷取日期 (預設)
**注意**  
雖然沒有事件限制，但有資料大小限制；最舊的資料將被較新的資料取代。建立後無法變更來源時間戳記。  
![\[客服人員工作區中的客戶設定檔索引標籤，關聯按鈕。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/calculated-attributes-admin-website-create-4.png)

1. 或者，您可以定義條件，在計算中僅包含相關事件。如需詳細資訊，請參閱 [設定事件篩選條件](calculated-attributes-admin-website-event-filters.md)。

1. 選取**建立**以建立計算屬性。

1. 成功建立計算屬性後，表格視圖會顯示橫幅，以在客群或流程中使用計算屬性。您也可以根據準備程度檢視計算屬性的狀態。  
![\[已建立計算屬性的橫幅。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/calculated-attributes-admin-website-create-5.png)

# 設定事件篩選條件
<a name="calculated-attributes-admin-website-event-filters"></a>

您可以透過事件篩選條件，篩選要在計算屬性中使用的設定檔物件。例如，事件篩選條件可能會篩選客戶的標準資產物件，只在計算中包含**狀態為已安裝或已註冊**的資產。

**注意**  
建立計算屬性定義後，就無法編輯事件篩選條件。

建立計算屬性時，您可以建立一個或多個事件篩選條件。事件篩選條件包含以下元件：

![\[事件篩選條件元件。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/calculated-attributes-admin-website-event-filters-1.png)

+  **篩選條件群組**：套用至設定檔物件的篩選條件群組。您可以新增多個依 OR 關係連接的篩選條件群組。
+  **篩選條件**：指定屬性、運算子和值，篩選計算屬性的計算所包含的設定檔物件。您可以根據需要，為您的使用案例新增任意數量的篩選條件。
+  **屬性**：要篩選物件的屬性。您可以從 Customer Profiles 網域中的物件選取屬性，或使用物件類型定義所定義的欄位名稱。如需詳細了解物件類型映射，請參閱 [Amazon Connect Customer Profiles 中的物件類型映射定義詳細資訊](object-type-mapping-definition-details.md)。
**注意**  
 在 Amazon Connect 管理網站中，屬性下拉式清單會顯示上次使用 屬性儲存或更新任何設定檔物件時的時間戳記。
 如果同時有設定檔物件的屬性和具相同名稱的物件類型欄位，事件篩選條件會優先使用物件類型欄位名稱進行篩選。例如，如果設定檔物件具有名為 **Status** 的屬性，並且還有名為 **Status** 的物件類型欄位，則篩選條件將使用物件類型欄位 **Status** 進行篩選。
+  **運算子** — 運算子決定屬性與您輸入值的關係。如需更多詳細資訊，請參閱 [篩選條件運算子](#calculated-attributes-admin-website-event-filter-operators)
+  **值** — 用來篩選物件的值。您可以指定依 OR 關係連接的多個值。例如，*資產的狀態為已安裝或已註冊*。請留意，該值區分大小寫。例如，*Asset's Status is Installed* 會傳回與 *Asset's Status is installed* 不同的結果。若要檢視設定檔物件，請使用 Amazon Connect Customer Profiles [ListProfileObjects](https://docs.aws.amazon.com/connect/latest/APIReference/API_connect-customer-profiles_ListProfileObjects.html) API。

 您可以選擇建立最多兩個事件篩選條件，並在它們之間建立關係 (AND/OR/EXCLUDE)。如需有關關係的詳細資訊，請參閱 [事件篩選條件之間的關係](#calculated-attributes-admin-website-relationship-between-event-filters)。

 

## 篩選條件運算子
<a name="calculated-attributes-admin-website-event-filter-operators"></a>

運算子決定屬性與您輸入值的關係。下表說明可用的運算子。

[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/calculated-attributes-admin-website-event-filters.html)

**注意**  
 Amazon Connect 管理網站中計算的屬性使用 UTC 時區和預設時間 00：00：00 UTC 進行所有以時間為基礎的篩選條件。 您可以篩選日期，但時間會記錄為相同的值。如果您輸入的日期為 2024-01-01，主控台傳遞的時間會是 2024-01-01T00:00:00Z。

**注意**  
根據預設，儲存或更新設定檔物件時，會評估事件篩選條件。例如，如果您篩選 `PurchaseDate` 在上週的標準資產物件，則相對時間的計算方式為*儲存或更新該資產物件後的最後一週內*。這表示篩選結果可能因物件的儲存或更新時間而有所不同。

## 事件篩選條件之間的關係
<a name="calculated-attributes-admin-website-relationship-between-event-filters"></a>

 或者，您可以新增第二個事件篩選條件，並定義其與第一個事件篩選條件的關係。在 Amazon Connect 管理員網站建立計算屬性時，每個計算屬性最多可以有兩個事件篩選條件。如果您將第二個事件篩選條件新增至計算屬性，您可以選擇一種方式，來指定兩個事件篩選條件的連接方式：
+  **AND 關係** — 如果您使用 AND 關係來連接兩個事件篩選條件，則符合第一個和第二個事件篩選條件的物件將包含在計算中。
+  **OR 關係** — 如果您使用 OR 關係來連接兩個事件篩選條件，則符合第一個或第二個事件篩選條件的物件將包含在計算中。
+  **EXCLUDE 關係** — 如果您使用 EXCLUDE 關係來連接兩個事件篩選條件，則符合第一個但不符合第二個事件篩選條件的物件將包含在計算中。

## 後續步驟
<a name="calculated-attributes-admin-website-event-filter-next-steps"></a>
+  [透過流程編輯器，在聯絡中心使用您的計算屬性](https://docs.aws.amazon.com/connect/latest/adminguide/customer-profiles-block.html#customer-profiles-block-properties-get-calculated-attributes) 
+  [使用計算屬性來定義客戶客群](https://docs.aws.amazon.com/connect/latest/adminguide/segmentation-admin-website)
+  [在 Amazon Connect 中檢視計算屬性](https://docs.aws.amazon.com/connect/latest/adminguide/calculated-attributes-admin-website-view.html) 
+  [在 Amazon Connect 中編輯計算屬性](https://docs.aws.amazon.com/connect/latest/adminguide/calculated-attributes-admin-website-edit.html) 
+  [在 Amazon Connect 中刪除計算屬性](https://docs.aws.amazon.com/connect/latest/adminguide/calculated-attributes-admin-website-delete.html) 

# 在 Amazon Connect 中檢視計算屬性
<a name="calculated-attributes-admin-website-view"></a>

1. 登入 Amazon Connect 管理網站，網址為 https：//*instance name*.my.connect.aws/。使用管理員帳戶，或已指派至安全性設定檔，並具有 **Customer Profiles - 計算屬性**權限的帳戶。

1. 在 Amazon Connect 的左側導覽窗格中，選擇 **Customer Profiles**、**計算屬性**。

1. 在**計算屬性**頁面上，從表格的**名稱**欄選擇計算屬性。

   下圖顯示**名稱**欄所列計算屬性的範例。  
![\[列出計算屬性的表格。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/calculated-attributes-admin-website-view-1.png)

1. 您現在可以檢視您所選屬性的詳細資訊。下圖顯示計算屬性的詳細資訊頁面。  
![\[計算屬性的詳細視圖。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/calculated-attributes-admin-website-view-2.png)

# 在 Amazon Connect 中編輯計算屬性
<a name="calculated-attributes-admin-website-edit"></a>

1. 若要編輯計算屬性，請選擇可啟用**編輯**按鈕的選項按鈕，在表格視圖中選擇屬性。選擇**編輯**。  
![\[編輯計算屬性\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/calculated-attributes-admin-website-edit-1.png)

1. 您能夠編輯**說明**、**事件數量**和**期間**。完成時，請選擇**儲存**。  
![\[編輯計算屬性。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/calculated-attributes-admin-website-edit-2.png)

# 在 Amazon Connect 中刪除計算屬性
<a name="calculated-attributes-admin-website-delete"></a>

1. 若要刪除計算屬性，請選擇要刪除之屬性旁的選項按鈕，以選擇表格中的屬性。

1. 選擇後，選擇**刪除**。

1. 在**刪除屬性**彈出式視窗中，確認詳細資訊並輸入*確認*以啟用**刪除**按鈕。  
![\[刪除新的計算屬性。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/calculated-attributes-admin-website-delete-1.png)

1. 選擇**刪除**。

# Amazon Connect Customer Profiles 計算屬性 API
<a name="customerprofiles-calculated-attributes-apis"></a>

您可以使用下列客戶設定檔計算屬性 API

------
#### [ CreateCalculatedAttributeDefinition ]

**CreateCalculatedAttributeDefinition**

建立新的計算屬性。這需要網域中的現有物件類型。您可以定義要從單一來源物件中提取的屬性，以及要套用至彙總的數學運算，以及時間範圍和物件計數。

建立之後，擷取至客戶設定檔的新物件資料將包含在計算屬性中，您可以使用 `GetCalculatedAttributeForProfile` API 針對設定檔擷取該屬性。若要使用歷史資料，請指定 `UseHistoricalData` 為 true。API 回應上的 `Readiness` 和 `Status` 欄位將提供計算屬性所含歷史資料的狀態資訊。

定義計算屬性可讓網域內的所有設定檔使用該屬性。每個計算屬性只能參照一個 ObjectType，以及該 ObjectType 中的最多兩個欄位。

**請求**

```
POST /domains/DomainName/calculated-attributes/CalculatedAttributeName
```

```
{
    "CalculatedAttributeName": "string",
    "DisplayName": "string",
    "Description": "string",
    "AttributeDetails": {
       "Attributes": [
           {
               "Name": "string"
           }
           ...
       ],
       "Expression": "string",
    },
    "Statistic": "AVERAGE" | "COUNT" | "SUM" | "FIRST_OCCURRENCE" | "LAST_OCCURRENCE" | "MINIMUM" | "MAXIMUM" | "MAX_OCCURRENCE",
    "Conditions": {
        "Range": {
             "Value": "number",
             "Units": "string"
        },
        "ObjectCount": "number",
        "Threshold": {
            "Value": "string",
            "Operator": "EQUAL_TO" | "GREATER_THAN" | "LESS_THAN" | "NOT_EQUAL_TO"
        }
     },
     "Tags": {}
}
```

**回應**

```
{
    "CalculatedAttributeName": "string",
    "DisplayName": "string",
    "Description": "string",
    "AttributeDetails": {
       "Attributes": [
           {
               "Name": "string"
           }
           ...
       ],
       "Expression": "string",
    },
    "Statistic": "AVERAGE" | "COUNT" | "SUM" | "FIRST_OCCURRENCE" | "LAST_OCCURRENCE" | "MINIMUM" | "MAXIMUM" | "MAX_OCCURRENCE"
    "Conditions": {
        "Range": {
             "Value": "number",
             "Units": "string"
        },
        "ObjectCount": "number",
        "Threshold": {
            "Value": "string",
            "Operator": "EQUAL_TO" | "GREATER_THAN" | "LESS_THAN" | "NOT_EQUAL_TO"
        }
    },
    "CreatedAt": number,
    "LastUpdatedAt": number,
    "Tags": {}
}
```

**請求內文**
+ **CalculatedAttributeName**

  計算屬性的唯一 (每個網域) 名稱。
  + 類型：字串
  + 長度限制：長度下限為 1。長度上限為 64。
  + 模式：`^[a-zA-Z0-9_-]+$`
  + 必要：是
+ **DisplayName**

  計算屬性的顯示名稱。
  + 長度限制：長度下限為 1。長度上限為 64。
  + 模式：`^[a-zA-Z_][a-zA-Z_0-9-\s]*$`
  + 必要：否
+ **Description**

  計算屬性的描述。
  + 類型：字串
  + 長度限制：長度下限為 1。長度上限為 1000。
  + 必要：否
+ **UseHistoricalData**

  建立計算屬性前擷取的歷史資料是否應包含在計算中。
  + 類型：布林值
  + 必要：否
+ **AttributeDetails**

  定義中使用的屬性詳細資訊，以及屬性之間涉及的數學運算。參閱以下元件：
  + **Attributes**

    在數學運算式中指定的屬性項目清單。
    + **AttributeItem**

      在數學運算式中指定的單一屬性項目的詳細資訊。
      + 名稱
        + 設定檔物件類型中定義的屬性名稱。
        + 類型：字串
  + **運算式**

    針對屬性清單中所提供屬性項目執行的數學運算式。運算式中的每個元素應遵循 \$1"\$1ObjectTypeName.AttributeName\$1\$1" 的結構。
    + 範例：`{ObjA.AttributeA} - {ObjA.AttributeB}`
    + 類型：字串
    + 我們只支援以下數學運算：`+ - * /`
    + 計算屬性定義建立後，您就無法修改「運算式」
+ **條件**

  定義計算屬性彙總條件和閾值。
  + 類型：條件物件
    + 範圍
    + ObjectCount
    + Threshold
+ **範圍**

  資料包含在彙總中的相對期間。
  + 類型：範圍物件
    + 值：指定單位的時間長度。`ValueRange` 會覆寫 Value。
      + 類型：整數
      + 必要：否
    + ValueRange：可讓客戶指定相對時間範圍的結構，其中的資料會包含在計算屬性中。使用正數表示結束時間在過去時間，負數表示在未來時間。ValueRange 會覆寫 Value。
      + 類型：ValueRange
      + 必要：否
        + Start
          + 應開始包含物件的時間。使用正數表示開始時間在過去時間，負數表示在未來時間。
          + 類型：整數
          + 必要：是 
        + 結束
          + 應不再包含物件的時間。使用正數表示開始時間在過去時間，負數表示在未來時間。
          + 類型：整數
          + 必要：是 
    + TimestampSource：指定 JSON 物件中應剖析日期欄位的運算式。運算式應遵循以下結構：\$1"\$1ObjectTypeName.<Location of timestamp field in JSON pointer format>\$1\$1"。例如，如果您的物件類型是 MyType，而來源 JSON 為 `{"generatedAt": {"timestamp": "1737587945945"}}`，則 TimestampSource 應為 `"{MyType.generatedAt.timestamp}"`。
      + 長度限制：長度下限為 1。長度上限為 255。
      + 必要：否
    + TimestampFormat：指定 JSON 物件中時間戳記欄位的格式。此值應為 EPOCHMILLI (適用於具秒/毫秒精確度的 Unix epoch 時間戳記) 或 ISO\$18601 (遵循 ISO\$18601 格式，具秒/毫秒精確度，可選偏移 Z 或格式 HH:MM 或 HHMM)。例如，如果您的物件類型是 MyType，而來源 JSON 為 `{"generatedAt": {"timestamp": "2001-07-04T12:08:56.235-0700"}},`，則 TimestampFormat 應為 `"ISO_8601"`。
    + 單位：時間單位
      + 有效值：天
      + 必要：是
  + 必要：是
  + 初始範圍：最多 366 天
+ **ObjectCount**

  用於計算屬性的設定檔物件數目。
  + 類型：數字
  + 範圍：1 至 100
  + 必要：否
+ **Threshold**

  用來產生真/假計算屬性的比較邏輯。
  + 類型：臨界值物件
    + Value
      + 閾值的值
      + 類型：字串
      + 必要：否
    + 運算子
      + 閾值的運算子
      + 類型：ENUM
      + 有效值：
        + GREATER\$1THAN
        + LESS\$1THAN
        + EQUAL\$1TO
        + NOT\$1EQUAL\$1TO
  + 必要：否
+ **統計數字**

  要針對計算屬性執行的彙總作業。
  + 類型：ENUM
  + 有效值：
    + FIRST\$1OCCURRENCE
    + LAST\$1OCCURRENCE
    + COUNT
    + SUM
    + MINIMUM
    + MAXIMUM
    + AVERAGE
    + MAX\$1OCCURRENCE

------
#### [ UpdateCalculatedAttributeDefinition ]

**UpdateCalculatedAttributeDefinition**

更新計算屬性定義。更新僅限於顯示名稱、描述、時間範圍、物件計數和閾值。此 API 支援部分更新，因此只需要包含需要更新的參數。

**注意**  
更新條件時：  
增加計算屬性的日期範圍並不會觸發將大於目前日期範圍的歷史資料納入。
建立計算屬性定義後，就無法更新 TimestampSource 和 TimestampFormat。

**請求**

```
PUT /domains/DomainName/calculated-attributes/CalculatedAttributeName
```

```
{
    "DisplayName": "string",
    "Description": "string",
    "Conditions": {
        "Range": {
             "Value": "number",
             "Units": "string"
        },
        "ObjectCount": "number",
        "Threshold": {
            "Value": "string",
            "Operator": "EQUAL_TO" | "GREATER_THAN" | "LESS_THAN" | "NOT_EQUAL_TO"
        }
   }
}
```

**回應**

```
{
    "CalculatedAttributeName": "string",
    "DisplayName": "string",
    "Description": "string",
    "AttributeDetails": {
       "Attributes": [
           {
               "Name": "string"
           }
           ...
       ],
       "Expression": "string",
    },
    "Statistic": "AVERAGE" | "COUNT" | "SUM" | "FIRST_OCCURRENCE" | "LAST_OCCURRENCE" | "MINIMUM" | "MAXIMUM" | "MAX_OCCURRENCE"
    "Conditions": {
        "Range": {
             "Value": "number",
             "Units": "string"
        },
        "ObjectCount": "number",
        "Threshold": {
            "Value": "string",
            "Operator": "EQUAL_TO" | "GREATER_THAN" | "LESS_THAN" | "NOT_EQUAL_TO"
        }
    },
    "CreatedAt": number,
    "LastUpdatedAt": number,
    "Tags": {}
}
```

**請求內文**
+ **DisplayName**

  計算屬性的顯示名稱。
  + 長度限制：長度下限為 1。長度上限為 64。
  + 模式：`^[a-zA-Z_][a-zA-Z_0-9-\s]*$`
  + 必要：否
+ **Description**

  計算屬性的描述。
  + 類型：字串
  + 長度限制：長度下限為 1。長度上限為 1000。
  + 必要：否
+ **條件**

  定義計算屬性彙總條件和閾值。
  + 類型：條件物件
    + 範圍
    + ObjectCount
    + Threshold
+ **範圍**

  資料包含在彙總中的相對期間。
  + 類型：範圍物件
    + 值：指定單位的時間長度
      + 類型：整數
      + 必要：否
    + ValueRange：可讓客戶指定相對時間範圍的結構，其中的資料會包含在計算屬性中。使用正數表示結束時間在過去時間，負數表示在未來時間。ValueRange 會覆寫 Value。
      + 類型：ValueRange
      + 必要：否
        + Start
          + 應開始包含物件的時間。使用正數表示開始時間在過去時間，負數表示在未來時間。
          + 類型：整數
          + 必要：是 
        + 結束
          + 應不再包含物件的時間。使用正數表示開始時間在過去時間，負數表示在未來時間。
          + 類型：整數
          + 必要：是 
    + 單位：時間單位
      + 有效值：天
      + 必要：是
  + 必要：是
  + 初始範圍：最多 366 天
+ **ObjectCount**

  用於計算屬性的設定檔物件數目。
  + 類型：數字
  + 範圍：1 至 100
  + 必要：否
+ **Threshold**

  用來產生真/假計算屬性的比較邏輯。
  + 類型：臨界值物件
    + Value
      + 閾值的值
      + 類型：字串
      + 必要：否
    + 運算子
      + 閾值的運算子
      + 類型：ENUM
      + 有效值：
        + GREATER\$1THAN
        + LESS\$1THAN
        + EQUAL\$1TO
        + NOT\$1EQUAL\$1TO
  + 必要：否

------
#### [ GetCalculatedAttributeDefinition ]

**GetCalculatedAttributeDefinition**

擷取計算屬性定義。

**請求**

```
GET /domains/DomainName/calculated-attributes/CalculatedAttributeName
```

**請求內文**

```
The request does not have a request body.
```

**回應**

```
{
"CalculatedAttributeName": "string",
    "DisplayName": "string",
    "Description": "string",
    "AttributeDetails": {
"Attributes": [
           {
"Name": "string"
           }
           ...
       ],
       "Expression": "string",
    },
    "Statistic": "AVERAGE" | "COUNT" | "SUM" | "FIRST_OCCURRENCE" | "LAST_OCCURRENCE" | "MINIMUM" | "MAXIMUM" | "MAX_OCCURRENCE"
"Conditions": {
"Range": {
      "Unit": "string",
      "Value": number
      "ValueRange"
        {
            "Start": number 
            "End": number 
        },
      "TimestampFormat": "string", 
      "TimestampSource": "string"
    },
        "ObjectCount": "number",
        "Threshold": {
"Value": "string",
            "Operator": "EQUAL_TO" | "GREATER_THAN" | "LESS_THAN" | "NOT_EQUAL_TO"
        }
    },
    "UseHistoricalData" boolean,
  "Status": "PREPARING" | "IN_PROGRESS" | "COMPLETED" | "FAILED",
  "Readiness": {
        "ProgressPercentage": number, 
        "Message": "string", 
        },
    "CreatedAt": number,
    "LastUpdatedAt": number,
    "Tags": {}
}
```

**URI 請求參數**
+ **DomainName**

  網域的唯一名稱。
  + 長度限制：長度下限為 1。長度上限為 64。
  + 模式：`^[a-zA-Z0-9_-]+$`
  + 必要：是
+ **CalculatedAttributeName**

  計算屬性的唯一 (每個網域) 名稱。
  + 類型：字串
  + 長度限制：長度下限為 1。長度上限為 64。
  + 模式：`^[a-zA-Z0-9_-]+$`
  + 必要：是

------
#### [ DeleteCalculatedAttributeDefinition ]

**DeleteCalculatedAttributeDefinition**

刪除現有的計算屬性定義。請注意，您可以刪除預設的計算屬性，但是一旦刪除，您將無法復原該動作，如果您想要還原，則需要使用 `CreateCalculatedAttributeDefinition` API 自行重新建立該屬性。

**請求**

```
DELETE /domains/DomainName/calculated-attributes/CalculatedAttributeName
```

**請求內文**

```
The request does not have a request body.
```

**回應**

```
The response does not have a response body.
```

**URI 請求參數**
+ **DomainName**

  網域的唯一名稱。
  + 長度限制：長度下限為 1。長度上限為 64。
  + 模式：`^[a-zA-Z0-9_-]+$`
  + 必要：是
+ **CalculatedAttributeName**

  計算屬性的唯一 (每個網域) 名稱。
  + 類型：字串
  + 長度限制：長度下限為 1。長度上限為 64。
  + 模式：`^[a-zA-Z0-9_-]+$`
  + 必要：是

------
#### [ ListCalculatedAttributeDefinitions ]

**ListCalculatedAttributeDefinitions**

擷取網域的所有計算屬性定義。

**請求**

```
GET /domains/DomainName/calculated-attributes?max-results=MaxResults&next-token=NextToken
```

**請求內文**

```
The request does not have a request body.
```

**回應**

```
{ 
    "Items": [
        {
            "UseHistoricalData": boolean,
            "ReadinessStatus": PREPARING | IN_PROGRESS | COMPLETED | FAILED,
            "CalculatedAttributeName": "string", 
            "CreatedAt": number, 
            "Description": "string", 
            "DisplayName": "string", 
            "LastUpdatedAt": number, 
            "Tags": { 
                "string" : "string" 
            }
        } 
    ], 
    "NextToken": "string"
}
```

**URI 請求參數**
+ **DomainName**

  網域的唯一名稱。
  + 長度限制：長度下限為 1。長度上限為 64。
  + 模式：`^[a-zA-Z0-9_-]+$`
  + 必要：是
+ **MaxResults**

  每頁傳回的物件數量上限。
  + 有效範圍：最小值為 1。最大值為 100。
+ **NextToken**

  先前 ListCalculatedAttributeDefinition API 呼叫的分頁字符。
  + 長度限制：長度下限為 1。長度上限為 1024。

------
#### [ GetCalculatedAttributeForProfile ]

**GetCalculatedAttributeForProfile**

啟動計算並擷取單一設定檔中單一計算屬性的結果。

**請求**

```
GET /domains/DomainName/profile/ProfileId/calculated-attributes/CalculatedAttributeName
```

**請求內文**

```
The request does not have a request body.
```

**回應**

```
{
"Name": "string",
    "DisplayName": "string",
    "Value": "string",
    "IsDataPartial": "string",
    "LastObjectTimestamp" : number
}
```

**URI 請求參數**
+ **DomainName**

  網域的唯一名稱。
  + 長度限制：長度下限為 1。長度上限為 64。
  + 模式：`^[a-zA-Z0-9_-]+$`
  + 必要：是
+ **CalculatedAttributeName**

  計算屬性的唯一 (每個網域) 名稱。
  + 類型：字串
  + 長度限制：長度下限為 1。長度上限為 64。
  + 模式：`^[a-zA-Z0-9_-]+$`
  + 必要：是

------
#### [ ListCalculatedAttributesForProfile ]

**ListCalculatedAttributesForProfile**

啟動計算並擷取單一設定檔所有計算屬性的結果。

**請求**

```
GET /domains/DomainName/profile/ProfileId/calculated-attributes?max-results=MaxResults&next-token=NextToken
```

**請求內文**

```
The request does not have a request body.
```

**回應**

```
{
"Items": [
        {
"CalculatedAttributeName": "string",
            "DisplayName": "string",
            "Value": "string",
            "IsDataPartial" : "string",
            "LastObjectTimestamp" : number
        },
        ...
    ],
    "NextToken": "string"
}
```

**URI 請求參數**
+ **DomainName**

  網域的唯一名稱。
  + 長度限制：長度下限為 1。長度上限為 64。
  + 模式：`^[a-zA-Z0-9_-]+$`
  + 必要：是
+ **ProfileId**
  + 模式：`[a-f0-9]{32}`
  + 必要：是
+ **MaxResults**

  每頁傳回的物件數量上限。
  + 有效範圍：最小值為 1。最大值為 100。
+ **NextToken**

  先前 ListCalculatedAttributeDefinition API 呼叫的分頁字符。
  + 長度限制：長度下限為 1。長度上限為 1024。

------

# 建立自訂 Amazon Connect Customer Profiles 計算屬性定義
<a name="customerprofiles-calculated-attributes-creating-definition"></a>

使用客戶設定檔 [CreateCalculatedAttributeDefinition](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_CreateCalculatedAttributeDefinition.html) API，您可以根據自訂物件類型以程式設計方式建立自己的計算屬性。

在本主題中，我們將展示如何使用自訂 JSON 檔案來建立計算屬性。

## 步驟 1：建立 JSON 檔案
<a name="step1-calculate-attribute-api"></a>

使用下列內容建立檔案：

```
{
"DomainName": "your-domain-name", 
   "CalculatedAttributeName": "your-calculated-attribute-name",
   "UseHistoricalData": true,
   "DisplayName": "your-display-name",
   "Description": "your-description",
   "AttributeDetails": {
"Attributes": [
         {
            "Name": "your-attribute-name"
         }
       ],
       "Expression": "{your-object-type.your-attribute-name}"
   },
    "Statistic": "your-statistic",
    "Conditions": {
       "Range": {
        "ValueRange"
        {
            "Start": your-range-start
            "End": your-range-end
        },
        "TimestampSource": "{your-object-type.your-timestamp-source}",          
        "Unit": "days"
        },
        "ObjectCount":  your-object-count,
        "Threshold": {
           "Value": "your-threshold-value",
           "Operator": "your-threshold-operator"
        }
   }  
}
```

若要使用您自己的值來自訂 JSON，請遵循下列指示：
+ **屬性**：這應包含您要用於計算屬性之物件類型中的欄位名稱。支援此清單中參照的兩個屬性。
+ **運算式**：支援在屬性之間執行的基本數學運算式。如果您只有一個屬性，則此欄位應該是 `{ObjectTypeName.AttributeName}`，否則如果您有數學運算式，則此欄位應包含這兩個屬性。
+ **Statistic**：這是當您呼叫其中一個實際執行彙總作業的計算 API 時所執行的作業。大多數都是不言自明的，但我們已經為那些不清楚的添加了解釋。

  **支援的統計**
  + `FIRST_OCCURRENCE` 傳回在最早擷取物件的運算式中指定的屬性。
  + `LAST_OCCURRENCE` 傳回在最新擷取物件的運算式中指定的屬性。
  + `COUNT` 從選擇的資料傳回計數。
  + `SUM` 從選擇的資料傳回總和。
  + `MINIMUM` 從選擇的資料傳回最小值。
  + `MAXIMUM` 從選擇的資料傳回最大值。
  + `AVERAGE` 從選擇的資料傳回平均值。
  + `MAX_OCCURRENCE` 返回表達式中所指定，出現最頻繁的值。
+ **範圍**：
  + 單位：目前僅支援 DAYS 單位。
  + ValueRange：在 ValueRange 的開始或結束欄位中指定正數，以指定應從幾天前開始，或使用負數指定應從未來幾天開始。
  + TimestampSource：指定 JSON 物件中應剖析日期欄位的運算式。運算式應遵循以下結構：\$1"\$1ObjectTypeName.<Location of timestamp field in JSON pointer format>\$1\$1"。例如，如果您的物件類型是 MyType，而來源 JSON 為 `{"generatedAt": {"timestamp": "1737587945945"}}`，則 TimestampSource 應為 `"{MyType.generatedAt.timestamp}"`。
+ **ObjectCount**：指出應根據計算屬性計算的物件數目。
+ **Threshold**：如果您想知道它是否大於特定值，而不是確切的計算屬性值，則可以使用閾值。

  閾值可以是任何字串，且支援下列閾值運算子。
  + `GREATER_THAN`
  + `LESS_THAN`
  + `EQUAL_TO`
  + `NOT_EQUAL_TO`
+ UseHistoricalData：建立計算屬性前擷取的歷史資料是否應包含在計算中。

## 步驟 2：呼叫 CreateCalculatedAttributeDefinition API
<a name="step2-calculated-attribute-api"></a>

使用您的值建立並自訂 JSON 檔案之後，呼叫 [CreateCalculatedAttributeDefinition](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_CreateCalculatedAttributeDefinition.html) API，如下列範例所示：

```
aws customer-profiles create-calculated-attribute-definition --cli-input-json file:///custom_calculated_attribute_cli.json --region region_name
```

也可以使用以下端點：

```
https://profile.your-region.amazonaws.com/domains/your-domain-name/calculated-attributes
```

# 使用 API，在 Amazon Connect Customer Profiles 驗證計算屬性值
<a name="customerprofiles-calculated-attributes-validating-values"></a>

有兩個 API，`GetCalculatedAttributeForProfile` 和 `ListCalculatedAttributesForProfile`，位於設定檔層級。
+ **GetCalculatedAttributeForProfile** - 為單一設定檔檢索單一計算屬性。
+ **ListCalculatedAttributesForProfile** - 擷取單一設定檔的計算屬性清單

使用有效的設定檔 ID，您應該會看到計算屬性的值：

**回應範例**

```
{   
    "CalculatedAttributeName": "_average_hold_time",
    "DisplayName": "Average hold time",
    "IsDataPartial": "true",
    "Value": "24144"
}
```

**IsDataPartial** - 此旗標表示尚未達到時間範圍 (30 天) 或物件計數，因此計算屬性仍在計算中。例如，如果您想要超過 30 天的平均值，則只有在 30 天後，`IsDataPartial` 欄位才會設定為 false。

## 擷取計算屬性的清單
<a name="calculated-attributes-validating-a-list-of-values"></a>

**使用 AWS CLI**

```
aws customer-profiles list-calculated-attributes-for-profile --region your-region --domain-name your-domain-name --profile-id your-profile-id
```

**將 AWS CLI 與自訂 JSON 檔案搭配使用**

使用下列內容建立檔案：

```
{
    "DomainName": "your-domain-name", 
    "ProfileId" "some-profile-id"
}
```

```
aws customer-profiles list-calculated-attributes-for-profile --region your-region --cli-input-json file://list_calculated_attributes_for_profile_cli.json
```

**端點：**

```
https://profile.your-region.amazonaws.com/domains/your-domain-name/profile/your-profile-id/calculated-attributes/
```

## 擷取單一已計算屬性
<a name="calculated-attributes-validating-a-single-value"></a>

**使用 AWS CLI**：

```
aws customer-profiles get-calculated-attributes-for-profile --region your-region --domain-name your-domain-name --calculated-attribute-name your-calculated-attribute-name --profile-id your-profile-id
```

**使用 AWS CLI 搭配自訂 JSON 檔案**：

使用下列內容建立檔案：

```
{   
    "DomainName": "your-domain-name", 
    "CalculatedAttributeName": "your-calculated-attribute-name",
    "ProfileId" "your-profile-id"
}
```

```
aws customer-profiles get-calculated-attributes-for-profile --region your-region --cli-input-json file://list_calculated_attributes_for_profile_cli.json
```

**端點：**

```
https://profile.your-region.amazonaws.com/domains/your-domain-name/profile/your-profile-id/calculated-attributes/your-calculated-attribute-name
```

# Amazon Connect Customer Profiles 中的預設計算屬性
<a name="customerprofiles-default-calculated-attributes"></a>

## 預設 CTR 計算屬性
<a name="customerprofiles-default-calculated-attributes-ctr"></a>

Amazon Connect Customer Profiles 會根據聯絡記錄提供 out-of-the 立即可用的預設屬性。屬性如下：

**最常見的管道**

```
{
   "CalculatedAttributeName": "_most_frequent_channel",
   "DisplayName": "Most frequent channel",
   "Description": "Returns customer's frequently used communication channel. Channels include voice, chat, task.",
   "CreatedAt": null,
   "LastUpdatedAt": null,
   "Statistic": "MAX_OCCURRENCE",
   "Conditions": {
      "Range": {
         "Value": 30,
         "Unit": "DAYS"
       },
       "ObjectCount": null
   },
   "AttributeDetails": {
      "Attributes": [
         {
            "Name": "channel"
         }
      ],
      "Expression": "{CTR.channel}"
   },
   "Tags": {
   }
}
```

**最後一個管道**

```
{
   "CalculatedAttributeName": "_last_channel",
   "DisplayName": "Last channel",
   "Description": "Returns customer's last communication channel. Channels include voice, chat, task.",
   "CreatedAt": null,
   "LastUpdatedAt": null,
   "Statistic": "LAST_OCCURRENCE",
   "Conditions": {
      "ObjectCount": null
   },
   "AttributeDetails": {
      "Attributes": [
         {
            "Name": "channel"
         }
       ],
       "Expression": "{CTR.channel}"
   },
   "Tags": {
   }
}
```

**最後一個客服人員識別符**

```
{
   "CalculatedAttributeName": "_last_agent_id",
   "DisplayName": "Last agent identifier",
   "Description": "Returns identifier of the last agent customer connected with.",
   "CreatedAt": null,
   "LastUpdatedAt": null,
   "Statistic": "LAST_OCCURRENCE",
   "Conditions": {
      "ObjectCount": null
   },
   "AttributeDetails": {
      "Attributes": [
         {
            "Name": "agent.id"
         }
      ],
      "Expression": "{CTR.agent.id}"
   },
   "Tags": {
   }
}
```

**經常通話者**

```
{
   "CalculatedAttributeName": "_frequent_caller",
   "DisplayName": "Frequent caller",
   "Description": "Returns true or false based on the number of times a customer has called.",
   "CreatedAt": null,
   "LastUpdatedAt": null,
   "Statistic": "COUNT",
   "Conditions": {
      "Range": {
         "Value": 30,
         "Unit": "DAYS"
      },
      "ObjectCount": null,
      "Threshold": {
         "Value": "5",
         "Operator": "GREATER_THAN"
      }
   },
   "AttributeDetails": {
      "Attributes": [
         {
            "Name": "contactId"
         }
      ],
      "Expression": "{CTR.contactId}"
   },
   "Tags": {
   }
}
```

**平均保留時間**

```
{
   "CalculatedAttributeName": "_average_hold_time",
   "DisplayName": "Average hold time",
   "Description": "Returns customer's average hold time for voice calls.",
   "CreatedAt": null,
   "LastUpdatedAt": null,
   "Statistic": "AVERAGE",
   "Conditions": {
      "Range": {
         "Value": 30,
         "Unit": "DAYS"
      },
      "ObjectCount": null
   },
   "AttributeDetails": {
      "Attributes": [
         {
            "Name": "agent.customerHoldDurationMillis"
         },
         {
            "Name": "queue.durationMillis"
         }
      ],
      "Expression": "{CTR.agent.customerHoldDurationMillis} + {CTR.queue.durationMillis}"
   },
   "Tags": {
   }
}
```

**平均通話時間**

```
{
   "CalculatedAttributeName": "_average_call_duration",
   "DisplayName": "Average call duration",
   "Description": "Returns customer's average call duration for voice calls.",
   "CreatedAt": null,
   "LastUpdatedAt": null,
   "Statistic": "AVERAGE",
   "Conditions": {
      "Range": {
         "Value": 30,
         "Unit": "DAYS"
       },
      "ObjectCount": null
   },
   "AttributeDetails": {
      "Attributes": [
         {
            "Name": "disconnectTimestamp"
         },
         {
            "Name": "initiationTimestamp"
         }
      ],
      "Expression": "{CTR.disconnectTimestamp} - {CTR.initiationTimestamp}"
   },
   "Tags": {
   }
}
```

**客戶的最長保留時間**

```
{
    "CalculatedAttributeName": "_maximum_hold_time",
    "DisplayName": "Customer's maximum hold time",
    "Description": "Returns customer's maximum hold time for voice calls in the past month.",
    "AttributeDetails": {
      "Attributes": [
        {
          "Name": "agent.customerHoldDurationMillis"
        },
        {
          "Name": "queue.durationMillis"
        }
      ],
      "Expression": "{CTR.agent.customerHoldDurationMillis} + {CTR.queue.durationMillis}"
    },
    "Statistic": "MAXIMUM",
    "Conditions": {
      "Range": {
        "Value": 30,
        "Unit": "DAYS"
      },
      "ObjectCount": null,
      "Threshold": null
    },
    "Launched": false
  }
```

## 預設設定檔計算屬性
<a name="customerprofiles-default-calculated-attributes-profile"></a>

Amazon Connect Customer Profiles 會根據設定檔提供out-of-the可用的預設屬性。屬性如下：

**新客戶**

```
{
   "CalculatedAttributeName": "_new_customer",
   "DisplayName": "New customer",
   "Description": "Returns true or false for new customer profiles created.",
   "CreatedAt": null,
   "LastUpdatedAt": null,
   "Statistic": "TIME_DIFFERENCE_FROM_NOW",
   "Conditions": {
      "ObjectCount": null,
      "Threshold": {
         "Value": "30",
         "Operator": "LESS_THAN"
      }
   },
   "AttributeDetails": {
      "Attributes": [
         {
            "Name": "createdAt"
         }
      ],
      "Expression": "{_profile.createdAt}"
   },
   "Tags": {
   }
}
```

## 預設資產計算屬性
<a name="customerprofiles-default-calculated-attributes-asset"></a>

Amazon Connect Customer Profiles 會根據資產提供 out-of-the 立即可用的預設屬性。屬性如下：

**資產數量**

```
{
    "CalculatedAttributeName": "_assets_count",
    "DisplayName": "Count of assets",
    "Description": "Returns the count of assets for a customer.",
    "AttributeDetails": {
      "Attributes": [
        {
          "Name": "AssetId"
        }
      ],
      "Expression": "{_asset.AssetId}"
    },
    "Statistic": "COUNT",
    "Conditions": {
      "Range": null,
      "ObjectCount": null,
      "Threshold":null
    },
    "Launched": false
  }
```

**第一個資產的購買日期**

```
{
    "CalculatedAttributeName": "_asset_first_occurrence",
    "DisplayName": "First asset purchased date",
    "Description": "Returns purchase date of the customer's first asset.",
    "AttributeDetails": {
      "Attributes": [
        {
          "Name": "PurchaseDate"
        }
      ],
      "Expression": "{_asset.PurchaseDate}"
    },
    "Statistic": "FIRST_OCCURRENCE",
    "Conditions": {
      "Range": null,
      "ObjectCount": null,
      "Threshold": null
    },
    "Launched": false
  }
```

**最後一個資產的購買日期**

```
{
    "CalculatedAttributeName": "_asset_last_occurrence",
    "DisplayName": "Last asset purchased date",
    "Description": "Returns purchase date of the customer's last asset.",
    "AttributeDetails": {
      "Attributes": [
        {
          "Name": "PurchaseDate"
        }
      ],
      "Expression": "{_asset.PurchaseDate}"
    },
    "Statistic": "LAST_OCCURRENCE",
    "Conditions": {
      "Range": null,
      "ObjectCount": null,
      "Threshold": null
    },
    "Launched": false
  }
```

**總資產價格**

```
{
    "CalculatedAttributeName": "_assets_price_sum",
    "DisplayName": "Total asset price",
    "Description": "Returns customer's total asset price.",
    "AttributeDetails": {
      "Attributes": [
        {
          "Name": "Price"
        }
      ],
      "Expression": "{_asset.Price}"
    },
    "Statistic": "SUM",
    "Conditions": {
      "Range": null,
      "ObjectCount": null,
      "Threshold": null
    },
    "Launched": false
  }
```

**平均資產價格**

```
{
    "CalculatedAttributeName": "_assets_price_average",
    "DisplayName": "Average asset price",
    "Description": "Returns customer's average asset price.",
    "AttributeDetails": {
      "Attributes": [
        {
          "Name": "Price"
        }
      ],
      "Expression": "{_asset.Price}"
    },
    "Statistic": "AVERAGE",
    "Conditions": {
      "Range": null,
      "ObjectCount": null,
      "Threshold": null
    },
    "Launched": false
  }
```

**第一個資產的名稱**

```
{
    "CalculatedAttributeName": "_assets_name_first_occurrence",
    "DisplayName": "First asset name",
    "Description": "Returns name of the customer's first asset",
    "AttributeDetails": {
      "Attributes": [
        {
          "Name": "AssetName"
        }
      ],
      "Expression": "{_asset.AssetName}"
    },
    "Statistic": "FIRST_OCCURRENCE",
    "Conditions": {
      "Range": null,
      "ObjectCount": null,
      "Threshold": null
    },
    "Launched": false
  }
```

**最後一個資產的名稱**

```
{
    "CalculatedAttributeName": "_assets_name_last_occurrence",
    "DisplayName": "Last asset name",
    "Description": "Returns name of the customer's last asset.",
    "AttributeDetails": {
      "Attributes": [
        {
          "Name": "AssetName"
        }
      ],
      "Expression": "{_asset.AssetName}"
    },
    "Statistic": "LAST_OCCURRENCE",
    "Conditions": {
      "Range": null,
      "ObjectCount": null,
      "Threshold": null
    },
    "Launched": false
  }
```

## 預設案例計算屬性
<a name="customerprofiles-default-calculated-attributes-case"></a>

Amazon Connect Customer Profiles 會根據案例提供 out-of-the 立即可用的預設屬性。屬性如下：

**案例數量**

```
{
    "CalculatedAttributeName": "_cases_count",
    "DisplayName": "Count of cases",
    "Description": "Returns the count of customer's cases for a customer.",
    "AttributeDetails": {
      "Attributes": [
        {
          "Name": "CaseId"
        }
      ],
      "Expression": "{_case.CaseId}"
    },
    "Statistic": "COUNT",
    "Conditions": {
      "Range": null,
      "ObjectCount": null,
      "Threshold":null
    },
    "Launched": false
  }
```

**第一個案例的建立日期**

```
{
    "CalculatedAttributeName": "_case_first_occurrence",
    "DisplayName": "First case created date",
    "Description": "Returns created date of the customer's first case.",
    "AttributeDetails": {
      "Attributes": [
        {
          "Name": "CreatedDate"
        }
      ],
      "Expression": "{_case.CreatedDate}"
    },
    "Statistic": "FIRST_OCCURRENCE",
    "Conditions": {
      "Range": null,
      "ObjectCount": null,
      "Threshold": null
    },
    "Launched": false
  }
```

**最後一個案例的建立日期**

```
{
    "CalculatedAttributeName": "_case_last_occurrence",
    "DisplayName": "Last case created date",
    "Description": "Returns created date of the customer's last case.",
    "AttributeDetails": {
      "Attributes": [
        {
          "Name": "CreatedDate"
        }
      ],
      "Expression": "{_case.CreatedDate}"
    },
    "Statistic": "LAST_OCCURRENCE",
    "Conditions": {
      "Range": null,
      "ObjectCount": null,
      "Threshold": null
    },
    "Launched": false
  }
```

**開啟的案例數量**

```
{
    "CalculatedAttributeName": "_cases_open_status_count",
    "DisplayName": "Count of open cases",
    "Description": "Returns the count of customer's open cases.",
    "AttributeDetails": {
      "Attributes": [
        {
          "Name": "CaseId"
        }
      ],
      "Expression": "{_case.CaseId}"
    },
    "Statistic": "COUNT",
    "Conditions": {
      "Range": null,
      "ObjectCount": null,
      "Threshold":null
    },
    "Filter": {
      "Include": "ALL",
      "Groups": [
        {
          "Type": "ALL",
          "Dimensions": [
            {
              "Attributes": {
                "Status": {
                  "DimensionType": "INCLUSIVE",
                  "Values": ["Open"]
                }
              }
            }
          ]
        }
      ]
    },
    "Launched": false
  }
```

**關閉的案例數量**

```
{
    "CalculatedAttributeName": "_cases_closed_status_count",
    "DisplayName": "Count of closed cases",
    "Description": "Returns the count of customer's closed cases.",
    "AttributeDetails": {
      "Attributes": [
        {
          "Name": "CaseId"
        }
      ],
      "Expression": "{_case.CaseId}"
    },
    "Statistic": "COUNT",
    "Conditions": {
      "Range": null,
      "ObjectCount": null,
      "Threshold":null
    },
    "Filter": {
      "Include": "ALL",
      "Groups": [
        {
          "Type": "ALL",
          "Dimensions": [
            {
              "Attributes": {
                "Status": {
                  "DimensionType": "INCLUSIVE",
                  "Values": ["Closed"]
                }
              }
            }
          ]
        }
      ]
    },
    "Launched": false
  }
```

## 預設通訊記錄計算屬性
<a name="customerprofiles-default-calculated-attributes-communication-record"></a>

Amazon Connect Customer Profiles 會根據通訊記錄提供 out-of-the 立即可用的預設屬性。屬性如下：

**最後一次開啟電子郵件的日期**

```
{
    "CalculatedAttributeName": "_campaign_email_last_open",
    "DisplayName": "Last email open date",
    "Description": "Returns the last email open date of the customer.",
    "AttributeDetails": {
      "Attributes": [
        {
          "Name": "Events.Open.UpdatedDate"
        }
      ],
      "Expression": "{_communicationRecord.Events.Open.UpdatedDate}"
    },
    "Statistic": "LAST_OCCURRENCE",
    "Conditions": {
      "Range": null,
      "ObjectCount": null,
      "Threshold": null
    },
    "Filter": {
      "Include": "ALL",
      "Groups": [
        {
          "Type": "ALL",
          "Dimensions": [
            {
              "Attributes": {
                "Attributes.ChannelSubType": {
                  "DimensionType": "INCLUSIVE",
                  "Values": ["connect:Email"]
                },
                "Events.Open.EventType": {
                  "DimensionType": "INCLUSIVE",
                  "Values": ["Open"]
                }
              }
            }
          ]
        }
      ]
    },
    "Launched": false
  }
```

**開啟的電子郵件數量**

```
{
    "CalculatedAttributeName": "_campaign_email_open_count",
    "DisplayName": "Email open count",
    "Description": "Returns the number of times emails were opened by a customer.",
    "AttributeDetails": {
      "Attributes": [
        {
          "Name": "CommunicationRecordId"
        }
      ],
      "Expression": "{_communicationRecord.CommunicationRecordId}"
    },
    "Statistic": "COUNT",
    "Conditions": {
      "Range": null,
      "ObjectCount": null,
      "Threshold": null
    },
    "Filter": {
      "Include": "ALL",
      "Groups": [
        {
          "Type": "ALL",
          "Dimensions": [
            {
              "Attributes": {
                "Attributes.ChannelSubType": {
                  "DimensionType": "INCLUSIVE",
                  "Values": ["connect:Email"]
                },
                "Events.Open.EventType": {
                  "DimensionType": "INCLUSIVE",
                  "Values": ["Open"]
                }
              }
            }
          ]
        }
      ]
    },
    "Launched": false
  }
```

**傳送的電子郵件數量**

```
{
    "CalculatedAttributeName": "_campaign_email_delivery_count",
    "DisplayName": "Email delivery count",
    "Description": "Returns the number of times emails were delivered to a customer.",
    "AttributeDetails": {
      "Attributes": [
        {
          "Name": "CommunicationRecordId"
        }
      ],
      "Expression": "{_communicationRecord.CommunicationRecordId}"
    },
    "Statistic": "COUNT",
    "Conditions": {
      "Range": null,
      "ObjectCount": null,
      "Threshold": null
    },
    "Filter": {
      "Include": "ALL",
      "Groups": [
        {
          "Type": "ALL",
          "Dimensions": [
            {
              "Attributes": {
                "Attributes.ChannelSubType": {
                  "DimensionType": "INCLUSIVE",
                  "Values": ["connect:Email"]
                },
                "Events.Delivery.EventType": {
                  "DimensionType": "INCLUSIVE",
                  "Values": ["Delivery"]
                }
              }
            }
          ]
        }
      ]
    },
    "Launched": false
  }
```

**已傳送的 SMS 數量**

```
{
    "CalculatedAttributeName": "_campaign_sms_delivery_count",
    "DisplayName": "SMS delivered count",
    "Description": "Returns the number of times SMS were delivered to a customer.",
    "AttributeDetails": {
      "Attributes": [
        {
          "Name": "CommunicationRecordId"
        }
      ],
      "Expression": "{_communicationRecord.CommunicationRecordId}"
    },
    "Statistic": "COUNT",
    "Conditions": {
      "Range": null,
      "ObjectCount": null,
      "Threshold": null
    },
    "Filter": {
      "Include": "ALL",
      "Groups": [
        {
          "Type": "ALL",
          "Dimensions": [
            {
              "Attributes": {
                "Attributes.ChannelSubType": {
                  "DimensionType": "INCLUSIVE",
                  "Values": ["connect:SMS"]
                },
                "Events.TEXT_DELIVERED.EventType": {
                  "DimensionType": "INCLUSIVE",
                  "Values": ["TEXT_DELIVERED"]
                }
              }
            }
          ]
        }
      ]
    },
    "Launched": false
  }
```

**最後一次封鎖 SMS 的日期**

```
  {
    "CalculatedAttributeName": "_campaign_sms_last_stop",
    "DisplayName": "Last SMS blocked date",
    "Description": "Returns the last SMS blocked date of the customer.",
    "AttributeDetails": {
      "Attributes": [
        {
          "Name": "Events.TEXT_BLOCKED.UpdatedDate"
        }
      ],
      "Expression": "{_communicationRecord.Events.TEXT_BLOCKED.UpdatedDate}"
    },
    "Statistic": "LAST_OCCURRENCE",
    "Conditions": {
      "Range": null,
      "ObjectCount": null,
      "Threshold": null
    },
    "Filter": {
      "Include": "ANY",
      "Groups": [
        {
          "Type": "ALL",
          "Dimensions": [
            {
              "Attributes": {
                "Attributes.ChannelSubType": {
                  "DimensionType": "INCLUSIVE",
                  "Values": ["connect:SMS"]
                },
                "Events.TEXT_BLOCKED.EventType": {
                  "DimensionType": "INCLUSIVE",
                  "Values": ["TEXT_BLOCKED"]
                }
              }
            }
          ]
        }
      ]
    },
    "Launched": false
  }
```

**通訊業者最後一次封鎖 SMS 的日期**

```
{
    "CalculatedAttributeName": "_campaign_sms_last_stop_carrier",
    "DisplayName": "Last SMS carrier blocked date",
    "Description": "Returns the last SMS carrier blocked date of the customer.",
    "AttributeDetails": {
      "Attributes": [
        {
          "Name": "Events.TEXT_CARRIER_BLOCKED.UpdatedDate"
        }
      ],
      "Expression": "{_communicationRecord.Events.TEXT_CARRIER_BLOCKED.UpdatedDate}"
    },
    "Statistic": "LAST_OCCURRENCE",
    "Conditions": {
      "Range": null,
      "ObjectCount": null,
      "Threshold": null
    },
    "Filter": {
      "Include": "ANY",
      "Groups": [
        {
          "Type": "ALL",
          "Dimensions": [
            {
              "Attributes": {
                "Attributes.ChannelSubType": {
                  "DimensionType": "INCLUSIVE",
                  "Values": ["connect:SMS"]
                },
                "Events.TEXT_CARRIER_BLOCKED.EventType": {
                  "DimensionType": "INCLUSIVE",
                  "Values": ["TEXT_CARRIER_BLOCKED"]
                }
              }
            }
          ]
        }
      ]
    },
    "Launched": false
  }
```

## 預設訂單計算屬性
<a name="customerprofiles-default-calculated-attributes-order"></a>

Amazon Connect Customer Profiles 會根據訂單提供 out-of-the 立即可用的預設屬性。屬性如下：

**訂單數量**

```
{
    "CalculatedAttributeName": "_orders_count",
    "DisplayName": "Count of orders",
    "Description": "Returns the count of orders for a customer.",
    "AttributeDetails": {
      "Attributes": [
        {
          "Name": "OrderId"
        }
      ],
      "Expression": "{_order.OrderId}"
    },
    "Statistic": "COUNT",
    "Conditions": {
      "Range": null,
      "ObjectCount": null,
      "Threshold":null
    },
    "Launched": false
  }
```

**第一個訂單的建立日期**

```
{
    "CalculatedAttributeName": "_order_first_occurrence",
    "DisplayName": "First order created date",
    "Description": "Returns created date of the customer's first order.",
    "AttributeDetails": {
      "Attributes": [
        {
          "Name": "CreatedDate"
        }
      ],
      "Expression": "{_order.CreatedDate}"
    },
    "Statistic": "FIRST_OCCURRENCE",
    "Conditions": {
      "Range": null,
      "ObjectCount": null,
      "Threshold": null
    },
    "Launched": false
  }
```

**最後一個訂單的建立日期**

```
{
    "CalculatedAttributeName": "_order_last_occurrence",
    "DisplayName": "Last order created date",
    "Description": "Returns created date of the customer's last order.",
    "AttributeDetails": {
      "Attributes": [
        {
          "Name": "CreatedDate"
        }
      ],
      "Expression": "{_order.CreatedDate}"
    },
    "Statistic": "LAST_OCCURRENCE",
    "Conditions": {
      "Range": null,
      "ObjectCount": null,
      "Threshold": null
    },
    "Launched": false
  }
```

**所有訂單的總價格**

```
{
    "CalculatedAttributeName": "_orders_total_price_sum",
    "DisplayName": "Total price of all orders",
    "Description": "Returns sum of total price for all customer's orders.",
    "Statistic": "SUM",
    "AttributeDetails": {
      "Attributes": [
        {
          "Name": "TotalPrice"
        }
      ],
      "Expression": "{_order.TotalPrice}"
    },
    "Conditions": {
      "Range": null,
      "ObjectCount": null,
      "Threshold":null
    },
    "Launched": false
  }
```

**訂單的平均總價**

```
{
    "CalculatedAttributeName": "_orders_total_price_average",
    "DisplayName": "Orders average of total price",
    "Description": "Returns average of total price for all customer's orders.",
    "AttributeDetails": {
      "Attributes": [
        {
          "Name": "TotalPrice"
        }
      ],
      "Expression": "{_order.TotalPrice}"
    },
    "Statistic": "AVERAGE",
    "Conditions": {
      "Range": null,
      "ObjectCount": null,
      "Threshold": null
    },
    "Launched": false
  }
```

# Amazon Connect Customer Profiles 計算屬性的錯誤訊息和解決方案
<a name="customerprofiles-calculated-attributes-troubleshooting"></a>

下表顯示每個錯誤的計算屬性錯誤訊息、原因和解決方案。


| 錯誤訊息 | 原因 | Resolution | 
| --- | --- | --- | 
| 擷取設定檔的計算屬性會顯示空值 | 這可能是因為計算屬性沒有資料而導致。建立計算屬性之後，必須擷取新資料。 | 透過整合或 CreateProfile 和 PutProfileObject API 擷取新資料或重新擷取舊資料。 | 

# 在 Amazon Connect Customer Profiles 中設定客戶客群
<a name="segmentation-admin-website"></a>

 *客群*是共享特定屬性的客戶設定檔群組。例如，一個客戶客群可能包含住在特定城市的所有客戶，或經常撥打電話且平均花費超過 500 美元的所有客戶。透過 Amazon Connect 外撥行銷活動，您可以將行銷活動傳送至客戶客群。

 系統會根據您定義的屬性動態評估客戶客群，屬性值改變時也可能隨著改變。例如，如果您將新的設定檔新增至 Customer Profiles 網域，或者修改或刪除現有設定檔，該客戶客群中的設定檔數量可能增加或減少。如需了解如何建立客戶客群，請參閱 [在 Amazon Connect 中建置客戶客群](customer-segments-building-segments.md)。

作為在 中建置客群的先決條件 Amazon Connect，您的管理員必須在 AWS 管理主控台中設定您的網域，並設定整合，將描述檔、訂單、資產和/或案例資料帶入客戶描述檔。如需詳細資訊，請參閱[為您的 Amazon Connect 執行個體啟用客戶設定檔。](enable-customer-profiles.md)。啟用資料整合可讓系統繼續根據傳入您網域的新資料產生動態客群

客戶客群僅包含 Amazon Connect Customer Profiles 網域中的客戶設定檔。您可以從 S3 或外部應用程式擷取 Customer Profiles，或透過客服人員應用程式、聯絡流程或 API 建立。如需詳細了解客戶設定檔，請參閱 [Amazon Connect 中的客戶設定檔是什麼？](customer-profiles-what-data.md)。

**Topics**
+ [建置客戶客群](customer-segments-building-segments.md)
+ [管理客群](customer-segments-managing-segments.md)
+ [從匯入的檔案建立客群](customer-segments-imported-files.md)
+ [將客群匯出至 CSV 檔案](customer-segments-exporting-segments.md)
+ [使用客群 AI 助理](customer-segments-ai-assistant.md)
+ [疑難排解](customer-segments-troubleshooting.md)

# 在 Amazon Connect 中建置客戶客群
<a name="customer-segments-building-segments"></a>

**注意**  
**由 SQL (Beta) 提供支援的區段需要開啟資料存放區。請造訪客戶設定檔首頁畫面，並從頂端藍色橫幅啟用資料存放區**

**注意**  
若要導覽至 Amazon Connect 管理員網站中的分段建置器體驗，您需要此功能的安全設定檔許可。如需詳細資訊，請參閱[指派管理客戶客群的安全性設定檔權限](security-profile-customer-profile-segmentation.md)。
建置客群之前，建議您的 Customer Profiles 網域設定資料整合，在 Customer Profiles 網域中填入設定檔。如需了解如何設定資料與 Customer Profiles 整合，請參閱 [將外部應用程式與 Amazon Connect Customer Profiles 整合](integrate-external-apps-customer-profiles.md)。
客群可以包含您以計算屬性擷取的事件。如需了解如何設定自訂計算屬性和檢閱 Customer Profiles 提供的預設計算屬性，請參閱 [設定 Amazon Connect Customer Profiles 中的計算屬性](customerprofiles-calculated-attributes.md)。

Amazon Connect 提供兩種建置客戶客群的方式：1/ 透過 Spark SQL 定義客群 (Beta； 需要啟用資料存放區）；2/ 透過受眾群組和篩選條件定義客群 （傳統客群）。對於兩者，您可以透過採用生成式 AI 技術的客群 AI 助理使用自然語言提示。如果您以其中一種方式定義客群，請將該客群移至另一個客群，而且必須再次開始。

## 採用 Spark SQL 技術的區段
<a name="segments-powered-by-spark-sql"></a>

採用 Spark SQL 技術的客群可讓您使用完整的客戶設定檔資料和擴充功能來定義客群。您可以使用標準設定檔物件屬性和自訂物件屬性。您也可以使用以 SQL 為基礎的功能，例如將標準和自訂物件結合在一起以使用來自各種物件的資料、使用百分位數等統計資料篩選區段，以及標準化日期欄位以進行比較。

您可以從在客群助理 AI 中輸入自然語言提示開始。客群 AI 助理將定義客群，包括將其轉譯為 Spark SQL。客群助理 AI 將提供定義客群所採取的步驟，而且您可以驗證該客群是否符合您要建立的項目。您也可以檢視 SQL、自然語言的 SQL 步驟，以及 AI 產生的 Spark SQL 摘要，以進一步協助驗證。如果您想要進行變更，您可以更新您的自然語言提示或直接編輯 Spark SQL。

您也可以選擇直接建立 Spark SQL 區段。

**如同傳統分割，Spark SQL 支援的區段可用於區段成員資格呼叫、流程區塊和傳出行銷活動。**

**當您在客群成員資格呼叫、流程區塊或客戶事件啟動的外撥行銷活動中使用 Spark SQL 客群時，會使用上次匯出的客群 （客群快照）。用於成員資格的客群快照會在建立 1 年後過期。如果您收到 4XX 錯誤，請確定您已匯出區段 （區段快照）。**

**客戶客群啟動的外撥行銷活動不需要您匯出客群 （客群快照）。**

### 步驟 1：建立新客群
<a name="spark-sql-step1"></a>

在客群 AI 助理中，選取「如何建立客群」以取得建立寶貴客群的更多指引，或選取「我想要產生客群」以輸入自然語言提示來建立客群。

或者，使用 SQL 在查詢編輯器中定義新區段。

**注意 - 如果您想要建立以時區為基礎的傳出行銷活動，您必須確保時區屬性是區段輸出的一部分**

**注意 - 如果您想要在外撥行銷活動中使用客群，您必須確保客群輸出中的設定檔 IDs 是唯一的**

### 步驟 2：設定名稱和說明
<a name="spark-sql-step2"></a>

針對名稱，輸入客群的名稱，以方便稍後輕鬆識別。

**注意 -** Amazon Connect 管理員網站使用輸入的名稱作為區段`DisplayName`的 ，並根據它產生識別符。當您使用 Customer Profiles API 存取客群時，產生的識別符會用作 `SegmentDefinitionName`。

在說明中，可以輸入客戶客群的說明。

### 步驟 3：檢閱和驗證客群
<a name="spark-sql-step3"></a>

檢閱客群 AI 助理使用的資料，以及產生客群所需的 AI 模型步驟。您也可以檢閱它建立的 SQL，以在查詢編輯器中定義區段。如果無法建立客群，請解決它提供的意見回饋，以協助建立準確的客群。產生客群後，Customer Profiles 會自動為您建立客群預估。

如果您想要進行編輯，您可以按一下「新對話」或在查詢編輯器中建立/編輯 SQL，以提供新的提示。

如果您不是使用客群 AI 助理，您可以驗證查詢，並按一下查詢編輯器下方的「驗證和預估查詢」按鈕來建立預估。

**注意 - 採用 Spark SQL 技術的區段需要一些時間，取決於您在區段中使用的設定檔資料量和使用的 SQL，類似於其他查詢引擎 （例如，跨物件的多個聯結需要一些時間）。**

### 步驟 4：建立客群
<a name="spark-sql-step4"></a>

建立客群並滿足之後，請選取右上角的「建立客群」按鈕。建立客群後，您可以使用流程中的客群和外撥行銷活動中的客群，選取動作 - 匯出至 .csv。

**注意 - 如果您在外撥行銷活動或流程區塊中使用客群，將根據客群上次建立的時間檢查客群成員資格。如果您在執行流程或行銷活動時需要即時區段成員資格檢查，請使用 Classic 分割。**

## 使用對象群組和篩選條件進行傳統分割
<a name="customer-segments-audience-groups-classic-segmentation"></a>

 建立客戶客群時，請選擇起始受眾，並選擇定義客群的篩選條件來縮小該受眾範圍。例如，您可以建立受眾群組，然後選擇所有住在特定國家且經常撥打電話的客戶篩選條件。系統會隨時重新計算客群，例如在行銷活動執行期間、聯絡流程執行期間，以及客群預估或匯出期間。因此，每個客群的大小和成員資格會隨著時間而改變。

 此外，您可以建立第二個受眾群組，然後在兩個受眾群組間建立關係 (AND、OR 或 EXCLUDE)，以進一步縮小、串連或排除第一個受眾群組的客戶。

![\[兩個受眾群組。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-segments-building-segments-1.png)


## 受眾群組
<a name="customer-segments-audience-groups"></a>

 建立客戶客群時，請建立一個或多個受眾群組。受眾群組包含兩個元件：

![\[顯示受眾群組元件的概念圖。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-segments-audience-groups-1.png)

+  **起始受眾**：定義最初使用者的客戶客群。您最多可以指定 5 個起始受眾，或 Customer Profiles 網域中的所有設定檔。
+  **篩選群組**：您針對起始受眾套用的受眾資訊類別。您可以新增多個依 OR 關係連接的篩選條件群組。
+  **篩選條件**：篩選條件可以減少客群的受眾數。您可以儘可能新增篩選條件，使客群符合您的需求。

 客戶客群必須至少有一個受眾群組，但您可以選擇建立第二個受眾群組，然後在兩個受眾群組間建立關係 (AND/OR/EXCLUDE)。如需群組關係的詳細資訊，請參閱 [步驟 5：新增第二個受眾群組 (選用)](#step-5-add-the-second-audience-group-optional)。

## 建立客戶客群
<a name="creating-a-customer-segment"></a>

 以下步驟說明如何建立和設定客戶客群：
+  步驟 1：建立新客群 
+  步驟 2：設定名稱和說明 
+  步驟 3：選擇要納入受眾群組 1 的開始受眾 
+  步驟 4：選擇並設定篩選群組 (選用) 
+  步驟 5：新增受眾群組 2 (選用) 

### 步驟 1：建立新客群
<a name="step-1-build-a-new-segment"></a>

1.  若要建立客群，請確定您已先建立安全性設定檔權限。如需詳細資訊，請參閱[指派管理客戶客群的安全性設定檔權限](security-profile-customer-profile-segmentation.md)。此外，為了以最佳視覺化方式呈現客群成員資格，建議您在建立客群之前先擷取資料。若要透過 S3 或外部應用程式擷取設定檔，請參閱 [建立客戶資料並將其擷取至 Customer Profiles](customer-profiles-object-type-mappings.md) 或 [將外部應用程式與 Amazon Connect Customer Profiles 整合](integrate-external-apps-customer-profiles.md)。

1.  在客戶客群視圖中，選擇**建立客群**。  
![\[建立客群按鈕。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/step-1-build-a-new-segment-1.png)

### 步驟 2：設定名稱和說明
<a name="step-2-configure-specify-name-and-description"></a>
+  針對**名稱**，輸入客群的名稱，以方便稍後輕鬆識別。
**注意**  
 Amazon Connect 管理員網站使用輸入的名稱做為區段`DisplayName`的 ，並根據它產生識別符。當您使用 Customer Profiles API 存取客群時，產生的識別符會用作 `SegmentDefinitionName`。
+  在**說明**中，可以輸入客戶客群的說明。

![\[客群名稱區段。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/step-2-configure-specify-name-and-description-1.png)


### 步驟 3：選擇要納入受眾群組 1 的開始受眾
<a name="step-3-choose-the-starting-audiences-to-include-in-audience-group"></a>

 您需要先選擇如何定義受眾群組的起始受眾。

1.  在**受眾群組 1** 的**起始受眾**下拉式清單下，選取要納入受眾群組的一個或多個客群，或從 **Customer Profiles 的所有設定檔**選擇。
**注意**  
 當您選擇多個客群做為起始受眾時，客群會依 `OR` 關係連接。例如，如果您選擇**付費會員客戶**和**基本會員客戶**客群作為起始受眾，則屬於任一客群的所有設定檔都會納入。  
![\[起始受眾下拉式清單。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/step-3-choose-the-starting-audiences-to-include-in-audience-group-1.png)

1. 若要使用 ProfileType 建立客群，請先使用 **Customer Profiles 的所有帳戶**做為初始受眾。透過這個方式，您可以快速篩選帳戶型設定檔。請務必留意，除非您另有指定，否則客群建立過程會自動匯出客戶設定檔網域中的所有設定檔。此預設行為確保全面涵蓋設定檔，但可以進行調整，以滿足特定需求。

   以下範例顯示如何建立客群定義 (帳戶型設定檔或標準設定檔)：

   **篩選所有帳戶型設定檔 (ProfileType=ACCOUNT\$1PROFILE)**  
![\[篩選所有帳戶型設定檔 (ProfileType=ACCOUNT_PROFILE)。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/step-3-choose-the-starting-audiences-to-include-in-audience-group-1-5.png)
**注意**  
若僅要使用子設定檔建立客群，請建立新的受眾，排除帳戶型設定檔。例如，`ProfileType` 為 PROFILE 或 `ProfileType` 為空白的設定檔。  
![\[若僅要使用子設定檔建立客群，請建立新的受眾，排除帳戶型設定檔。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/step-3-choose-the-starting-audiences-to-include-in-audience-group-1-6.png)

   **以使用 `Phone` 聯絡的帳戶為目標的行銷活動範例**  
![\[以使用 Phone 聯絡的帳戶為目標的行銷活動範例\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/step-3-choose-the-starting-audiences-to-include-in-audience-group-1-7.png)

   在此範例中，行銷活動以具下列呼叫順序的單一帳戶為目標：

   1. 第一次嘗試聯絡 John (ID：2)

   1. 如果 John 沒有接聽，則聯絡 Sally (ID：3) 為後備聯絡人

1.  選擇開始受眾後，**預估受眾**區段會更新，以顯示符合資格的設定檔。編輯受眾群組後，您可以按一下預估受眾區段的**重新整理**按鈕，重新擷取預估值。  
![\[預估受眾區段。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/step-3-choose-the-starting-audiences-to-include-in-audience-group-2.png)

### 步驟 4：選擇並套用客群篩選條件 (選用)
<a name="step-4-choose-and-apply-audience-filters-optional"></a>

 選擇起始受眾之後，您可以將條件式邏輯套用至屬性，進一步縮小受眾範圍。客群支援標準設定檔屬性、自訂設定檔屬性和計算屬性。

![\[受眾篩選條件。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/step-4-choose-and-apply-audience-filters-optional-1.png)


**選擇和設定受眾篩選條件**

1.  針對**屬性**，您可以從以下類型選擇

   1.  **計算屬性** - 根據其中一個計算屬性篩選受眾。

      請參閱 [設定 Amazon Connect Customer Profiles 中的計算屬性](customerprofiles-calculated-attributes.md)，以了解預設計算屬性，以及如何設定自訂計算屬性。

   1.  **標準屬性** – 根據其中一個標準設定檔屬性篩選受眾。

      如需了解全部的標準設定檔屬性，請參閱 [Amazon Connect Customer Profiles 中的標準設定檔定義](standard-profile-definition.md)。

   1.  **自訂屬性** – 根據其中一個自訂設定檔屬性篩選受眾。
**注意**  
我們在網域中儲存最多 1000 個最新的設定檔屬性。如果您的網域含有大量屬性，則最舊的屬性可能不會顯示在此清單中。

1.  選擇**運算子**。運算子決定屬性與您輸入值的關係。以下說明可用的運算子。可用的運算子會根據您所選屬性值類型而有所不同。

[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/customer-segments-building-segments.html)

**注意**  
 Amazon Connect 管理網站中的客戶客群在所有時間型篩選條件中使用 UTC 時區和預設時間 00：00：00 UTC。 您可以篩選日期，但時間會記錄為相同的值。如果您輸入的日期為 2024-01-01，主控台傳遞的時間會是 2024-01-01T00:00:00Z。

**注意**  
當您為計算屬性指定篩選條件時，您可以覆寫計算屬性定義的期間。例如，篩選條件 `Frequent caller is true for the event time period of 60 days` 會覆寫*經常通話者* [Amazon Connect Customer Profiles 中的預設計算屬性](customerprofiles-default-calculated-attributes.md)，以評估過去 60 天的值，而不是[計算屬性定義所設定的期間](customerprofiles-calculated-attributes-apis.md)。此覆寫只適用於客群，不會影響計算屬性定義本身。  

![\[要評估的屬性、運算子和值。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/step-4-choose-and-apply-audience-filters-optional-2.png)


1. 指定值。您可以指定依 `OR` 關係連接的多個值。例如，`Address.Country` 是 `USA` 或 `Mexico`。值輸入會根據網域中的客戶設定檔，在字串運算子的下拉式清單中顯示建議。
**注意**  
值區分大小寫。例如，*Address.Country is US* 會傳回與 *Address.Country is us* 不同的結果。

1.  (選用) 若要將其他屬性套用到此篩選條件群組，請選擇 **\$1 篩選條件**。若要建立另一組篩選條件，請選擇 **\$1 群組**。

**注意**  
 篩選條件群組有多個篩選條件時，篩選條件會依 AND 關係連接。例如，包含 2 個篩選條件的篩選群組：「*Address.Country* 是 USA」和「*客戶的平均保留時間*大於 10 秒」，其 *Address.Country* 是 USA **且***平均保留時間*大於 10 秒的設定檔會屬於該客群。

 當您在對象群組中有多個篩選群組時，管理網站中的客戶客群會使用 OR Amazon Connect 關係在篩選群組之間連線。

![\[兩個受眾篩選條件。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/step-4-choose-and-apply-audience-filters-optional-3.png)


1. 受眾群組設定完成後，請選擇**建立客群**。

### 步驟 5：新增第二個受眾群組 (選用)
<a name="step-5-add-the-second-audience-group-optional"></a>

 選擇是否新增第二個受眾群組，並定義其與受眾群組 1 的關係。當您使用Amazon Connect 管理員網站建立客戶客群時，每個客群最多可以有兩個受眾群組。如果您將第二個受眾群組加入客群，可以選擇一種方式，指定要以什麼方法連接兩個受眾群組：
+  **AND 關係** — 如果您使用 AND 關係來連接兩個受眾，則您的客群會包含符合受眾群組 1 和受眾群組 2 篩選條件的所有設定檔。
+  **OR 關係** — 如果您使用 OR 關係來連接兩個受眾，則您的客群包含符合受眾群組 1 或受眾群組 2 篩選條件的所有設定檔。
+  **EXCLUDE 關係** — 如果您使用 EXCLUDE 關係來連接兩個受眾，則您的客群將包含受眾群組 1 的設定檔，但不包括受眾群組 2 的設定檔。

**設定第二個受眾群組**

1.  設定受眾群組 1 之後，選擇 **AND**、**OR** 或 **EXCLUDE** 關係。  
![\[AND、OR 或 EXCLUDE 選項。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/step-5-add-the-second-audience-group-optional-1.png)

1.  選擇受眾群組 2 的起始受眾。如需參考資訊，請參閱 [步驟 3：選擇要納入受眾群組 1 的開始受眾](#step-3-choose-the-starting-audiences-to-include-in-audience-group)。

1.  (選用) 選擇您要縮小客群範圍的篩選條件。如需參考資訊，請參閱 [步驟 4：選擇並套用客群篩選條件 (選用)](#step-4-choose-and-apply-audience-filters-optional)。

1.  當您完成設定客群後，請選擇**建立客群**。客群已建立，您現在可以在對外行銷活動或流程中使用客群。  
![\[已成功建立客群的訊息。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/step-5-add-the-second-audience-group-optional-2.png)

## 建立採用 Spark SQL 技術的客群
<a name="w2aac36c53c13c17"></a>

採用 Spark SQL 技術的客群可讓您使用完整的客戶設定檔資料和擴充功能來定義客群。您可以使用標準設定檔物件屬性和自訂物件屬性。您也可以使用以 SQL 為基礎的功能，例如將標準和自訂物件結合在一起以使用來自各種物件的資料、使用百分位數等統計資料篩選區段，以及標準化日期欄位以進行比較。

您可以從在客群助理 AI 中輸入自然語言提示開始。客群 AI 助理將定義客群，包括將其轉譯為 Spark SQL。客群助理 AI 將提供定義客群所採取的步驟，而且您可以驗證該客群是否符合您要建立的項目。您也可以檢視 SQL、自然語言的 SQL 步驟，以及 AI 產生的 Spark SQL 摘要，以進一步協助驗證。如果您想要進行變更，您可以更新您的自然語言提示或直接編輯 Spark SQL。

您也可以選擇直接建立 Spark SQL 區段。

Spark SQL 支援的客群可用於客群成員資格呼叫、流程區塊和傳出行銷活動。他們檢查截至上次建立客群的客群 （客群快照）。如果您收到 4XX 錯誤，您將執行客群快照。

**注意**  
**SQL 分割會在具有長達 10 年資料的資料存放區上執行。傳統分割使用最新資料 （過去 3 年更新的資料）**

### 步驟 1：建立新客群
<a name="w2aac36c53c13c17c13"></a>

在客群 AI 助理中，選取「如何建立客群」以取得建立寶貴客群的更多指引，或選取「我想要產生客群」以輸入自然語言提示來建立客群。

或者，使用 SQL 在查詢編輯器中定義新區段。

### 步驟 2：設定名稱和說明
<a name="w2aac36c53c13c17c15"></a>

針對名稱，輸入客群的名稱，以方便稍後輕鬆識別。

**注意**  
Amazon Connect 管理網站使用輸入的名稱做為區段`DisplayName`的 ，並根據它產生識別符。當您使用 Customer Profiles API 存取客群時，產生的識別符會用作 `SegmentDefinitionName`。

在說明中，可以輸入客戶客群的說明。

### 步驟 3：檢閱和驗證客群
<a name="w2aac36c53c13c17c17"></a>

檢閱客群 AI 助理使用的資料，以及產生客群所需的 AI 模型步驟。您也可以檢閱它建立的 SQL，以在查詢編輯器中定義區段。如果無法建立客群，請解決它提供的意見回饋，以協助建立準確的客群。產生客群後，Customer Profiles 會自動為您建立客群預估。

如果您想要進行編輯，您可以按一下「新對話」或在查詢編輯器中建立/編輯 SQL 來提供新的提示。

如果您不是使用客群 AI 助理，您可以驗證查詢，並按一下查詢編輯器下方的「驗證和預估查詢」按鈕來建立預估。

**注意**  
採用 Spark SQL 技術的區段需要一些時間，具體取決於您在區段中使用的設定檔資料量和使用的 SQL，類似於其他查詢引擎 （例如，跨物件的多個聯結通常需要更多時間）。

### 步驟 4：建立客群
<a name="w2aac36c53c13c17c19"></a>

建立客群並滿足之後，請選取右上角的「建立客群」按鈕。建立客群後，您可以使用流程中的客群和外撥行銷活動中的客群，選取動作 - 匯出至 .csv。

**注意**  
如果您在外撥行銷活動或流程區塊中使用客群，將根據客群上次建立的時間來檢查客群成員資格。如果您在執行流程或行銷活動時需要即時區段成員資格檢查，請使用 Classic 分割。

# 在 Amazon Connect 中管理客戶客群
<a name="customer-segments-managing-segments"></a>

 您可以透過Amazon Connect 管理員網站，為客戶客群建立、檢視、複製和執行其他管理任務。如果開啟客戶客群檢視其設定，您也可以快速建立使用該客群的行銷活動。如需了解如何建立客群，請參閱《 Amazon Connect 開發人員指南》中的 [在 Amazon Connect 中建置客戶客群](customer-segments-building-segments.md)。

**若要管理客戶客群**

1.  在**客戶客群**頁面上，前往您要管理的客群，或選擇動作。

![\[客戶客群頁面，客群清單。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-segments-managing-segments-1.png)


1.  在**動作**功能表上，您可以使用下列選項：

   1.  **檢視詳細資訊** — 選擇此選項以顯示客戶客群相關資訊，包括客群的建立日期和時間，以及上次更新客群的日期和時間。Amazon Connect 使用者需具備 **CustomerProfiles.Segments.View** 安全性設定檔權限才能執行此動作。

   1.  **複製** – 選擇此選項，以複製所選客群來建立新客群。然後，您可以修改新客群的任何設定，而不變更原始客群。 Amazon Connect 使用者需要 **CustomerProfiles.Segments.Create** 安全性描述檔許可才能執行此動作。

   1.  **匯出 CSV** – 選擇此選項，在您的電腦上將客戶客群匯出成檔案。如需更多詳細資訊，請參閱 [在 Amazon Connect 中將客戶客群匯出至 CSV 檔案](customer-segments-exporting-segments.md)。 Amazon Connect 使用者需具備 **CustomerProfiles.Segments.Export** 安全性設定檔權限，才能執行此動作。

   1.  **刪除** – 選擇此選項，永久刪除客戶客群。刪除客群後就無法復原。  Amazon Connect 使用者需要 **CustomerProfiles.Segments.Delete** 安全性描述檔許可才能執行此動作。

**重要**  
 如果刪除客群，所有使用該客群的作用中行銷活動都會失敗。同理，任何基於該客群建置的客群都會停止運作。刪除某個客群之前，建議您先確認沒有任何作用中的行銷活動或其他客群正在使用該客群。

# 從 Amazon Connect 中的匯入檔案建立客群
<a name="customer-segments-imported-files"></a>

**注意**  
若要存取 Amazon Connect 管理員網站上的分段建置器體驗，請確定已設定適當的安全性設定檔許可。如需詳細資訊，請參閱[指派管理客戶客群的安全性設定檔權限](security-profile-customer-profile-segmentation.md)。

客戶客群匯入會使用包含設定檔資料的 CSV 檔案，來建立新的設定檔或更新現有設定檔，然後分為客群。CSV 檔案的大小必須低於 1GB，並包含映射至標準設定檔屬性的有效標頭。

以下步驟說明如何建立和設定匯入的客戶客群：

1. [建立新客群](#create-new-segment)

1. [上傳 CSV 檔案](#upload-csv-file)

1. [設定客群詳細資訊](#configure-segment-details)

1. [映射客戶屬性](#map-customer-attributes)

1. [設定設定檔過期日期](#set-profile-expiry)

1. [建立和監控客群匯入](#create-monitor-segment-import)

## 建立新客群
<a name="create-new-segment"></a>

1. 若要建立客群，請確定您已先建立安全性設定檔權限。如需詳細資訊，請參閱[指派管理客戶客群的安全性設定檔權限](security-profile-customer-profile-segmentation.md)。

1. 在 Amazon Connect 管理員網站中，導覽至 **Customer Profiles****Customer 客群**

1. 選擇**建立客群**，然後從下拉式清單選取**從檔案上傳**

## 上傳 CSV 檔案
<a name="upload-csv-file"></a>

透過下列任一方式選擇 CSV 檔案：
+ 選擇**選擇檔案**並選取您的檔案。
+ 將檔案拖放至上傳區域。

檔案必須是：
+ CSV 格式
+ 小於 1GB
+ 包含標頭
+ UTF-8 編碼

## 設定客群詳細資訊
<a name="configure-segment-details"></a>

針對**名稱**，為您的客群指定可供辨識的識別符。此欄位為必填。
+ 只使用字母 (a-z、A-Z)、數字 (0-9)、破折號 (-) 或底線 (\$1)
+ 以字母或數字開頭 (不能以底線開頭)
+ 長度上限為 255 個字元

**注意**  
 Amazon Connect 管理員網站使用此名稱做為區段`DisplayName`的 ，並產生唯一的`SegmentDefinitionName`識別符。透過 Amazon Connect Customer Profiles API 存取客群時，會使用此識別符。

針對**說明** (選用)，新增客群詳細資訊：
+ 長度上限為 1000 個字元

## 映射客戶屬性
<a name="map-customer-attributes"></a>

物件類型映射會定義 Customer Profiles 如何處理 CSV 資料。此映射：
+ 決定 CSV 資料如何填入標準設定檔物件。
+ 指定要為設定檔指派編製索引的欄位。

如需有關物件類型映射的詳細資訊，請參閱 [建立客戶資料並將其擷取至 Customer Profiles](customer-profiles-object-type-mappings.md)。

選擇下列其中一個選項，將您的 CSV 欄映射至 Customer Profiles 屬性：

### 選項 1：AI 支援的映射 (建議)
<a name="ai-powered-mapping"></a>

1. 選擇**產生客戶屬性**，然後選擇**下一步**。

1. 系統會分析您的 CSV 標頭，並建議對標準設定檔屬性進行適當映射。

1. 檢閱建議的映射。

1. 選用：自訂映射：
   + 修改標準設定檔屬性映射。
   + 使用 `Attributes.attribute-name` 格式新增自訂屬性。
   + 更新唯一識別符。

### 選項 2：手動映射
<a name="manual-mapping"></a>

1. 將每個 CSV 欄標頭映射至設定檔屬性：
   + 使用標準設定檔屬性。如需完整清單，請參閱 [Amazon Connect Customer Profiles 中的標準設定檔定義](standard-profile-definition.md)。
   + 使用 `Attributes.attribute-name` 格式建立自訂屬性。
**注意**  
您最多可以映射 25 個屬性。

1. 選擇一個映射屬性作為客戶識別符 (唯一索引鍵)。

### 選擇客戶識別符
<a name="select-customer-identifier"></a>

完成映射後，選擇一個映射屬性作為客戶識別符。Amazon Connect Customer Profiles 使用此識別符來：
+ 建立新的設定檔或更新現有設定檔。
+ 配對傳入資料和現有設定檔。

**注意**  
無論使用 AI 支援的映射或手動映射，您都可以在設定期間隨時修改屬性映射。

## 設定設定檔過期日期
<a name="set-profile-expiry"></a>

指定匯入設定檔的過期日期：

1. 選擇過期選項：
   + 預設：自匯入日期起 14 天
   + 自訂：使用日期選擇器選取日期

1. 如果自訂過期日期：
   + 下限：匯入後 1 天
   + 上限：匯入後 90 天

Customer Profiles 會從客群和設定檔網域移除過期的設定檔。

**注意**  
選擇符合您資料保留需求的過期日期。選取自訂日期前，請判斷預設的 14 天期間是否符合您的商業需求。

## 建立和監控客群匯入
<a name="create-monitor-segment-import"></a>

**建立客群**

1. 檢閱您的組態。

1. 選擇**建立客群**。

1. 系統會：
   + 上傳您的 CSV 檔案。
   + 根據資料建立/更新設定檔。
   + 將設定檔分組到客群中。
   + 透過通知橫幅顯示進度。

監控匯入進度
+ 在客群詳細資訊頁面上檢視匯入進度。
+ 通知橫幅顯示正在進行匯入任務。
+ 匯入任務詳細資訊表會顯示：
  + 檔案名稱
  + 匯入任務建立日期
  + 匯入任務完成日期
  + 處理的設定檔數量
  + 成功匯入的數量
  + 匯入失敗的數量
+ 您可以在匯入進行時取消匯入。
+ 匯入任務仍在進行時，該客群可用於行銷活動。

**注意**  
匯入的客群可以像任何其他客群一樣，用於對外行銷活動或在匯入完成後匯出。您可以從客群詳細資訊頁面檢視客群詳細資訊，包括匯入狀態和結果。

# 在 Amazon Connect 中將客戶客群匯出至 CSV 檔案
<a name="customer-segments-exporting-segments"></a>

 從  Amazon Connect 管理員網站上的**客戶客群**頁面，您可以將現有客群匯出至電腦上的檔案。當您執行此操作 時，Customer Profiles 會將與客戶客群中描述檔相關聯的所有描述檔屬性匯出至 CSV 檔案。

**匯出客戶客群**

1.  在客戶客群頁面上，從動作下拉式清單選擇**匯出 CSV**。

![\[客戶客群頁面，匯出 CSV 選項。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-segments-exporting-segments-1.png)


或者，您可以前往**檢視詳細資訊**頁面，然後選擇**下一步動作**、**下載**。

![\[客群的詳細資訊頁面，下一步動作選項。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-segments-exporting-segments-2.png)


**注意**  
 Amazon Connect 管理員網站支援匯出最多包含 350，000 個設定檔的客戶客群。如果您需要匯出包含大量設定檔的客群，請使用 Customer Profiles API 的 `CreateSegmentSnapshot` 操作。`CreateSegmentSnapshot` 操作支援將 ORC、JSONL 和 CSV 檔案中的客群匯出至 S3 儲存貯體。請留意，除了儲存貯體中的匯出客群之外，API 還會輸出測試檔案。

1. 匯出任務開始之後，請保持下載視窗或索引標籤開啟，直到完成為止。

![\[顯示正在匯出客群的訊息。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-segments-exporting-segments-3.png)


1. 匯出任務完成後， Amazon Connect 管理員網站會自動開始下載 檔案。

![\[顯示已成功下載客群的訊息。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-segments-exporting-segments-4.png)


 匯出的 CSV 檔案包含跨匯出設定檔填入的所有[標準和客戶設定檔屬性](https://docs.aws.amazon.com/connect/latest/adminguide/standard-profile-definition.html)。

# 在 Amazon Connect 中使用客群 AI 助理
<a name="customer-segments-ai-assistant"></a>

 Amazon Connect Customer Profiles 支援生成式 AI 客群，讓不具相關技術的商業使用者能夠使用自然語言查詢 ([客群 AI 助理](#generating-a-segment-by-prompt)) 來建置受眾，並根據客戶資料中的趨勢 ([用於建立客群的靈感卡](#inspiration-cards-for-segment-creation)) 接收建議。這些功能利用 [Amazon Bedrock](https://aws.amazon.com/bedrock/) 的進階 AI 演算法，協助您進行主動和個人化推廣，來提高客戶滿意度和收入。例如，您可以建立一個客戶客群，他們上週經常透過個人化服務優惠，聯絡客戶支援中心。您也可以識別總支出增加的客戶，並提供個人化折扣、培養忠誠度並推動成長。

 將生成式 AI 整合到客群工作流程中，可享有下列優點：
+  **簡化客群建立**：使用對話式語言建立複雜的客戶客群，讓不具相關技術的使用者可以應用此過程並提高效率。
+  **資料驅動型客群建立靈感**：根據客戶資料中的趨勢，接收 AI 客群靈感。
+  **提升個人化程度：**輕鬆識別並鎖定特定客戶群組，以提供量身打造的通訊和優惠服務。

 以下章節說明每項功能、如何使用這些功能，及其提供的優勢，以協助您改善客戶客群相關工作。

**注意**  
若要使用客群 AI 助理，使用者需具備建立客群的權限 **CustomerProfiles.Segments.Create**。
雖然這些採用 AI 的工具會提供寶貴的建議，但請務必檢閱和調整建議的客群，以確保客群符合組織的特定商業目標，並符合其資料使用政策。

## 用於建立客群的靈感卡
<a name="inspiration-cards-for-segment-creation"></a>

靈感卡是**客戶客群**頁面上的 AI 功能。這項功能可以簡化和增強建立客群的程序。以圖顯示三個靈感卡的範例。

![\[客戶客群頁面上的靈感卡範例。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/inspiration-cards-for-segment-creation-1.png)


這些卡片每次都會根據 Amazon Connect Customer Profile 資料，產生最多三類客群想法，以提供靈感和簡化客群建立程序。  

**注意**  
趨勢資料是根據預設計算屬性的事件擷取日期。

 **主要功能** 
+  **資料驅動的靈感**：每張靈感卡都針對特定客戶資料和趨勢，提供量身打造的客群想法。
+  靈感卡提供三個聚焦於業務的想法：
  +  **促銷**：以特定促銷策略瞄準目標客戶的想法。
  +  **保留**：識別保留客戶的客群。
  +  **支援**：強調可能需要特別關注客戶服務的客戶群組。
+  **基於深入分析的建議**：利用歷史趨勢、資料深入分析和生成式 AI，來建立有意義且可以轉化為實際行動的深入分析。

 **如何使用靈感卡** 

1.  前往**客戶客群**頁面。

1.  找到靈感卡區段。其中會顯示三個客群建議。

1.  檢閱每張卡片，了解其所提議的客群及其潛在應用。

1.  找到您要使用的卡片時，選擇該卡片上的**開始**。

1.  選擇**探索更多**，產生更多靈感卡。這些卡片可以根據您的 Amazon Connect Customer Profiles 資料，提供全新的客群想法。

1.  選擇**開始**時，系統會自動將您導向**建立客群**頁面。

1.  您選擇的客群想法會填入客群建置器，準備好供您檢閱和細修。

## 使用自然語言提示產生客群
<a name="generating-a-segment-by-prompt"></a>

 客群 AI 助理提供了使用自然語言提示建立客群的引導方法，可以簡化建立複雜客群的過程，讓您以自然語言說明目標受眾，並接收結構化且可轉化為實際行動的客群定義。

下圖顯示客群 AI 助理提示的範例。

![\[客群 AI 助理提示的範例。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/generating-a-segment-by-prompt-1.png)


 **若要使用此功能：**

1.  前往**客戶客群**頁面，然後選擇**建立客群**。

1.  找到頁面右側的客群 AI 助理面板，如下圖所示。

![\[頁面右側的客群 AI 助理面板範例。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/generating-a-segment-by-prompt-2.png)


 **使用客群 AI 助理** 

1.  助理會引導使用者完成一系列問題，以了解其客群需求；與助理的所有互動路徑都會產生提示。

1.  使用者可以提供所需客群的文字說明。

1.  提示動作步驟會提供範例提示，作為撰寫詳細說明的參考。

1.  Amazon Connect 會根據您輸入的內容，產生結構化客群定義。

1.  其產生的客群定義會自動套用至客群建置器。

1.  您可以使用標準客群建置器工具，進一步精修其產生的客群。客群建置器上的篩選條件變更會覆寫先前產生的現有條件。  

1.  檢閱產生的客群並進行任何必要調整後，您可以選擇**建立客群**來完成此程序。這個動作會儲存您的客群，並使其可用於您的行銷活動。

 **最佳實務** 

 當您使用客群 AI 助理時，請留意下列最佳實務：
+  撰寫詳細說明。當您使用現有屬性的名稱時，客群 AI 助理可以產生更準確的條件。
+  請確定您參考的所有屬性都在您的網域中。
+  從簡單的提示開始，然後再嘗試不同的提示。如果您在第一次嘗試時沒收到理想內容，請重寫您的提示。提交新的提示或選擇**新對話**都會取代現有條件。
+  預留在客群建置器上精修和確認客群的時間，以確保客群準確反映您的實際資料值。

**注意**  
客群 AI 助理旨在使用一般說明和條件。描述客群時，請務必遵守資料保護法規和公司政策，確保您的提示和描述不包含任何敏感或個人資訊。  

## 針對產生的客群提供意見回饋
<a name="providing-feedback-on-generated-segments"></a>

 產生客群後，建議使用者評估該功能的表現，並提供意見回饋。意見回饋機制有助於改善客群產生程序，並確保有效滿足業務需求。下圖顯示意見回饋頁面。

![\[說明已記錄意見回饋的訊息範例。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/providing-feedback-on-generated-segments-1.png)


 意見回饋包含兩個步驟：

1.  **初始反應**：您會在提醒區段的右下角，看到拇指向上和拇指向下圖示。點選其中一個圖示，表示您對所產生客群的整體滿意度。

1.  **其他意見回饋**：選取拇指向上或拇指向下圖示後，您會看到一個選項，可以提供更詳細的意見回饋。這是文字輸入形式的欄位，您能以自由格式留下意見。

 鼓勵您同時透過初始反應 (姆指向上/向下) 和文字進行全面評估，適用時提供特定範例或使用案例、聚焦於產生的客群如何貼近業務目標，並提出改進或其他功能建議，以改善客群產生過程。

 可以改善客群產生過程的改進或其他功能建議。

 使用者若主動參與意見回饋，將有助於持續改進客群產生功能，最終達成更有效的分眾和目標行銷策略。

## 錯誤處理
<a name="customer-segments-ai-error-handling"></a>

使用客群 AI 助理產生客戶客群時，您可能會遇到錯誤訊息，指出：**我們現在無法處理您的要求。**即使向客群建立程序提供有效提示，也可能發生此錯誤。

下圖顯示此錯誤訊息範例。

![\[Amazon Connect 無法處理您的要求的錯誤訊息範例。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-segments-ai-error-handling-1.png)


 下列步驟可以協助您了解並解決此錯誤。

 **可能原因：**
+  **高系統負載**：客群 AI 助理可能遇到高需求負載，或需同時處理多個要求。
+  **服務暫時中斷**：服務可能中斷，暫時無法處理新的客群要求。
+  **複雜查詢**：系統可能需要更多時間，來處理特別複雜或資源密集的客群查詢。

 **處理方式：**
+  **等待並重試**：錯誤訊息建議等待數分鐘，然後再試一次。這讓系統有時間解決任何暫時問題。
+  **手動建立客群**：如果您需要立即建立客群，您可以選擇使用客群建置器，手動建立客群 

 **如何重試：**

1.  請等待數分鐘。

1.  選擇聊天介面底部的**新對話**。

1.  開始新對話，然後重新輸入您的客群建立提示。

 **最佳實務** 
+  如果多次嘗試後仍未解決錯誤，請嘗試簡化您的客群條件，或將其切割為更小、更易處理的要求。
+  避免在短時間內連續提出重複的要求，因為這可能導致系統過載。
+  如果問題持續發生，請聯絡客戶支援中心，取得進一步協助。

 請留意，此錯誤通常只是暫時性的。只要遵循所提供指示，您應能成功建立所需客群。

## 已知限制
<a name="customer-segments-ai-known-limitations"></a>

 若要有效使用客群 AI 助理，就必須了解資料處理生命週期。本節概述商業使用者在不同資料整合階段可能遇到哪些情況，以及該情況如何影響客群建議。

 **資料處理和品質影響：**客群 AI 助理分為兩個主要階段：初始資料擷取和後製處理。在初始擷取期間，系統可能無法充分利用實際屬性值，而更依賴於提示解譯。例如，*VIP 客戶*的提示可能會建議 *VIP* 客群，而不是使用資料中現有的*黃金*等級。處理完成後，系統會利用實際的屬性值來產生更準確的客群、減少對提示解譯的依賴，並改善整體客群品質。

**注意**  
在仰賴更進階的功能之前，請預留足夠時間完成資料處理。定期更新客戶設定檔資料。客群準確性取決於 Amazon Connect Customer Profiles 中客戶資料的完整性和準確性。系統會在其回應中標記任何缺少的屬性。

 **系統效能：**在高負載期間，可能會延遲產生客群。系統已針對一般工作負載進行最佳化，但具大量分眾需求的企業可能需相應調整其程序。

 **屬性可用性**：產生的客群品質取決於 Amazon Connect Customer Profiles 中可用的客戶資料。如果有越全面且嶄新的客戶設定檔資料，系統在解譯提示和定義相關客群時就越準確。如果缺少某個屬性，我們將傳回缺少該屬性的訊息。  

 **提示複雜性**：對於非常複雜或細微的客群定義，自然語言處理可能有所限制。客戶應從相對直接的提示開始，並在獲得功能體驗後逐漸提高複雜度。

 **客群精修**：雖然系統產生的客群是很好的起始點，客戶仍可能想檢閱和精修詳細資訊，確保客群完全貼合其業務目標。初始產生後，您可以在分眾介面完全自訂客群。

 **效能和擴展**：高負載並行時，由於語言模型需要處理每個提示，因此客群產生過程中可能出現延遲。系統旨在處理一般的分眾工作負載，但具有極高分眾需求的客戶可能需相應調整其工作流程 

# 疑難排解 Amazon Connect 中的客戶客群
<a name="customer-segments-troubleshooting"></a>

## 左側導覽面板沒有客戶客群選項
<a name="customer-segments-does-not-exist-in-the-left-navigation-panel"></a>

 如果 Amazon Connect 管理員網站左側導覽面板中不存在**客戶客群**選項，請檢查使用者的安全性描述檔是否具有**客戶客群 - 檢視**許可。 如需詳細資訊，請參閱 [指派管理客戶客群的安全性設定檔權限](security-profile-customer-profile-segmentation.md)。更新權限後，請重新整理Amazon Connect 管理員網站頁面以反映變更。

## 匯出 CSV 按鈕無法使用，或匯出任務逾時
<a name="export-csv-button-not-available-or-export-job-timed-out"></a>

 Amazon Connect 管理員網站不支援匯出包含超過 350，000 個設定檔的客群。或者，建議您透過命令列參考 (CLI) 或 SDK，使用 `CreateSegmentSnapshot` API 將這類客群匯出至 Amazon S3 儲存貯體。

## 錯誤：您達到 60 個唯一屬性限制
<a name="error-you-reached-the-limit-of-20-unique-attributes"></a>

 客群定義中唯一屬性的數量超過配額時，就會發生此錯誤。唯一屬性的數量是包括以遞迴方式計算起始受眾得出的。

**解決方案**
+  移除客群定義中的受眾篩選條件，或移除包含受眾篩選條件的起始受眾，以減少唯一屬性的數量。
+  [要求提高服務配額](https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html) - 客群中唯一屬性的數量上限  

 如需預設服務配額的詳細資訊，請參閱 [Amazon Connect Customer Profiles 服務配額](https://docs.aws.amazon.com/general/latest/gr/connect_region.html#limits_customer_profiles)。

## 錯誤：您達到 10 個唯一計算屬性限制
<a name="error-you-reached-the-limit-of-1-unique-calculated-attribute"></a>

 客群定義中唯一計算屬性的數量超過配額時，就會發生此錯誤。唯一計算屬性的數量是包括以遞迴方式計算起始受眾得出的。

**解決方案**
+  移除客群定義中計算屬性的受眾篩選條件，或移除包含計算屬性的受眾篩選條件的起始受眾，以減少唯一計算屬性的數量。
+  [要求提高服務配額](https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html) - 客群中唯一計算屬性的數量上限。

 如需預設服務配額的詳細資訊，請參閱 [Amazon Connect Customer Profiles 服務配額](https://docs.aws.amazon.com/general/latest/gr/connect_region.html#limits_customer_profiles)。

## 錯誤：您達到起始受眾的 5 個深度限制
<a name="error-you-reached-the-limit-of-5-depth-of-starting-audiences"></a>

當起始受眾深度超過配額時，就會發生此錯誤。深度是以遞迴方式針對受眾群組中的所有起始受眾計算得出的。例如，如果您選取客群「符合資格的租賃升級」作為起始受眾，而客群「符合資格的租賃升級」具有另一個客群作為起始受眾，則深度將為 2。

**解決方案**
+ 移除受眾群組中包含深度巢狀起始受眾的一個或多個起始受眾。

如需預設服務配額的詳細資訊，請參閱 [Amazon Connect Customer Profiles 服務配額](https://docs.aws.amazon.com/general/latest/gr/connect_region.html#limits_customer_profiles)。

# 在 Amazon Connect Customer Profiles 中設定 Profile Explorer
<a name="customer-profiles-profile-explorer"></a>

Amazon Connect Customer Profiles Explorer 是動態且全面的儀表板，可提供 360 度全方位的客戶檢視。這個儀表板整合了片面的客戶資料，讓組織可以自訂資料顯示、追蹤互動，並將客戶資訊轉換為可據以採取行動的深入分析，以推動商業價值和客戶忠誠度。旅遊和住宿等產業的組織可以使用 Profile Explorer，透過這種直覺式介面，更全面地了解客戶並和客戶互動。
+ 同時使用多個識別符 (電子郵件、電話、預訂參考等) 搭配即時搜尋結果，**立即尋找客戶**。
+ **自訂視圖**，以針對特定業務需求排定最相關資訊的優先順序，並設計網域特定配置，強調由您定義的最相關客戶資料。
+ 使用互動式視覺化和資料顯示，來**存取完整的客戶內容**，包括人口統計資料、通訊歷史記錄、行為互動和客群成員資格。
+ 以強調關鍵模式和個人化行為推論的客戶摘要，**善用 AI 深入分析**。

![\[Profile Explorer 儀表板。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/customer-profiles-profile-explorer-1.png)


**Topics**
+ [啟用 Profile Explorer](enabling-profile-explorer.md)
+ [開始使用](getting-started-profile-explorer.md)
+ [配置定義](layout-definition.md)
+ [將 Profile Explorer 新增至客服人員工作區](add-profileexplorer-to-agentworkspace.md)

# 啟用 Profile Explorer
<a name="enabling-profile-explorer"></a>

您可以透過下列步驟，為管理員和使用者啟用 Profile Explorer。此過程需要配置組態和檢視存取權的設定權限。

**Topics**
+ [讓管理員定義配置](#enable-administrators-define-layout)
+ [讓使用者檢視 Profile Explorer](#enable-users-view-profile-explorer)
+ [確認設定](#verify-setup)

## 讓管理員定義配置
<a name="enable-administrators-define-layout"></a>

管理員需具備特定權限，才能建立和編輯 Profile Explorer 配置：
+ 將下列權限指派至 Profile Explorer 安全性設定檔：
  + **Profile Explorer - 編輯**：允許修改現有 Profile Explorer 配置。
  + **Profile Explorer - 建立**：啟用建立 Profile Explorer 配置。
  + **Profile Explorer - 檢視**：啟用存取權，以檢視已設定的 Profile Explorer 配置。  
![\[新增權限，以允許使用者建立、編輯和檢視 Profile Explorer 配置。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/enable-administrators-define-layout-1.png)

## 讓使用者檢視 Profile Explorer
<a name="enable-users-view-profile-explorer"></a>

使用者需具備適當權限，才能存取 Profile Explorer 配置並與之互動：
+ 將下列權限指派至 Profile Explorer 安全性設定檔：
  + **Profile Explorer - 檢視**：啟用存取權，以檢視已設定的 Profile Explorer 配置。  
![\[新增權限，以允許使用者檢視 Profile Explorer 配置。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/enable-users-view-profile-explorer-1.png)

## 確認設定
<a name="verify-setup"></a>

若要確認是否能成功啟用 Profile Explorer：

以管理員身分登入，以確認您可以：
+ 存取 Profile Explorer 頁面。
+ 建立和修改您的 Profile Explorer 配置。

以一般使用者身分登入，以確認您可以：
+ 存取 Profile Explorer。
+ 檢視 Profile Explorer 配置。
+ 使用已啟用的功能。

# 開始使用 Amazon Connect Customer Profiles Profile Explorer
<a name="getting-started-profile-explorer"></a>

開始使用 Profile Explorer，並了解介面的基本概念。

**Topics**
+ [配置控制](layout-controls.md)
+ [編輯您的 Explorer 配置](editing-explorer-layout.md)
+ [儲存您的 Explorer 配置](saving-explorer-layout.md)

# 配置控制
<a name="layout-controls"></a>

![\[新增權限，以允許使用者檢視 Profile Explorer 配置。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/layout-controls-1.png)


Profile Explorer 歡迎主控台。

1. 編輯索引標籤

1. 新增小工具

1. 配置動作

## 編輯索引標籤
<a name="edit-tabs"></a>

透過索引標籤控制項，將儀表板有邏輯地組織到各區段：
+ **1a. 新增索引標籤**：建立新的索引標籤，以區隔不同的客戶資料層面
+ **1b. 移除索引標籤**：從您的配置中刪除不必要的索引標籤
+ **1c. 重新命名索引標籤**：自訂索引標籤名稱，以反映其內容
+ **1d. 重新排序索引標籤**：拖放索引標籤，以按照您偏好的順序排列

![\[編輯彈出索引標籤。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/layout-controls-2.png)


## 新增小工具
<a name="add-widgets"></a>

以各種資料視覺化小工具，增強您作用中的索引標籤：

### 可用的小工具
<a name="available-widgets"></a>
+ 預設小工具
  + [生成式 AI 摘要](default-widgets.md#generative-ai-summary)
  + [客戶資訊](default-widgets.md#customer-information)
  + [計算屬性](default-widgets.md#calculated-attribute)
  + [聯絡人](default-widgets.md#contacts)
  + [案例](default-widgets.md#cases-cp)
  + [訂單](default-widgets.md#orders-cp)
  + [資產](default-widgets.md#assets-cp)
+ 自訂小工具
  + [資料表](custom-widgets.md#table-widget)
  + [鍵值對](custom-widgets.md#key-value-pair)
  + [金鑰指標](custom-widgets.md#key-metric)
  + [甜甜圈圖](custom-widgets.md#donut-chart)

只需選取您要使用的小工具，然後開始探索

## 配置動作
<a name="layout-actions"></a>

管理儀表板整體組態：
+ **儲存配置**：保留您目前的儀表板組態

![\[儲存配置彈出視窗。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/layout-controls-3.png)


**注意**  
在您儲存變更之前，所有變更都處於草稿階段。

# 編輯您的 Explorer 配置
<a name="editing-explorer-layout"></a>

透過簡單、直覺式的控制項來自訂您的 Profile Explorer 配置，以管理小工具及其配置。

## 小工具控制項
<a name="widget-controls"></a>

每個小工具在右上角都有一個三點功能表，提供兩個主要選項：
+ **1A 編輯**：開啟該特定小工具的組態面板
+ **1B 移除**：從您的配置中刪除小工具

![\[編輯或移除 Explorer 配置的彈出視窗。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/widget-controls-1.png)


## 自訂小工具
<a name="widget-customization"></a>
+ **拖放**：在儀表板的任何位置上重新放置小工具
+ **調整大小**：選擇並拖曳小工具邊界，以調整維度
+ **組態**：透過每個小工具類型的編輯面板，存取詳細設定

![\[在 Explorer 配置中自訂和重新排序小工具。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/widget-customization-1.png)


**注意**  
每個小工具類型都有唯一的組態選項。如需特定小工具設定的詳細資訊，請參閱小工具文件。

## 新增小工具
<a name="adding-new-widgets"></a>

若要將新元件新增至配置，請使用控制面板的**新增小工具**按鈕。

# 儲存您的 Explorer 配置
<a name="saving-explorer-layout"></a>

如何儲存和管理 Profile Explorer 配置組態。

## 配置持久性
<a name="layout-persistence"></a>

您必須儲存 Profile Explorer 配置的變更，以保留變更內容。離開頁面或重新整理瀏覽器時，未儲存的變更會遺失。

## 預設配置
<a name="default-layout"></a>

每個 Profile Explorer 實作都包含一個預設配置。預設配置可作為組織的基本組態，並可根據需要修改。

## 儲存變更
<a name="saving-changes"></a>

若要儲存配置變更：

1. 在配置動作功能表選擇**儲存**。

1. 在儲存對話方塊中確認您的變更。

1. 儲存完成後，所有使用者的配置都會更新。

![\[在 Explorer 配置中儲存配置對話方塊。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/saving-changes-1.png)


**注意**  
需要適當權限才能儲存配置變更。如需所需許可的詳細資訊，請參閱[啟用 Profile Explorer](enabling-profile-explorer.md)。

# 配置定義
<a name="layout-definition"></a>

了解 Profile Explorer 配置的結構和元件。

**Topics**
+ [運作方式](how-it-works.md)
+ [小工具](widgets.md)

# 運作方式
<a name="how-it-works"></a>

Profile Explorer 提供各種小工具來顯示客戶資訊，配置會儲存為 JSON 定義，代表儀表板的完整結構和組態。視覺化配置中的每個小工具和元件都對應至此定義中的特定 JSON 區塊。

## 核心元件
<a name="core-components"></a>

配置定義中的每個元件都由五個常見元素組成：
+ **類型**
  + 定義元件類別
  + 決定元件的轉譯方式
  + 範例：BoardItem、Table、KeyValuePair
+ **Id**
  + 每個元件的唯一識別符
  + 用於追蹤和更新元件
  + 在建置器中建立元件時會自動產生
+ **屬性**
  + 元件特定屬性
  + 控制外觀和行為
  + 包含組態設定
+ **子系**
  + 巢狀元件或內容
  + 定義階層關係
  + 可以包含多個子元件
+ **DataSource**
  + 指定資料來源
  + 定義資料擷取參數
  + 控制元件的資料繫結

## 配置元件定義範例
<a name="example-layout-component-definition"></a>

以下是儀表板資料表元件的範例 JSON 結構：

```
{
    "Id": "unique-identifier",
    "Type": "BoardItem",
    "Props": {},
    "Children": [
        {
            "Id": "unique-identifier",
            "Type": "Table",
            "Props": {},
            "Children": [
                {
                    "Id": "unique-identifier",
                    "Type": "TextContent",
                    "Props": {},
                    "Children": ["string"]
                }
            ]
        }
    ],
    "DataSource": [
        {
            "Type": "source-type",
            "Params": {}
        }
    ]
}
```

## 動態資料組態
<a name="dynamic-data-configuration"></a>

Profile Explorer 使用範本表達式，在您的元件中動態存取和顯示 Customer Profiles 資料。

### 單一值支援
<a name="single-value-support"></a>

對於金鑰值對和金鑰指標等元件，您可以存取：

#### 標準設定檔資訊
<a name="standard-profile-information"></a>

```
{{Customer.<StandardProfileInfo>}}
```

使用範例：
+ `{{Customer.FirstName}}`
+ `{{Customer.LastName}}`
+ `{{Customer.PhoneNumber}}`

#### 計算屬性
<a name="calculated-attributes"></a>

```
{{Customer.CalculatedAttributes.<attributeDefinitionName>}}
```

使用範例：
+ `{{Customer.CalculatedAttributes._cases_count}}`
+ `{{Customer.CalculatedAttributes._new_customer}}`

### 表格式資料支援語法
<a name="tabular-data-support-syntax"></a>

#### 計算屬性
<a name="calculated-attributes-tabular"></a>

```
{{Customer.CalculatedAttributes.DisplayName}}
```

```
{{Customer.CalculatedAttributes.CalculatedAttributeDefinitionName}}
```

#### 客群
<a name="segments"></a>

```
{{Customer.CalculatedAttributes.DisplayName}}
```

```
{{Customer.CalculatedAttributes.SegmentDefinitionName}}
```

#### 設定檔物件
<a name="profile-objects"></a>

```
{{Customer.ObjectAttributes.<objectTypeName>.<fieldName>}}
```

**使用範例**：
+ `{{Customer.ObjectAttributes.CTR.contactId}}`
+ `{{Customer.ObjectAttributes.Order.orderId}}`

### 實作範例
<a name="implementation-examples"></a>

#### 單一值元件
<a name="single-value-component"></a>

```
{
    "Type": "KeyValuePair",
    "Props": {
        "Items": [
            {
                "Label": {
                    "Content": {
                        "Type": "TextContent",
                        "Children": ["Customer Name"]
                    }
                },
                "Value": {
                    "Content": {
                        "Type": "TextContent",
                        "Children": ["{{Customer.FirstName}}"]
                    }
                }
            }
        ]
    }
}
```

#### 表格式元件
<a name="tabular-component"></a>

```
{
    "Type": "Table",
    "Props": {
        "ColumnDefinitions": [
            {
                "Cell": {
                    "Content": {
                        "Type": "TextContent",
                        "Children": ["{{Customer.ObjectAttributes.CTR.contactId}}"]
                    }
                },
                "Header": "Contact ID"
            }
        ]
    }
}
```

**注意**  
請確定您參考的屬性、物件和客群在您的 Customer Profiles 組態中，然後再將它們用於您的配置中。

# 小工具
<a name="widgets"></a>

探索 Profile Explorer 中可用的不同小工具類型。

## 概觀
<a name="widgets-overview"></a>

Profile Explorer 中的小工具是從配置定義的 JSON 元件建置的複合元素。雖然這些小工具代表複雜的 JSON 結構，但我們的 UI 建置器會自動處理技術合成，使儀表板管理簡單明瞭且易於使用。

**Topics**
+ [概觀](#widgets-overview)
+ [可用的小工具](#available-widgets)
+ [預設小工具](default-widgets.md)
+ [自訂小工具](custom-widgets.md)

## 可用的小工具
<a name="available-widgets"></a>
+ 預設小工具
  + [生成式 AI 摘要](default-widgets.md#generative-ai-summary)
  + [客戶資訊](default-widgets.md#customer-information)
  + [計算屬性](default-widgets.md#calculated-attribute)
  + [聯絡人](default-widgets.md#contacts)
  + [案例](default-widgets.md#cases-cp)
  + [訂單](default-widgets.md#orders-cp)
  + [資產](default-widgets.md#assets-cp)
+ 自訂小工具
  + [資料表](custom-widgets.md#table-widget)
  + [鍵值對](custom-widgets.md#key-value-pair)
  + [金鑰指標](custom-widgets.md#key-metric)
  + [甜甜圈圖](custom-widgets.md#donut-chart)

# 預設小工具
<a name="default-widgets"></a>

Profile Explorer 有一組預先設定的小工具，旨在順暢地與 Customer Profiles 資料搭配使用。這些預設小工具以最少的設定提供立即值，讓您只需按幾下滑鼠就能建置複雜的儀表板。

![\[在 Explorer 配置中新增預設小工具。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/default-widgets-1.png)


## 現成小工具
<a name="ready-to-use-widgets"></a>
+ [生成式 AI 摘要](#generative-ai-summary)
+ [客戶資訊](#customer-information)
+ [計算屬性](#calculated-attribute)
+ [聯絡人](#contacts)
+ [案例](#cases-cp)
+ [訂單](#orders-cp)
+ [資產](#assets-cp)

**注意**  
雖然這些小工具已預先設定，您仍然可以進行自訂，更符合您的特定需求。這些小工具可以作為起點，以便您輕鬆上手。

## 生成式 AI 摘要
<a name="generative-ai-summary"></a>

Profile Explorer 提供預設 AI 客戶深入分析，產生強調關鍵行為模式的簡潔摘要、根據互動歷史提供個人化的客戶深入分析，並自客戶 360 資料提出可轉化為實際行動的建議。AI 產生的摘要會識別多個客戶接觸點的模式、提供每個客戶專屬的個人化行為解析，以及支援改善客戶體驗和提高忠誠度，以協助組織做出有資料為基礎的決策。

![\[生成式 AI 摘要小工具。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/generative-ai-summary-1.png)


## 客戶資訊
<a name="customer-information"></a>

客戶資訊小工具使用鍵值對元件，提供清晰且有條理的標準 Customer Profile 資料。此預設小工具會自動以容易掃描的格式顯示基本客戶資訊。

### 概觀
<a name="customer-information-overview"></a>

這個小工具利用鍵值對元件，在結構化配置中顯示客戶屬性。
+ 名字
+ 姓氏
+ 電子郵件地址
+ 電話號碼
+ 地址
+ 帳戶號碼
+ 設定檔 ID

### 資料
<a name="customer-information-data"></a>

小工具會自動連線至您的 Customer Profiles 網域，並從標準設定檔屬性提取資訊。基本功能不需要額外組態。

**注意**：雖然已經以標準設定檔屬性預先設定這個小工具，您可以根據您的需求，自訂標準設定檔中顯示的屬性。

#### 進一步了解
<a name="customer-information-learn-more"></a>
+ [標準設定檔定義](standard-profile-definition.md)
+ 鍵值對

## 計算屬性
<a name="calculated-attribute"></a>

您可以透過計算屬性小工具，顯示使用客戶設定檔計算屬性資料的關鍵指標元件。

### 概觀
<a name="calculated-attribute-overview"></a>

您可以透過計算屬性小工具，顯示使用客戶設定檔計算屬性資料的關鍵指標元件。

### 元件功能
<a name="component-features"></a>
+ 將計算指標顯示為單一值指標

### 範例使用案例可以是
<a name="example-use-cases"></a>
+ 已交付的行銷活動
+ 已開啟的案例
+ 平均通話時間
+ 管道偏好設定

### Configuration
<a name="configuration"></a>

只要選取您的計算屬性，然後選擇您偏好的顯示格式

**注意**  
須先在您的 Customer Profiles 網域中設定計算屬性，才能用於此小工具。

**進一步了解**
+ 金鑰指標
+ [設定計算屬性](customerprofiles-calculated-attributes-admin-website.md)

## 聯絡人
<a name="contacts"></a>

聯絡人小工具使用資料表 JSON 元件建置，以有組織的表格格式顯示您的 Customer Profiles 聯絡人物件資料。此小工具會自動連線至 Customer Profiles CTR 資料，顯示主要聯絡資訊和互動歷史記錄。

### 功能
<a name="contacts-features"></a>
+ 檢視所有客戶聯絡事件
+ 排序和篩選聯絡人記錄
+ 自訂顯示的聯絡欄位
+ 存取詳細的聯絡資訊

如需詳細了解 Customer Profiles CTR 物件，請參閱 [Amazon Connect Customer Profiles 中的聯絡人記錄範本](ctr-contact-record-template.md)

## 案例
<a name="cases-cp"></a>

案例小工具使用資料表 JSON 元件建置，以有組織的表格格式顯示您的 Customer Profiles 案例物件資料。此小工具會自動連線至 Customer Profiles 案例資料，顯示支援互動和案例管理詳細資訊。

### 功能
<a name="cases-features"></a>
+ 檢視所有客戶案例
+ 排序和篩選案例記錄
+ 自訂顯示的案例欄位
+ 存取詳細的案例資訊

如需詳細了解 Customer Profiles 案例物件，請參閱 [Customer Profiles 中標準案例的物件類型映射。](object-type-mapping-standard-case.md)。

## 訂單
<a name="orders-cp"></a>

訂單小工具使用資料表 JSON 元件建置，以有組織的表格格式顯示您的 Customer Profiles 訂單物件資料。此小工具會自動連線至 Customer Profiles 訂單資料，顯示購買歷史記錄和交易詳細資訊。

### 功能
<a name="orders-features"></a>
+ 檢視所有客戶訂單事件
+ 排序和篩選訂單記錄
+ 自訂顯示的訂單欄位
+ 存取詳細的訂單資訊

如需詳細了解 Customer Profiles 訂單物件，請參閱 [Amazon Connect Customer Profiles 中，標準訂單的物件類型映射](object-type-mapping-standard-order.md)

## 資產
<a name="assets-cp"></a>

資產小工具使用資料表 JSON 元件建置，以有組織的表格格式顯示您的 Customer Profiles 資產物件資料。此小工具會自動連線至 Customer Profiles 資產資料，顯示客戶自有的產品和服務。

### 功能
<a name="assets-features"></a>
+ 檢視所有客戶資產記錄
+ 排序和篩選資產資料
+ 自訂顯示的資產欄位
+ 存取詳細的資產資訊

如需詳細了解 Customer Profiles 資產物件，請參閱 [Customer Profiles 中標準資產的物件類型映射。](object-type-mapping-standard-asset.md)

# 自訂小工具
<a name="custom-widgets"></a>

從頭開始建立專屬儀表板元件，以符合您的特定商業需求。您可以透過自訂小工具，在沒有任何預先定義資料時建置唯一的視覺化效果。

![\[在 Profile Explorer 配置中新增客戶小工具。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/custom-widgets-1.png)


## 可用的自訂元件
<a name="available-custom-components"></a>
+ [資料表](#table-widget)
+ [鍵值對](#key-value-pair)
+ [金鑰指標](#key-metric)
+ [甜甜圈圖](#donut-chart)

## 建置自訂小工具
<a name="building-custom-widgets"></a>

**每個自訂小工具都可以設定：**
+ 自訂資料來源
+ 自訂顯示
+ 自訂欄位
+ 自訂項目互動

## 資料表
<a name="table-widget"></a>

自訂資料表元件有靈活的組態選項，以表格格式顯示您的資料，並提供互動和組織進階功能。

### 功能
<a name="table-features"></a>

1. **欄位組態**
   + 定義自訂欄位標頭
   + 為每欄指定資料
   + 設定資料格式選項
   + 定義欄位位置

1. **篩選**
   + 快速篩選資料表中的項目

1. **連結**
   + 連接資源連結
     + 順暢導覽至：
       + 客群
       + 計算屬性
     + 在新索引標籤中開啟
   + **外部 URL 連結**
     + 將列項目值轉換為您可以選擇的 URL
     + 在新索引標籤中開啟
     + 根據列資料動態產生連結
   + 抽屜檢視連結
     + 在側邊抽屜開啟詳細資訊
     + 檢視完整的記錄詳細資訊，而不離開頁面

1. 資料整理
   + 分組
     + 根據特定欄位名稱分組資料列
     + 長久的群組設定
   + 排序
     + 根據任何欄位排序
     + 遞增順序
     + 長久的排序設定

**圖 1**

![\[自訂資料表小工具編輯範例。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/table-features-1.png)


**圖 2**

![\[另一個自訂資料表小工具編輯範例。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/table-features-2.png)


### 範例組態
<a name="table-example-configuration"></a>

```
{
    "Type": "Table",
    "Props": {
        "ColumnDefinitions": [
            {
                "Header": "Table column header"
                "Cell": {
                    "Content": {
                        "Props": {
                            "Variant": "Link",
                            "LinkOptions": {
                                "LinkType": "Drawer"
                            }
                        },
                        "Type": "TextContent",
                        "Children": ["string"]
                    }
                },
            }
        ]
    }
}
```

## 鍵值對
<a name="key-value-pair"></a>

您可以透過鍵值對元件，以靈活且可讀取的格式建立相關資料點的整齊視圖。

### 概觀
<a name="key-value-pair-overview"></a>

定義自訂鍵值關係，來建立動態資料視圖。此元件特別適用於顯示屬性對，例如：
+ 客戶詳細資訊
+ 帳戶資訊

### 功能
<a name="key-value-pair-features"></a>

1. **互動式連結選項**
   + 連接資源連結
     + 直接連結至相關資源
     + 順暢導覽至：
       + 計算屬性
       + 客群
     + 在新索引標籤中開啟
   + 外部 URL 連結
     + 將項目值轉換為您可以選擇的 URL
     + 在新索引標籤中開啟
   + 抽屜檢視連結
     + 在側邊抽屜開啟詳細資訊
     + 檢視完整的詳細資訊，而不離開頁面

1. 欄位組態
   + 定義鍵值對的 1-4 欄

1. 在邏輯分組中整理配對

**圖 1**

![\[自訂鍵值對小工具編輯範例。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/key-value-pair-features-1.png)


**圖 2**

![\[另一個自訂鍵值對小工具編輯範例。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/key-value-pair-features-2.png)


### 範例組態
<a name="key-value-pair-example-configuration"></a>

```
{
    "Type": "KeyValuePair",
    "Id": "UniqueId",
    "Props": {
        "Columns": 2,
        "Items": [
            {
                "Label": {
                    "Content": {
                        "Type": "TextContent",
                        "Id": "UniqueId",
                        "Props": {
                            "FontWeight": "bold"
                        },
                        "Children": ["Profile id"]
                    }
                },
                "Value": {
                    "Content": {
                        "Type": "TextContent",
                        "Id": "UniqueId",
                        "Props": {},
                        "Children": ["[string]"]
                    }
                }
            }
        ]
    }
}
```

**注意**  
此元件目前不支援 UI 建置器中的 `ProfileObjects`。

## 金鑰指標
<a name="key-metric"></a>

金鑰指標元件可讓您以易於理解的格式，強調關鍵業務指標、KPI 和重要統計資料。

### 概觀
<a name="key-metric-overview"></a>

建立易見的指標視圖，強調重要的資料點、趨勢或狀態指示。此元件非常適合顯示：
+ 績效指標
+ 重要測量項目
+ 狀態摘要
+ 趨勢指標

### 功能
<a name="key-metric-features"></a>

1. **大型顯示文字**

1. **指標格式**

1. **互動式連結選項**
   + 連接資源連結
     + 直接連結至相關資源
     + 順暢導覽至：
       + 計算屬性
       + 客群
     + 在新索引標籤中開啟
   + 外部 URL 連結
     + 將項目值轉換為您可以選擇的 URL
     + 在新索引標籤中開啟
   + 抽屜檢視連結
     + 在側邊抽屜開啟詳細資訊
     + 檢視完整的詳細資訊，而不離開頁面

1. **整理指標配置**

**圖 1**

![\[自訂關鍵指標小工具編輯範例。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/key-metric-features-1.png)


**圖 2**

![\[另一個自訂關鍵指標小工具編輯範例。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/key-metric-features-2.png)


### 範例組態
<a name="key-metric-example-configuration"></a>

```
{
    "Type": "KeyMetrics",
    "Props": {
        "MetricDefinitions": [
            {
                "MetricLabel": "Total Revenue",
                "MetricValue": {
                    "Content": {
                        "Type": "TextContent",
                        "Props": {
                            "Format": "USD",
                            "FontSize": "large",
                            "FontWeight": "bold"
                        },
                        "Children": ["[string]"]
                    }
                },
                "Columns": 1
            }
        ]
    }
}
```

**注意**  
此元件目前不支援 UI 建置器中的 `ProfileObjects`。

## 甜甜圈圖
<a name="donut-chart"></a>

甜甜圈圖表元件可透過圓形的甜甜圈圖表，視覺化情緒評分。

### 概觀
<a name="donut-chart-overview"></a>

定義自訂評分條件，建立動態情緒視覺效果。此元件特別適用於顯示：
+ 成功指標
+ 達成率
+ 風險評估
+ 績效指標

### 功能
<a name="donut-chart-features"></a>

1. 情緒分析選項
   + 正面情緒
     + 從零開始
     + 根據條件追蹤進度：
       + 自訂點數值
       + 以顏色顯示的區段
       + 以灰色表示未滿足的條件
     + 顯示成功率百分比
   + 負面情緒
     + 從最大值開始
     + 追蹤推論：
       + 以顏色顯示的區段
       + 點數扣除系統
       + 綠色代表剩餘值
     + 顯示最終分數

1. 計算屬性值

1. 運算子選項
   + Equal To
   + Not Equal To
   + Greater Than
   + Less Than

1. 值條件

1. 每個條件的配置點

**圖 1：正面情緒範例**

![\[正面情緒小工具編輯範例。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/donut-chart-features-1.png)


**圖 2：負面情緒範例**

![\[負面情緒小工具編輯範例。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/donut-chart-features-2.png)


### 範例組態
<a name="donut-chart-example-configuration"></a>

```
{
    "Type": "DonutChart",
    "Props": {
        "Variant": "PositiveSentiment",
        "ConditionDefinitions": [
            {
                "Title": "Customer Satisfaction",
                "Color": "#4CAF50",
                "CalculatedAttribute": "satisfaction_score",
                "Operator": "GREATER_THAN",
                "ValueCondition": 8,
                "Points": 10
            }
        ]
    }
}
```

**注意**  
**甜甜圈圖目前僅支援作為資料來源的計算屬性。**
**所有條件定義都必須包含標題、顏色、計算屬性、運算子、值條件和點數值。**

# 將 Profile Explorer 新增至客服人員工作區
<a name="add-profileexplorer-to-agentworkspace"></a>

根據預設，具有適當[安全性設定檔許可](enabling-profile-explorer.md)的使用者可以在 Amazon Connect 管理員網站上檢視設定檔總管。您可能也希望客服人員在其客服人員工作區中存取 Profile Explorer。本主題說明如何執行此操作。

下圖顯示客服人員工作區中的 Profile Explorer 範例。

![\[客服人員工作區，設定檔 Profile Explorer 索引標籤。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/profile-explorer-agent-workspace.png)


## 建立您要與客服人員共用的 Profile Explorer 配置
<a name="begin-petoaw"></a>

以下是進階概觀：

1. 請確認您具備建立 Profile Explorer 配置的[安全性設定檔權限](enabling-profile-explorer.md)。

1. 遵循 [開始使用 Amazon Connect Customer Profiles Profile Explorer](getting-started-profile-explorer.md) 中的指示，來建立和儲存您要與客服人員共用的配置。

## 將 Profile Explorer 新增至 Amazon Connect 做為整合
<a name="add-pe-console"></a>

1. 在 Amazon Connect 主控台的左側導覽中，選擇**整合**，如下圖所示。  
![\[Amazon Connect 主控台、整合功能表項目。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/integrations.png)

1. 在**整合**頁面上，選擇**新增整合**。

1. 在**新增整合**頁面上，完成**基本資訊**區段中的下列欄位：

   1. **顯示名稱**：容易記的應用程式名稱。**此名稱會在客服人員工作區上的索引標籤顯示給客服人員**。此名稱也會顯示在安全性設定檔上。您可以返回並更改此名稱。

   1. **整合識別符**：整合的唯一官方名稱。如果您每個存取 URL 只有一個整合，我們建議您使用存取 URL 的原始伺服器。您不得變更此名稱。

   1. **描述 (選用)**：您可以選擇性地提供此應用程式的任何說明。此說明不會顯示給客服人員。

   1. **整合類型**：選擇**標準應用程式**。

   1. **聯絡人範圍**：選擇**每個聯絡人**。這是來電支援的必要設定。

   1. **初始化逾時**：能與工作區建立連線的時間上限 (以毫秒為單位)。

   下圖顯示這些欄位的設定範例。初始化逾時設定為 5 秒。  
![\[基本資訊區段，針對客服人員工作區的 Profile Explorer 進行設定。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/add-integration.png)

1. 在**存取**區段完成下列欄位：

   1. **存取 URL**：這是託管應用程式的 URL。URL 必須安全並以 https 開頭，除非是本地主機則例外。
**重要**  
URL 必須包含 `?_appLayoutMode=embedded`。例如：  
`https://{CONNECT_INSTANCE}/customer-profiles/profile-explorer?_appLayoutMode=embedded`  
如果您未包含 `?_appLayoutMode=embedded`， Amazon Connect 則管理員網站的左側導覽會顯示在客服人員工作區中。  
如需詳細了解此欄位所允許的內容，請參閱 [整合](3p-apps.md#onboard-3p-apps-how-to-integrate)。

   1. **已核准的來源 - 選用**：允許清單允許的 URL (如果與存取 URL 不同)。URL 必須安全並以 https 開頭，除非是本地主機則例外。

1. 完成接下來的兩個區段 - **權限**和 **Iframe 組態** - 這是選用的，不需將 Profile Explorer 新增至客服人員工作區。如需這些區段的相關資訊，請參閱 [整合](3p-apps.md#onboard-3p-apps-how-to-integrate)。

1. **執行個體關聯**：選擇客服人員使用的執行個體。

   您可以授予此帳戶區域內任何執行個體存取此整合的權限 （這些執行個體）。

1. 選擇**新增整合作業**。

## 將客服人員權限指派給新的安全性設定檔
<a name="assign-pe-agent-permissions"></a>

在此步驟中，您需要將存取新整合的代理程式許可和檢視許可指派給 Profile Explorer。

1. 在 Amazon Connect 管理員網站中，導覽至**客服人員**安全性設定檔。

1. 在**編輯安全性設定檔**頁面，指派下列權限：
   + **Customer Profiles** - **Profile explorer** - **檢視**
   + **客服人員應用程式** - **整合名稱** - **存取**

   下圖顯示為名為 **Profile Explorer** 的新整合新增的許可範例。  
![\[新整合的安全設定檔許可。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/profile-explorer-securityperms.png)

## 告知客服人員釘選新的應用程式
<a name="assign-pe-agent-permissions"></a>

使用您的一般通訊方式，指示客服人員將新的應用程式釘選到其客服人員工作區。這可讓他們跨工作區執行個體存取 Profile Explorer。
+ 在客服人員工作區中，選擇更多圖示，然後選擇**釘選索引標籤**，如下圖所示。  
![\[客服人員工作區，釘選索引標籤選項。\]](http://docs.aws.amazon.com/zh_tw/connect/latest/adminguide/images/pin-tab.png)

## 受支援的功能
<a name="supported-pe-functionality"></a>

完成上述步驟後，Profile Explorer 支援查詢傳入的聯絡。支援項目如下：
+ 電話和聊天：完整支援
+ 自訂聯絡屬性：全面支援 Profile Explorer 讀取的使用者定義屬性。您可以在流程中設定使用者定義的屬性，以支援任何客戶使用案例。例如：

  ```
  { 
  "profileSearchKey": "_phone", 
  "profileSearchValue": "<Phone number>" }
  ```

  如需詳細資訊，請參閱[自動填寫客戶設定檔](auto-pop-customer-profile.md)。

# 預測洞見 （預覽）
<a name="customer-profiles-predictive-insights"></a>

*Predictive Insights* （預覽） 是 Amazon Connect Customer Profiles 的一項功能，它使用人工智慧為您的客戶產生個人化產品和內容建議。透過分析客戶互動資料，Predictive Insights 可協助您在所有客戶接觸點中提供更相關的體驗。

## Predictive Insights 的運作方式
<a name="predictive-insights-how-it-works"></a>

Predictive Insights （預覽版） 使用 AI 模型來分析客戶行為模式並產生即時建議。服務會處理您的客戶互動資料，例如購買歷史記錄和瀏覽活動，以識別模式和偏好設定。
+ **步驟 1：**使用現有資料連接器將互動資料新增至設定檔，以使用客戶互動資料訓練 AI 模型 
+ **步驟 2：**將項目目錄新增至 S3，以允許客戶設定檔透過 存取您的項目資料 AWS 管理主控台
+ **步驟 3：**定義建議類型來建立建議 （類似項目、經常配對的項目、熱門項目） 
+ **步驟 4：**將建議套用至 Amazon Connect 生態系統，包括客服人員工作區、流程和 Connect AI 客服人員 

## 先決條件
<a name="predictive-insights-prereqs"></a>
+ **在客戶設定檔中啟用資料存放區**

  若要使用客戶設定檔訓練 AI 模型，您需要啟用資料存放區。如需進一步了解，請參閱客戶設定檔資料存放區下的詳細資訊。
+ **KMS**

  您已設定客戶設定檔，以在 下加密您的資料 AWS KMS key。
+ **安全設定檔**

  您已將安全性設定檔設定為支援檢視 （列出和檢視預測洞察）、建立 （建立建議）、刪除 （刪除建議） 和編輯 （更新建議） 許可，並啟用預測洞察。

## 使用 Predictive Insights 的優點
<a name="predictive-insights-benefits"></a>

使用 Predictive Insights 提供幾個主要優點：
+ 透過個人化建議改善客戶體驗
+ 透過相關產品建議增加銷售機會
+ 透過自動顯示相關建議來節省客服人員的時間
+ 在所有客戶接觸點之間提供一致的建議
+ 當客戶行為變更時，即時更新建議

# 開始使用 Predictive Insights
<a name="predictive-insights-get-started"></a>

若要開始使用 Predictive Insights，請遵循下列步驟：

**Topics**
+ [步驟 1：將互動資料新增至客戶設定檔](#add-interaction-data)
+ [步驟 2：新增項目目錄資料](#add-item-catalog-data)
+ [步驟 3：建立預測性洞見](#create-predictive-insights)
+ [步驟 4：跨客戶互動管道使用預測洞見](#use-across-customer-engagement-channels)

## 步驟 1：將互動資料新增至客戶設定檔
<a name="add-interaction-data"></a>

您可以利用客戶設定檔中的現有資料連接器，將互動資料映射至標準 Web Analytics 物件。

如需詳細資訊，請參閱[Web Analytics 物件的物件類型映射](standard-loyalty-promotion-object-mapping-web-analytics.md)。

## 步驟 2：新增項目目錄資料
<a name="add-item-catalog-data"></a>

您可以使用標準型錄資料來代表網域內目錄中的個別產品。此目錄資料存在於網域層級，且不會繫結至任何特定的客戶設定檔。它可作為您產品的結構化表示，可用於個人化功能。您可以使用資料連接器將您的產品或項目資訊作為網域物件匯入客戶設定檔，該資料連接器提供靈活的選項來擷取和維護目錄資訊，確保您的產品資料保持最新狀態並在系統中存取。

如需詳細資訊，請參閱[Item Catalog 的物件類型映射](standard-loyalty-promotion-object-mapping-item-catalog.md)。

## 步驟 3：建立預測性洞見
<a name="create-predictive-insights"></a>

Amazon Connect 可讓您建置和部署專為您特定產品建議需求量身打造的專用 AI 模型。這些模型可以透過 Connect Web UI 或以程式設計方式透過 APIs進行設定，以符合您的獨特商業案例。Predictive Insights 提供數種類型的建議：

1. **為您推薦** - 提供專為特定使用者量身打造的個人化建議。建議是根據使用者過去的行為，例如點擊流事件、購買事件、耗用的內容等。

1. **類似項目** - 使用生成式 AI 尋找主題上類似於目錄中現有項目的項目。它非常適合客戶想要為其使用者提供替代項目建議的進階銷售或替代使用案例。

1. **經常配對的項目** - 建議經常與目錄中現有項目互動的項目。它非常適合用於交叉銷售或補充項目建議使用案例。

1. **熱門項目 ** - 旨在建議使用者最常互動的項目。

1. **趨勢現在** - 建議在最近一段時間內參與度增加速度最大的項目。它旨在浮水印使用者互動中遇到病毒性的項目。

**注意**  
預覽版提供使用 Predictive Insights 啟用 AI 模型。未來可能會套用其他定價。

**依建議類型列出的項目限制**

下表說明根據使用的建議類型，考慮產生建議的項目數量上限。


| **建議類型** | **Description** | **限制** | 
| --- | --- | --- | 
| 為您推薦 | 考慮進行預測性洞見的項目數量上限 | 4000 萬 | 
| 類似項目 | 考慮進行預測性洞見的項目數量上限 | 1，000 萬 | 
| 所有其他商業案例 | 考慮進行預測性洞見的項目數量上限 | 750，000 | 

## 步驟 4：跨客戶互動管道使用預測洞見
<a name="use-across-customer-engagement-channels"></a>

### 在連線流程中使用客戶設定檔建議
<a name="using-in-flows"></a>

本節說明如何使用客戶設定檔 取得設定檔建議 流程區塊，透過即時產生設定檔的 AI 支援建議，來豐富聯絡期間的使用者體驗。

**流程區塊屬性**

**取得設定檔建議**流程區塊有下列屬性可設定：

1. **設定檔 ID （必要）：**

    此區塊需要設定檔 ID 才能運作。**取得設定檔建議**流程區塊會針對此處提供的設定檔 ID 產生建議。您可以選擇手動輸入設定檔 ID，或使用儲存在 屬性中的預先定義值。如果使用預先定義的值，請確定您使用先前的**取得設定檔**區塊來提供設定檔 ID 使用**取得設定檔**區塊來找出特定設定檔，然後再繼續在後續區塊中產生建議。

1. **建議者名稱 （必要）：**

    此區塊需要建議者名稱才能運作。這是您要用來為指定設定檔 ID 產生建議的推薦者名稱。您只能使用作用中的推薦者來產生建議。

1. **最大結果 （必要）：**

    為指定設定檔 ID 產生的建議數目上限。這範圍介於 1 到 3 個建議之間。

1. **建議屬性 （必要）：**

    定義要保留在聯絡屬性中的建議回應屬性。

1. **項目 ID：**

    這是提供作為額外內容的項目 ID，以為指定的設定檔 ID 產生建議。只有在使用「*類似項目」*或「*經常配對項目」*建議者類型時，才需要項目 ID。您可以選擇手動輸入設定檔 ID，或使用儲存在 屬性中的預先定義值。如果使用預先定義的值，請確定您使用前面的**取得計算屬性**區塊來提供項目 ID。使用**取得計算屬性**區塊，在繼續進行以在後續區塊中產生建議之前，找出特定項目 ID。



**流程區塊分支**

**取得設定檔建議**流程區塊可以將聯絡人路由到下列分支：

1. **成功： **

   建議已成功針對提供的設定檔 ID 產生。選取的建議屬性會保留為 \$1.Customer.Recommendations 聯絡人屬性。

1. **錯誤：**

    嘗試產生建議時發生錯誤。這可能是因為系統錯誤或**取得設定檔建議**區塊的設定方式所致。

1. **找不到：**

    無法產生任何建議。

**使用 區塊的建議**

建議回應會保留至 \$1.Customer.Recommendations 聯絡屬性 JSONPath，做為建議物件的 JSON 清單。每個建議物件都會包含選取的**建議屬性**。

下列來自 Lambda 函數的範例 Python 程式碼片段示範如何使用它從**取得設定檔建議**區塊轉換建議，並保留到其他聯絡屬性中，以便在後續區塊中使用建議。

```
import boto3
import json

# Handle lambda request
def lambda_handler(event, context):
    print("Contact flow data: ", event)

    # Transform recommendations
    recommendations = event['Details']['Parameters']['Recommendations']
    contact_attributes = {}
    for i, rec in enumerate(recommendations):
        contact_attributes.update(flatten(rec, i))
    
    # Set contact attributes using each recommendation attribute value
    print("Setting contact attributes: ", contact_attributes)
    try:
        client = boto3.client('connect', region_name="us-west-2")
        client.update_contact_attributes(
            InstanceId=event['Details']['ContactData']['InstanceARN'].rsplit('/', 1)[1],
            InitialContactId=event['Details']['ContactData']['InitialContactId'],
            Attributes=contact_attributes
        )
        print("Contact attributes set successfully.")
    except Exception as e:
        print("Error setting contact attributes: ", e)

    # Success response
    return {
        'statusCode': 200,
        'body': json.dumps('Success')
    }

# Flatten a nested object into a simple string:string object
def flatten(recommendation, index):
    flat = {}
    for key, value in recommendation.items():
        if isinstance(value, dict):
            flat.update(flatten(value, index))
        else:
            flat[f"Rec{index}_{key}"] = str(value)
    return flat
```

使用**取得設定檔建議**區塊設定流程後，您可以開始使用它，在客戶聯絡期間為客戶產生建議。

### 在外撥行銷活動中使用客戶設定檔建議
<a name="using-in-outbound-campaigns"></a>

您可以將 Predictive Insights 與 Amazon Connect 對外行銷活動整合，透過電子郵件和簡訊管道提供個人化的建議。當您建立事件觸發行銷活動時，您可以設定建議區段，為與行銷活動相關聯的客戶設定檔自動產生 AI 支援的建議。

此整合使用 Web Analytics 物件映射作為事件類別來擷取客戶互動資料，這可讓建議引擎根據客戶行為提供相關和有針對性的建議。

如需在事件觸發行銷活動中設定建議的step-by-step說明，請參閱 [使用事件觸發程序建立對外行銷活動](how-to-create-campaigns-using-event-triggers.md)。

### 設定 Connect AI 代理器以取得銷售建議
<a name="setting-up-agents-for-sales"></a>

Amazon Q in Connect 透過其新的「協調」代理程式類型來增強代理程式功能。此功能對於建立可提供項目建議的銷售 AI 代理程式特別有用，尤其適用於追加銷售和交叉銷售案例。

**入門** 

若要開始實作，請存取 AWS 管理主控台 並導覽至 Amazon Connect。透過存取 URL 登入 Connect 執行個體後，從左側選單找到 Amazon Q，然後選取 AI 代理器。您可以在 AI 代理器下的 QiC 頁面上，找到預先設定的類型協調 (SalesAgent) 草稿狀態 AI 代理程式。此範本隨附 1P 工具的所有必要組態，以及建議的範例提示。

**建立您的自訂代理程式** 

若要建立自訂銷售代理程式，請先建立新的協調類型 AI 代理程式，並從現有的 SalesAgent 範本複製。此程序會從範本將所有工具和組態傳輸到您的新代理程式。

**自訂 代理程式** 

在更新客服人員的提示時，管理員有兩個主要選項。他們可以將現有的客服人員提示附加到銷售客服人員提示中，並新增追加銷售識別指示，也可以移除SalesAgent提示，並根據他們目前發布的客服人員建立新的協調提示，並將銷售客服人員提示新增至其中，以重新開始。此彈性允許量身打造的解決方案，以符合特定業務需求和網域需求。

**流程組態和整合** 

完成代理程式組態並將其發佈後，下一個步驟涉及在流程下建立 Amazon Lex 機器人。傳入流程需要更新，以將 GetCustomerInput 區塊包含已建立的 Lex 機器人，而且應該在其他選項中選取新的 SalesAgent。您需要新增設定檔 ID 擷取的客戶設定檔流程區塊和設定聯絡屬性流程區塊，將設定檔 ID 和值的 CustomerId 設定為 \$1Customer.ProfileId 的金鑰。

實作支援聊天聯絡人和語音通話，客戶輸入無縫傳遞給 Lex 機器人上的 QIC 客服人員。此全方位設定可在 Amazon Connect 環境中啟用 AI 驅動的銷售建議和追加銷售機會。系統的彈性允許根據特定產業需求進行自訂，同時維持智慧型銷售協助的核心功能。此解決方案提供架構，可增強客戶與 AI 支援建議的互動，最終支援更有效的銷售和客戶服務操作。管理員可以透過新增特定網域的指示和自訂建議類型以符合其業務需求，進一步精簡實作。

### 設定 SalesAgent 以用於客服人員協助
<a name="configure-salesagent"></a>

您可以設定 SalesAgent 以在客服人員工作區的 Q in Connect 聊天小工具中使用。若要這麼做，您需要修改 2 個主要項目。

1. 使用存取聯絡人文字記錄的指示更新 AIAgent 提示。

   1. 在提示編輯器中開啟與 SalesAgent 相關聯的提示，並更新提示以新增指示，以存取可存取的聯絡人文字記錄` <conversation>{{$.transcript}}</conversation> `

   1. 以下是您可以附加到 SalesAgent 提示的範例提示。

      ```
      **IMPORTANT**
              **Guide on how to process requests and information:**
              - The messages section contains YOUR conversation with the customer service agent
              - Respond to the agent's questions/requests in the messages section
              - The transcript below is background information about the agent's conversation with their customer
              - Do not respond directly to the customer - you are helping the AGENT
              Background context from agent-customer conversation.
              The following transcript is for your information ONLY. Do not directly respond to messages in this conversation, but instead look at the messages section for what the agent requests you to do.
              IF YOU REFERENCE ANY INFORMATION FROM THIS SECTION: You should indicate so by saying "According to your conversation with the customer ..."
              <conversation>
              {{$.transcript}}
              </conversation>
      ```

   1. 使用新的提示版本更新 AIAgent，並使用此代理程式更新預設組態 → 代理程式協助使用案例。
**注意**  
建議使用 2 種不同的自助式和客服人員協助銷售 AIAGent 使用案例，因為兩者都需要對提示進行細微修改。這可以透過複製代理程式並直接變更提示版本和更新預設組態來指向針對個別使用案例修正 AI 代理程式來完成

1. 更新聯絡來電流程。

   1. 移除 GetCustomerInput 區塊，並改為新增 Connect 助理流程區塊

   1. 使用 AIAssistant ARN 填入流程區塊組態，然後選取適當的 AIAGent。

現在，您可以使用此流程作為一般傳入，Q in Connect 聊天小工具應該能夠提供建議，以協助處理使用者的請求。

## 資料考量事項
<a name="data-considerations"></a>

下列各節提供如何比對使用案例和評估 Predictive Insights 資料準備度的指引。

### 您是否已將使用案例與 Predictive Insights 配對？
<a name="data-consideration-1"></a>

Predictive Insights 個人化類型可以解決下列使用案例：
+ 為使用者產生個人化建議
+ 建議類似或相關的項目
+ 建議趨勢或熱門項目
+ 依相關性重新排序項目

### 您有足夠的項目互動資料嗎？
<a name="data-consideration-2"></a>

對於所有使用案例和個人化類型，您必須至少有 1，000 個項目互動給 25 個唯一使用者，每個使用者至少有兩個互動。對於品質建議，我們建議您從至少 1，000 個使用者至少有 50，000 個項目互動，每個使用者有兩個或更多項目互動。

### 您是否有即時事件串流架構？
<a name="data-consideration-3"></a>

如果您能夠將即時事件串流到 Connect Customer Profiles，您將能夠利用即時個人化。透過某些個人化類型，Predictive Insights 可以從使用者的最新活動中學習，並在使用者使用您的應用程式時更新建議。

### 您的資料是否已針對 Predictive Insights 進行最佳化？
<a name="data-consideration-4"></a>

我們建議您在資料中檢查下列項目：
+ 檢查是否有遺失值。我們建議至少 70% 的記錄具有每個屬性的資料。我們建議允許 Null 值至少完成 70% 的資料欄。
+ 修正資料中的任何不正確或問題，例如命名慣例不一致、項目的重複類別、跨資料集的不相符 IDs 或重複 IDs。這些問題可能會對建議產生負面影響，或導致非預期的行為。例如，您的資料中可能同時有「N/A」和「不適用」，但僅根據「N/A」篩選掉建議。篩選條件不會移除標記為「不適用」的項目。
+ 如果項目、使用者或動作可以有多個類別，例如具有多個類型的電影，請將分類值合併為一個屬性，並將每個值與 \$1 運算子分開。例如，電影的 GENRES 資料可能是動作 \$1 冒險 \$1 威脅。
+ 避免資料欄的可能類別超過 1000 個 （除非資料欄包含僅供篩選之用的資料）。

# 使用 Amazon Connect Customer Profiles API
<a name="use-customerprofiles-api"></a>

如需如何以程式設計方式管理網域和設定檔的詳細資訊，請參閱 [Amazon Connect Customer Profiles API Reference](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/Welcome.html)。

## ListObjectTypeAttributeValues API
<a name="listobjecttypeattributevalues-api"></a>

ListObjectTypeAttributeValues API 可讓您存取任何指定屬性的最新相異值，這對於物件類型中的即時資料驗證和一致性檢查很有價值。此 API 可跨網域運作，同時支援自訂和標準物件類型。API 接受物件類型名稱、屬性名稱和網域名稱做為輸入參數，並傳回的值上限為大約 350KB 的儲存限制。

**請注意：**
+ 每個欄位最多可存放 350KB 的屬性值，並優先排定最新值的優先順序。達到此限制後，將自動移除較舊的值，為新項目騰出空間。

## GetObjectTypeAttributeValues API
<a name="getobjecttypeattributevalues-api"></a>

GetObjectTypeAttributeValues API 提供特定物件類型內屬性的統計洞察，但僅適用於已啟用資料存放區的網域。此 API 會執行每日計算，以提供屬性值的統計資訊，協助您了解資料中的模式和趨勢。統計計算每天執行一次，提供屬性資料特性的一致快照。

**請注意：**
+ 您會在兩種情況下收到 null 值：
  + 在啟用資料保存庫後的第一個期間 （除非發生計算週期，每天發生一次）。
  + 對於不包含數值的屬性。

我們建議您：將客戶設定檔整合至您自己的客服人員應用程式時，使用 CustomerProfileJS 開放原始碼程式庫。如需詳細資訊，請參閱 [Github](https://github.com/amazon-connect/amazon-connect-customer-profiles) 上的 CustomerProfilesJS 儲存庫。

如需有關如何將現有應用程式與 Amazon Connect 整合的詳細資訊，請使用 [Amazon Connect 串流](https://github.com/aws/amazon-connect-streams)。您可以將聯絡控制面板 (CCP) 元件嵌入到應用程式中。

# 了解 Amazon Connect Customer Profiles 中的 IPv6 支援
<a name="customerprofiles-ipv6-support"></a>

## 公共連線
<a name="public-connectivity"></a>

所有 Amazon Connect Customer Profiles API 都完全支援 IPv4 和 IPv6 呼叫。

```
profile.Region.api.aws
```

**例如**：

```
profile.us-east-1.api.aws
```

針對 AWS CLI，您需要明確使用這些端點：

```
aws customer-profiles list-domains \
    --endpoint https://profile.us-east-1.api.aws \
    --region us-east-1
```

舊 API 仍可作為回溯相容性使用。它們僅支援 IPv4 呼叫。

```
profile.Region.amazonaws.com
```

**例如**：

```
profile.us-east-1.amazonaws.com
```

## 私人連線
<a name="private-connectivity"></a>

您可使用 Amazon VPC 主控台或 AWS Command Line Interface (AWS CLI) 來為 Amazon Connect Customer Profiles 建立 VPC 端點。如需詳細資訊，請參閱《AWS PrivateLink 使用者指南》中的[建立介面端點](https://docs.aws.amazon.com/vpc/latest/privatelink/create-interface-endpoint.html)。

使用下列服務名稱，建立 Amazon Connect Customer Profiles 的 VPC 端點：

```
com.amazonaws.Region.profile
```

**例如**：

```
com.amazonaws.us-east-1.profile
```

如果您為端點啟用私有 DNS，您可以使用區域的 IPv4 和 IPv6 支援 DNS 名稱，向 Amazon Connect Customer Profiles 提出 API 請求，例如 profile.us-east-1.api.aws。

或者，僅 IPv4 支援該區域的舊 DNS 名稱。

**例如**：

```
profile.us-east-1.amazonaws.com
```

# 範例：以程式設計方式整合 Amazon S3 與 Amazon Connect Customer Profiles
<a name="customerprofiles-s3-integration"></a>

使用客戶設定檔 [PutIntegration](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_PutIntegration.html) API，您可以透過程式設計方式為 S3、Salesforce、Marketo 等建立整合。

在本主題中，我們將示範如何建立同步間隔為 15 分鐘 (目前支援的最小值) 的 S3 整合。

## 步驟 1：建立 JSON 檔案
<a name="step1-cpintegration"></a>

使用下列內容建立檔案：

```
{
    "DomainName": "your-domain",
    "ObjectTypeName": "your-object-name", 
    "FlowDefinition": {
        "FlowName": "your-flow-name",
        "KmsArn": "the key ARN is the same as your domain's key",
        "Description": "Created by Customer Profiles",
        "TriggerConfig": {
            "TriggerType": "Scheduled",
            "TriggerProperties": {
                "Scheduled": {
                    "ScheduleExpression": "rate(15minutes)",
                    "DataPullMode": "Incremental",
                    "ScheduleStartTime": 1634244800.435,
                    "FirstExecutionFrom": 1594166400
                }
            }
        },
        "SourceFlowConfig": {
            "ConnectorType":"S3",
            "SourceConnectorProperties": {
                "S3": {
                    "BucketName": "your-bucket",
                    "BucketPrefix": "your-prefix"
                }
            }
        },
        "Tasks": [
            {"TaskType":"Filter","SourceFields":["colA","colB"],"ConnectorOperator":{"S3":"PROJECTION"}},
            {"ConnectorOperator":{"S3":"NO_OP"},"DestinationField":"colA","TaskProperties":{},"SourceFields":["colA"],"TaskType":"Map"},
            {"ConnectorOperator":{"S3":"NO_OP"},"DestinationField":"colB","TaskProperties":{},"SourceFields":["colB"],"TaskType":"Map"}
        ]
    }
}
```

若要使用您自己的值來自訂 JSON，請遵循下列指示：
+ `FlowName`：可以是字串 [a-zA-Z0-9][\$1w\$1@\$1.-]\$1
+ `ScheduleStartTime`：設定為紀元時間目前 `DateTime` \$1 5 分鐘。
+ `FirstExecutionFrom`：前往 S3，查看檔案日期，並使用最早日期之前的日期。
+ `Tasks`：定義 `TaskType`。在 `Sourcefields` 欄位中，您必須提供該陣列您的 CSV 的所有各欄。然後，對於該陣列中的每個項目，您需要指定 `ConnectorOperator`。此範例適用於具有兩欄：`colA` 和 `colB` 的 CSV 檔案。

## 步驟 2：呼叫 PutIntegration API
<a name="step2-cpintegration"></a>

使用您的值建立並自訂 JSON 檔案之後，請呼叫 [PutIntegration](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_PutIntegration.html) API，如下列範例所示：

```
aws customer-profiles put-integration --cli-input-json file:///put_integration_s3_cli.json --region us-west-2                    
```

來自 `PutIntegration` 的回應會傳回流程 URI。例如：

```
{
    "DomainName": "testDomain",
    "Uri": "arn:aws:appflow:us-west-2:9999999999999:flow/Customer_Profiles_testDomain_S3_Salesforce-Account_1634244122247",
    "ObjectTypeName": "your objec type",
    "CreatedAt": "2021-10-14T13:51:57.748000-07:00",
    "LastUpdatedAt": "2021-10-14T13:51:57.748000-07:00",
    "Tags": {}
}
```

## 步驟 3：呼叫 Amazon AppFlow StartFlow API
<a name="step3-cpintegration"></a>

使用流程 URI 呼叫 Amazon AppFlow [StartFlow](https://docs.aws.amazon.com/appflow/1.0/APIReference/API_StartFlow.html) API。例如：

```
aws appflow start-flow —flow-name uri --region us-west-2
```