在 Amazon Connect Customer Profiles 中,將 Shopify 物件映射至標準訂單
本主題列出 Shopify 物件中的哪些欄位會對應到客戶設定檔中標準訂單物件中的欄位。
Shopify-DraftOrder 物件
如需 Shopify-DraftOrder 物件中所有欄位的清單,請參閱 Shopify 文件中的 DraftOrder 物件
將 Shopify-DraftOrder 物件對應到標準訂單
Shopify-DraftOrder 物件中欄位的子集會對應到客戶設定檔中的標準訂單物件。
下表列出了哪些欄位可以從 Shopify-DraftOrder 物件對應到標準訂單。
如果來源中存在 order_status_url,則 StatusCode 為 ACTIVATED。否則 StatusCode 為 DRAFT。
| Shopify-DraftOrder 來源欄位 | 標準訂單目標欄位 |
|---|---|
| id | Attributes.ShopifyOrderId |
| customer.id | Attributes.ShopifyCustomerId |
| note | AdditionalInformation |
| CustomerEmail | |
| currency | Currency |
| created_at | CreatedDate |
| updated_at | UpdatedDate |
| name | Name |
| status | Status |
| order_status_url | StatusCode |
| billing_address.address1 | BillingAddress.Address1 |
| Address.Address2 | BillingAddress.Address2 |
| billing_address.city | BillingAddress.City |
| billing_address.zip | BillingAddress.PostalCode |
| billing_address.province | BillingAddress.Province |
| billing_address.country | BillingAddress.Country |
| billing_address.name | BillingAddress.Name |
| shipping_address.address1 | ShippingAddress.Address1 |
| shipping_address.address2 | ShippingAddress.Address2 |
| shipping_address.city | ShippingAddress.City |
| shipping_address.zip | ShippingAddress.PostalCode |
| shipping_address.province | ShippingAddress.Province |
| shipping_address.country | ShippingAddress.Country |
| shipping_address.name | ShippingAddress.Name |
| invoice_url | StatusUrl |
| total_price | TotalPrice |
| total_tax | TotalTax |
| line_items[].title | OrderItems[].Title |
| line_items[].price | OrderItems[].Price |
| line_items[].quantity | OrderItems[].Quantity |
範例
下列範例顯示如何將原始欄位對應到目標欄位。
"shopifyOrderId": { "Source": "_source.detail.event.detail.payload.id", "Target": "_order.Attributes.ShopifyOrderId" }
來自 Shopify 物件的 Shopify-DraftOrder 客戶資料會使用下列索引與 Amazon Connect 標準訂單關聯。
| 標準索引名稱 | Shopify-DraftOrder 來源欄位 |
|---|---|
| _shopifyOrderId | id |
例如,您可以使用 _shopifyOrderId 作為 ObjectFilter.KeyName,搭配 ListProfileObjects API 來尋找標準訂單。您可以使用 ListProfileObjects API,並將 ProfileId 和 ObjectTypeName 設定為 Shopify-DraftOrder,以尋找與特定設定檔關聯的 Shopify-DraftOrder 物件。
Shopify-Order 物件
如需 Shopify-Order 物件中所有欄位的清單,請參閱 Shopify 文件中的訂單物件
將 Shopify-Order 物件對應到標準訂單
Shopify-Order 物件中的欄位的子集會對應到客戶設定檔中的標準訂單物件。
下表列出了哪些欄位可以從 Shopify-Order 物對應到標準訂單。
如果來源中存在 order_status_url,則 StatusCode 為 ACTIVATED。否則 StatusCode 為 DRAFT。
| Shopify-Order 來源欄位 | 標準訂單目標欄位 |
|---|---|
| id | Attributes.ShopifyOrderId |
| customer.id | Attributes.ShopifyCustomerId |
| cancelled_at | CancelledDate |
| cancel_reason | CancelReason |
| closed_at | ClosedDate |
| created_at | CreatedDate |
| currency | Currency |
| CustomerEmail | |
| financial_status | Status |
| order_status_url | StatusCode |
| fulfillment_status | FulfillmentStatus |
| gateway | Gateway |
| name | 名稱 |
| note | AdditionalInformation |
| order_status_url | StatusUrl |
| phone | CustomerPhone |
| processed_at | ProcessedDate |
| total_discounts | TotalDiscounts |
| total_line_items_price | TotalItemsPrice |
| total_price | TotalPrice |
| total_shipping_price_set.shop_money.amount | TotalShippingPrice |
| total_tax | TotalTax |
| total_tip_received | TotalTipReceived |
| total_weight | TotalWeight |
| updated_at | UpdatedDate |
| billing_address.address1 | BillingAddress.Address1 |
| billing_address.address2 | BillingAddress.Address2 |
| billing_address.city | BillingAddress.City |
| billing_address.zip | BillingAddress.PostalCode |
| billing_address.province | BillingAddress.Province |
| billing_address.country | BillingAddress.Country |
| billing_address.name | BillingAddress.Name |
| payment_details.credit_card_number | CreditCardNumber |
| payment_details.credit_card_company | CreditCardCompany |
| shipping_address.address1 | ShippingAddress.Address1 |
| shipping_address.address2 | ShippingAddress.Address2 |
| shipping_address.city | ShippingAddress.City |
| shipping_address.zip | ShippingAddress.PostalCode |
| shipping_address.province | ShippingAddress.Province |
| shipping_address.country | ShippingAddress.Country |
| shipping_address.name | ShippingAddress.Name |
| line_items[].title | OrderItems[].Title |
| line_items[].price | OrderItems[].Price |
| line_items[].quantity | OrderItems[].Quantity |
範例
下列範例顯示如何將原始欄位對應到目標欄位。
"shopifyOrderId": { "Source": "_source.detail.event.detail.payload.id", "Target": "_order.Attributes.ShopifyOrderId" }
來自 Shopify 物件的 Shopify-Order 客戶資料會使用下列索引與 Amazon Connect 標準訂單關聯。
| 標準索引名稱 | Shopify-Order 來源欄位 |
|---|---|
| _shopifyOrderId | id |
例如,您可以使用 _shopifyOrderId 作為 ObjectFilter.KeyName,搭配 ListProfileObjects API 來尋找標準訂單。您可以使用 ListProfileObjects API,並將 ProfileId 和 ObjectTypeName 設定為 Shopify-Order,以尋找與特定設定檔關聯的 Shopify-Order 物件。