Skip to main content

Reward customers for repeat coffee purchases

Quick-service restaurants and coffee shops use stamp cards as a simple but effective way to encourage repeat purchases and boost revenue. With recurring on completion achievements, you can implement a stamp card engine that automatically rewards customers with more of what they love, such as a free coffee for frequent coffee buyers.

In this tutorial, let's create a coffee campaign using recurring on completion achievements to reward customers for repeat purchases:

  • Goal: Increase coffee orders by offering rewards.
  • Duration: The promotion runs on an ongoing basis with no fixed end date.
  • Reward: For every six coffees purchased, customers receive one free coffee added to their cart. For example, if a customer purchases 12 coffees in a single session, they complete the achievement twice and receive two free coffees.

Set up the achievement and rules

1

Prepare your environment

Create a standard campaign named Coffee Campaign with the Achievements feature enabled.

To set up the campaign, we first create a cart item filter scoped to coffee products, then create an achievement, and define two rules in this campaign.

2

Create the achievement

Create a recurring-on-completion achievement to track the customer's coffee purchases:

  • Set the Name as buy6CoffeesGet1Free.
  • Set the Target to 6. This value represents the number of coffees a customer must purchase to complete the achievement.

For every purchase the customer makes, the quantity of coffee items gets added as progress to the achievement. When the customer's progress reaches 6, the achievement completes and resets. Let's set up the rules to track progress and deliver the reward.

3

Create a cart item filter

Restaurants and coffee shops often sell other products alongside coffee, such as bagels, cakes, and smoothies. To ensure only coffee purchases count toward the reward, let's filter the customer's cart for coffees only.

Cart item filter

Create a cart item filter named coffeeFilter that includes all items whose category is coffee.

  • Start with this list of cart items: all items in cart.
  • Select Filter items by conditions: Filter items when all of these are true: Item category (Item) contains coffee.
  • Save as: coffeeFilter.
4

Create a rule to count coffee purchases

Let's create a rule that increases the customer's progress in the achievement by the number of coffees purchased in each session. We can name the rule Count coffees purchased. For example, if a customer buys four coffees in a session, this rule increases their progress by 4.

This rule checks whether the Rule Engine has triggered a Customer Session Closing event, confirming that the customer completed a purchase order and the session is in closed state.

If the condition is true, the Rule Engine updates the customer's progress in the achievement by the quantity of coffee items in the session, as determined by the cart item filter.

note

Ensure that the coffee cart item's category is set to coffee for this rule to evaluate as expected.

Rule 1: Conditions

When all of these are true:

  • Check for event types and custom event values:
    • Event type: Customer session Closing

Rule 1: Effects

  • Update customer progress:
    • Achievement name: buy6CoffeesGet1Free
    • Update progress by:
      1. Click Add an attribute ( Plus sign. ).
      2. Select the Item Count (coffeeFilter) attribute.
5

Create a rule to award a free coffee

Let's create a second rule that checks if the achievement was completed and awards the customer a free coffee for every six coffees purchased. This rule adds a free coffee item to the cart with a quantity that matches the number of times the achievement was completed in the session. We can name the rule Award free coffee for each achievement completion.

For example, if a customer buys 12 coffees, the achievement completes twice, and this rule adds two free coffees to their cart.

The built-in attribute Achievement progress completion count in Session tracks how many times a customer completes the achievement in a session. This count determines how many free coffees the customer receives.

tip

You can also add a notification effect to inform customers when they earn a reward to enhance the customer experience.

Rule 2: Conditions

  • Has completed an achievement:
    • Achievement name: buy6CoffeesGet1Free

Rule 2: Effects

  • Add free item:

    • Item: coffee_001
    • Discount name: Free coffee on six purhcased coffees
    • Quantity:
      1. Click Add an attribute ( Plus sign. ).
      2. Select the Achievement progress completion count in Session attribute.
  • (Optional) Create notification:

    • type: Info
    • Title: Free coffee earned!
    • Body: Dear customer, you've earned Achievement progress completion count in Session free coffees as a reward for continuing to buy with us. Enjoy!