header-mobile-bg

Integrating CoreMedia Content Cloud with Commerce Layer: A simple process

With the Italian e-commerce vendor Commerce Layer disrupting the market, CoreMedia saw a great opportunity to test the CoreMedia Commerce Hub integration pattern with it. In this article, we want to demonstrate how easily the integration of a CoreMedia Commerce Hub Adapter for Commerce Layer can be created. The focus is on the developer experience.

Blog - Commerce layer

CoreMedia has extensive experience in integrating with e-commerce systems, with many customers relying on our proven integration pattern, facilitated by the CoreMedia Commerce Hub. This Hub features prefabricated integration points that are ready to be utilized with our editorial backend, CoreMedia Studio, as well as our delivery engines—whether it's our GraphQL-based headless service or our headful content application engine.

Blended content and commerce experiences

Enhancing the content creator’s experience in creating blended content and commerce experiences is where CoreMedia excels. The CoreMedia Commerce Hub supports standard content-driven use cases out-of-the-box, including: 

  • Accessing products and SKUs (product variants) from within CoreMedia Studio 

  • Creating storytelling with embedded products 

  • Creating shoppable images (images with clickable hot zones) 

  • Creating shoppable videos (videos with an interactive timeline of products) 

  • Enriching product listing pages (PLPs) with content at fix positions 

  • Enriching product detail pages (PDPs) with inspirational content 

  • Personalizing content experiences based on e-Commerce segments  

  • Creating blended content and commerce mega menus 

And much more. 

With the Italian e-commerce vendor Commerce Layer disrupting the market, we saw a great opportunity to test our CoreMedia Commerce Hub integration pattern with them.

So, in this article, we want to demonstrate how easily the integration of a CoreMedia Commerce Hub Adapter for Commerce Layer can be created. The focus is on the developer experience.

Setting up Commerce Layer

If you already have an existing Commerce Layer organization with products in it, this chapter can be skipped. Otherwise, feel free to read through the getting started on Commerce Layer documentation: https://docs.commercelayer.io/core/readme/onboarding-tutorial. After the onboarding tutorial you are ready to go.

