Skip to main content

Creating a community buying campaign

In community buying campaigns, customers can access a higher discount if a large number of people purchase the same product in a given time span. We can use coupon code redemptions to track how many times the product has been purchased.

Let's imagine that we are a fashion brand and want to run a promotion on trousers. We want as many customers as possible to buy trousers on two specific days in March. To do this, we create a campaign to give customers a 5% discount on trousers if they redeem a valid coupon code on March 13. We also inform them at checkout that, if they buy more trousers the next day and more than 500 people participate in the campaign, they will receive a 10% discount.

This campaign can be useful to increase customer engagement and the number of orders placed.

Let's create:

  1. A universal coupon code that we have to distribute among our customers before March 13.
  2. A custom profile attribute to ensure that only customers who use the coupon on March 13 can get a discount the next day.
  3. A cart item filter to filter items by item category (in our example, trousers).
  4. A promotion rule to issue a 5% discount on trousers on March 13.
  5. A promotion rule to issue a 10% discount on trousers on March 14 for customers who already used the coupon code to purchase on March 13.
note

The Coupons feature has to be enabled.

The coupon code is valid condition redeems the code if the rule is successful. The corresponding counter in the usage column on the Coupons page of the campaign is automatically updated once the session is closed.

Creating a universal coupon code

Let's create a universal coupon code for our customers to receive a discount on March 13. We will use coupon redemptions to track the total number of purchases on March 13 and which customers are eligible for a discount on March 14.

  • Coupon code: Trousers13
  • Coupon redemption limit: Allow unlimited redemptions
  • Per-customer redemption limit: Allow unlimited redemptions

Creating a custom profile attribute

Let's create a custom attribute to indicate whether the given customer is eligible for the community buying discount. We will set it to true if the coupon code is redeemed on March 13.

  • Associated entity: customer profile
  • Attribute type: boolean
  • API name: communityEligible
  • Rule Builder name: Community eligible
  • Rule Builder description: Determines if the customer is eligible for a community buying discount.
  • Available in our Application.

Filtering the cart items by item category

Let's create a cart item filter to find all the cart items belonging to the trousers category.

Filter items by condition:

  • Attribute is Item category (Item).
  • Is equal to trousers.
  • Save as trouser_filter.

Issuing a 5% discount on March 13

Let's build a rule for our customers to receive a 5% discount on any trousers in their cart if they redeem the coupon code on March 13.

Let's name it 5% discount. It has 2 conditions and 3 effects.

Rule 1: Conditions

  • Coupon code is valid.
  • Validate attribute value:
    • Attribute is Current time.
    • Is on exact day: 03/13/2022.

Rule 1: Effects

  • Discount individual items:
    • List of items is trouser_filter.
    • Discount name is 5% off per item.
    • Discount value is [Item.Quantity]*[Item.Price]*5%.
  • Create notification:
    • Type is info.
    • Title is trouser community discount.
    • Message is If more than 500 people redeem this coupon code today, you can use the same coupon again tomorrow to get a 10% discount. Share the code with your friends!
  • Update attribute value:
    • Attribute is Community eligible (Customer Profile).
    • Set to value True.

Issuing a 10% discount on March 14

Let's build a rule for our customers to receive a 10% discount on any trousers in their cart if they redeem the coupon code on March 14 and already used it the day before, and if more than 500 people participated in this campaign.

Let's name it 10% discount. It has 4 conditions and 1 effect.

Rule 2: Conditions

  • Coupon code is valid.
  • Validate attribute value:
    • Attribute is Number of coupon usages (Coupon)
    • Is greater than 500.
  • Validate attribute value:
    • Attribute is Current time
    • Is on exact day 03/14/2022.
  • Validate attribute value:
    • Attribute is Community eligible (Customer Profile)
    • Value is True.

Rule 2: Effect

Discount individual items:

  • List of items is trouser_filter.
  • Discount name is 10% off per item.
  • Discount value is [Item.Quantity]*[Item.Price]*10%.