Back to blog

Headless Ecommerce Architecture Using Contentstack and commercetools

headless-ecommerce-architecture.png

Published: Oct 22, 2019


Predicting the future is difficult. But given the pace at which customer demands and expectations are evolving, we can be certain that today’s solutions cannot cater to the requirements of tomorrow.

This is especially true for the ecommerce space. Consumers expect more convenience (e.g., order from anywhere, anytime, through smart speakers). Businesses are demanding more flexible commerce solutions and reduced time to market. Moreover, with the increase in adoption of IoT devices, businesses are looking at solutions that can support connected experiences.

This calls for a solution that can keep up with this pace of ever-changing demands. The answer is a re-imagined, modern and headless commerce architecture. Such an architecture combines a headless CMS that can deliver content, as well as a headless ecommerce platform that provides core e-shopping functionalities, such as pricing details, cart, payment gateway – all through REST APIs.

Using Contentstack as your CMS and Commercetools as your ecommerce platform allows you to develop a robust, scalable, and secure ecommerce site that’s ready for the future.

Content in Contentstack: Shopping Details in commercetools

Since a headless CMS ensures that content can be published across any channel with ease, it makes more sense than ever to manage all product-related content within the CMS. This includes articles, images, and any other marketing content. Conversely, key components such as pricing, orders, cart, and checkout, can all be managed in commercetools. Such an implementation ensures that key concerns are separated, and of course, managed by two best-in-class solutions.

headless-ecommerce-architecture.jpg

Syncing Contentstack and commercetools for Seamless Integration

Since both Contentstack and commercetools are API-based solutions and offer webhooks, keeping them in sync is easy. For example, whenever an order is placed, commercetools can trigger a webhook to update product inventory in Contentstack. Or, if any product details (such as pricing or offers) are updated in commercetools, it can send notifications so that site content editors can make corresponding site updates using Contentstack. It is easy to keep both systems in sync for any other event using webhooks.

Ecommerce Demo: See Contentstack and commercetools in Action

We have created a sample ecommerce web app using Contentstack and commercetools. You can check out the demo, view the code, or go through the steps to set up your own site. While the site is intended to be just a simple, straightforward demo, it will help you gain a quick understanding of how to set up an ecommerce site – and with Contentstack you can always add additional integrations and capabilities if you wish you enrich the experience.

commercetools Extension for Contentstack-powered Sites

The demo web app provided above uses both Contentstack and commercetools within your site code. There’s another way of integrating these two services: Create an ecommerce website using Contentstack, and use the commercetools field extension to fetch product details in your content type’s fields. Or you can use this extension within the demo app given above. Learn more about this extension to understand how you can use it in your apps.

More Resources

Share on:

About Contentstack

The Contentstack team comprises highly skilled professionals specializing in product marketing, customer acquisition and retention, and digital marketing strategy. With extensive experience holding senior positions at renowned technology companies across Fortune 500, mid-size, and start-up sectors, our team offers impactful solutions based on diverse backgrounds and extensive industry knowledge.

Contentstack is on a mission to deliver the world’s best digital experiences through a fusion of cutting-edge content management, customer data, personalization, and AI technology. Iconic brands, such as AirFrance KLM, ASICS, Burberry, Mattel, Mitsubishi, and Walmart, depend on the platform to rise above the noise in today's crowded digital markets and gain their competitive edge.

In January 2025, Contentstack proudly secured its first-ever position as a Visionary in the 2025 Gartner® Magic Quadrant™ for Digital Experience Platforms (DXP). Further solidifying its prominent standing, Contentstack was recognized as a Leader in the Forrester Research, Inc. March 2025 report, “The Forrester Wave™: Content Management Systems (CMS), Q1 2025.” Contentstack was the only pure headless provider named as a Leader in the report, which evaluated 13 top CMS providers on 19 criteria for current offering and strategy.

Follow Contentstack on LinkedIn.

headless-ecommerce-architecture.png

Published: Oct 22, 2019


Background.png