Building an Ecommerce Website with Agility CMS

Agile Ecommerce with Headless CMS: How to Create an Ecommerce Content Strategy

Joel Varty
Joel Varty
Jun 3, 2021
Building an Ecommerce Website with Agility CMS

Both SMB and enterprise organizations benefit from Headless CMS and Ecommerce. Moving away from traditional, monolithic website design brings speed, agility, and better customer experience. Modern development and content tools come together with ecommerce platforms to help drive sales performance.

Ecommerce tools on their own aren't enough to maximize your online revenue. Use Agility CMS to promote your products with personalized experiences that you can continue to test and optimize over time.

Interested in learning how? Let's get started!

A Better Ecommerce Website Architecture: Headless Commerce

What is Headless Commerce?

Headless commerce architecture is similar to headless CMS architecture in the sense that a headless commerce solution can store, manage, publish, and pull content from other applications headlessly. In other words, you can pull in content from anywhere, and push it out to any front-end.

With commerce in the equation, retailers and wholesalers can benefit by extending their experiences and products to new channels. Whereas a legacy CMS couldn’t display products and complete checkouts on a digital sign or smartwatch, a headless commerce solution can.

Learn More: What is a Headless CMS?

Why should you use Headless Commerce? Benefits of the Jamstack approach.

We recommend using headless CMS and headless ecommerce to build a modern Jamstack website.

The CMS and ecommerce APIs will be consumed at build-time to create pages for displaying and promoting your products. These pages will be statically generated and served through a CDN, so they'll always be fast, even during peak periods like Black Friday. By decoupling the website from the ecommerce and CMS data, we remove the bottlenecks associated with monolithic architectures. It's important to note that we won't statically serve any user-specific data - we need to render that dynamically at runtime.

We recommend using serverless functions to implement the user-specific data routines that an ecommerce website requires, including:

  • Login & User Registration
  • Add to Cart & Cart management
  • Checkout
  • Order Lookup & Management

Serverless functions allow you to provide all the functionality offered by your headless ecommerce platform of choice, such as ShopifyBigCommerceStripe, and others. The URLs of these functions will still be rooted in your website's domain, and any API keys will not be exposed publicly.

With a headless eCommerce platform you can:

Deliver 1:1 Personalized Experiences

A headless solution simplifies personalization for companies in multiple ways. For instance, retailers can integrate region-specific payment methods and offer additional regional payment gateways without re-platforming. 

Also, since your backend stores the information multiple channels use, you can distribute personalized offers across devices based on actions your customers have taken on other platforms. 

Integrate With Third-Party Software

Traditional commerce platforms tend to be monolith solutions where if you want to add a new feature you have to use a plugin that slows down your eCommerce store in the long run. For eCommerce retailers, a slow site means fewer customers. Luckily, the headless architecture enables integration with best-of-breed software tools for improved performance.

Scale To New Markets and Segments

A traditional commerce platform doesn’t give customers the option of changing language much less enable content localization in their websites, which represents a barrier for users whose language isn’t English or aren’t located in an English-speaking country. A headless eCommerce solution gives marketers the ability to offer automatic translation for users to give them a seamless storefront experience. 

Cut Down IT Costs 

Most headless commerce solutions use a SaaS business model that’s based on cloud infrastructure. Commerce cloud platforms like AWS and Azure reduce maintenance costs and increase uptime without increasing your IT costs, especially when compared with traditional, monolith platforms hosted on-premise. 

Use Your Favorite Frontend

Since the headless architecture enables frontend developers to use their preferred frontend frameworks and libraries, the headless approach gives developers almost infinite ways of customizing the presentation layer. APIs make connecting the appropriate frontend layer a simple task. With a headless commerce platform, you can create progressive web applications (PWAs) that work seamlessly from your browser and single-page applications for your storefront.

Centralize Assets and Content

Ecommerce platforms are known for being hubs where you can centralize and store your data, but with the headless approach, and its flexible backend, things get taken to the next level as it simplifies and streamlines content delivery to different platforms. About content assets, Oulette says that Agility CMS’ content models have been helpful when it comes to building shopping carts and product pages. He says

“A model is basically a component that you create in the CMS and that is then linked to a React component. The cool thing about content models is that when you design your pages, you can come to this page, for example, your own page and you can drag and drop models as you want.”

Enable Content Display in Digital Signage and IoT Devices 

Recent research by the Journal of Advertising Research shows that digital signage can boost incremental sales by as much as 25%, and when you consider how a digital sign can be used to engage a customer, that figure comes as no surprise.

Create Jamstack-based Digital Experiences

Creating a Jamstack-based eCommerce store will net you benefits you never thought possible to achieve with a traditional eCommerce platform. Even headless-ready platforms like Shopify Plus simply can’t compete with the speed and ease of use Jamstack eCommerce frontends can give you. With a Jamstack CMS you can implement best-of-breed technologies using APIs to power your eCommerce content management and build a progressive web app. 

Deploy Quickly 

