Stay informed
Receive monthly updates on trends, products and growth insights in your inbox.

Get weekly updates on markets, new features, and exclusive investment insights delivered straight to your inbox.
How can we harness the potential of generative AI (GenAI) in the realm of digital commerce? And is it possible to use GenAI to streamline the implementation of a composable commerce solution? To answer these questions, our engineering team ran an experiment to test the boundaries of generative AI using GPT-4 for a potential commercetools implementation. Here’s what we learned from this exploration.
2023 has emerged as the year of generative AI, capturing the imagination of not only the media but also businesses — and individuals like you and me. While the hype is certainly here, it raises the question: Is this excitement justified by tangible results? Can generative AI accomplish more than helping school kids write Shakespeare-like sonnets inspired by Dolly Parton?
The answer is a resounding YES. Undoubtedly, GenAI tools such as GPT-4 and Jasper are taking the business world by storm with numerous applications, from the lightning-fast creation of product descriptions to virtual assistants for customer service.
At commercetools, we’re actively exploring the potential of this technology for all things commerce. A recent experiment helped us discover how generative AI using GPT-4 can support customers to implement commercetools Composable Commerce for a typical retailer’s site. Using prompt engineering during the process, we wanted to answer the following questions:
Let’s delve deeper into what we learned after six hours of prompting on GPT-4.
First things first: The scope. We made the deliberate choice to generate a basic, static eCommerce application replicating a state-of-the-art retailer that provides exceptional customer experiences. For this reason, we randomly chose Adidas.com.
(Note that Adidas is not a customer of commercetools, which aligns with the nature of our experiment of exploring potential new implementations).
Not only does this approach provide an idea of a potential implementation but also sets our expectations higher on what generative AI can help us achieve.
As a step further, this eCommerce site would emulate a standard customer journey, spanning from the homepage to the ultimate destination: The “order complete” page. To bring this scope to life, we employed TypeScript and React to create a custom frontend.
Here’s an overview of the scope and approach we took along the way:
Our prompts, which you can find here, started from a generic “Create a boilerplate Reach commerce application based on Adidas’s website” down to more precise requirements to rework the code wherever applicable and troubleshoot during the process.

After three engineers spent six hours prompting and refining their interactions with GPT-4, we actually accomplished a great deal of what we initially set our sights on:
It’s important to note that all code, except the anonymous session flow, was in fact generated by GPT-4. However, half the time was spent on debugging and resolving issues during the exercise, and therefore the “checkout” and “order complete” pages weren’t completed during the preset timeframe of six hours.
Overall, we were happy with the preliminary results when it came to the creation and integration of commerce functions. However, it’s clear that GPT-4 lacks the visual capabilities to actually replicate a retailer’s site.
Let’s start with the good stuff: We were impressed by GPT-4 proficiency in enhancing and expanding existing code patterns, and its knack for introducing commendable programming patterns and syntax over time.
Furthermore, GPT-4 has the ability to respond correctly to specific instructions and is a capable system of generating boilerplate code. This capability helped us to quickly create simple React applications from the ground up.
However, achieving suitable results wasn’t without its challenges. Our engineers found that the tool often required constant code references and hand-holding to get the code right, suggesting that it’s better suited to edit and refine code instead of creating it from scratch. This was the case even when using the comprehensive commercetools API documentation as a reference.
As already pointed out, GPT-4 completely lacks visual thinking abilities at this stage. The inconsistent styles with the well-known Adidas look and feel are plain to see. When tasked to create styles for commercetools’ components, the tool inadvertently created class name collisions, which needed to be corrected with CSS modules.
In a nutshell, while we got decent boilerplate code, it comes as no surprise that a GenAI tool needs very clear and precise requirements to generate meaningful code. Our engineers also spent a fair amount of time copying in the component or block of code that had just been created in order to ask for revisions, refactors and/or bug fixes. Interestingly, GPT-4 generated non-existent commercetools SDK API methods, which made troubleshooting even more time-consuming.
So, what have we learned from this exercise? Here are our four key takeaways:

It’s clear that what we’re experiencing today is a technology on the rise, and a lot of improvements will certainly pop up in the next months and years. And while AI-powered commerce is definitely written in the stars — especially at commercetools — we see it as a companion that helps us get more efficient rather than a replacement for human ingenuity.
This experiment showed us that it’s already possible to leverage GenAI to kickstart a commerce implementation. This can be particularly relevant for teams that aren’t yet familiar with the world of composable commerce and MACH®, and need a shortcut to accelerate development. At the same time, our partners can use it as a tool to accelerate implementations and test cycles for their own clients.
In the near future, we expect that you’ll be able to do even more. Moving from prompt engineering (manually crafted prompts) to prompt-tuning (updating some of a pre-trained model’s parameters), it will be possible to optimize LLMs (large language models) for specific tasks. When that comes, the power of generative AI to create commerce implementations will be even more transformative.
And, to answer the questions we stated at the beginning of this article, we do believe that GenAI will be able to simplify implementations at a certain point in time while also improving the developer experience as the technology matures and trained models arise.
In any case, you can already start trying out how generative AI and commerce converge with composability. A composable architecture, championed by commercetools, is crucial to experiment, implement and adapt any AI applications with ease — and without disruption to your business operations or tech stack. That’s really the first step in this journey!
If you’re ready to experiment with generative AI on commercetools, use our comprehensive API documentation as a baseline and start your own prompt engineering/tuning.
Receive monthly updates on trends, products and growth insights in your inbox.