Pular para o conteúdo principal

Referral Program

The Indicacoes page (/referrals) lets tenants generate referral codes to invite others to the platform.


Como Funciona​

  1. Generate a Code -- click Generate Referral Code to create a unique code
  2. Share -- give the code to others
  3. Track -- see who used your code and the resulting conversions

Referral Code Details​

CampoDescricao
CodeUnique referral code (e.g., ACME2024)
Reward TypeDiscount or credit
Reward ValueAmount of the reward
UsesHow many times the code has been used
Max UsesMaximum allowed uses (0 = unlimited)
Expires AtExpiration date

Conversion Tracking​

View all conversions:

  • Which tenant signed up using your code
  • When they converted
  • Reward amount earned

Automatic Reward Distribution​

When a referred tenant converts by subscribing to a paid plan, the referrer automatically receives their reward. No manual intervention is required.

The ReferralRewardService handles the entire process:

  1. Reward Calculation -- The reward amount is determined from the platform default (affiliate_default_reward in Platform Configuracoes) or from a custom amount configured per referral code.
  2. Credit/Discount Creation -- A credit or discount entry is created on the referrer's account, which is applied to their next billing cycle.
  3. Referrer Notification -- The referrer receives an in-app and email notification confirming the reward.

Admin Configuracao​

The superadmin can configure the default referral reward amount in Platform Configuracoes under the affiliate_default_reward field. Individual referral codes can override this default with a custom reward value.


Proximos Passos​