References

Connector default behaviour

Reference data / entities allows you to link custom entity objects with their own properties to multiple products. The connector will create simple or multiple select attributes in Magento for these Akeneo attribute types. During the product export step the necessary select options will get created. This way Magento knows which entities are linked to which products.

Possibility to send the property attributes and values

Our Magento partner company PHPro has written custom API endpoints which make it possible to insert, modify or remove entity properties and values. This way all data is present in Magento. Otherwise Magento needs to create their own API calls back to Akeneo environment to receive this information.

Difference between reference data and reference entities

Reference entities

Reference entities are available in all Akeneo EE projects. Backend users can create as much entities as they want. No coding required. Because the API connector must work for EE and CE projects we cannot activate export logic for reference entities by default. Therefore we need to import extra configuration for EE projects.

We do this by adding a extra config file to our project. Under {project_root}/config/services/services.yml add the following code.

imports:
    # add when using EE
    - { resource: '@MagentoBundle/Resources/config/ee_services.yml' }

This file contains all logic (more than just reference entity logic) required for EE project. Including the logic for exporting reference entity data. See the installation manual for more information.

Reference data

Reference data is used for CE projects and is not available by default. For each project reference data must be programmed at customer request. Therefore the API connector cannot activate logic for reference data by default either. So we must active this logic by importing a separate config file again.

We do this by adding a extra config file to our project.

imports:
    - { resource: '@MagentoBundle/Resources/config/reference_data.yml' }

See the installation manual for more information.

Working

Once added one of these config files to you project, you’ll see that there are new export types available.

  • FOR CE projects: Magento reference data export
  • FOR EE projects: Magento reference entity data export

Export types

This export type has two export steps

  • Reference entity export -> creates a custom eav_entity
  • Reference record export -> creates the reference entity item with it’s data

At this moment there is no logic written for creating entity attributes dynamically. These attributes are created manually once.