How to Add Products to commercetools
Blog

How to Add Products to commercetools

May 10th, 2023

Adding products is the essential first step in using commercetools, as it forms the basis of your catalog API. In this tutorial, we'll show you how to add products and variants to your project.

Sunrise Integration
  by Sunrise Integration

What is commercetools?

 

commercetools is a cloud-based, API-centric ecommerce platform designed to help businesses create custom shopping experiences using headless technology. Using the API, B2B and B2C businesses can tailor their digital commerce strategies to match their brand needs. commercetools is an exciting platform with a technology-first approach to ecommerce. To take full advantage of the system, you'll need an ecommerce development team and a detailed plan for a composable integration. In this short tutorial, we'll review how to add products using the commercetools Merchant Center.

 

Check out our YouTube video tutorial on adding products to commercetools.

 

Adding Products To commercetools - Tutorial

 

Ecommerce Starts With Products

 

Products are the heart of any ecommerce store so it makes sense for our tutorial to start here. Using the commercetools Merchant Center, we'll show you the steps required to add products and test the API to ensure you're receiving data.

 

Before we start the tutorial, it's important to explain how commercetools functions as a composable ecommerce platform. Composable, headless commerce is a modern approach to building an ecommerce site.

 

A composable platform separates the front-end presentation layer (head) from the back-end functionality (commerce), enabling developers to build and optimize each part using the best-suited tech or frameworks. This "headless" paradigm requires the use of an API to communicate with the backend data. This means it's critical to ensure your data is properly being reflected in the API, otherwise, you won't see your data.

 

So now that we understand the concept of composable and headless, let's add products to commercetools using the Merchant Center.

 

There are a few different methods for adding products to your commercetools platform. You can use the API to programmatically add items, or you can use the Merchant Center UI/UX site to add products. Adding products through the Merchant Center is a more user-friendly approach compared to the API so we'll use that method for this tutorial

 

Product Types

 

The first step to adding products is the creation of product types. Think of a product type like a grouping or category of similar products. It's an easy way to organize your products and create consistency. Some examples of product types could be apparel, laptops, shoes, furniture and many others. In commercetools, every product must first be assigned to an existing product type before you can add the item.

 

Adding product types is the first step of adding products

 

Adding Products

 

Once the Product Type is created, click on the "Add Product" button in the Merchant Center to get started. Select the product type for the product. If you haven't created any product types yet, you'll need to first before you can add a product.

 

Next, fill in the required product information, including the product name, slug (a unique, human-readable identifier for the product), and description. You can also provide details, such as categories, meta information and custom attributes.

 

Adding products from the merchant center

 

Product Variants

 

After entering the basic product information, you'll need to define the variants. Variants represent different versions of the same product, for example, different colors or sizes. You must create at least one variant for the product. This first one is called the "master variant." Add additional variants as needed for the product. In our example video, we created the different sizes for our t-shirt. The variants also support the product images. Assign images to specific variants to ensure customers see the correct product images based on their selections.

 

After completing all the necessary information, click on the "Save" or "Publish" button at the bottom of the form to add the new product to your commercetools catalog. The "Save" option saves the product as a draft, while the "Publish" option makes the product publicly available. You can always edit the product later if you need to make any changes or updates.

 

Testing the Product API

 

After adding products to your commercetools catalog, you should test the API to ensure the products are accessible and functioning correctly. One way to do this is by querying the products using a simple GET request to the Products endpoint.

 

commercetools is a composable headless platform so you need the API

 

We like to use Postman to query the Products endpoint using a simple GET request. If everything was configured correctly in the Merchant Center, the API will return a JSON response containing a list of your products, including the one you just added. This will confirm that the API is working correctly and the products are successfully added to your catalog.

 

Taking Your Products Headless

 

Leveraging products in commercetools is a crucial component for building a successful headless ecommerce store. Modern brands want a flexible, tailored shopping experience for their customers so they've turned to a headless approach to achieve this goal. Maintaining an organized and up-to-date product catalog in commercetools, ensures that customers are getting the latest details on the frontend.

 

Harnessing the power of commercetools' headless approach enables businesses to adapt rapidly and deliver exceptional customer experiences. Consider taking your business to the next level and drive success in the highly competitive e-commerce landscape using a composable platform like commercetools.

 

RELATED ARTICLES

Tags:   commercetools   ecommerce