

翻訳は機械翻訳により提供されています。提供された翻訳内容と英語版の間で齟齬、不一致または矛盾がある場合、英語版が優先します。

# 顧客データを作成して、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 アクセス許可のリストについては、「[Actions defined by Amazon Connect Customer Profiles](https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonconnectcustomerprofiles.html#amazonconnectcustomerprofiles-actions-as-permissions)」の表で「`PutProfileObject`」を参照してください。

## Customer Profile の取り込み
<a name="customer-profiles-ingesting-account-based-profiles"></a>

**アカウントベースのプロファイルの取り込み**

1. S3 へのファイルのアップロード account-profiles で参照されるプロファイルと account-profiles 自体の取り込みは、個別に行う必要があります。

1. account-profile の取り込みに使用される新しいファイルには、プロファイルタイプと E メールおよび電話のエンゲージメント設定という新しい属性を含める必要があります。

1. AWS コンソールを使用して S3 から Customer Profiles にファイルを取り込む

   **サンプルプロファイル (以下のアカウントベースのプロファイルで参照) CSV**    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/connect/latest/adminguide/customer-profiles-object-type-mappings.html)

   **account-based profiles のサンプル CSV**    
[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/ja_jp/connect/latest/adminguide/customer-profiles-object-type-mappings.html)

   **E メールを含むエンゲージメント設定の例**:

   ```
   [ 
    {"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. 2 つのデータマッピングを作成します。1 つはサブプロファイル用、もう 1 つはアカウントベースのプロファイル用です。  
![\[記述された関係に基づいてマッピングをそれぞれ作成する 2 つのデータソース統合を作成します。例えば、accounts/profiles などです。\]](http://docs.aws.amazon.com/ja_jp/connect/latest/adminguide/images/customer-profiles-ingesting-account-based-profiles-1.png)

1. 次に、顧客プロファイル属性をマッピングします。`ProfileType` という名前の送信先を書き留めます。  
![\[次に、顧客プロファイル属性をマッピングします。ProfileType という名前の送信先を書き留めます。\]](http://docs.aws.amazon.com/ja_jp/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. このプロセスを繰り返して、アカウントベースのプロファイルを取り込みます。Note EngagementPreferences.Email and EngagementPreference.Phone.  
![\[このプロセスを繰り返して、アカウントベースのプロファイルを取り込みます。Note EngagementPreferences.Email and EngagementPreference.Phone.\]](http://docs.aws.amazon.com/ja_jp/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. 記述された関係に基づいてマッピングをそれぞれ作成する 2 つのデータソース統合を作成します。例えば、accounts/profiles などです。

**注記**  
アカウントベースのプロファイルの取り込みは、Amazon Connect Customer Profiles コンソールの [SearchProfiles](https://docs.aws.amazon.com/connect/latest/APIReference/API_connect-customer-profiles_SearchProfiles.html) API または Profile メトリクスを使用して、アカウントベースのプロファイルで参照されるプロファイルの正常な取り込みを検証した後にのみ行う必要があります。
自動生成マッピングは、アカウントベースのプロファイルとサブプロファイルの取り込みには使用できません。
連絡先設定の E メールと電話番号のリストには、子プロファイルを参照する `KeyName`、`KeyValue`、または `ProfileId` のいずれかが含まれます。`KeyName` は一意の識別子である必要があります。
サブプロファイルを更新しても、アカウントベースのプロファイルのエンゲージメント設定は更新されません。更新は取り込みパスを介して行う必要があります。