[仅限PaaS]{class="badge informative" title="仅适用于云项目(Adobe管理的PaaS基础架构)和内部部署项目上的Adobe Commerce 。"}

连接器信息源的字段映射

本页记录了Adobe Commerce Optimizer Connector如何将Adobe Commerce目录字段转换为Commerce Optimizer Catalog Data Ingestion API所需的格式。 有关支持的馈送及其API端点的列表,请参阅连接器引用。

产品

products馈送将数据发送到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。
使用默认值的ID作为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数据类型时,产品API尝试将其存储值解析为JSON。 如果解析成功,则API将返回值作为嵌套对象。 对于不能表示为单个值的结构化属性数据,请使用OBJECT。 有关说明,请参阅动态添加产品属性。

价格手册

priceBooks信息源将数据发送到价格手册终结点。

与其他连接器馈送不同,Adobe Commerce中的SaaS Data Export索引器不收集priceBooks馈送。 连接器从管理员的网站和客户组配置生成此信息源。

对于每个网站,连接器会为每个客户组创建一个基本价格手册和一个子价格手册。

对priceBookId使用这些公式:

  • 常规价格的基础价格手册: priceBookId = websiteCode。
  • 客户组的子价格手册: priceBookId = websiteCode::sha1(customerGroupId),其中sha1(customerGroupId)是客户组的整数ID的SHA-1十六进制摘要。

价格信息源使用相同的公式将每个价格条目分配给价格手册。 有关店面如何为客户会话解析priceBookId的信息,请参阅Headless店面集成。

Source字段或值
Commerce Optimizer API字段
映射详细信息
websiteCode
parentId
将此字段添加到子价格手册。 其值标识基本价格手册。
网站名称
name
使用基本价格手册的网站名称。 将Customer group name (Website name)用于子价格簿。
websiteCode
parentId
仅显示在子价格手册中;指向基本价格手册
网站基础货币
currency
仅包括基本价格手册上的此字段。 儿童价格手册省略了它。

价格

prices信息源将Adobe Commerce数据发送到Prices终结点。

馈送输入字段
Commerce Optimizer API字段
映射详细信息
sku
sku
以不变方式传递SKU。
websiteCode, customerGroupCode
priceBookId
将websiteCode与customerGroupCode中客户组ID的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