Back to blog home

How to improve customer retention with Magento 2

Magento 2 is full of useful features to help get your first-time buyers coming back to buy again. In this post we talk you through the available features, how to set them up, and how they can be used to entice repeat purchases.


One of the most exciting features of Magento 2 is the Segments tool. It allows you to categorise your customers according to specific browsing, buying, or account information. You can then use these segments to create targeted shopping experiences for users when they browse your site.

To set up segments, go to the admin panel and locate the Segments tool under Customers.

Here you will see all segments you have set up. The default installation does not come with any segments, so to create the first one, click on Add segment. Here you will be shown the following options:

  • Segment name: what your segment will be called
  • Description: not a required field, but a description can help if you have a few similar segments
  • Assigned to website: you can select which of your sites this segment applies to
  • Status: whether you want the segment to be active or not
  • Apply to: here you can choose if the segment conditions apply to all users of your site, registered customers, or visitors only



Once you have filled in the properties for this segment, click Save and Continue. Until you do this, the conditions section will be hidden, so once saved you’ll be able to start adding criteria to your segment.

Next you will see the options to add conditions for the segment. Conditions are the attributes of customers within a segment. When a user matches these conditions, they will be added to that segment.

Possible segments could be:

  • Male and Female. Identified using the gender field.
  • High spending users. You can use the sales amount condition to find users who have spent over £100, £1000 or more!
  • Users with abandoned baskets. Add the condition ‘products quantity’ to create.
  • Users with a Gmail address to inform them how they can ensure to get emails to their Inbox instead of filtered into promos.



You can use as many or as few of these conditions as you like to create very broad or very specific segments.

Once you have chosen and created your segment, hit the Save button.

When you have finished adding conditions for your segment, you will see the list of Matched Customers on the left update. It will show the number of matched users in brackets. If you click on Matched Customers you will see the corresponding users that have matched the criteria you have set.

This section will show the name, email address, and several other attributes of the matched users.



This list can be a good starting point to work out who your customers are and their habits. Once you have set up your segments, they will automatically update. So, if you are pushing to improve a certain area of your site, you don’t need to create a new segment or change it each time you want an updated number.

Once you have established your segments, you can begin to make use of the data. For example, you can export a list of users to .csv in order to email them a specific promotional message according to their shopping behavior.

Note: be sure you have permission to do this. It is very important to only send emails to customers who have explicitly said they are happy to receive them. This is determined by an opt-in or opt-out declaration when customers sign up for an account.

Promotional rules

One of the most popular methods to attract repeat buyers is to offer discount codes or other promotions, and Magento 2 caters for this.

With Magento 2’s promotion features, you can provide money off deals for orders via 2 methods:

  • Catalog Price Rules - sets a discount rule across one or more categories or attributes. For example, 10% off kidswear
  • Cart Price Rules - allows you to set a discount on the total basket value. For example, £5 off all orders

To add a promotion, navigate to Marketing > Promotions where you can set up one of the above.

Click on the Catalog Price Rule option to begin and select Add New Rule. Start by giving your rule a name and change the status to Active to make it live.

If you have multiple stores, you can choose which of your sites this promotion is valid for and you can also limit your promotion to certain customer groups if required.

If you want the rule to run within a certain time period, add a From and To rule to set a valid date range for this promotion. If left blank, the promotion will continue to run until you manually change the status to Inactive.

You can also set the priority of rules in relation to others. For example, if a user enters three codes, only the code with the highest priority will be applied to their basket.

For promotional codes to work, you need to select the conditions that need to be met. If you leave this blank, it will give the discount off all products. However, if you want to limit the promotional code you can do so. Here’s an example of a simple rule-based promotion:



By applying these conditions, this code ensures any products in category 1 and tagged as ‘New’ will be eligible for the promotion.

Next you need to select the discount that will be applied. The following example shows 10% off all the products that fit the above set of conditions.



Once you have completed the above steps, the rule is ready to use.

Cart Price Rules are promotions that a customer can apply to their basket. These are most commonly used in relation with a code so the user has to enter a defined word to receive the discount. For example, customers could enter Autumn2016 to receive discount on their basket.

To set this up, head to Marketing > Cart Price Rules and click Add New Rule.

The Rule Information tab is the same as the Catalog Price Rules so follow the steps above. You can also specify how many times a code can be used. If it’s blank, no limit will be applied.

If you want the user to enter a code to get the discount then you’ll need to select the coupon settings, such as the below:

  • No Coupon - Discount will be applied automatically
  • Specific Coupon - You choose a specific coupon required
  • Auto - Magento will automatically generate coupon codes as and when they are required. This can be very helpful if you are using a code for an abandoned basket reminder.

Use the conditions step to specify the requirements of the promotion. For example, “3 items in your basket” or “Basket is over £50”. The below shows these 2 rules in one promotion setup:



Now we need to set an Action, which is the change in price the user will see. There are four types of discounts:

  • Percent of Product Price Discount
  • Fixed Amount Discount
  • Fixed Amount Discount for Whole Cart
  • Buy X get Y free

These discounts allow you flexibility in the type of discount the user will get. If you wanted to offer something simple like £5 off an order, then you would select the Fixed Amount Discount for Whole Cart option and type 5 in the Discount Amount field.

