Akeneo is a product information management system that enables enterprises to create, maintain, and distribute their entire product catalog across multiple channels.
With the Storyblok Akeneo plugin, you can connect Akeneo with Storyblok and use it to display product information anywhere in your project. Here's how to set up this plugin:
On the Akeneo Side
From the Connect option on the right sidebar, navigate to Connection Settings and click Create. You will now see a new connection form. Fill it out, and remember to set the Flow type as "Data destination."
After creation, in the Credentials section, take note of the following items, as you will need them to complete the setup on Storyblok:
- URL for the connection (visible in your browser's URL bar)
- Client ID
- Client Secret
- Username
- Password
On the Storyblok side
Once installed, create a new field of the type plugin in the block library and set the custom type to sb-akeneo
.
The first time you open your story to add content, you will see options to fill in the Akeneo credentials. Fill these in and save.
You should then see an option to add products using the newly created field. Click on it to open the Akeneo product selection modal. You can see available products and perform various other options, such as filtering by channel and category and switching the locale and currency. Then, you can load the selected products.
Once the story is saved or published, access the Akeneo product data in the API response. In the JSON for the story that has product data from Akeneo, there will be an object with the following structure:
{
"items": [
{
"id": "d893b2c0-2c6c-4f6b-bfd3-2738b8fcac2d",
"sku": "8877886635365",
"name": [
{
"data": "Storyblok T-Shirt DE",
"scope": null,
"locale": "de_DE",
"attribute_type": "pim_catalog_text"
},
{
"data": "Storyblok T-Shirt UK",
"locale": "en_GB"
}
],
"type": "product",
"image": [...],
"price": [
{
"data": [
{
"amount": "20.00",
"currency": "EUR"
}
],
"scope": null,
"locale": null,
"attribute_type": "pim_catalog_price_collection"
}
],
"updatedAt": "2024-11-26T23:23:42.000Z",
"categories": ["3m"],
"description": [
{
"data": "Some description",
"scope": null,
"locale": "en_GB",
"attribute_type": "pim_catalog_textarea"
}
]
}
],
"plugin": "sb-akeneo"
}
If you need further information about products on Akeneo, you can use the product ID or SKU to call the Akeneo API and fetch it.