Loyalty Points Overview
Points System Relationships Diagram
Model Descriptions
Point
Manages the configuration of different point types in the system. It defines point values, causes (like course subscription or new orders), and tracks their active status. Points can be earned through various activities and are used to determine customer levels and unlock discounts.
CustomerLevel
Defines the different loyalty tiers (Bronze, Silver, Gold, Diamond) that customers can achieve based on their accumulated points. Each level has specific point thresholds, and subscription day bonuses. The model tracks customer counts per level and manages level-specific benefits.
PointsRecord
Tracks individual point transactions for customers through a polymorphic relationship. It maintains a history of points earned, current total points, and associated messages. This model enables comprehensive tracking of how and when customers earn points through various activities.