Subscription-based discount amount promotion
In this tutorial, we will create a loyalty program that reduces a customer's subscription cost by a small amount each time they're billed. In short, the longer they are a customer, the larger the discount they receive.
We will build a loyalty program to categorize customers based on their loyalty (subscription) length and a cart promotion with multiple tiers to automatically enable discounts for predefined segments.
Define the Subscription product
From there, add new metadata. For example, create a mandatory parameter called Subscription with flag type.
This solution ensures that you will be able to assign this metadata to any subscription you would like to offer to your customers. If you have a couple of different subscription options – each one of them can have this flag.
Build a loyalty program
During the creation of the campaign (second step), create a new earning rule, which will assign 1 point each time an order has been paid. This information will be used for counting how many months a user has been a subscriber.
Confirm the rule by clicking Add. Remember that after saving the rule, you can reuse it for other campaigns. During the creation of your loyalty program, you will also need to define one Reward. The Reward will be used to remove the customer’s points on his loyalty card if he wants to stop subscribing to your service.
Save the reward, and don't forget to click
Assign loyalty cards
For test purposes, you can assign the card manually to a selected customer. Find the loyalty card you are interested in and hit Publish.
Split customers into several segments
The customers will be assigned to the segments automatically.
Build cart-level promotions
That’s it. You have all the building blocks of the campaign set up.
Apply discounts with API and remove loyalty points (customer unsubscribes)
If your customers will be ready to make an order, use this API to create an order and apply the discount to it.
Customer unsubscribed scenario
If a customer wants to unsubscribe from your service, the best solution would be to redeem a customer's reward to remove loyalty points from their account.
We had already defined the reward in one of the previous steps. You will need to get the ID of the reward by using the following API.
When you get the reward ID, use this API method in the redeem reward request.
Since we had defined a reward, where 1 point equals 1 cent, the amount used in the POST body can be set to 1000, which will redeem a 1000 months worth of points.