

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

# 在 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 物件。