

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

# 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 Connect Customer Profiles と Shopify の統合を作成および削除するには、以下の Amazon AppIntegrations アクセス要件を使用します。
+ app-integrations:GetEventIntegration
+ app-integrations:ListEventIntegrationAssociations
+ app-integrations:CreateEventIntegrationAssociation
+ app-integrations:DeleteEventIntegrationAssociation

# Amazon EventBridge アクセス要件
<a name="standard-order-eventbridge-requirements"></a>

Amazon Connect Customer Profiles と Shopify の統合を作成および削除するには、以下の Amazon EventBridge アクセス要件を使用します。
+ `events:ListTargetsByRule`
+ `events:PutRule`
+ `events:PutTargets`
+ `events:DeleteRule`
+ `events:RemoveTargets`

# Customer Profiles 標準注文オブジェクトのフィールド
<a name="standard-order-definition"></a>

次の表に、Customer Profiles 標準オーダーオブジェクトのすべてのフィールドを示します。


| 標準注文のフィールド | データ型 | 説明 | 
| --- | --- | --- | 
| OrderId | String | 標準オーダーの一意の識別子。 | 
| CustomerEmail | String | 顧客の E メールアドレス。 | 
| 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 | 顧客のクレジットカードの最後の 4 桁。 | 
| 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 list | オーダーの品目。 | 
| 属性 | 文字列から文字列へのマッピング | 標準オーダーの属性のキーと値のペア。 | 

標準注文オブジェクトは、次の表のキーによってインデックス付けされます。


| 標準インデックス名 | 標準注文のフィールド | 
| --- | --- | 
| \$1orderId | OrderId | 

例えば、`_orderId` をキー名として [SearchProfiles API](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_SearchProfiles.html) で使用すると、OrderId が検索値と一致する注文を持つプロファイルを見つけることができます。特定のプロファイルに関連付けられている標準注文オブジェクトは、[ListProfileObjects](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_ListProfileObjects.html) API を、`ProfileId` および `ObjectTypeName` を `_order` に設定して使用すると検索できます。

## OrderAddress データ型
<a name="orderaddress-data-type"></a>


| 標準注文のフィールド | データ型 | 説明 | 
| --- | --- | --- | 
| Name | String | オーダーの住所に関連付けられた名前。 | 
| Address1 | String | オーダーの住所の最初の行。 | 
| Address2 | String | オーダーの住所の 2 行目。 | 
| Address3 | String | オーダーの住所の 3 行目。 | 
| Address4 | String | オーダーの住所の 4 行目。 | 
| City | String | オーダーの住所の都市。 | 
| County | String | オーダーの住所の郡。 | 
| State | String | オーダーの住所の州。 | 
| Province | String | オーダーの住所の都道府県。 | 
| Country | String | オーダーの住所の国。 | 
| PostalCode | String | オーダーの住所の郵便番号。 | 

## OrderItem データ型
<a name="orderitem-data-type"></a>


| 標準注文のフィールド | データ型 | 説明 | 
| --- | --- | --- | 
| タイトル | String | オーダーの品目のタイトル。 | 
| Price | String | オーダーの品目の価格。 | 
| 数量 | String | オーダーの品目の数量。 | 

# Amazon Connect Customer Profiles の標準注文への Shopify オブジェクトのマッピング
<a name="mapping-shopify-objects-standard-order.html"></a>

このトピックでは、Customer Profiles の標準オーダーオブジェクトの各フィールドに、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 オブジェクトのフィールドの一部は、Customer Profiles の標準オーダーオブジェクトにマッピングされます。

次の表は、Shopify-DraftOrder オブジェクトから標準プロファイルにマッピングできるフィールドの一覧です。

 ソースに `order_status_url` が存在する場合、`StatusCode` は `ACTIVATED` です。そうでない場合、`StatusCode` は `DRAFT` です。


|  Shopify-DraftOrder ソースフィールド  |  標準オーダーのフィールド  | 
| --- | --- | 
| id | Attributes.ShopifyOrderId | 
| customer.id | Attributes.ShopifyCustomerId | 
| note | AdditionalInformation | 
| E メール | CustomerEmail | 
| currency | Currency | 
| created\$1at | CreatedDate | 
| updated\$1at | UpdatedDate | 
| 名前 | 名前 | 
| ステータス | ステータス | 
| 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 を使用することができます。特定のお客様プロファイルに関連付けられている Shopify-DraftOrder オブジェクトは、[ListProfileObjects](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_ListProfileObjects.html) API を、`ProfileId` および `ObjectTypeName` を `Shopify-DraftOrder` に設定して使用すると検索できます。

## Shopify-Order オブジェクト
<a name="shopify-order-object.html"></a>

Shopify-Order オブジェクトのすべてのフィールドのリストについては、Shopify ドキュメントの「[Order オブジェクト](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 オブジェクトのフィールドの一部は、Customer Profiles の標準オーダーオブジェクトにマッピングされます。

次の表は、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 | 
| E メール | CustomerEmail | 
| financial\$1status | ステータス | 
| order\$1status\$1url | StatusCode | 
| fulfillment\$1status | FulfillmentStatus | 
| ゲートウェイ | ゲートウェイ | 
| 名前 | 名前 | 
| 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 を使用することができます。特定のプロファイルに関連付けられている Shopify-Order オブジェクトは、[ListProfileObjects](https://docs.aws.amazon.com/customerprofiles/latest/APIReference/API_ListProfileObjects.html) API を、`ProfileId` および `ObjectTypeName` を `Shopify-Order` に設定して使用すると検索できます。