You can, if required, set the maximum quantity discount applied. For example, if you’ve offered 10% off you can restrict this to only apply to purchases above £100. You can apply the discount to the shipping amount (note: this would only work with % discounts) and you can also add Reward Points as part of the promotion. There are more details on reward points in the last section of this guide.

Once you have entered all the settings, you need to hit Save and this promotional code will be ready to use.

Gift cards

A great way to attract your repeat customers is to offer gift cards. Cards can be a great way for existing users to attract new shoppers to your site or allow those who already love your site to shop even more.

In Magento 2, a gift card is considered a type of product so to set up, go to Products > Catalog and click Add Product to view the drop down menu. Then, select the Gift Card option.



There are several attributes you can set. The first gift card allows you to state whether it is a virtual gift card, a physical one, or both. A virtual gift card allows the user to purchase the item and the recipient will be sent an email with the voucher code to redeem that value purchased. Or, you can allow the customer to purchase a physical gift card that can be sent to them in person to be used on your site. The final option allows the gift card to be sent in both virtual and physical form.

Next, you can set the values available for purchase. You can create pre-set gift card values, like the example below, which the user will see when they land on the gift card product page. Here, users can purchase a £5, £10, £25, or £50 gift card:



Next, you have an option to allow any values of gift cards where you can set the minimum and maximum values allowed. This gives the user more freedom to choose the value that best suits the recipient without restricting them to set amounts.

The next section is the same as all other products. Select an image for the product, quantity in stock, categories they sit in, and a description.

The next section is the same as all other products. Select an image for the product, quantity in stock, categories they sit in, and a description.

The final section is specific to the settings of the gift card. Here you can select if the gift card is to be treated as Store Credit. You can also choose if the gift card expires after a set amount of time.



You can then choose if you want to allow the purchaser to send a message to the recipient. This can be included in the email for their virtual gift card or to accompany the physical version. Finally, you can create an email template for emails to recipients. In our example, we have left it as the default design, but here is where you can create any new varieties you’d like.

Once complete, you are ready to offer gift vouchers to your customers.

Reward scheme

One of the best ways to reward repeat custom is to provide a loyalty scheme. Reward schemes allow customers to earn points for completing certain actions on your site. This is very popular as it encourages users to shop at a place where they are able to redeem their points for a discount.

There are a few steps required to set up a reward scheme. To enable this feature, navigate to Stores > Configuration under the Settings header. Once there, find the Customers option and click on Reward Points. Here you will see the following:

To enable this, change the first option to Yes.

You can also enable visitors to see their total number of reward points and spend them directly.

To enable this, change the field next to Customers May See Reward Points History to Yes.

Rewards Points Balance Redemption Threshold allows you to set a limit for the minimum reward points a customer requires before they can be spent. If you do not want to set a limit, leave this blank.

At the other end of the scale you can set a limit on the total number of points a user is able to collect. See Cap Reward Points Balance At to set this total. Again, if you don’t want to limit this, just leave the field blank.

Reward Points Expire in (days) allows you to clear reward points after a set amount of time.

There is also an option for Reward Points Expiry Calculation where "Static" defines the expiration date as precisely when the balance increases. "Dynamic" does not have an expiration date, but calculates one when the balance is checked for expiry.

The next setting, Refund Reward Points Automatically, allows you to refund points if an order was placed with points and is then refunded. When set to ‘Yes’, you don’t need to remember to carry out this action when carrying out the refund. You can also Deduct Reward Points from Refund Amount Automatically if an order is retrospectively refunded and you want to remove the awarded points when this is done.

For the last step, you can select a landing page that offers more information about the reward scheme. Magento 2 offers a default page with general information for a user that can be edited to reflect your specific reward scheme policy.

The next section of settings Actions for Acquiring Rewards Points by Customers, allows you to choose what actions can gain points and how many possible actions can be rewarded.

Possible actions:

  • Purchase: the amount of points is defined in a different section covered below.
  • Registration
  • Newsletter signup
  • Converting invitation to customer
  • Invitation to customer conversions quantity limit
  • Converting invitation to order
  • Invitation to orderconversions quantity limit
  • Invitation conversion to order reward
  • Review submission
  • Rewarded seviews submission quantity limit

You can use as many or as few as you like to encourage your users to keep coming back to shop with you.

The next section is Email Notification Settings where you can organise all your email-related settings including: who the notifications are sent from, and if the customer should be subscribed by default.

You can also set up balance updates and expiry warning emails so customers are notified when their reward points are close to becoming invalid.

The last step of the set up is to decide the value of your reward points. To do this, navigate to Stores > Reward Exchange Rates.



Here you can select the rate of currency to points and points to currency. A common reward level is between 1-3 per cent. For example, you can set it so that every £1 spent equates to 2 points, and your reward rate would be 2 percent.

To set up this example, you need two rates. Hit the Add New Rate button and create the below:


You will notice that you can set different rates for your different websites as well as Customer Groups. This allows you to create preferential rates for your more loyal spenders, for example. Once complete, hit Save and you’re done!

These four features are a great way to create a reason for customers to return to your store to buy again. Once they have bought a second time you can start to consider them loyal, an incredibly valuable position in the increasingly competitive ecommerce space.



About the author

Andrew is an account manager with five years’ commercial experience. He has worked with internationally-recognised brands, such as Amazon, Mars Group, WorldPay, and William Hill, assisting in their digital strategies from email marketing campaigns to Magento deployments.