Salesforce

Trigger referrals when Salesforce records match the conditions you choose and update/add Salesforce contact field labels with their unique share link and referrer information.

circle-exclamation

Referral Trigger

Description

When you connect your Salesforce account to your GrowSurf campaign and enable Referral Trigger, GrowSurf can automatically detect and trigger referrals when the Salesforce records you choose match the conditions you configure.

GrowSurf lets you choose one Salesforce object, one direct trigger field on that object, and one exact value to match. Supported objects include:

  • Opportunity

  • Lead

  • Contact

  • Account

  • Other Salesforce custom objects that are queryable in your Salesforce account

GrowSurf then determines which participant should count as the referred participant:

  • Opportunity: By default, GrowSurf uses the Primary Opportunity Contact. You can also choose All Opportunity Contacts as an advanced option.

  • Lead: GrowSurf uses Lead.Email to find the referred participant.

  • Contact: GrowSurf uses Contact.Email to find the referred participant.

  • Account and Other Salesforce Object: GrowSurf can use a direct email field on that object, a direct Contact lookup, or a direct Lead lookup to find the referred participant.

circle-info

Note: GrowSurf creates and manages its own Salesforce PushTopic for referral-trigger events. If Salesforce connects successfully but enabling or changing the Referral Trigger fails, ask your Salesforce administrator to confirm that the connected user has the API access and PushTopic permissions required to create and update that GrowSurf-managed PushTopic.

In order for a referral to trigger from within Salesforce, the following must be true:

  1. The selected Salesforce record must exist

  2. The selected trigger field on that record must match the exact value you configured

  3. GrowSurf must be able to resolve one or more referred-participant email addresses from the matching rule you selected

  4. One or more of those resolved email addresses must already exist as participants in the GrowSurf campaign connected to Salesforce

If all of the above holds true and a participant match is found, the referral will trigger within GrowSurf. Referral credit will then be given to the referrer and unlock any rewards, if applicable.

Here's how to set up Salesforce referral triggers:

How to Set Up

circle-exclamation

Step 1: In Campaign Editor > 4. Options > Integrations, click the Connect to Salesforce button, then choose Production org or Sandbox org.

circle-info

Note: Salesforce sandbox orgs are best for testing. If you choose Sandbox org, GrowSurf sends you through Salesforce's sandbox login. We recommend connecting sandbox orgs to a separate GrowSurf test campaign instead of your live campaign.

circle-info

Note: Once connected, Salesforce requires us to collect certain information from your organization, such as Org ID and business address. Please contact GrowSurf support herearrow-up-right to submit your organization details.

The Salesforce integration will continue to work without this information, however, to ensure there are no service interruptions please submit this information within 3-5 business days of your first GrowSurf invoice payment.

Step 2: Once connected, toggle the switch to enable the Referral Trigger.

Step 3: Choose the Salesforce object, direct trigger field, and exact value that should count as the qualifying referral event.

Step 4: Choose how GrowSurf should identify the referred participant when that record matches.

  • For Opportunities, choose either Use the Primary Opportunity Contact or Use all Opportunity Contacts (advanced).

  • For Leads and Contacts, GrowSurf automatically uses the record's email field to find the referred participant.

  • For Accounts and custom objects, choose a direct email field, Contact lookup, or Lead lookup that points to the referred participant.

(Optional) Step 5: You can add a referral trigger hold period by toggling the Show advanced settings section.

circle-info

Note: The referral trigger hold period is useful for making sure that Salesforce records that stop matching do not count as referrals. During this hold period, if the selected Salesforce record no longer matches the condition you configured, the referral trigger will be cancelled completely.

Troubleshooting Tips

  • When testing out the Salesforce Referral Trigger integration, make sure to view participants' activity logs for details that can help you troubleshoot any issues.

  • Salesforce record updates are sent to GrowSurf asynchronously and could take up to one minute or longer depending on load. Until the event is received, GrowSurf cannot process the event and trigger the referral. Furthermore, we use a message queue to process these events. If you do not see a referral trigger right away, please be patient.

  • If you are connecting a Salesforce sandbox org, choose Sandbox org after clicking Connect to Salesforce. If your campaign is already connected to the wrong org type, disconnect Salesforce and reconnect with the correct choice.

  • If Salesforce connects but GrowSurf shows an error when you save or change the Referral Trigger, ask your Salesforce admin to confirm that the connected user can create and update the GrowSurf-managed Salesforce PushTopic and has the required API access.

  • If you are using Use the Primary Opportunity Contact for Opportunities, make sure exactly one primary contact is marked on the Opportunity. If there is no primary contact, GrowSurf will not trigger the referral for that Opportunity.

  • If you are using an Account or custom object, make sure the matching rule points to a direct email field, Contact lookup, or Lead lookup on that same object. GrowSurf does not follow indirect relationship chains for Salesforce referral triggers.

Sync Data

Description

When new GrowSurf participants are added to your campaign, they will automatically be added/updated as Salesforce contacts with new GrowSurf Field Labels. Their unique share link and referrer information will be available for use in emails and reports.

How to Set Up

Step 1: In Campaign Editor > 4. Options > Integrations, click the Connect to Salesforce button, then choose Production org or Sandbox org.

circle-info

IMPORTANT: Because the GrowSurf data sync to Salesforce only occurs after you have connected with the integration, it is imperative to connect with the integration BEFORE importing participants. Click herearrow-up-right to see remedy options if you have already imported participants into your campaign but would like to sync their GrowSurf data to Salesforce.

Step 2: Give GrowSurf authorization to connect to Salesforce

