Build a loyalty rewards system in Bubble where users earn points on purchases and actions, redeem points for discounts, progress through tiers, and track their reward history. This tutorial covers the data model for points, tiers, and redemptions, plus workflows for earning and spending rewards.
Overview: Rewards System in Bubble
A rewards system increases user engagement and retention by giving points for purchases and actions, letting users redeem them for discounts or perks, and offering tier-based status progression. This tutorial builds the complete rewards infrastructure in Bubble.
Prerequisites
- A Bubble account with user authentication
- Basic understanding of Data Types and Workflows
- An existing purchase or action system to attach rewards to
Step-by-step guide
Create the rewards data model
Create the rewards data model
Add fields to User: points_balance (number, default 0), lifetime_points (number, default 0), reward_tier (Option Set: Bronze/Silver/Gold/Platinum). Create 'RewardTransaction': user (User), points (number, positive=earned, negative=redeemed), type (Option Set: purchase/referral/redemption/bonus), description (text), balance_after (number). Create the RewardTier Option Set with threshold attribute (Bronze: 0, Silver: 1000, Gold: 5000, Platinum: 20000).
Expected result: User fields and RewardTransaction data type are ready.
Build the points-earning workflow
Build the points-earning workflow
In your purchase completion workflow, add actions: calculate points (e.g., 1 point per dollar spent). Make changes to Current User → points_balance + earned points, lifetime_points + earned points. Create RewardTransaction → user, points = earned, type = purchase, description = order details, balance_after = new balance. Check tier upgrade: if lifetime_points crosses next tier threshold, update reward_tier.
Expected result: Users automatically earn points on purchases with transaction logging.
Implement points redemption
Implement points redemption
On the checkout or rewards page, show the user's points balance and available rewards (e.g., 500 points = $5 off). When the user clicks Redeem: check points_balance >= cost. Make changes to User → points_balance minus cost. Create RewardTransaction with negative points, type = redemption. Apply the discount to the current order.
Expected result: Users can redeem points for discounts with balance validation.
Build the rewards dashboard
Build the rewards dashboard
Create a 'rewards' page showing: current tier badge, points balance, progress bar to next tier, and a Repeating Group of RewardTransactions sorted by date descending. The progress bar width = (lifetime_points - current tier threshold) / (next tier threshold - current tier threshold) × 100%.
Expected result: Users see their tier status, points balance, and reward history.
Add bonus point campaigns
Add bonus point campaigns
Create an admin page for setting up bonus campaigns. Create 'BonusCampaign' data type: name, multiplier (number, e.g., 2 for double points), start_date, end_date, category (optional). In the purchase points calculation, check if an active campaign exists and multiply points accordingly. Display an 'Earn 2X Points!' banner when a campaign is active.
Expected result: Admins can run bonus point campaigns that automatically multiply earned points.
Complete working example
1REWARDS SYSTEM — ARCHITECTURE SUMMARY2======================================34USER FIELDS:5 points_balance (number, default 0)6 lifetime_points (number, default 0)7 reward_tier (Option Set: Bronze/Silver/Gold/Platinum)89DATA TYPES:10 RewardTransaction: user, points, type, description, balance_after11 BonusCampaign: name, multiplier, start_date, end_date1213TIER THRESHOLDS:14 Bronze: 0, Silver: 1000, Gold: 5000, Platinum: 200001516WORKFLOWS:17 Earn: purchase → calculate points → update balance → log transaction → check tier18 Redeem: check balance → deduct points → log transaction → apply discount19 Tier check: if lifetime_points >= next threshold → upgrade tier20 Bonus: check active campaign → multiply points by campaign multiplierCommon mistakes when creating a rewards system in Bubble.io: Step-by-Step Guide
Why it's a problem: Not logging reward transactions
How to avoid: Create a RewardTransaction record for every earn and redeem action
Why it's a problem: Allowing points to go negative
How to avoid: Add an Only when condition: points_balance >= redemption cost on the redeem workflow
Why it's a problem: Recalculating tier on every page load instead of on point changes
How to avoid: Update the tier only in the earn/redeem workflows when lifetime_points changes
Best practices
- Log every point change as a RewardTransaction for auditing
- Store both current balance and lifetime total for tier calculations
- Use Option Sets for tiers with threshold attributes for easy tier management
- Validate sufficient balance before redemption at the workflow level
- Run bonus campaigns to drive engagement during slow periods
- Send notifications when users reach new tiers
Still stuck?
Copy one of these prompts to get a personalized, step-by-step explanation.
I want to build a loyalty rewards system in Bubble.io with points earning, redemption, tier progression, and bonus campaigns. Can you design the data model and key workflows?
Build a rewards system. Add points fields to User, create RewardTransaction and BonusCampaign data types. Set up workflows for earning points on purchases, redeeming for discounts, and automatic tier progression.
Frequently asked questions
Can points expire?
Yes. Add an expiry_date field to RewardTransaction. Run a scheduled backend workflow to deduct expired points and create an expiration transaction.
Can I have different point values per product?
Yes. Add a points_value field to your Product data type. Use it in the earning calculation instead of a flat per-dollar rate.
How do I handle refunds?
When a purchase is refunded, create a RewardTransaction with negative points (type = refund) and deduct from the user's balance.
Can users transfer points to each other?
Yes. Create a transfer workflow that deducts from sender and credits recipient, logging both transactions.
What is a good points-to-dollar ratio?
Common ratios are 100 points = $1 or 10 points = $1. Choose a ratio that makes earning feel achievable but sustainable for your business.
Can RapidDev build a loyalty program?
Yes. RapidDev designs and implements loyalty programs with points, tiers, referral bonuses, and integration with payment systems.
Talk to an Expert
Our team has built 600+ apps. Get personalized help with your project.
Book a free consultation