For the complete documentation index, see llms.txt. This page is also available as Markdown.

Referrals

Running a refer-a-friend programme: sharing referral links, passing the referrer's token at registration, and rewarding both sides when the friend qualifies.

In a referral programme, a member invites a friend; when the friend joins and does something that qualifies — usually a first purchase — Open Loyalty rewards the referrer, the friend, or both. Open Loyalty keeps the referral relationship and runs the rules; your channels build the links and pass the token back at registration.

For the Admin Panel side, see Referral campaigns, Referred members and the Referral programs FAQ.

Who does what

Area
Responsibility

Admin Panel

Referral campaigns: trigger on the friend's activity, rules for referrer and referee, referral depth, limits

Integration layer

Builds referral links from the member's token, carries the token through registration, sends the friend's qualifying activity

Website / app

"Invite a friend" with share options; captures the token from the link (URL parameter, deep link) and keeps it through sign-up

CRM / marketing automation

Tells both sides when a reward is given

Design decisions

Decision
Options
Recommendation

What qualifies a referral

Registration, first purchase, a minimum spend, a custom event

A first purchase (or an event that costs the friend something). Rewarding registration alone invites fake sign-ups.

Who is rewarded

Referrer, referee, or both

Both, with separate rules for referrer and referee in the same campaign.

Referral depth

Direct referrer only, or several levels

Direct only unless multi-level rewards are part of the proposition; set Referral max levels in the campaign's referral reward depth.

Limits

Unlimited, or a cap per referrer and period

Cap rewarded referrals per referrer (e.g. 5 a year) to limit abuse.

Link format

Your own domain, app deep link

Your own URL with the token as a parameter (e.g. https://example.com/join?ref={token}); Open Loyalty doesn't generate links.

1

Configure (Admin Panel)

Create a referral campaign triggered by the friend's qualifying activity, with rules for the referrer and the referee, the referral depth and limits.

2

Read the member with GET /api/{storeCode}/member/{member} — their own token is in referralToken — and build the share link with it.

3

Pass the token at registration

Capture the token from the link and keep it through the whole sign-up (including email verification or app install). Send it as customer.referrerToken in POST /api/{storeCode}/member. This links the friend to the referrer at creation.

4

Send the qualifying activity

The friend's purchase or event goes through the normal transaction or custom event flow. The referral campaign rewards each side.

5

Tell both sides

Use CampaignEffectWasApplied to message the referrer and the friend.

Sequence diagram

Share: the referrer asks for a referral link; the integration layer reads the member and gets their referralToken, and returns a link with the token as a parameter, which the referrer shares. Join: the friend opens the link and registers; the integration layer creates the member with customer.referrerToken set to the token, and Open Loyalty links the new member to the referrer. Qualify: the friend's first purchase or event is sent; the referral campaign runs its rules for referee and referrer with limits, and CampaignEffectWasApplied webhooks let the channel tell the referrer they earned points.
Share, join and qualify

Go-live checklist

Admin Panel

Integration layer

Website / app

Validation

Key endpoints

Webhooks: CampaignEffectWasApplied

Last updated

Was this helpful?