How to Create a Free Gift with Purchase in commercetools

Clients often ask us how to create a "free gift with purchase" promotion in commercetools. Our example allows customers to get a free Aries coffee mug with a cart total of $100 or more. This guide walks you through how to set up this cart-level promotion.

Clients often ask us how to create a “free gift with purchase” promotion in commercetools. Our example allows customers to get a free Aries coffee mug with a cart total of $100 or more. This guide walks you through how to set up this cart-level promotion.

Creating the Free Gift with Purchase Promotion

After logging into the commercetools Merchant Center, add a cart-level discount. If you need more information about the difference between a product discount and a cart discount, please check out our commercetools’ Promotions Overview article.

add a cart level discount for how to create a free gift with purchase in commercetools

The very first option is where we determine that this promotion will be set up as a free gift. Select “Gift line item.” Name it “Mug for free.”

free gift line item

Give it a rank so commercetools knows in which order to apply the discounts. For our example, we will not require a discount code and we will leave the validity dates blank.

add a sort order/rank

Configuring the Free Gift with Purchase Promotion

Our example allows customers to get a free Aries coffee mug with a cart total of $100 or more. Therefore, we will need this promotion to “Apply to specific carts.” Set the condition to say the cart total “is equal to or greater than” “100 USD.”

configuring the discount for how to create a free gift with purchase in commercetools

Now we get into specifying what product is the free gift that will be added to the cart once the cart total equals $100 or more. In order to find the product ID, we need to get the commercetools identifier for the product. Please note that the “Product ID” is not a SKU.

You will need to go to the API Playground in your ImpEx account. Select the proper environment in the header. From the “Endpoint” dropdown menu, select “Products.”

ImpEx account

For our example, the product we’re looking for, the Aries mug, happens to be the first one listed. Copy the “id” from the code and paste it into the “Product ID” field back in the commercetools Merchant Center. Set the “Variant ID” as 1 for our purposes. Click “Save” in the bottom right-hand corner and activate the discount in the top right-hand corner.

Aries mug product id in ImpEx
enter the product id and variant

Testing the Free Gift with Purchase Promotion

Let’s create an example order to see how this promotion works!

testing how to create a free gift with purchase in commercetools

In the “Orders” dropdown menu on the left-hand side, click on “Add order”. Set your cart to be in “USD”, or whatever currency you’re comfortable calculating. Click “Next” in the bottom right-hand corner.

select the currency

Select a test customer and click “Next”.

selecting a test customer from the customer list

For our purposes, we will enter an Aries women’s tee item and click on the search icon. Click “Add” next to the item to add a few to the cart. As expected, nothing special happens because the cart total is still under $100 USD.

adding items to your test cart

However, once you add an item that puts your cart over the $100 threshold, you will see the “FREE GIFT”, our Aries mug, shows up in the cart.

adding a fifth items triggers the free mug to be added to the cart for how to create a free gift with purchase in commercetools

Questions about how to create a free gift with purchase in commercetools?

Please reach out to us – we are happy to help! If you prefer the vlog version of this article, be sure to check it out on our YouTube page! Give us a follow for more helpful content and click here to read up on our other commercetools promotions articles.

One comment

  1. Thanks for sharing such useful information! I’ve been searching for insights on this topic, and your post is by far the best I’ve found. Looking forward to seeing more from you.

Leave a Reply

Your email address will not be published. Required fields are marked *