Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

With the out-of-box functionality of the Friend referral module, you can define a referral system that rewards referrers with bonus points upon the first purchase of the friend they invited to join the loyalty program. However, there might be cases, when instead of points, you may want to reward the referrer with a coupon or any other type of instant benefit. This tutorial guides you through the steps of using the Workflows functionality, the Rewards and Custom events modules, and the Events API endpoint to introduce this mechanism in your loyalty program.

...

Info

Prerequisites

Friend referral module

If you haven’t used the Friend referral module in your loyalty program yet, please contact us through Service Desk to enable it and set up the basic configuration for you. This is essential, as the Friend referral module is the one that establishes the relationship between the referee and referrer through the built-in ‘Referrer’ attribute of the customer entity.

Referral tracking system

Also, make sure you have implemented a tracking mechanism in your website environment that is capable of handling invitations and recognizing customers as referrers and referees.

...

1. Assign the referrer to the referred customer

First, you need to let Antavo know that a customer joined the program through a member’s invitation. To do so, populate the customer ID in the ‘Referrer’ attribute of the Optin event that enrolls the invited friend to the program. If your developer team needs further information on how to use Antavo’s Events API to send the Optin event, check out our documentation here

...

2. Configure the instant reward

The instant reward that referrers will earn should be configured as a reward, using the Rewards module. In case you want to reuse a previously added reward as a referrer reward, you can skip this step.

...

Expand
titleAdvanced option - Display reward as a restricted item

Also, you have the choice to keep the reward item appearing among all other rewards, still making it unavailable to claim by restricting it to a segment that no customer is part of.
You can create the segment through the ’Create segment' option of the ‘Customer Insights’ menu. Add ‘_id not exist’ as the segment filter which defines the empty segment.

Select the newly created segment in the ‘Segments’ field of the ‘Mechanics’ section of the reward editor. The reward that is restricted to an empty segment will always appear unclaimable for every member. Don’t forget the leave the ‘Display only for selected segments’ checkbox empty and add a segment restriction message so that the Display API endpoint will provide all the information you need when designing your membership site.

...

3. Define referral custom event

The next thing to do is to use the Custom events module to define the event that will trigger the assignment of the instant reward to the referrer.

...

You can find further information about the configuration of customer events in our user manual.

...

4. Set up the workflows

Referral registration workflow

The goal of this workflow is to have the referral custom event registered in the referrer customer’s Events history when their friend completes the first purchase.

...

  • Customer: {customer.referrer} - this implies that the event will be registered for the referrer of the customer making the purchase

  • Action: select the customer event defined in step 3.

...

Referral reward assignment workflow

The second workflow will use the event registered at the end of the first workflow as the starting trigger event. Drop the 'Event' trigger node to the canvas and select the custom event (defined in step 3) from the dropdown list.

...

Don’t forget to save and activate both of the configured workflows. If you need a deep dive into workflows, read our articles here /wiki/spaces/DOC/pages/445546994.

...

5. Test the referral reward flow

After you have added the referrer ID to the Optin event and defined all the mechanics in the Backoffice, you can start testing.

...