Skip to main content
Referrals close the Reputation Studio flywheel. Where surveys and testimonials feed reputation outward, the 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:
The endpoint:
  • Resolves the org and agent server-side from the published profile slug. Anything else returns a uniform 404.
  • Creates a Person for the referrer with source: REFERRAL and relationshipStage: ADVOCATE.
  • Creates a Referral row with status: RECEIVED and the resolved agentUserId.
  • 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.
Example submission:
No auth required — the published profile slug is the capability.

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:
  1. Referral is created with status: RECEIVED.
  2. REFERRAL_RECEIVED is emitted.
  3. The downstream workflow creates or updates a Person for the referred lead with LeadSource.REFERRAL.
  4. The new Person enters the pipeline at the lead stage like any other inbound lead — visible in People and routed through your existing automations.
  5. When that lead’s deal closes, set Referral.resultingDealId and Referral.status = CLOSED_WON so revenue attributes back to the advocate.
That last write — referral → resulting deal — is what turns Reputation Studio from a review tool into a revenue tool: every closed deal you can attribute to a prior 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.