---
schema_version: "1"
id: 98287a30109c8ca4b3a480289ed854ef4063a0b6548dbef5adac0a1462033947
title: Example Flows to Track B2B Referrals Across Sales Lifecycle
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/mktg/264-0-0/b2b_referral_config_activity_example.md
canonical_url: https://help.salesforce.com/s/articleView?id=mktg.b2b_referral_config_activity_example.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: b78e79ed534c5047d23dc7fa6e2f4d66e59cc1251fe2471c591d51d226e67987
description: Design flows that progressively track B2B referrals provided by customers and partners as referred businesses advance through sales lifecycle stages. For example, the flow can track the progression of referrals from lead generation to opportunity closure or from opportunity generation to first order fulfillment. B2B Referral Management provides businesses the flexibility to plug their referral programs in any type of B2B sales lifecyle. In this example, two reference flows are designed to visualize how partner referrals are tracked across the referral lifecycle during the lead to opportunity sales lifecycle and how partners are paid out for successful referrals.
products:
  - Marketing
  - Marketing Cloud Account Engagement
release: "264"
---
# Example Flows to Track B2B Referrals Across Sales Lifecycle

Design flows that progressively track B2B referrals provided by customers and partners as referred businesses advance through sales lifecycle stages. For example, the flow can track the progression of referrals from lead generation to opportunity closure or from opportunity generation to first order fulfillment. B2B Referral Management provides businesses the flexibility to plug their referral programs in any type of B2B sales lifecyle. In this example, two reference flows are designed to visualize how partner referrals are tracked across the referral lifecycle during the lead to opportunity sales lifecycle and how partners are paid out for successful referrals.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: Lightning Experience</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>,&nbsp;<strong>Performance</strong>, <strong>Unlimited</strong>, and&nbsp;<strong>Developer</strong>&nbsp;Editions with Referral Marketing</td></tr><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;">Available in: <strong>Enterprise</strong>,&nbsp;<strong>Performance</strong>, and <strong>Unlimited</strong>&nbsp;Editions with Partner Ecosystem Management - Members or Partner Ecosystem Management - Login. <a href="https://help.salesforce.com/s/articleView?id=sales.b2b_referral_prm.htm&amp;language=en_US" target="_blank">Learn more about Referral Marketing with Partner Ecosystem management.</a></td></tr></tbody></table>

## Tracking Referrals Lead Generation to Lead Qualification

Admins can create a flow that tracks B2B referrals right from inception when leads are generated from partner referrals until the sales team qualifies the lead. A record-triggered flow with the Process B2B Referral Event action makes sure that partners' referrals are always tracked, regardless of whether the lead is generated from the partner portal or offline.

![Image of sample flow to track referral activity for lead generation.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-mktg-referral_marketing-264-0-0-production-enus/069de2ea-aef2-412d-92c4-07a2a8ab4a37/referral_marketing/images/b2b_referral_process_activity_lead_flow.png)

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d6818e101">Flow Stage</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d6818e104">Configuration</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Flow Stage" class="slds-cell-wrap" style="vertical-align:top;" headers="d6818e101 ">Trigger condition (1)</td>

            <td data-label="Configuration" class="slds-cell-wrap" style="vertical-align:top;" headers="d6818e104 ">
              <ul>
                <li>Source object: Lead</li>

                <li>Trigger: When a lead is created or updated</li>

                <li>Entry conditions:<ul>
                    <li>Lead is sourced from a partner</li>

                    <li>Lead has a referral code</li>

                  </ul>
                </li>

              </ul>
              <p style="margin-bottom:0;">Referral Code is a custom field on Lead and this flow considers that partner
                referral code is added to leads generated from referrals.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Flow Stage" class="slds-cell-wrap" style="vertical-align:top;" headers="d6818e101 ">Lead status assessment (2)</td>

            <td data-label="Configuration" class="slds-cell-wrap" style="vertical-align:top;" headers="d6818e104 ">A Decision element checks whether the current status of the lead is New or
              Qualified.</td>

          </tr>
          <tr class="">
            <td data-label="Flow Stage" class="slds-cell-wrap" style="vertical-align:top;" headers="d6818e101 ">Outcome for new leads (3)</td>

            <td data-label="Configuration" class="slds-cell-wrap" style="vertical-align:top;" headers="d6818e104 ">
              <p>The Process B2B Referral Event action is used to track a
                <span class="apiname">Refer</span> type activity for the referral.
              </p>
              <p style="margin-bottom:0;">The action takes the
                lead's referral code and referral time as input and creates a Referral record as
                output.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Flow Stage" class="slds-cell-wrap" style="vertical-align:top;" headers="d6818e101 ">Outcome for qualified leads (4)</td>

            <td data-label="Configuration" class="slds-cell-wrap" style="vertical-align:top;" headers="d6818e104 ">
              <p>The Process B2B Referral Event action is used to track a
                <span class="apiname">Qualify</span> type activity for the referral.
              </p>
              <p style="margin-bottom:0;">The action takes the
                lead's referral code, qualification date time, account ID, and converted
                opportunity ID as input and updates the promotion stage of the lead's Referral
                record to Referral Qualifies as output.</p>
            </td>

          </tr>
        </tbody>
      </table>

