[僅限PaaS]{class="badge informative" title="僅適用於雲端專案(Adobe管理的PaaS基礎結構)和內部部署專案的Adobe Commerce 。"}

聯結器摘要的欄位對應

此頁面記錄了Adobe Commerce Optimizer Connector如何將Adobe Commerce目錄欄位轉換為Commerce Optimizer Catalog Data Ingestion API所需的格式。 如需支援的摘要及其API端點的清單,請參閱聯結器參考。

產品

products摘要傳送資料至產品端點。

Adobe Commerce欄位
Commerce Optimizer API欄位
對應詳細資料
sku
sku
storeViewCode
source/locale
name
name
urlKey
slug
productId
externalIds[0].id
將origin設為"AdobeCommerce"
status
status
將狀態轉換為大寫。 如果狀態遺失,或如果可設定或組合產品沒有選項值,則使用DISABLED。
description
description
如果缺少說明,則使用空字串。
shortDescription
shortDescription
如果缺少簡短說明,則使用空字串。
visibility
visibleIn
分割逗號分隔值並將Catalog對應至CATALOG並將Search對應至SEARCH。 捨棄其他值。
metaTitle
metaTags/title
metaDescription
metaTags/description
metaKeyword
metaTags/keywords
將換行分隔的關鍵字分割成陣列,並修剪空白字元。
inStock, lowStock, weight, weightUnit
attributes[].code = "aco_ac_attributes"
一律新增aco_ac_attributes專案作為第一個屬性。 其JSON值包含inStock和lowStock做為字串。 當這些值可用時,它包含weight和weightType。
attributes[]
attributes[]
將每個專案對應至其屬性程式碼、字串值,以及相符的變數參考ID (可用時)。 略過inStock、lowStock、categories、weight和weightType。 與存貨相關的值包含在aco_ac_attributes中。 類別會匯出為路由。
images[]
images[]
略過沒有URL的影像。
匯出url、label (如果遺漏則為空白)和sortOrder (整數,預設為0)。
依sortOrder遞增順序排序影像。
對應標準角色:image到BASE、small_image到SMALL、thumbnail到THUMBNAIL和swatch_image到SWATCH。 將其他角色匯出為customRoles[]。
categoryData[].categoryPath
routes[].path
略過具有空白類別路徑的專案。
categoryData[].productPosition
routes[].position
如果缺少產品位置,則使用0。
links[].type + links[].sku
links[]
type個大寫;捨棄不含sku的專案
parents[].productType + parents[].sku
links[]
將configurable對應至VARIANT_OF,並將bundle或bundle_fixed對應至IN_BUNDLE。 將其他產品型別轉換為大寫。 略過沒有SKU的父母。
configurable options
configurations[]
匯出具有ID和至少一個值的選項。
將id對應至attributeCode。 當swatchType存在時,將type設定為SWATCH,否則設定為CONFIGURABLE。
使用預設值的識別碼做為defaultVariantReferenceId。
將每個值對應到variantReferenceId、label、colorHex和imageUrl。
bundle options
bundles[]
匯出至少包含一個專案的選項。
使用選項標籤做為group,如果標籤是空的,則使用Bundle group。 將required複製到輸出。
將checkbox和multi轉譯器型別的multiSelect設為true。
列出defaultItemSkus中的預設SKU。 每個專案包含sku、qty (預設為0)和userDefinedQty (從qtyMutability,預設為false)。

產品屬性中繼資料

productAttributes摘要傳送資料至中繼資料端點。

Adobe Commerce欄位
Commerce Optimizer API欄位
對應詳細資料
attributeCode
code
storeViewCode
source/locale
label
label
dataType + frontendInput
dataType
請參閱下方的轉換表格
dataType和frontendInput
dataType
使用下列轉換規則。
visible, visibleInSearch, visibleInListing, visibleInCompareList
visibleIn[]
當旗標為true時,會將其對應的值加入:
visible → PRODUCT_DETAIL
visibleInSearch → SEARCH_RESULTS
visibleInListing → PRODUCT_LISTING
visibleInCompareList → PRODUCT_COMPARE
filterable
filterable
sortable
sortable
searchable
searchable
searchWeight
searchWeight
searchTypes
searchTypes

資料型別轉換