What needs to be considered is that you have a git repository for a complete demo-store to test with it (https://github.com/commercelayer/demo-store). Read through the README and start your local store.

Getting your IDE ready

First things first: authentication. Create an oauth method which connects you via API to the store. You need to know your client ID and your client secret. Obviously, the client secret shouldn’t be shared with third parties. Also, you need to connect it with the right domain. The properties should look like this:

To fetch the access token for your organization, it’s necessary to send a POST request to the /oauth/token endpoint.

Now you can manipulate the data and send it via API calls to CoreMedia’s endpoints.

It’s important to notice that there are different entities that you can GET from different endpoints. There are, for example, markets, SKUs, shipping categories, etc. Each one of them has relationships, attributes and a unique ID. For our CoreMedia Commerce Adapter we want to be able to list these relevant entities in the CoreMedia Studio library to allow content creators to embed them into content experiences.

The steps are:

1. Set up HTTP Request

2. GET Market-, Shipping Category-, SKU list

3. GET Relationships between these entities

4. Build a connector to CoreMedia’s Studio Server

5. Show the data in the Studio Client

Step 1:

Include the necessary headers in your request. This usually involves setting the authorization header with your API key and specifying the mime type as application/json.

Step 2:

Now, getting the data from Commerce Layer is easy. Using the API token, send a GET post to the right API endpoint. The GET post is generic and could be built with different bodies. For example, if you want to have all SKU lists available the body needs nothing more than the API endpoint. If a specific type is searched for the API needs also the unique ID of the type. It could look like this:

Step 3:

Commerce Layer always returns responses in a JSON format if the HTTP request is set up right. So, attributes and relationships are provided by the response. In this case, it’s easy to read out the relationships that are needed.

Step 4:

Building a connector to the CoreMedia Studio Server works fine over ports if it’s run on your local machine. Set up the “plugins.directories” property in the run configuration for Studio server to listen on the port, which you have configured in the spring properties in the commerce adapter.

Step 5:

Now let’s get to show the data in the Studio Client. After having defined your port, it’s necessary to adjust the “LiveContext” settings inside the studio-client. Select your previously configured port as the “Commerce Connector Endpoint”. Also, the vendor's name and the catalog Id needs to be set.

And that’s it! Now, you have connected Commerce Layer via the CoreMedia Commerce Hub. The great thing about our Commerce Hub is that once connected, it will provide product catalog access in CoreMedia Studio for content creators – as well as integration in our headless server based on GraphQL.

A few examples on how it looks like:

1. Homepage with an embedded product of the demo store of Commerce Layer: First the view in CoreMedia Studio and then the GraphQL view.

2. Shoppable image: The view in CoreMedia Studio and then the GraphQL view.

As you can see, it’s very simple to set up and configure the Commerce Layer specific topics – and due to the high degree of prefabrication in the generic CoreMedia Commerce Hub, you can quickly enjoy the benefits of all the use cases mentioned in the beginning of the article. Have fun!

Ferdinand Ragi

Ferdinand Ragi

How an omnichannel CMS turns in-store screens into sales

How an omnichannel CMS turns in-store screens into sales 

Imagine this: You're walking past a local energy provider’s store. A screen in the window displays a personalized offer for your postcode. You’ve...
Soeren Stamer ceo white male glasses

Sören Stamer

Introducing In-Preview Editing for CoreMedia Content Cloud

Introducing In-Preview Editing for CoreMedia Content Cloud

Edit content directly in the preview with the In-Preview Editing Extension — no tab switching, no guesswork. Just fast, intuitive updates that...
Sebastian Buettner profile

Sebastian Büttner

LLMs changed the rules of search How to succeed in Generative Engine Optimization (GEO) with CoreMedia

LLMs changed the rules of search: How to succeed in Generative Engine Optimization (GEO) with CoreMedia

Search optimization isn’t about climbing rankings anymore. It is about being part of an AI-generated answer.
Marjolein van der Kolk-Mai

Marjolein van der Kolk-Mai

Digital accessibility is no longer optional_article

Digital accessibility is no longer optional: How the European Accessibility Act redefines inclusion

Starting in June 2025, the European Accessibility Act (EAA) will come into force across the European Union, setting minimum accessibility...
Mariana Gaspar

Mariana Gaspar

Soeren presentation at connect 2025

Is your CX as smart as you think? Sören Stamer on leading the intelligent CX revolution

At CoreMedia Connect & Partner Engage 2025, CoreMedia’s CEO and Co-Founder Sören Stamer took the stage with a bold promise: to challenge...
Mariana Gaspar

Mariana Gaspar

Connect and Partner Engage 2025

The Intelligent CX Revolution: Highlights from Connect & Partner Engage 2025

On May 15, 2025, digital innovators, business leaders and strategic partners met at the Kehrwieder Theater in Hamburg for CoreMedia’s annual...
Mariana Gaspar

Mariana Gaspar

Customer profiles: How to build and use them for smarter personalization

Customer profiles: How to build and use them for smarter personalization

Why do some brand interactions feel effortless, like they were made just for you, while others fall flat? The answer often lies in how well a...
Mariana Gaspar

Mariana Gaspar

CoreMedia now

29 years of CoreMedia: A story of curiosity, code and (a little) chaos

From a tiny corner office with green floors and controversial furniture to powering digital experiences for the world’s leading brands.
Mariana Gaspar

Mariana Gaspar

Enhancing digital experiences with location-based personalization

Enhancing digital experiences with location-based personalization

People are tired of one-size-fits-all marketing. These days, they expect brands to know them and to understand what they like, need and care about.
Sebastian Buettner profile

Sebastian Büttner

CoreMedia Girls Day 2025 Feature

Empowering the next generation of women in tech: Celebrating Girls' Day at CoreMedia

Our Hamburg office was buzzing with energy because it was Girls' Day today! This nationwide event gives teenage girls the chance to discover...
white female barbara eigner

Barbara Eigner