Referral Program for any B2C retailer 💳 🤩

Referrals is a pretty typical way for a company to acquire new customers. In essence, it's also quite a simple back end process, but so often I see this module outsourced to 3rd parties that either charge a lot or take a profit share. Remember they only provide the back end services - you the business and your customers are doing all the hard work. I always think to myself, how can we do this in salesforce? 🤔💡😃

This project requires you to integrate to your website to salesforce, but for the sake of this project I assume salesforce is doing all the heavy lifting and your website gets all its information from salesforce via simple api calls.

First, here's the object model - its pretty straightforward...

whenever a customer is referred we store them as a lead (or you can insert a 'type' of Account which is certainly easier)

In the referral process there's essentially 3 main scenarios that need to be built - these are also the main 'events' that occur in the entire process (other than any expiry rules you wish to build in).

Part 1 - This will need to be a web form on your site that is only visible to logged in users as they will be doing the referring - and we need to know who they are automatically and that they are already a customer.

The person they want to refer will have their details input into the form - with the email address being our key identifier field, we will locate an account if there is one with that key identifier value and perform any validation (eg. already a customer etc), before creating the Account with a source type of 'Referral Program' and then applying a referral record to the referrer account.

The referral account also then has a lookup populated to the referrer and a voucher then additionally attached to the referral record and a voucher for them too - (one for the referee and one for the referral) - (these can be different voucher types depending on how you want to arrange your voucher program).

We then email the referred customer via an email alert and send them their referral voucher code and information about who referred them as well as who 'we' are (the website) in styled customer facing email template.

Part 2 - Eventually (ideally) that referred customer will make a purchase, and at the checkout, has the option to redeem that voucher.

At checkout, we call salesforce using the key field value of the new incoming users email address and pull that voucher record up. If not used before, and in-date, we apply the desired discount/benefit.

All of this information can be stored on the voucher in salesforce the website doesn't need to track or store anything.

We then update the, now used, voucher's status in salesforce accordingly. The referral record just holds everything together (the junction object), you can report on status's and you only need to use formula fields to do this.

Part 3 - The referrer has gained us a new customer! On redemption of the referees' voucher we find the referral record with the voucher that was just redeemed on it and update the referrers' voucher to 'activated'. We then email that existing customer and in that email include the voucher code for their assigned discount/benefit.

In the same way as in Part 2 when this customer uses this voucher we set it to 'redeemed'. This wraps up the status of the referral record - you have a complete referral to brag about!

You can then report on your referral record with a simple formula field with ordered IF statements to compare both related voucher status's (and account status's). To see what is going on with all these referrals eg;

  • referred not created account but not purchased - yet
  • referred created account and not redeemed code but made purchases
  • referred and timed-out
  • and so on...

The beauty of this is that it's a very simple process to maintain. It doesn't cost anything once its setup, and its flexible. You can use this is so many more ways than just referrals, you can use the vouchers on their own in a sale mail out or issue special gift cards with voucher codes on that are activated and then applied to the customers account - these ideas do require their own processes but now you have a foundation to support this.

Additionally, you instantly have access to report on this information using lightning dashboards and reports and reward your most influential referrers offering additional bonuses when they hit referral goals. You can even automate that!

By reporting on the referral record with vouchers you have all the information at hand to create rich reports that compare plenty of data.

Marry this into the account structure process in my previous post and you now have the data and components to hand to enrich this process and look for any gamification of referrals by your customers. I'll let you work that one out though.

For those of you that like to visualize things, here's an example referral record;

and the voucher records;