header-mobile-bg

Integrating Commercetools with CoreMedia Content Cloud

Over the last few years, CoreMedia Content Cloud has integrated with every major eCommerce system on the market. Some of these are delivered as a bundled product (including Salesforce Commerce Cloud, SAP Commerce Cloud and HCL Commerce) while others are implemented on a project level (including Elastic Path, Magento, Spryker and a variety of homegrown systems).

Over the last few years, CoreMedia Content Cloud has integrated with every major eCommerce system on the market. Some of these are delivered as a bundled product (including Salesforce Commerce Cloud, SAP Commerce Cloud and HCL Commerce) while others are implemented on a project level (including Elastic Path, Magento, Spryker and a variety of homegrown systems).

And now we’re excited to announce a partnership with commercetools, a leader in next-generation commerce software.

The good thing is that all integrations follow the same approach. Which is: they use an integration API layer known as the CoreMedia Commerce Hub that is deeply integrated into the CoreMedia platform. This integration includes an editorial interface (called CoreMedia Studio) featuring comprehensive preview capabilities and all of the associated delivery components (the CoreMedia Content Application Engine for server-side rendering and the CoreMedia Headless Server for client-side rendering).

The benefits of this approach are clear. Because when adding a new integration, enterprises can focus just on providing the required data instead of having to work out how to expose the integration to marketers and frontend developers.

Here’s an example from the Salesforce Commerce Cloud integration. This is what things look like within CoreMedia Studio.

Screenshot Integrating Commercetools

Screenshot Integrating Commercetools

Marketing users have full access to the eCommerce catalog without having to switch between tools. They can easily drag-and-drop items from various systems onto a landing or category page. (And the system doesn’t copy any product data, of course, it’s just referencing items via the eCommerce APIs).

So not only do marketing users have full access to all product data but they’re also working with a full preview – a combination of product data from the eCommerce system and content from CoreMedia – which is directly integrated into CoreMedia Studio.

This preview immediately reflects changes across all formats, because the key to enabling marketers to publish content consistently – on all channels, in all languages, in any currency, etc. – is to let them do this without needing any technical knowledge.

BEFORE YOU START ADDING YOUR OWN ECOMMERCE SYSTEM

So here are some questions to consider before integrating CoreMedia with your own eCommerce system (along with our answers).

Does the eCommerce system come with an API that exposes the full catalog, including products and variants? Most systems today have this kind of API in place.

What’s your desired integration approach? CoreMedia can address a variety of scenarios – for example, delivering fragments or data into an existing experience (a commerce-led or “headless” approach),  rendering the whole experience (a content-led approach), or anything in between (a hybrid approach). The first approach is the one we’re seeing the most often, as there’s no rip and replace required and you can build on your existing landscape.

What’s your desired rendering approach? Is the rendering happening on the server-side, the client-side or both? All scenarios are supported by CoreMedia but recently we’re seeing a shift from server-side rendering to a headless approach leveraging an API gateway and pre-built Progressive Web Apps (PWAs) such as Vue Storefront or Mobify.

INTEGRATING COMMERCETOOLS

So how do you integrate the eCommerce system of your choice? The following example focuses on commercetools but is valid for almost any eCommerce system.

  1. Build the integration between CoreMedia and commercetools by implementing your own commerce adapter
  2. Set up content to test the editorial integration within CoreMedia Studio
  3. Build the frontend integration

BUILDING THE API INTEGRATION USING COREMEDIA COMMERCE HUB

Commerce Hub is the term for the CoreMedia concept that allows different eCommerce systems to be integrated against a stable API. This API defines which lookups need to be implemented by a developer so that any CoreMedia component can communicate easily with the eCommerce system.

The diagram below depicts a high-level architecture. All you need to implement is section indicated by the green box – the vender-specific implementation of the CoreMedia Commerce Adapter framework.

Screenshot Integrating Commercetools

Screenshot Integrating Commercetools

One lookup you need to implement is, for example, getProductById. This vendor-agnostic framework will pass a productId and a specific storeId. Your job is to forward them to the eCommerce system. And the big advantage commercetools brings to the table is their Java SDK to access the catalog and its products.

The lookup will look like this:

public Optional<Product> getProductById(IdQuery idQuery) {

 //Extract productId
String productId = idQuery.getId().getValue();
//Setup call to commercetools
final CompletionStage<Product> stage = getClient().execute(ProductByIdGet.of(productId));
//Perform call and return result wrapped as Optional
return Optional.ofNullable(SphereClientUtils.blockingWait(stage, Duration.ofMinutes(1)));
}

Now you need to map the result (a commercetools product) to a CoreMedia product. Or you could also create a unit test.

The method getProductById is one of the required calls you need to implement. And you need to implement access to the catalog, including category hierarchy, product data, images and pricing. Using an existing adapter as a reference is the best way to go. With some knowledge about the commercetools API, this is achievable in just a few days.

SETTING UP A SITE

Add a standard eCommerce site within CoreMedia and link it with your connector and you’re good to go. You’ll see the catalog now being integrated into CoreMedia Studio, like this:

Screenshot Integrating Commercetools

Screenshot Integrating Commercetools

And you can already browse the catalog and open up products and categories:

Screenshot Integrating Commercetools

Screenshot Integrating Commercetools

This looks good but we’re still missing a vital part: the preview. CoreMedia allows you to add any preview right within CoreMedia Studio. Since commercetools comes with a Vue-based client, we’ve integrated it in this example as is.

Now Studio will look like this:

Screenshot Integrating Commercetools

Screenshot Integrating Commercetools

Much better, although note that at this stage no content from CoreMedia has been loaded yet.

BUILDING THE FRONTEND INTEGRATION

Commercetools’ client is based on Vue and uses the Apollo framework to load data from a GraphQL endpoint. This makes the CoreMedia integration easy since we support this integration pattern as well. All you need to do is add a second endpoint pointing to the CoreMedia Headless Server, start loading data, then render it using Vue.

Screenshot Integrating Commercetools

Screenshot Integrating Commercetools

In addition, you can enable the responsive slider so marketing users can preview the experience for multiple viewports. You can see this represented here as a slider component above the preview:

Screenshot Integrating Commercetools

Screenshot Integrating Commercetools

And you can add preview-driven editing right into the frontend experience. This provides business users with a context-menu within the preview. If you want to exit a content item you see within the preview, for example, just right-click into the experience and you’ll get a context-menu so you can start editing:

Screenshot Integrating Commercetools

Screenshot Integrating Commercetools

As well, there is what we call “time travel” – a feature that provides business users the ability to preview an experience for any future or past date.

Screenshot Integrating Commercetools

Screenshot Integrating Commercetools

Note that this pattern doesn’t just apply to commercetools but to any eCommerce system offering an API.

SUMMARY

This is truly agile: It only takes a few days to get an initial version up and running. And the The required knowledge set is light –java programming for the CoreMedia Commerce Hub integration and some knowledge of commercetools and CoreMedia in order to map the data.

For the frontend piece, this depends on the technology of the client. In the above scenario, knowledge of industry-standard technologies like Vue, GraphQL and Apollo was required along with a little knowledge of CoreMedia in order to add the responsive slider, the preview-driven editing capabilities and time travel. A little more involved but hardly rocket science.

We’d be happy to share the integration code with you and answer any questions. So get in contact with us!

Philipp Hofmann_retu_sRGB

Philipp Hofmann

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