當dataType為int時,聯結器會檢查frontendInput。 對於其他資料型別,frontendInput不會影響轉換。

輸入dataType
輸入frontendInput
輸出dataType
int
boolean
BOOLEAN
int
text或select
TEXT
int
任何其他值,包括缺少的值
INTEGER
decimal
未使用
DECIMAL
text, varchar, static, datetime
未使用
TEXT
OBJECT
未使用
OBJECT
任何其他值
未使用
TEXT
NOTE
當屬性使用OBJECT資料型別時,Products API會嘗試將其儲存的值剖析為JSON。 如果剖析成功,API會傳回值作為巢狀物件。 針對無法以單一值表示的結構化屬性資料,請使用OBJECT。 如需指示,請參閱動態新增產品屬性。

價格簿

priceBooks摘要傳送資料至價格簿端點。

與其他聯結器摘要不同,Adobe Commerce中的SaaS Data Export索引器不會收集priceBooks摘要。 聯結器會從Admin的網站和客戶群組設定產生此摘要。

聯結器會針對每個網站,為每個客戶群組建立一個基本價格簿和一個子價格簿。

對priceBookId使用這些公式:

  • 一般價格的基準價格簿: priceBookId = websiteCode。
  • 客戶群組的子價格簿: priceBookId = websiteCode::sha1(customerGroupId),其中sha1(customerGroupId)是客戶群組的整數ID的SHA-1十六進位摘要。

價格摘要會使用相同的公式,將每個價格專案指定至價格簿。 如需店面如何針對客戶工作階段解析priceBookId的相關資訊,請參閱無頭店面整合。

Source欄位或值
Commerce Optimizer API欄位
對應詳細資料
websiteCode
parentId
將此欄位新增至子價格簿。 其值可識別基本價格簿。
網站名稱
name
使用基本價格簿的網站名稱。 對子價格簿使用Customer group name (Website name)。
websiteCode
parentId
僅出現在子價格簿上;指向基本價格簿
網站基本貨幣
currency
僅包含基本價格簿的此欄位。 兒童價格簿會省略它。

價格

prices摘要傳送Adobe Commerce資料至價格端點。

摘要輸入欄位
Commerce Optimizer API欄位
對應詳細資料
sku
sku
以未變更的方式傳遞SKU。
websiteCode, customerGroupCode
priceBookId
將websiteCode與customerGroupCode中客戶群組識別碼的SHA-1雜湊結合。 如果customerGroupCode是0,則會單獨使用websiteCode。
regular
regular
以不變的價格傳遞一般價格。
discounts[]
discounts[]
如果來源值為null,會匯出空白陣列。
若專案的code設為special_price且percentage,當值介於0與100之間時,將percentage設為100 - percentage。 設定為0 (位於或超出該範圍)。
將其他專案(包括價格特別價格)通過未變更。
tierPrices[]
tierPrices[]
如果來源值遺失或null,則使用空白陣列。

類別

categories摘要傳送Adobe Commerce資料至類別端點。

含有空白urlPath (邏輯根類別)的專案會被略過,且永遠不會提交。

Adobe Commerce欄位
Commerce Optimizer API欄位
對應詳細資料
storeViewCode
source/locale
name
name
urlPath
slug
description
description
position
position
匯出出現時的類別位置。 缺少欄位時省略該欄位。
metaTitle
metaTags/title
metaDescription
metaTags/description
metaKeywords
metaTags/keywords
以換行分隔的字串分割為陣列
image
images[].url
單一元素陣列; roles: ["BASE"]
isActive + includeInMenu
families
["top_menu"]若兩者皆為true,否則[]

| metaKeywords | metaTags/keywords |將換行分隔的關鍵字分割成陣列,並修剪空白字元。 |
| image | images[].url |當image存在時,會匯出具有BASE角色的一個影像。 當影像空白或遺失時,匯出空白陣列。 |
| isActive + includeInMenu | families |只有在兩個值都是true時才新增top_menu。 否則,會匯出空白陣列。 |
| attributes[] | attributes[] |將具有非空白attributeCode的專案匯出為{code, values[]}。 將值轉換為字串。 不存在符合條件的專案時,省略attributes。 |

recommendation-more-help
commerce-help-aco-connector