Skip to main content
All CollectionsIntegrations & AutomationsSalesforce And Referral Factory
How To Send Referred Users (the Person Invited) from Referral Factory to Salesforce And Automatically Qualify Referrals When They Convert
How To Send Referred Users (the Person Invited) from Referral Factory to Salesforce And Automatically Qualify Referrals When They Convert

Create new leads or contacts in Salesforce when a person is referred and qualify them when the referral is successful.

Updated over 4 months ago

Referral Factory can automatically create a new contact in Salesforce when someone signs up using their friend's referral link. That way, your team can pick up the referred lead without skipping a beat!

Step 1: Create Custom Fields in Salesforce

→ For the Salesforce integration to work correctly, you will need to create custom text fields in Salesforce to store Referral Factory’s unique user ID for the Person Invited, which we call {Referral Code} in the Lead, Contact and Opportunity objects. This allows us to track the Person Invited inside Salesforce as it moves through your pipelines and workflows.

→ (Optional) Should you wish to store additional referral data related to your referred user, create these relevant fields inside Salesforce. You could, for example, create fields to house information like:

  • {Referrer First Name}: The name of the person who referred them

  • {Referrer Email Address}: The email address of the person who referred them

  • {Referral Campaign}: The name of your Referral Factory campaign (useful if you're running multiple campaigns)

  • {Referral Link}: The referral link automatically generated for the new user (useful if you will enrol referred leads into your referral program)

If you have recently created new properties in Salesforce but they do not appear in Referral Factory - please click on the "Refresh" icon and try again.

Step 2: Map {Referral Code} Across Your Lead, Contact and Opportunity Objects in Salesforce

Map the {Referral Code} fields you have just created in Salesforce across the Lead, Contact and Opportunity objects. This will allow Referral Factory to track the Person Invited as they move through your pipelines and workflows.

Step 3: Configure How Data Should Be Sent In Referral Factory

→ Click Edit Campaign to enter the campaign builder.

→ Navigate to the Integrations step in the bottom navigation bar.

→ Scroll down until you see the option to configure settings for the Person Invited.

Step 4 (Optional): Set Your Qualification Rules

If you would like to automatically qualify the Person Invited when they convert in Salesforce, set the rules that will trigger the automatic qualification. If you choose to qualify users using a different method, simply leave this section blank.

→ To automatically qualify the Person Invited when they convert in Salesforce, set the rules that will trigger the automatic qualification.

You have 4 options:

Option 1: Qualify By A Change In A Lead Field

→ Select the option to “Create a New Lead In Salesforce”.

→ Set the method to qualify as “A field of the Lead would change”.

→ Choose the lead field you want to track. For example, Status.

→ Select what the field's value should be when Referral Factory first creates the lead inside Salesforce. For example, "Open - Not Contacted".

→ Select the field value(s) that mean the referral has been successful or converted; i.e., the value that should trigger a qualification in Referral Factory. For example "Closed - Converted".

Option 2: Qualify By A Change In A Contact Field→ Select the option to “Create a New Contact In Salesforce”.

→ Set the method to qualify as “A field of the Contact would change”.

→ Choose the Contact field you want to track.

→ Select what the field's value should be when Referral Factory first creates the contact inside Salesforce.

→ Select the field value(s) that mean the referral has been successful or converted; i.e., the value that should trigger a qualification in Referral Factory.

Option 3: Qualify When A Lead Converts Into An Opportunity

→ Select the option to “Create a New Lead In Salesforce”.

→ Set the method to qualify as “A Lead would convert into an Opportunity”.

Option 4: Qualify When A Lead Converts Into An Opportunity and Moves To A Specific Opportunity Stage

→ Select the option to “Create a New Lead In Salesforce”.

→ Set the method to qualify as “A Lead would convert into an Opportunity, and move to a specific stage”.

→ Select the opportunity stage(s) that mean the referral has been successful or converted; i.e., the stage that should trigger a qualification in Referral Factory. For example "Closed Won".


Step 5: Map Your Fields In Referral Factory

→ Map the data fields from Referral Factory to your Salesforce fields using the dropdown select options. If a recently created Salesforce field is unavailable for selection, click the refresh button.

❗️ For this function to work, you must map the following fields:

  • {First Name}

  • {Last Name}

  • {Email}

  • {Company} (Only required to create Leads)

  • {Referral Code}

📌 We recommend adding {Last Name} and {Company} as form fields in the Pages for the Person Invited. If you do not want to ask your users to fill in these details, we recommend mapping a default field.

Step 6 (Optional): Define Your Default Fields

→ You have the option to define any default data fields for when the Lead/ Contact is created inside Salesforce.

Step 7 (Optional): Attach Information About The Person Referring

→ You also have the option to attach information about the person who made the referral. Remember that you may need to create custom fields inside Salesforce to house this data.

Step 8: Choose How To Handle Duplicates

→ Choose whether Referral Factory should update existing Leads/ Contacts in Salesforce. If you choose to update, the fields you have mapped in the integration step will be updated for the Lead/ Contact inside Salesforce. Keep in mind that enabling this setting may result in existing Salesforce data being overwritten.

→ Click Save or Next.

❗️ We recommend selecting the middle option to update your Salesforce Leads/ Contacts, in order to ensure that all your Leads/ Contacts qualify correctly. However, if your referral program rules exclude existing Leads/ Contacts, you may prefer to select the first option.

Step 9: Test Whether Your Integration Is Working

Step 1: Sign Up As the Person Referring

→ Open your campaign link in a private window or incognito mode and sign up as the Person Referring. Please note that Referral Factory uses cookies, so if you have already visited your campaign link, you may see the incorrect step.

→ Be sure to use an email address that does not already exist as a user in your referral campaign and, depending on your settings, does not already exist in Salesforce. We recommend using plus addressing to make sure that each email address is unique and easily searchable. For example, [email protected].

Once you have your referral link you can either use one of the share icons to share your referral link or click "Copy Link" and open your referral link in a different browser.

Step 2: Sign Up As The Person Invited

→ Once you have opened the referral link generated for the Person Referring, enter your details and sign up as the Person Invited.

→ Be sure to use an email address that does not already exist as a user in your referral campaign and, depending on your settings, does not already exist in HubSpot. We recommend using plus addressing to make sure that each email address is unique and easily searchable. For example, [email protected].

Step 3: Check For New Users in Referral Factory

→ Check that the Person Invited is created in the Users tab inside Referral Factory.

Step 4: Check For New Contacts in Salesforce

→ Check that the contact is created in Salesforce with all the data you have chosen to map across.

Step 5: Test Your Qualification Trigger

→ Update the Lead or Contact field or the Opportunity stage of the Person Invited inside Salesforce as per the settings you configured.

→ Return to Referral Factory to check the status of the contact you just converted in the Users tab. Note that it can take up to 30 minutes for the data to pass from Salesforce to Referral Factory.

Did this answer your question?