Referral integration is essential for running a referral campaign. This involves creating a relationship between an advocate and a friend. The system validates the earning rules for both the advocate and the friend based on the actions completed by the friend, rewarding them accordingly.

Integration steps

  1. Create the referral campaign on rehook platform
  2. Generating referral codes (Rehook assigns referral codes to user as soon they created on rehook platform, otherwise you can manage the referral code from your end and update the referral code using update customer API)
  3. Deep linking configuration (This is required to generate referral links which can be shared with friend to signup). Please navigate to Deep Link Configuration section to know more about this.
  4. Friend signup on your app using a referral code shared by an advocate.
  5. Validate the referral code entered by a friend through validate referral code API. If referral code is valid, complete the signup process.
  6. Send signup event to rehook platform with friend source_id and referral_code used to signup
  7. Rehook creates a relationship between advocate and friend.
  8. Send any other custom events set in the referral campaign rule when friend completes an intended action.
  9. Rehook validates the advocate earning rule and friend earning rule, and reward them accordingly.

APIs Required for this integration

Following APIs are required to complete the referral campaign integration flow. Below table indicates the list of APIs and it's purpose, details of the these APIs are given in the respective APIs section.

API NamePurposeAPI doc link
Get customer API1. To fetch user details from rehook to show it on the referral page UI on your app. 2. API returns following data points required for the referral page : referral count, referral campaign messaging text and referral link.
Update customer API1. To update the user properties 2. To update the referral code for a newly signed up user. this will be true only if you are managing the referral codes.
Get all referrals for customer APITo fetch list of successful referrals done by an advocate, which can be shown on your referral page UI
Campaign metadata APIGet metadata API returns metadata objects corresponding to a user, campaign and campaign_type. you can call this API at applicable touch points on your application to create customised referral UI page for a referral campaign using metadata configured in the referral campaign on rehook
Validate referral code APITo validate the referral code entered by a friend while signing up on your platform.
Trigger event API1. To send the signup event when a user completes the signup on your platform. 2. To send the custom events