circle-info

Note: Once connected, Salesforce requires us to collect certain information from your organization, such as Org ID and business address. Please contact your GrowSurf customer success manager herearrow-up-right to submit your organization details.

The Salesforce integration will continue to work without this information, however to ensure there are no service interruptions please submit this information within 3-5 business days of your first GrowSurf invoice payment.

Enabling Contact Field Visibility in Salesforce

Once you have successfully connected to Salesforce, GrowSurf fields are automatically available. However, in some cases, the custom field permissions must be modified to grant other Salesforce users access and allow visibility.

To find contact fields and add permissions to those fields as an admin, follow the steps below:

Step 1: In Salesforce navigate to Setup > Object Manager > Contact > Fields and Relationships

Step 2: Select a Field Label from the list

Step 3: Click the Set Field-Level Security button and make modifications.

triangle-exclamation

How to Add Fields to Page Layouts in Salesforce

To view the GrowSurf custom fields within Salesforce, you must update one or more page layouts so that the fields appear for contacts within Salesforce.

Step 1: In Salesforce navigate to Setup > Object Manager > Contact > Page Layouts

Step 2: Select the target page layout from the list

Step 3: Click and drag one or more GrowSurf custom contact fields into the view

Step 4: Click the Save button

Step 5: Navigate to the layout to view the added fields

Examples

View our Salesforce tutorialsarrow-up-right to see different kinds of examples that you can copy/paste into your email templates.

Contact Field Labels

GrowSurf will automatically create these new contact field labels for your Salesforce contacts.

Field Label

API Field Name

Type

Description

Example

GrowSurf Share URL

growsurf_share_url__c

URL

The participant's unique Share URL (contains their unique GrowSurf ID)

https://piedpiper.com?grsf=d77a8j

GrowSurf Participant ID

growsurf_participant_id__c

Text

The participant's unique GrowSurf ID

d77a8j

GrowSurf Referral Status

growsurf_referral_status__c

Text

The referral status of the participant*

CREDIT_PENDING

GrowSurf Referrer Email

growsurf_referrer_email__c

Email

The email of the participant's referrer

GrowSurf Referrer First Name

growsurf_referrer_first_name__c

Text

The first name of the participant's referrer

Gavin

GrowSurf Referrer Last Name

growsurf_referrer_last_name__c

Text

The last name of the participant's referrer

Belson

GrowSurf Participant First Name

growsurf_participant_first_name__c

Text

The participant's First Name

Bob

GrowSurf Participant Last Name

growsurf_participant_last_name__c

Text

The participant's Last Name

Loblaw

GrowSurf Total Referral Count

growsurf_total_referral_count__c

Number

The participant's all-time referral count

0

GrowSurf Monthly Referral Count

growsurf_monthly_referral_count__c

Number

The participant's current month referral count

19

GrowSurf

Prev Monthly Referral Count

growsurf_previous_monthly_referral_count__c

Number

The participant's previous month referral count

200

GrowSurf Next Milestone

growsurf_next_milestone__c

Text

The text for the next/upcoming milestone reward (only applies to milestone rewards. See an example herearrow-up-right)

You are only 2 referrals away from winning a free t-shirt!

GrowSurf Next Monthly Milestone

growsurf_next_monthly_milestone__c

Text

The text for the next/upcoming monthly milestone reward (only applies to milestone rewards. See an example herearrow-up-right)

You are only 2 referrals away from winning a free t-shirt!

GrowSurf Total Invite Count

growsurf_total_invite_count__c

Number

The participant's all-time invite count

112

GrowSurf Total Impression Count

growsurf_total_impression_count__c

Number

The participant's all-time impression count

150

*GrowSurf Referral Status can be the following: CREDIT_PENDING (This participant must still trigger a referral for their referrer to receive referral credit), CREDIT_AWARDED (This participant triggered a referral and their referrer received referral credit), CREDIT_EXPIRED (This participant did not trigger the referral credit within the referral credit expiration window so their referrer did not receive referral credit).

Troubleshooting Tips

  • If the new participant isn't being added to Salesforce, or if they are being added but their unique referral link isn't being synced to Salesforce:

    • Activity logs will denote if a participant was added to Salesforce or if they failed to be added. (In the case of failure, GrowSurf will re-attempt to add them for 7 days).

  • If the new participant is being added twice to Salesforce (as a Lead and Contact):

    • If you are tracking referrals on a form (typically a Marketo form), you will always see a new Salesforce contact created/updated by GrowSurf. This is the expected behavior, as GrowSurf will create/update Salesforce Contact objects regardless of Salesforce Lead objects. Your form most likely has an automation that also generates a Salesforce Lead upon form submission.

      • NOTE: Even if you have a Duplicate Rule set up in your Salesforce instance to prevent Leads and Contacts from having the same email address, GrowSurf will still create a new Contact if it does not already exist.

  • If you are having trouble connecting to Salesforce:

    • If you are having trouble connecting Salesforce to your GrowSurf campaign, the issue may be related to permissions. Contact your Salesforce administrator and ask them to enable API access in the 'Permission Sets' section. Keep in mind that API access is only available in certain Salesforce editions, including Enterprise, Unlimited, Developer, and Performance. It is not available in Group, Essentials, and Professional but can be added as a feature in the Professional edition. For more information, check out Salesforce editions with API accessarrow-up-right.

    • If you are connecting a Salesforce sandbox org, choose Sandbox org after clicking Connect to Salesforce. If your campaign is already connected to the wrong org type, disconnect Salesforce and reconnect with the correct choice.

Last updated

Was this helpful?