Referral record captures the lead that comes back in — and ties it to the resulting deal so you can attribute revenue to the original advocate.
A Referral is the per-referral ledger Winnerr was missing. The legacy Person.totalReferrals counter is still maintained as a cache, but Referral is now the source of truth: who referred whom, through which channel, what reward was offered, and which Deal the referral eventually produced.
Where referrals come from
Public capture endpoint
The public profile and widget post submissions to a single CORS-friendly endpoint:- Resolves the org and agent server-side from the published profile slug. Anything else returns a uniform
404. - Creates a
Personfor the referrer withsource: REFERRALandrelationshipStage: ADVOCATE. - Creates a
Referralrow withstatus: RECEIVEDand the resolvedagentUserId. - Emits
REFERRAL_RECEIVED, which fires the workflow that re-enters the new lead at the top of the pipeline. - Rate-limits the request to 20 per minute and caps the body at 32 KB; all client strings are treated as data, validated with Zod.
Lifecycle
When the referral converts, set
resultingDealId so the referral is tied to actual revenue and the original advocate shows up in attribution reports.
What’s on a Referral
Managing referrals
List and create referrals via the authenticated API:Closing the loop
When a referral is captured publicly:Referralis created withstatus: RECEIVED.REFERRAL_RECEIVEDis emitted.- The downstream workflow creates or updates a
Personfor the referred lead withLeadSource.REFERRAL. - The new
Personenters the pipeline at the lead stage like any other inbound lead — visible in People and routed through your existing automations. - When that lead’s deal closes, set
Referral.resultingDealIdandReferral.status = CLOSED_WONso revenue attributes back to the advocate.
Referral is a closing the flywheel produced.
Referral rewards
When a referral’s linked deal is won, Winnerr notifies the agent that a reward is ready to send. The agent fulfills it out of band and marks it sent from the Rewards queue, at which point the referrer is automatically thanked by email or SMS (consent-gated, per the org’s reward policy). See Referral rewards for the full guide.Related
- Overview — the full reputation flywheel.
- Public profile — the surface the referral CTA lives on.
- Referral rewards — reward queue and auto-thank policy.
- Reputation API — referrals — authenticated CRUD.
- Public referral endpoint — token-less public capture.