How Loranj works
Campaigns
A campaign belongs to a brand, which belongs to an agency. It has dates, a promo type, form fields, legal wording, a theme and a list of allowed domains. Each campaign has a public campaign key that identifies it to the API. The key isn't secret: it can only read the campaign's public settings and submit entries from allowed domains.
The entry pipeline
Every promotion, whatever it looks like, goes through the same five stages:
| Stage | Question | Examples | | ---------- | ---------------------- | ------------------------------------------- | | Identity | Who is entering? | Form details, email one-time code | | Proof | Why are they eligible? | Unique code, receipt, pack scan, nothing | | Engagement | What do they do? | Answer a question, play, upload, vote | | Outcome | What happens? | Draw entry, instant win, reward, score | | Fulfilment | How do they get it? | Prize claim, digital code, coupon, cashback |
A promo type is a tested combination of these. "On-pack code + prize draw" is form identity, code proof and a prize-draw outcome. The campaign's config tells the SDK which parts a campaign uses.
Loranj decides, your front end shows
Codes, limits, winning moments, correct answers and winners are always decided by Loranj on the server. Your front end shows the result it gets back. A spin wheel or scratch card is an animation of a result Loranj has already stored, never the thing that decides it.
Loranj is the system of record
Entries are saved in Loranj first, inside one transaction that also burns the code and writes the audit log. Your systems receive copies through webhooks or the entries API. Never write an entry to two places from the browser: if one save failed, a code could be redeemed twice.
Data protection
The brand is the data controller. Loranj and the agency are processors. Personal details are encrypted, held in the UK, separated by agency and deleted when the campaign's retention period ends.