

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

# 在 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>

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

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