## Rewarding Partners for Successful Referrals

Admins can create a flow that rewards partners when leads generated from their B2B referrals result in won opportunities. A record-triggered flow with the Process B2B Referral Event action makes sure that partners are instantly rewarded when opportunities generated from their referrals result in a positive outcome for the sales team.

![Image of sample flow to track referral activity for lead generation.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-mktg-referral_marketing-264-0-0-production-enus/069de2ea-aef2-412d-92c4-07a2a8ab4a37/referral_marketing/images/b2b_referral_process_activity_opportunity_flow.png)

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small ">
        <colgroup>
          <col style="width:50%">
          <col style="width:50%">
        </colgroup>
        <thead class="slds-text-title_caps ">
          <tr class="">
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d6818e212">Flow Stage</th>
            <th scope="col" class="slds-cell-wrap" style="vertical-align:top;" id="d6818e215">Configuration</th>
          </tr>
        </thead>
        <tbody>
          <tr class="">
            <td data-label="Flow Stage" class="slds-cell-wrap" style="vertical-align:top;" headers="d6818e212 ">Trigger condition (1)</td>

            <td data-label="Configuration" class="slds-cell-wrap" style="vertical-align:top;" headers="d6818e215 ">
              <ul>
                <li>Source object: Opportunity</li>

                <li>Trigger: When an opportunity is created or update</li>

                <li>Entry conditions:<ul>
                    <li>Opportunity stage is Closed Won</li>

                    <li>Opportunity has a referral code</li>

                  </ul>
                </li>

              </ul>
              <p style="margin-bottom:0;">Referral Code is a custom field on Opportunity and this flow considers that
                partner referral code is added to opportunities when leads generated from
                referrals are converted to opportunities.</p>
            </td>

          </tr>
          <tr class="">
            <td data-label="Flow Stage" class="slds-cell-wrap" style="vertical-align:top;" headers="d6818e212 ">Referral lifecycle closure (2)</td>

            <td data-label="Configuration" class="slds-cell-wrap" style="vertical-align:top;" headers="d6818e215 ">
              <p>The Process B2B Referral Event action is used to track a
                <span class="apiname">Closure</span> type activity for the referral.
              </p>
              <p>The action takes the
                opportunity's referral code, closure date time, amount, account ID, and ID as
                input and updates:</p>
              <ul>
                <li>The promotion stage of the lead's Referral record to Referral
                  Closure/Converts</li>

                <li>Issues a referral reward for the partner with the New status</li>

              </ul>
            </td>

          </tr>
          <tr class="">
            <td data-label="Flow Stage" class="slds-cell-wrap" style="vertical-align:top;" headers="d6818e212 ">Partner payout (3)</td>

            <td data-label="Configuration" class="slds-cell-wrap" style="vertical-align:top;" headers="d6818e215 ">
              <p>The next three elements:</p>
              <ul>
                <li>Gets the referral record to find the record for the issued reward</li>

                <li>Gets the issued reward</li>

                <li>Updates the partner's reward with these changes:<ul>
                    <li>Calculates payout value based on opportunity amount and payout
                      percentage</li>

                    <li>Sets reward status to Issued </li>

                    <li>Changes the date on which the reward value can be paid out</li>

                  </ul>
                </li>

              </ul>
            </td>

          </tr>
        </tbody>
      </table>

![Tip](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-mktg-referral_marketing-264-0-0-production-enus/069de2ea-aef2-412d-92c4-07a2a8ab4a37/images/icon_tip.png)

Tip You can design nuanced flows based on what your company considers as eligible referrals and successful referral conversion. For example, the flow that initiates the referral lifecycle can filter referrals based on the annual revenue of the referred businesses. The flow that closes the lifecycle of referrals can have advanced conditions that only reward advocates when the final deal with the referred business is of a particular size.