One of the main advantages of the headless commerce approach is that merchants can deploy commerce experiences to a mobile device, a PWA or any frontend to create engaging, native-like commerce experiences across different customer touchpoints. 

Your Next Steps: Build your Ecommerce Content Architecture

Agility CMS gives you the ability to control all of the content and pages in your website. You have complete control over the content model itself, such as what fields are available on a blog post and how different types of content relate to each other. Depending on which ecommerce platform you choose to work with, your most significant decision will be where to store your product data. Let's explore a few different options:

Option 1: Store Product Data in the Ecommerce Platform

  • We recommend this approach if you are choosing Shopify or BigCommerce.  
  • You set up the products and variants in the ecommerce system and relate those products to content in Agility CMS based on the product identifier. You can also override product data in the CMS when needed.
  • With this approach, you will be managing the ecommerce and CMS data separately.

Option 2: Store Product Data in Agility CMS

  • This is the most flexible solution in terms of the actual structure of your product content. Create your specialized content model that represents your products exactly as you want to market them.
  • We recommend this when using a direct Stripe integration with your website.

Option 3: Store Product Data in an External System

  • If you already utilize an external product database or management system, we recommend staying with that system.
  • You can either pull those products into your website via an API or synchronize them with Agility CMS.

Headless CMS, Ecommerce, and Website Frameworks

Headless CMS, Ecommerce, and Website Frameworks

Choose your Ecommerce Platform

You have lots of options to choose from when composing the parts of your system.  Along with Agility CMS, you can use Shopify, BigCommerce, or any headless ecommerce platform that has a mature API.  You'll see later why we prefer Shopify and BigCommerce 🧐.

Choose your Website Framework

You can choose pretty much any modern website framework to build your solution with. Still, the most popular ones with the best examples are Next.js and Gatsby.js, both of which support Static Site Generation plus Dynamic Functions.  They are the leading frameworks, but you can still choose Nuxt, Eleventy, or even Hugo - you just won't have such a broad foundation to start from.

Next.js Commerce

next.js ecommerce website screenshot

The Vercel team has built a project that works with multiple headless ecommerce platforms, including BigCommerce and Shopify.  That project allows you to simply plugin the API credentials of your ecommerce platform, set a config variable, and you're off and running! 

The code below shows the example env configuration - simply change the COMMERCE_PROVIDER to use a different platform.

AGILITY_GUID=
AGILITY_API_FETCH_KEY=
AGILITY_API_PREVIEW_KEY=
# Available providers: bigcommerce, shopify, swell COMMERCE_PROVIDER=
BIGCOMMERCE_STOREFRONT_API_URL= BIGCOMMERCE_STOREFRONT_API_TOKEN= BIGCOMMERCE_STORE_API_URL= BIGCOMMERCE_STORE_API_TOKEN= BIGCOMMERCE_STORE_API_CLIENT_ID= BIGCOMMERCE_CHANNEL_ID=
NEXT_PUBLIC_SHOPIFY_STORE_DOMAIN= NEXT_PUBLIC_SHOPIFY_STOREFRONT_ACCESS_TOKEN=
NEXT_PUBLIC_SWELL_STORE_ID= NEXT_PUBLIC_SWELL_PUBLIC_KEY=
NEXT_PUBLIC_SALEOR_API_URL= NEXT_PUBLIC_SALEOR_CHANNEL=

Next.js Commerce with Agility

The team here at Agility has taken that idea to the next level and forked the work from the Vercel team.  Our version of the project brings the same ecommerce functionality and adds CMS content from Agility into the mix! This brings you the ability to feature products on blog posts, as well as full page management.  This code provides you with a rock-solid starting foundation for building your headless commerce website.  

Featuring Products

Give your marketing team the ability to easily create compelling content that features the products in your catalogue. 

Here's an example of a blog post that's linked to a product:

agility cms headless commerce website screenshot

This is how it looks on the website, with a product image that overlays the blog post image and links directly to the product's detail page.

 agility cms ecommerce example

The Next.js Commerce package is just the starting point - including order management, favourite products, and more

 

Start Your Headless Commerce Journey: Set An eCommerce Store With Agility CMS, Next.js, and Snipcart

Creating an eCommerce store with Agility CMS is simple because, with Agility, you can deliver content to any front end using any coding language via RESTful APIs, regular APIs, and GraphQL, our open source SDKs, and Jamstack architecture

Agility CMS offers marketers built-in page management features, with which they can create, manage and organize pages using reusable blocks and sitemaps – all without having to rely on a developer.

Plus, Agility CMS enables you to integrate with the solution of your liking. In this case, we integrate with Next.js and Snipcart to create an eCommerce storefront.

Next.js is a front-end framework that enables developers to export individual components of an app and build applications modularly, reducing load times and enabling every eCommerce retailer to build and deploy their eCommerce solution in minutes.

Snipcart is a Jamstack favorite tool to add a shopping cart to your website and start accepting international payments in minutes. Snipcart is an eCommerce solution that allows you to use a Headless CMS and the frontend frameworks you love. It also offers a full back office management dashboard where you can track and analyze your eCommerce data.

