Loyalty & CRM
Build customer relationships with stamp cards, SMS messaging, and referral programs.
Loyalty Program Overview
The loyalty system tracks customers, their purchases, and rewards them for repeat visits.
Customer Registration
Customers are created when:
- A cashier enters their phone number at checkout
- They opt in to SMS communications
- The system creates or finds the customer record
Phone numbers are automatically formatted to E.164 Mexican mobile format (+521XXXXXXXXXX).
Stamp Cards
Digital stamp cards replace physical punch cards.
Configuration
- Go to Loyalty > Configuration
- Set:
- Stamps required: How many purchases for a reward (e.g., 10)
- Reward: What they get (e.g., free item, discount)
- Qualifying amount: Minimum order value to earn a stamp
How It Works
- Customer makes a qualifying purchase
- A stamp event is recorded on their card
- When stamps reach the target, the reward unlocks
- Cashier applies the reward on the next visit
- A new stamp card starts automatically
SMS Messaging
Send targeted messages to loyalty customers via Twilio.
Message Types
- Welcome message: Sent when a customer first joins
- Stamp updates: "You earned a stamp! 3 more to go"
- Reward notifications: "Your free taco is ready to claim!"
- Recapture offers: Target delivery-only customers (see Delivery Intelligence)
- Custom campaigns: Promotional messages
SMS Configuration
Requires Twilio credentials in your environment:
TWILIO_ACCOUNT_SIDTWILIO_AUTH_TOKENTWILIO_PHONE_NUMBER
note
SMS opt-in is tracked per customer. Only customers who have opted in receive messages. The sms_opt_in flag is set during customer creation.
Referral Program
Encourage customers to bring friends:
- Each loyalty customer gets a unique referral code
- When a new customer signs up with a referral code, both earn bonus stamps
- Track referral chains in the loyalty dashboard
CRM Dashboard
The loyalty dashboard shows:
- Total customers: Active loyalty members
- Active stamp cards: Cards in progress
- Rewards redeemed: Total rewards claimed
- Top customers: Highest visit frequency and spend
- SMS campaign performance: Delivery rates and engagement