Overview
Multi-step rewards let you incentivize both the customer (referrer) and their friend (referee) at different stages of the referral journey.Examples of steps you might configure:
- Friend creates an account
- Friend places an order (optionally with conditions, e.g., number_of_products equals 3)

One-time steps: You can mark a step as Happens One Time in your configuration without extra metadata or custom rules.
What you’ll build
- A Steps UI that renders each configured referral step (trigger, who gets rewarded, reward details).
- The customer’s referral code/link to share.

- The customer’s referral progress (list + counts).

Implementation Steps
1) Fetch and render the multi-step config
Get Referrals Configurations
GET /integrations/configurations/referralsReturns the referral rule(s), including trigger and rewards.
- Trigger: from eventName + optional eventMetaData (e.g., place order — number_of_products equals 3).
- Who gets rewarded: from referralMethod (e.g., CustomerAndFriend).
- Customer reward: from customerReward (point, score, coupon) and extraReward if present (e.g., extra 500 points for every 3 events).
- Friend reward: from friendReward (points/coupon details such as percentage, min order value, combine rules, etc.).
2) Show the customer’s referral code/link
Get Customer
GET /integrations/configurations/referralsReturns the customer’s referral code/link
3) Detect and propagate referral code (friend journey)
When a friend lands using a link like:- Read
referralCodefrom the URL query string. - Store it in session/local storage (or cookie) until signup completes.
- On friend signup, call Create/Update Customer and include
referrerCode: “code123” during initial registration (within your program’s allowed window).
4) Track progress (list + counts)

- List: GET /integrations/customers/:customerId/referrals
Get Customer Referrals
GET /integrations/customers/:customerId/referralsReturns all the referrals (pending and completed) done by the customer-
Counts: GET /integrations/customers/:customerId/referrals/count (e.g., completed, pending, total)
Get Customer Referrals count
GET /integrations/customers/:customerId/referrals/countReturns the total count of referees referred by a customer
Implementation checklist
- Fetch Referrals Configurations and normalize to an array to render steps.
- Fetch Customer and show referralCode/referralLink.
- Capture referralCode from URL on friend visit; persist until signup.
- On signup, send referrerCode in Create/Update Customer (initial registration window).
- Render referrals list + counts for progress.