Where to find Reference entities in Adobe Commerce?
Since the 100.2.1 version of the Akeneo Connector for Adobe Commerce, the connector imports Reference entities as Product attributes.
However, the Community Edition of the Akeneo Connector doesn't manage Reference entities (As this feature is only available on PIM Enterprise Edition).
Depending on the configuration of your Connector, two attributes can be created from one Reference entity.
Reference entity label attribute
The first attribute created is the Reference entity label attribute. This attribute is used by Akeneo PIM to link a product to a Reference entity record. It contains all records labels of the reference entity as options.
Reference entities attribute mapping
Akeneo attribute type | Adobe Commerce attribute type |
---|---|
Reference entity single link | Select |
Reference entity multiple links | Multi-select |
- Reference entity record label attribute is imported by the Attribute Import job and options by the Option Import job.
- Only Reference entity single link can be used as a configurable axis for Configurable Products.
- Reference entity record label attribute is created with Reference entity record labels.
Reference entity data attribute
Depending on the configuration of your Connector, a Reference entity data attribute can be created. This text area attribute contains all data from Reference entities records assigned to your product (in JSON format).
[
{
"label": "Record Label",
"attribute_1": "Record Attribute 1 Value",
"attribute_image": "akeneo_connector/reference_entities/records/path/to/image.jpg",
"attribute_multiselect": [
"Record Attribute Multiselect Option 1",
"Record Attribute Multiselect Option 2"
],
"magento_option_id": "30"
},
{
"label": "Second Record Label",
"attribute_1": "Second Record Attribute 1 Value",
"attribute_image": "akeneo_connector/reference_entities/records/path/to/image.jpg",
"attribute_multiselect": [
"Second Record Attribute Multiselect Option 1",
"Second Record Attribute Multiselect Option 2"
],
"magento_option_id": "31"
}
]
- Reference entity data attribute is created by the Attribute Import job and data is assigned to products by the Product Import job.
- You need to create your own methods to parse and use the data from this attribute.
- The attribute code of the reference entity data attribute is the same than the reference entity label attribute, but suffixed with _data.
How can I link "Reference entity label attribute" and "Reference entity data attribute"?
You can link the Reference entity label attribute and the Reference entity data attribute in your custom code by using the magento_option_id value inside the Reference entity data attribute JSON content.
magento_option_id value is corresponding to the Magento 2 option_id inside the eav_attribute_option table.
You can also use the localized label of your Reference entity label attribute in order to match the label value contained inside the Reference entity data attribute JSON content.
Where to find my PIM Reference entities medias in Adobe Commerce?
You can find your Reference entities medias in this directory: pub/media/akeneo_connector/reference_entities/records/.
Medias are imported by the Product Import job.