Customer Experience

Building a referral program in Salesforce

Aaron Ward

One of the best ways to engage with your happiest customers is to invite them to refer a friend or colleague (especially if they've just filled in a Net Promoter Score survey saying they'd happily do exactly that!). And, of course, you also want to take the chance to make your happy customer a little bit happier still, so offering some sort of reward for a referral is often a good idea.

This is something we often get customers wanting to do as a follow-up to promoter responses on AskNicely NPS surveys, however, a lot don't have an existing referral program and want to do as much as possible with their existing tools.We've previously posted on how to setup a basic referral program using HubSpot, but one of the most common requests we get is to set something up using Salesforce. This post is a step-by-step guide on how to build the bare bones of a referral program using Salesforce. You may well also have a marketing automation platform (Salesforce brand or other) that can do some of the pieces of this. For those that don't, you can actually build everything you need, except for the landing page, just in the Salesforce CRM itself.

Before we start:

The program I describe below offers the existing customer a gift card (or similar reward) only if the person they refer actually starts a free trial. In our opinion, this type of reward is the most effective – it encourages customers only to offer referrals to people who are actually likely to be interested. This in turn, ensures you're getting better quality leads out of the process and more importantly, makes sure that you're not annoying people and creating a negative brand image by reaching out to people who aren't interested in what you have to offer.

While I've used free trial as an example here, you could use any other conversion point that's easily trackable in your CRM. It could be anything from signing up to your mailing list, attending a webinar or actually becoming a paid customer.

This is the process we're going to build:

  1. Our customer sees a landing page where they enter details for someone they think might be interested in our product.
  2. Once they submit that form, we’ll check that person is not already a customer or prospect and create a new lead in Salesforce that is linked to the person who referred them.
  3. If the friend signs up, we’ll then get an alert, add a gift voucher code to the contact record of the person who referred the lead in Salesforce and then send them a thank you email with the voucher code.

Setting up your Salesforce referral program:

1. Add some custom fields for tracking the referral

First step is setting up two new custom fields in Salesforce on the lead record – we need to record the name and email address of the person who referred a lead to us.

Obviously, use a naming convention that works for you, but it is a good idea to separate these fields out clearly as we'll be using them to identify who is a referral lead and to trigger notifications later on.

2. Create a landing page

This is where things may differ based on your particular tech stack - for the sake of this example, I've used Unbounce and their API integration with Salesforce, but this could easily be built in your marketing automation platform or as a custom form on any site sending info via the Salesforce API (preferably) or web to lead form, if needed.

And then we map the data fields for the "your friend's details", to the lead data fields, and the "your details" section to the referral fields we just created. (Again, this bit depends on how you're hosting the landing page - example below shows Unbounce Salesforce connector config.)

3. The email to the referral lead:

First, we create an email template in Salesforce inviting our newly referred lead to start a free trial. This is a fairly basic email template for the sake of the example, but you could style it with more rich HTML, if needed. Alternatively, the email setup and send (steps 3&4) could be setup via your marketing automation system if you're running one.

Second, we create an email alert using the template we just created (note that we've setup the alert on the lead object, and the recipient address as the lead's email address field - this means the alert will be sent to the lead themselves, rather than anyone internal):

4. Sending the referral invite:

As with anything in Salesforce, there's a few ways you could do this. For the sake of this example, we're using process builder.To start with, we'll create a new process from a Lead being created. The setting to only run this on create ensures that we're only capturing for new leads and therefore not rewarding someone for referring a lead who is already in our system.

*If you wanted to change this and also reward someone who refers a lead who's already in the system, but say wasn't previously marketing qualified you could change that setting and add an additional filter in the next step.

**If you use Salesforce's web-to-lead functionality to send the form data into Salesforce, you would also need to check for any duplicate leads to ensure there is not an existing person in your system as that isn't done natively by Salesforce when using web-to-lead.

New Process builder process from lead create

Next, we'll create the filter criteria - this is pretty simple, we're just looking for any lead that is created and has a value for our custom field Referral - Referred By - Email - this is enough to show us that the lead has been created as a referral.

filter to check for referral lead

5. Success!

The last part is to reward the referrer when their friend follows through and signs up for a free trial (or whatever your desired conversion point is).To do this, we're staying in process builder and creating a new process to be triggered when a lead is updated or created. And in the filter, we'll check if Referral - Referred By - Email is not empty AND Free Trial is True.

And then the action for this process will be to create a task, assigned to our internal owner to send a reward to the person who made the referral.

*Note that we've used a formula for subject and description so that we can include the referral fields in the text, making the details more immediately available.This part of the process could be automated further, but we're deliberately keeping a manual step in here at the moment because

1) it lets us have a close check of the lead and make sure it's legit before paying out on a reward and;

2) it keeps the setup work to a minimum when we're first getting the program up and running, but can easily be extended once it takes off.

Considerations for NPS Salesforce Referrals

Getting your customers to your referral landing page: We use AskNicely workflows or Salesforce process builder to send an email after positive feedback is placed, inviting the customer to refer a friend. This means we're only sending people we know are verified customers to this page. This is important, because we want to make sure we protect our own reputation by not having the page abused. In some cases, it might also be worth adding a captcha form and/or limiting the number of leads that can be added through the form in a short time.

The fact that this process does send an email directly out to the referred lead does have some inherent dangers, and it's important to keep that in mind. Check laws in any location you're operating to be sure on what you're allowed to send. And regardless of any local legislation, make sure the referred leads aren't automatically added to nurture emails or sales cadences. You may also want to include a consent declaration from the person making the referral stating that they have their friend's permission to share their details with you.

Of course, the other way around that sort of danger, is to put the sending in your customers' hands - let them send the link to their friends and you just check the lead when they come in. The background mechanics in this case are similar, but instead of tracking the lead, we're tracking a custom referral field. If you get stuck, watch this space – we're working on a separate guide for that one!There's plenty of ways you can take this basic framework and expand it into a range of different referral incentive programs. If you've got any ideas you'd like to share, let us know!

And don't forget to checkout the AskNicely for Salesforce app on the AppExchange to see how you can get all that real-time customer feedback data into Salesforce to help you find your happiest customer so you can ask them for a referral!

Aaron Ward
About the author

Aaron Ward

Aaron is the Co-Founder and CEO of AskNicely. He's a passionate evangelist for frontline-driven customer experience, but when he’s not spreading the gospel of an experience-first culture, he’s spending time with his lovely family. Or binge-watching Rocky movies.

Aaron Ward
About the author

Aaron Ward

Aaron is the Co-Founder and CEO of AskNicely. He's a passionate evangelist for frontline-driven customer experience, but when he’s not spreading the gospel of an experience-first culture, he’s spending time with his lovely family. Or binge-watching Rocky movies.

Ready to take action on customer experience?

Book a Demo >