To start, sign up for a free Agility CMS Account, set up your profile, and select the Blog with Next.js Starter Template. 

We'll be using this template as a starting point because it uses features such as Native Page-Management and gives you a basic structure for your Next.js website. Our Next.js and Agility starter serves an example based on our recommended best practices.

To see how these three technologies integrate and help you create a blazing-fast eCommerce store go ahead and check our tutorial:  How to start with Headless Commerce

You can also watch this tutorial where we’re joined by Zipwhip’s Full Stack Engineer, Flor Antara; Snipcart’s Co-Founder, Charles Ouelette; and Agility CMS’ VP of Product and Operations, James Vidler.

Headless Commerce: Agility CMS Examples & Use Cases

When it comes to headless commerce, you’ve already seen it in action. When you visit your local fast food restaurant and order using a digital screen, that’s headless commerce in full swing.

Let's see how our clients are taking the lead in the ecommerce space:

Compass Group Canada

Compass Group Canada is a global leader in contract foodservice and support services, managing tens of thousands of meal plans for educational institutions, professional and leisure organizations.

compass group canada headless ecommerce

Thanks to Agility CMS, now students and staff can easily order meals on any device. Content is easily managed by multiple stakeholders, with secure user accounts set up for 75 content editors.

Using the Agility CMS, Compass Group is a new responsive site that houses all schools, with an improved, easier-to-use portal and robust Ecommerce capability. The new DineOnCampus.ca site dynamically updates the banner name and content offering based on the customer’s province and school selection. The new site also provides a consistent layout across all individual school sites.

Visit Orlando

Visit Orlando is the official tourism association for Orlando, the most-visited destination in the United States. They are a registered not-for-profit trade association that represents moreover 1,000 member companies making up Central Florida’s tourism community.

Visit Orlando website screenshot

Before headless eCommerce was implemented, the staff had to manually issue tickets because their former site couldn't handle a ton of traffic and would crash during their busy times. Tickets also had to be processed in batches (once a day), and because of this, the staff was burdened with the workload while customers were upset that they couldn't purchase last-minute tickets.

Rolling out Headless commerce with Agility CMS, online revenue went up by 20%.

Most importantly, in December, the CIO and Director both remarked that they had taken a 4-day weekend for Thanksgiving for the first time in many years!

Start Your Headless Commerce Journey: Set An eCommerce Store With Agility CMS, Next.js, and Snipcart

Creating an eCommerce store with Agility CMS is simple because, with Agility, you can deliver content to any front end using any coding language via RESTful APIs, regular APIs and GraphQL, our open source SDKs, and Jamstack architecture

Agility CMS offers marketers built-in page management features, with which they can create, manage and organize pages using reusable blocks and sitemaps – all without having to rely on a developer.

Plus, Agility CMS enables you to integrate with the solution of your liking. In this case, we integrate with Next.js and Snipcart to create an eCommerce storefront.

Next.js is a front-end framework that enables developers to export individual components of an app and build applications modularly, reducing load times and enabling every eCommerce retailer to build and deploy their eCommerce solution in minutes.

Snipcart is a Jamstack favorite tool to add a shopping cart to your website and start accepting international payments in minutes. Snipcart is an eCommerce solution that allows you to use a Headless CMS and the frontend frameworks you love. It also offers a full back office management dashboard where you can track and analyze your eCommerce data.

To start, sign up for a free Agility CMS Account, set up your profile, and select the Blog with Next.js Starter Template. 

We'll be using this template as a starting point because it uses features such as Native Page-Management and gives you a basic structure for your Next.js website. Our Next.js and Agility starter serves as an example based on our recommended best practices.

To see how these three technologies integrate and help you create a blazing-fast eCommerce store go ahead and check our tutorial:  How to start with Headless Commerce

You can also watch this tutorial where we’re joined by Zipwhip’s Full Stack Engineer, Flor Antara; Snipcart’s Co-Founder, Charles Ouelette; and Agility CMS’ VP of Product and Operations, James Vidler.

If you want to learn more about how your eCommerce content can go beyond your website and mobile application? Check out our guide to a winning content architecture strategy.

To sum up: Optimize, Personalize, & Increase Revenue

Agility CMS gives you the tools to optimize your ecommerce website on an ongoing basis. Use Page Management and Modules to provide the building blocks for your team to market and promote your products in new and exciting ways. Allow them to create landing pages, microsites, and other promotions to drive continual growth.

Once you have the basics in place, you can take things to the next level by adding personalization and A/B testing into the mix with the platform of your choice.

Keep Learning

If you want to learn more about why Agility CMS is faster, make sure you read these articles:

Webinar: Build Ecommerce with Agility CMS and Next.js in 30 minutes

Join this FREE workshop now and build a modern Ecommerce solution with Joel Varty

Webinar: Build Ecommerce with Agility CMS and Next.js in 30 minutes
Back to All ResourcesBack to All Resources