ReferralFlo
Engineering·Oct 13, 2026·6 min read

Salesforce Referral Program Integration: A Working Recipe

Salesforce referral program integration: trigger referral tracking, stage sync, and release rewards only after Closed Won approval, with partner intro credit.

NANaveed Ahmer
Naveed Ahmer
Referral Strategy Consultant
Share
Editorial photograph: A wide view of an emptied SaaS sales floor near dusk: rows of vacant desks recede into shadow as one rep, sleeves rolled, reaches up to ring a mounted brass bell by the back wall,….

Salesforce referral program integration means treating the Opportunity object as the source of truth: a referral record attaches to an Opportunity ID, advances when that Opportunity's stage changes, and only releases a reward after the deal closes and a human approves payout. This post is the wiring diagram, not the sales pitch.

How Salesforce referral tracking ties a referral to an Opportunity

Salesforce referral tracking works by writing the referral ID onto the Opportunity record, usually as a custom field populated the moment a rep creates the deal from a referred lead. ReferralFlo's Growth Graph attribution engine captures the original referral link click, including device fingerprint and UTM passthrough, then passes that referral ID through the Salesforce REST API connector so every stage change on the Opportunity stays linked to one tracked referral.

Stage names are configurable per Salesforce org, so treat the mapping below as a starting template, not a fixed schema:

Opportunity stage (example) Referral lifecycle state What fires
Qualification Referred Click recorded, no reward yet
Proposal / Price Quote Verified Anti-fraud checks run, escrow opens
Negotiation / Review Pending approval Reward amount locked, awaiting Closed Won
Closed Won Converted Approval step triggers, payout releases
Closed Lost Disqualified Escrow closes, no payout

Salesforce sits alongside Stripe, Shopify, and HubSpot in ReferralFlo's integrations list, and the same Growth Graph engine that reads a Stripe charge or a Shopify order reads an Opportunity's StageName field. For the exact definition of Opportunity stages inside Salesforce, see Salesforce's own Help documentation on customizing Opportunity fields and stages.

Trigger referral stage changes from Opportunity stage updates

Salesforce Flow fires the trigger: build a record-triggered flow on Opportunity that fires when StageName changes, then call ReferralFlo's REST API, or route through Zapier, with the referral ID and new stage value. ReferralFlo's webhook listener maps that stage to a referral lifecycle state, so a rep moving a deal from Proposal to Negotiation advances the referral automatically, without anyone touching the referral dashboard.

Flow diagram showing a Salesforce Opportunity stage change triggering a Flow and API call that updates referral lifecycle state, gated by Closed Won before reward payout.

  1. Add a custom field, such as Referral_ID__c, to Opportunity, populated when a rep converts a referred Lead or Contact.
  2. Build a record-triggered Flow on Opportunity that fires on StageName change.
  3. Call ReferralFlo's REST API from the Flow via a Named Credential, or route the event through Zapier, passing Referral_ID__c and the new stage.
  4. Map each Salesforce stage to a ReferralFlo lifecycle state (Referred, Verified, Pending approval, Converted, Disqualified) in the program's integration settings.
  5. Test with one Opportunity before going live. Watch the referral record advance in ReferralFlo as you change stages in Salesforce.

Five steps. That's the whole setup. The pattern above is CRM-agnostic: if part of your stack still runs on HubSpot, the deal-stage trigger works the same way field-for-field; see HubSpot Referral Program Integration: No-Code Deal Triggers for that mapping. For the exact payload shape ReferralFlo expects on each call, check the webhook and SDK reference. If you route through an event bus instead of a direct callout, Salesforce's Platform Events documentation describes the pub/sub model that pattern relies on.

Gate the reward behind Closed Won with an approval step in front

ReferralFlo's reward escrow holds the referral payout in a pending state until two conditions clear: the linked Opportunity reaches Closed Won, and a named approver signs off inside ReferralFlo or through a Salesforce approval process built with Flow. Only after both gates clear does the payout fire, whether that's cash, a discount code, store credit, or a gift card.

The approval step exists because Closed Won isn't always final. A deal can be reopened. A chargeback can hit the first invoice. A self-referral can slip past the automated checks. ReferralFlo's anti-fraud detection, covering self-referrals, IP collisions, and device overlaps, runs before the approval screen loads, so the approver reviews a pre-screened case, not a blind one. That's the point of the gate.

Reward rules, including escrow hold periods and payout method, can be configured per region inside ReferralFlo's referral management console, where approvals, payouts, and the audit log all live in one view. For a closer look at what can go wrong without that screening step, see the anti-fraud checklist for referral programs.

Credit partner-sourced intros and push lifecycle events back onto the Opportunity

Partner-sourced intros get a separate referral ID namespace: when a partner introduces a prospect, ReferralFlo logs that as an affiliate-program referral tied to the same Opportunity ID, distinct from any customer-referral record on the same deal. That separation stops a customer and a partner from both collecting a reward on one Closed Won Opportunity, since each program type reads its own field and evaluates its own escrow conditions independently.

Once a reward fires, ReferralFlo pushes the referral's status, amount, and payout date back onto the Opportunity record through the same REST API connector, usually as three custom fields an AE can see without leaving Salesforce. That closes the loop. The rep who worked the deal can see whether their pipeline included a referred lead or a partner-sourced one, without opening a second tool. No spreadsheet reconciliation. No end-of-quarter guesswork on commission.

Teams weighing whether the referral channel earns its keep against paid acquisition can run the numbers with ReferralFlo's referral vs. paid CAC tool, using their own Salesforce-sourced close rates as the input.

Frequently asked questions

Does ReferralFlo integrate directly with Salesforce Opportunities?

Yes. ReferralFlo lists Salesforce among its named integrations, and referral records attach to an Opportunity ID so stage changes and Closed Won status drive the referral lifecycle automatically.

Can a reward release automatically on Closed Won?

Reward escrow can hold payout until Closed Won, but a manual approval step runs first. Nothing pays out without a person confirming the deal and the referral.

How do you avoid paying both a partner and a customer for the same deal?

Run customer and affiliate programs in parallel with separate referral ID namespaces tied to the same Opportunity, so each program's escrow conditions evaluate independently.

What triggers a referral stage change in Salesforce?

A record-triggered Flow on Opportunity.StageName calls ReferralFlo's REST API, or routes through Zapier, with the referral ID and new stage, advancing the referral lifecycle state automatically.

NANaveed Ahmer
Naveed Ahmer
Referral Strategy Consultant

Referral program specialist and researcher who helps businesses turn referrals into a stable, scalable, and transparent distribution channel.

30 articles by this author →
Built for engineers

Fraud checks you don't have to build.

Device fingerprinting, IP velocity limits, disposable-email blocking and reward escrow — all built in.

Related reading