This document will explain Contentful integration with SAP Hybris which includes implementation of Mulesoft as a Middleware for routing and transforming messages.
The behaviour of this implementation will work as an application where content writers can insert some content for products and categories in Contentful which will be pushed to SAP Hybris passing through Mulesoft.
The diagram below shows exactly how this integration will work:
There’s some explanation for the flow of integration defined below:
There are a couple of steps to prepare systems before integration:
Let’s suppose there are 3 fields in a content model named Category which should look like the image below;
2. SAP Hybris Commerce
1. HTTP Listener
– This will behave as the entry point of the flow and will be used to receive payload from Contentful webhook
2. HTTP Request
– This will be used to request and receive full payload for the particular category including its supercategories from Contentful
– This will be used to transform Contentful payload to Hybris payload
4. HTTP Request
– This will be used to send data to SAP Hybris Commerce
1. Configure Settings in Contentful Application for Integration
2. Configure Settings in Mule Application for Integration
Now we’ll configure connectors in Mulesoft Application which were created in “Prepare Systems” section
– Define method as POST
– Define path as /category
– Define method as GET
– Define URL as:
– Define Request body as payload
– Transform Contentful payload to Hybris payload
– Define method as PUT
– Define URL as
Mule flow should look like this
Once done with the steps defined above, Add any entry for category content type in Contentful then Publish it, and go to Hybris Backoffice to verify the category.
As this integration works perfectly fine for products and categories models for SAP Hybris, using Mulesoft was an idea to not make any basic customisations in Hybris however it can be achieved using Contentful API libraries like CMA and CDA by customizing Hybris Service layers and CronJobs. This Integration can be enhanced to make it work for assets integration for which there might be some customization required in Hybris to import external media.