Salesforce

Keeping Salesforce and Referral Rock in sync through a sales process is essential so Referral Rock can correctly calculate rewards based off of referral and sales events.

Examining Your Use Case

When integrating your Salesforce and Referral Rock accounts, the Referral information has to live in both accounts.  You need to ensure that the Referral is added to both Referral Rock and Salesforce at the same time and that Referral Rock knows who the Member that referred them is.  This can typically be done in one of two ways:

  1. Use your existing online lead capture method (which already adds to Salesforce) and add the Referral/new lead via Conversion Tracking through the Referral Rock Integration Scripts.
  2. Lead is gathered from Referral Rock form and sent to Salesforce.

How the Sales Receiver Works

Understanding the process behind the Referral Rock and Salesforce integration is helpful when trying to decide and understand how your settings should be set within your accounts.

  1. Adding a Lead/Referral: When a new lead is captures, it needs to exist in both Referral Rock and Salesforce (see the two methods above).
  2. Close/Update Deal/Referral Processing: Update Referral Rock based on event triggers in Salesforce.
    1. Trigger Events in Salesforce
      1. New/Updated Lead
      2. New/Updated Contact
      3. New/Updated Account
      4. New/Updated Opportunity
    2. Action/Operation Response in Referral Rock
      1. Event trigger notifies actions to send data into Referral Rock
      2. When event occurs, a call is made to Referral Rock to collect various available sales data points
      3. Based on the configuration, data is sent to Referral Rock
  3. Sales Receiver: Referral Rock then processes the data sent and makes intelligent decisions in order to update/add the Referral record.
The Sales Receiver is smart enough to process information it has no questions about but will also save data that was sent in both complete and incomplete.  For example, a new sale can be sent in with a referral code that doesn’t match.  It will fail, but save the record so a team member can manually edit and retry the information with the correct referral code.  This way, a log of all failed and successful updates is saved, so you won’t have to try to recreate a trigger or event to re-submit a record that needs correcting.

Setting Up Your Accounts

  1. Install Package: Download the Unmanaged Package from Referral Rock and install on your Salesforce account.
  2. Configure Settings in Salesforce: Once installed you can update your settings based first, you’re going to have to add your Referral Rock API Keys then your configuration key.  This is designed so you only have to set this up once.  After that all of the settings changes you’ll make will be within the Referral Rock Admin UI.  Within your Referral Rock Admin UI, navigate to Settings > Integrations > Sales Receiver Settings > Salesforce Settings and you will see a button that says ‘Setup Salesforce.’  Select this button and follow the instructions on the following widget to complete your setup.
  3. Configure Settings in Referral Rock: Based on how your workflow is setup within Salesforce, you can configure the various events you utilize and how it affects your Referral Rock data.  Please go through the all of the steps on the page to configure the necessary settings.  We’re happy to help talk you through the correct configuration based on your use case.
    1. Required Setup Areas
      1. Referral Status Change Events:  Choose which referral status you want to update to based on the Salesforce object, field name, and value match. The most common example is setting the "Approved Status" to use the "Opportunity" object with the "StageName" field name with the value match of "Closed Won"
      2. Referral Fields to Update: Once the status change event occurs, the fields are sent to Referral Rock. You then set the mapping of which fields in Referral Rock will be updated by which fields from Salesforce
    2. Recommended Setup Areas
      1. Referral Target Match: If the Referral already exists in both Referral Rock and Salesforce, you can assign the following fields to ensure a direct match, so that the correct Referral record in Referral Rock is updated.
    3. Optional Setup Areas
      1. Member Match: If the Referral does not exist in Referral Rock, you can assign the fields so that the Referral record gets added to the correct referring Member based on the Salesforce fields set to match.
  4. Test the setup: Trigger one of the events you setup in the previous step.  You’ll be able to see the “Last Salesforce Connection” date update as well as “Last Entry Received” date if you have set everything up correctly.
You must use the proper API field names based off of how they are named for the API in Salesforce, not how they are displayed in the user interface.  A full list of field names, including those for custom fields, can be found within your Salesforce account under Setup > Customize > [Object Name] > Fields.  Check out this guide for the API field names for most standard fields.

Troubleshooting

I’m not sure this is workingYou’ll be able to see the “Last Salesforce Connection”
date be updated as well as “Last Entry Received” date if
you have your keys and events setup properly but that
doesn’t necessarily mean the fields are correct.  If your
Keys are input and your receiver settings are all correct,
any tests should appear in your Sales Entries log.
I’m not getting any sales entriesCheck to see if your keys are input correctly in Step 2 of the
setup.  Also check to see if you have the events configured
properly.  Remember you must use the API field names based
off of how they are named for the API in Salesforce, not how
they are displayed in the user interface.
My fields aren’t being set correctlyIf you run into any issues you can dig into the details of the
individual sales entries to tell you exactly what is being sent
by Salesforce.  Double check your field mapping settings to
see if they are correct.

Other Notes on Fields

Due to the nature of some fields in Salesforce, Referral Rock can only receive direct fields. Relational fields will send as null so use direct Object > Field relationships whenever possible. For example, instead of sending Contact > AccountName, send Account > Name to ensure an accurate Business Name is sent.

If the set fields are not available, Salesforce will send Referral Rock “null” records.  If there is the possibility of many objects, then Salesforce will send us the fields if there is only one record matching (i.e. Account that Has Many Opportunities trying to send Object ‘Opportunity’ with the field name ‘Name’).

Trigger

Looking for

Relationship

Logic

Lead

Lead

Self

Same object, no problem

Contact

Contact

Self

Same object, no problem

Contact

Account

1 to 1

If exists, else null

Contact

Opportunity

1 to many

Send record if only one associated record exists, else null

Account

Contact

1 to many

Send record if only one associated record exists, else null

Account

Account

Self

Same object, no problem

Account

Opportunity

1 to many

Send record if only one associated record exists, else null

Opportunity

Contact

1 to many

Send record if only one associated record exists, else null

Opportunity

Account

1 to 1

If exists, else null

Opportunity

Opportunity

Self

Same object, no problem


How did we do?