Compensation Plans
Tiered pay plans with condition trees that auto-assign a tier to each statement.
A compensation plan defines how a host gets paid based on performance. Plans are tiered, and each tier carries a condition tree that decides whether a host qualifies.
Plans and tiers #
An AgencyCompensationPlan holds ordered tiers (AgencyCompensationTier).
Each tier has:
- a condition tree (the same AND/OR format as campaigns),
- a reward type — cash (BRL/USD), points, or a service,
- a reward value/label.
Which plan prices a host #
A plan is for the whole agency or for one sub-agency. A host whose platform account is in a sub-agency is priced only by that sub-agency's plans; a host in no sub-agency, only by the whole agency's. Within each, a plan for the host's platform comes before a plan for all platforms. One plan can be active per platform in each sub-agency, and per platform for the whole agency.
People attached to a sub-agency see only their own sub-agency's plans, not the whole agency's, and a plan they create is for their sub-agency. What they can do with those plans depends on their role's Compensation plans permissions.
When no plan applies to a host, calculating their statements gives them no payment amount (an amount entered by hand stays). After you add a plan, select those statements and use Recalculate from Plan to price them.
A tier that pays points, diamonds, beans or another reward that isn't money gives the statement no payment amount. Points are added to the host's wallet when the statement is marked paid. In a plan that pays money, a new statement below its lowest tier shows 0; an existing one keeps the amount it had.
Condition trees #
Tiers match on stat fields and deltas — diamonds_earned, valid_live_days,
live_duration_minutes, diamonds_delta, and more — combined with AND/OR groups.
Example: a "Gold" tier might require diamonds_earned >= 5000 AND
valid_live_days >= 15.
Automatic tier assignment #
When a monthly statement is saved, the
CompensationCalculator evaluates the plan's tiers against that statement and
assigns the correct one automatically — no manual matching.
Deleting and restoring tiers #
Deleting a tier keeps it with its values and takes it out of tier matching: new and recalculated statements no longer match it, and the statements it already priced keep it. To bring a tier back, set the Deleted records filter on the plan's tiers table to Only deleted records and use Restore. A tier cannot be restored while another tier of the plan has the same order.
Proximity alerts #
When a host reaches ≥ 80% of the next tier's threshold, a tier-proximity alert can notify them (WhatsApp + portal) to push for the next level. See WhatsApp.