Documentation Index
Fetch the complete documentation index at: https://docs.mgpass.net/llms.txt
Use this file to discover all available pages before exploring further.
Points Rules
Every event type maps to a points rule that determines how many points to award. Rules are configured by MG Digital admins and can vary by:- Platform — different rules for each connected application or partner
- Event type —
article_readawards different points thanpurchase - Tier — Gold users can earn more per event than Bronze users
Rule Matching
When an event is published, the engine finds the best matching rule:- Exact match:
platform + event_type + tier - Tier fallback:
platform + event_type + tier IS NULL(applies to all tiers) - Platform fallback:
event_type + tier(any platform)
Calculation Types
Flat Points
A fixed number of points per event:Per-Unit Points
Points scale with a value in the event metadata:Multipliers
Tier Multiplier
Each tier has apoints_multiplier:
| Tier | Multiplier |
|---|---|
| Bronze | 1.0x |
| Silver | 1.5x |
| Gold | 2.0x |
| Platinum | 3.0x |
Partner Multiplier
Partners can have a bonus multiplier (e.g., 1.2x for a promotional period). This stacks with the tier multiplier.Caps
Daily Cap
Maximum points a user can earn from a specific event type in one day. Example:daily_cap: 50 for article_read means reading 100 articles still awards at most 50 points/day.
Monthly Cap
Maximum points per event type per calendar month.Frequency
Controls how often an event counts:| Frequency | Behavior |
|---|---|
unlimited | Every event counts (subject to caps) |
once | Only the first event ever counts |
daily | One event per day counts |
weekly | One event per week counts |
monthly | One event per month counts |
Tier Promotion
After points are credited, the engine checks if the user qualifies for a tier upgrade:Tiers are based on lifetime earned points, not current balance. Spending points on rewards does not affect tier status.
Idempotency
Usemetadata.reference_id to prevent duplicate awards:
reference_id is published twice for the same user and event type, points are only awarded once.
