The ReferralHero / Salesforce integration provides a robust set of features that empower you to:

  • Import Existing Contacts from Salesforce to ReferralHero

  • Automatically Sync ReferralHero Subscribers to Salesforce

  • Track a Salesforce Conversion Event

NOTE: Before connecting the ReferralHero/Salesforce integration, API access needs to be enabled in your Salesforce organization. API access is enabled by default in most Salesforce editions, including Enterprise, Unlimited, and Developer editions but a few editions like Professional do not include API access, and you need to enable API access or upgrade to a higher Salesforce edition.

Import Salesforce contacts to ReferralHero

If you have existing contacts in your Salesforce account and you want to import/subscribe them all to your ReferralHero campaign, you'll want to follow these instructions:

  1. Go to your Campaign Dashboard > Subscribers > Import and click on the tab Import from CRM.

  2. If you haven't connected your Salesforce account yet, please do it now by clicking on the button Setup Integration.

  1. Select the campaign to which the contacts/subscribers will be added.

  2. Choose the Salesforce object from which you want to import contacts/subscribers.

  3. Specify a URL for the referral link. This is the URL that we will use to generate the referral link for your subscribers. For example, if you use, the referral link will be ''

  4. Optional: Choose to "Send Welcome Email" at the time of import. Note, you must activate your Welcome Email in Automations before enabling the "Send Welcome Email".

  5. Click on the button Import

We will import your subscribers into your ReferralHero campaign immediately. Depending on how many subscribers you are importing, it might take from a few minutes to several hours. We will send you an email when the import is finished.

NOTE: If you turn on the Salesforce integration (see the section below), ReferralHero will populate the custom fields in your Salesforce account with the subscriber's values.

Sync ReferralHero subscribers to Salesforce

If you want to automatically add ReferralHero subscribers to Salesforce follow these instructions:

  1. Go to your Campaign Dashboard > Edit Campaign > Integrations > Salesforce

  2. Click ‘Connect your Salesforce account

  3. After connecting your account, toggle the Salesforce object (Leads or Person Accounts) you would like to create when a ReferralHero subscriber is added.

  4. Then click Save

Note: ReferralHero will first attempt to sync with the Salesforce profile. If found, we will sync; if not found, we will create it as you defined with the toggle.

The integration will automatically create the following custom fields in your Salesforce account.



Subscriber's unique referral code


Subscriber's extra field value


Subscriber's second extra field value


Timestamp of last referral


Subscriber’s total accumulated points


Subscriber’s position


Subscriber's unique referral link


Subscriber’s referrer’s name


Subscriber's source. If empty value will be "None"


Subscriber's id


Subscriber's total number of referrals


Subscriber’s email link


Subscriber’s Facebook link


Subscriber’s Twitter link


Subscriber’s referrer’s referral code

Now when a person signs up for your ReferralHero campaign, they will be immediately synced/added to your Salesforce account.

NOTE: ReferralHero will automatically update these custom fields when a person signs up or when things change (eg: when a subscriber refers a new person, their TOT_REF value changes).

Salesforce Account Configuration

Configuring your Salesforce account is essential for the ReferralHero integration to function properly. After establishing the integration, it's imperative to follow these steps to ensure seamless operation within your Salesforce environment.

Note: Please ensure that API access is enabled in Salesforce. API access is typically enabled by default in most Salesforce editions, including Enterprise, Unlimited, and Developer editions. For more information, refer to the Salesforce documentation.

Remote Site Settings

  1. Navigate to “Remote Site Settings” using the “Quick Find” search box in Salesforce Setup.

  2. Click the “New Remote Site” button.

  3. Enter the following ReferralHero site URL in the “Remote Site URL” field:

  4. Click Save.

Field Accessibility Settings

  1. Go to “Field Accessibility” using the “Quick Find” search box in Salesforce Setup.

  2. Choose the record type (e.g., Lead or Contact) for which you want to update field accessibility.

  3. Click “View by Fields”.

  1. Select the profile (e.g., System Administrator) to modify the field’s accessibility.

  2. Ensure that both “Field-Level Security” and “Page Layout” are set to “Visible”.

  1. Save the changes. The field “Code” is now “Editable” for the selected profile.

  1. Repeat the process for the following custom fields:

  • SubId__c

  • ExField__c

  • ExField2__c

  • Code__c

  • FbLink__c

  • TwLink__c

  • EmLink__c

  • RefLink__c

  • TotRef__c

  • Source__c

  • LastRef__c

  • Position__c

  • Points__c

  • MWR__c

  • Referrer__c

  1. Verify that all field-level security settings are correctly applied in the profile. Ensure that field access for all custom fields is now “Editable”.

NOTE: Updating "Field Accessibility" is crucial because it lets you decide which user profiles should see these new fields and where they should appear on the page layouts. By default, all RH custom fields are hidden, so adjusting these settings is necessary to control who can access these fields and where they appear on different layout configurations.

Track a Salesforce Conversion Event

If your Salesforce contacts are associated with “Opportunity”, you can add an event in the Salesforce integration that creates a rule to trigger the following actions in ReferralHero whenever there is a defined Opportunity Stage change in Salesforce.

  1. Contact added

  2. Referral change from pending to unconfirmed/confirmed status

  3. Total spend updates


  1. Click the ‘Add Event To Track’ button

  2. Give the event a name

  3. Select the Salesforce opportunity stage to track

  4. Select the 'Trigger Event Type' option that corresponds to the action you want to perform in ReferralHero, such as adding a contact or changing a referral status.

Last updated