We will start off by doing the preparations on the Bynder instance. A few things need to be set up here.
You can create a permanent token by navigating to ‘Advanced settings’ > ‘Portal settings’ > ‘Permanent tokens’ using the cog in the upper right hand side of the application, provided you have the necessary rights to do so.
Clicking ‘Add new’ prompts a form with a Bynder user selection. This would preferably be linked to a dedicated user, since the history/actions will be linked to the selected one. The user should have the following permission active:
Next up you select the access scopes of the token:
After selecting the user, scopes and confirming, a permanent token should be generated (store it somewhere on temporary location as leaving the page will obscure the token) which we can use to add to the credentials in Akeneo.
A few metaproperties need to be defined/existent to link to a product’s (or model’s) identifier and the related attribute within that product in Akeneo.
- First of all, we want a product identifier with the adviced configuration as following
- Then we define the same type of metaproperty, but for product model codes
- We want to make sure there is a metaproperty that contains/links to the attribute name that reflects the image attribute name of the product in Akeneo. The following setup would be adviced.
- There is an optional possibility to map 1 metaproperty option to multiple image attributes, provided they have the same name affixed with a dash and count. (f.e. ‘application’ in bynder => ‘application_1’, ‘application_2’ in Akeneo CE) In that case, an order field needs to be added in Bynder to define the order of the assets that get linked.
The metaproperty configurations above are what we think the most optimal configurations in terms of usability and added value. As long as the metaproperty is available through the Bynder API (ApiField) and the value reflects/maps with the corresponding values in Akeneo, the asset will get linked.
Now that we set up Bynder and we have the permanent token at hand, we can provide mapping and credentials to Akeneo, and have the linking/enrichment jobs scheduled.
Adding Bynder credentials to Akeneo CE is done in the UI using the credentials manager provided with the connector. Browse to System > Credentials manager and click on ‘create credential’. Provide the code input with the value ‘bynder’ and select one time key as the type of credential. When added, you can add the hostname (f.e. induxx-demo.bynder.com) and the permanent token. That’s it!
Let’s revisit the
bynder_attribute_mappings.yml we added in the installation step. Below we provided some context to the parameter names.
What key => value in this configuration is concerned, we are mapping Akeneo (key) to Bynder (value).
|property_mappings||Used to map the required Bynder metaproperties to Akeneo attributes|
|asset_type_metaproperty_options_mappings||If the asset type (the image attribute name) is a select, you can (optionally) map the values to the corresponding metaproperty options in Bynder|
|sortable_asset_type_metaproperty_mappings||Used to map attributes that are sortable. Example attribute code is ‘application_image_1’ the mapped ‘sort_order’ meta property has on the asset 3 as value. The attribute code that will be used is ‘application_image_3’.|
|localizable_asset_type_metaproperty_mappings||Used to map attributes that are localizable. The asset will be linked to each locale that is selected in the metaproperty that is mapped to applicable_locales.|
|scopable_asset_type_metaproperty_mappings||Used to map attributes that are scopable. The asset will be linked to each channel that is selected in the metaproperty that is mapped to applicable_scopes.|
|enrichment_metaproperty_mappings||define what attributes need to be used to enrich a metaproperty in Bynder|
|enrichment_metaproperty_options_mappings||If the akeneo attribute above is a select with options, you can (optionally) map the option’s value to the correct one in Bynder|
|enrichment_metaproperty_locale_mappings||If it’s a localizable attribute that is mapped to enrich Bynder, we need to define what locale we want to see synced.|
|derivative_to_use||defaults to ‘original’, this is optional to define what type of derivative needs to be linked to the product instead of the original|
|asset_unlink_after_archiving||default to ‘true’. Bynder has the possibility to archive an asset, this parameter gives you the option whether or not to unlink the asset in Bynder in this event|
|update_metaproperty_on_empty_only_mappings||here you can define the attributes for enrichment that will only update the mapped metaproperty in Bynder if it hs no prior value set|