Skip to main content

Loyalty Management & Promotional Engine

This guide covers the runtime connection between your checkout systems β€” POS, e-commerce, self-checkout, or the middleware in front of them β€” and Loyal Guru: how a cart is evaluated against the active campaigns, how vouchers reach the transaction, and how the resulting discounts, points and redemptions are applied and confirmed.

Two decisions shape that connection, and they are independent of each other:

DecisionWhat it settlesThe two options
Which model applies to youWho calculates the final pricePromo Engine β€” Loyal Guru calculates and returns the effects Β· Coupon Server β€” Loyal Guru validates eligibility and your POS calculates
How vouchers reach the transactionHow a targeted offer gets into the cartDigital pre-activation β€” the Customer activated it before the transaction Β· Individual activation β€” codes are presented one at a time during it

The model is an architectural choice, made once per project and expensive to revisit: it decides which endpoints your system calls, what the response means, and which mechanics can work at the till. The activation path is a scoping decision that is then resolved per transaction, by how the voucher actually reached the Customer β€” a project can support one path or both.

This page settles both. It defines the terms the decisions are expressed in, compares the options on the dimensions that change the project, and routes to the guide for each model and to the shared pre-activation flow both models depend on.

Whichever combination applies, the connection runs on the same API as the rest of the integration: same keys, same headers, same versioning.

Common concepts​

These are the terms used throughout this section. They are worth settling first, because the two decisions that follow are expressed in them.

What a promotion is made of

  • Discount campaign: the promotion configuration created in the current engine. It carries the conditions to meet, the products it applies to, and the benefit it grants.
  • Coupon: a code configuration linked to a discount campaign. It can be a shared static code or a per-customer code.
  • Voucher: the customer-specific assignment of a personalized campaign or benefit. It can come from Targeted Delivery, Intelligent Delivery, AI 1-to-1 Delivery, Games, Challenges, Rewards, or a trigger API flow.
  • Cart: the purchase payload sent to Loyal Guru. Use the cart endpoints listed in the API Reference for new integrations.

What the integration exchanges

  • Effects: the calculated outcome Loyal Guru returns for a cart β€” the discount per line, the points accrued, the cashback granted. Only Promo Engine receives them; Coupon Server receives the rules instead and produces its own amounts.
  • Selection: the set of vouchers a customer has activated for their next purchase. It is state held in Loyal Guru, not something the checkout has to carry.
  • Redemption: the confirmation that a coupon or voucher was actually used in a paid transaction. On the current engine, Coupon Server integrations confirm the applied amount with POST /discounts/redeem.

Who a campaign reaches

Campaigns are classified by audience, and the same cart can trigger all three at once:

AudienceAPI valueWho it reachesNeeds a coupon?
MASSall_customersEvery customer, identified or notNo
CLUBloyaltyEnrolled loyalty membersNo
TARGETEDtargetedA specific customer, delivered as a voucherYes β€” the voucher is the code

MASS and CLUB campaigns apply because the cart and the customer qualify. TARGETED campaigns only apply if the voucher reaches the transaction β€” which is what the second decision below is about.

The first decision: which model applies to you​

This is the decision that shapes the whole integration. It is normally agreed with the Loyal Guru team during scoping, and it settles one thing: who calculates the final price.

The table below compares the two models on the dimensions that actually change the project β€” what your system receives, what it has to build, which mechanics work at the till, and what it takes to launch a new promotion later.

Promo EngineCoupon Server
Who calculatesLoyal GuruYour POS
What you receiveCalculated effects and final valuesDiscount rules, coupon and voucher data
What you buildSend the cart, apply the responseSend the cart, parse the rules, calculate
Mechanics at the tillDiscounts, points, cashback, gamesCoupons and vouchers
Points earned on the cartYesYes β€” same asynchronous mechanism
Points spent as cashbackYesNot possible
A new mechanic goes liveBy configuring a discount ruleBy releasing POS software
Best whenYou want new mechanics without touching the POSYour POS already owns pricing logic
Both requireA real-time connection at checkout

For Discounts, if your POS has its own promotion engine and you want to keep it, Coupon Server fits. If you want any mechanic to work without a POS release, Promo Engine fits.

Earning points vs spending them​

Points are where the two models stop being interchangeable, and the line does not fall where most projects assume it does. It is not that Coupon Server "does not do points": earning works in both models, spending works only in Promo Engine. The axis is not the mechanic, it is when the mechanic has to take effect β€” before the payment closes, or after.

Earning is asynchronous, so it works in both models. Whoever calculated the price, the confirmed cart is sent to POST /carts/realtime and Loyal Guru evaluates the loyalty mechanics on it β€” points accrue, tiers recalculate, audiences update β€” after the customer has paid. A project where the customer collects coupons, redeems them as discounts at the till and earns points on the transaction is fully served by Coupon Server: the POS calculates the coupon-driven discount, and the points arrive with the cart that follows.

Spending is not asynchronous, so it only works in Promo Engine. Redeeming points as a cashback discount happens inside the price calculation: the balance has to be checked, burned and distributed across the cart lines before the payment closes, because it changes what the customer pays. That is what cashback_score_desired does, and it exists only when Loyal Guru calculates the cart β€” see Redeeming points as cashback.

caution

This is the one requirement that cannot be added later without changing the model. A project where the customer pays part of the cart with their points, or has to see their cashback balance change on the receipt, needs Promo Engine. On Coupon Server this is not a configuration gap that can be closed afterwards: the POS owns the price calculation and has no access to the customer's balance or to the distribution rules, so there is no point in the flow where the burn could happen. Everything else can be added to a live integration β€” this cannot. See what the POS calculates, and what it does not for the same boundary from the other side.

Where each model is documented​

In summary, each model has its own guide:

ModelGuide
Promo Engine β€” Loyal Guru calculates cart discountsOpen guide
Coupon Server β€” Loyal Guru validates, your POS calculatesOpen guide

The same choice, read as a flow: the diagram starts from the moment a checkout needs promotions, branches on who calculates, and follows each of the two branches through to the endpoints it uses and the work that lands on your side.

The second decision: how vouchers reach the transaction​

Choosing the model settles who calculates. It does not settle how a voucher gets into the transaction β€” a separate question with its own integration consequences. This one is a scoping decision: the retailer decides which of the two activation paths below the project supports, one of them or both. Supporting both means building both, because the path is then resolved per transaction β€” by how the voucher actually reached the customer β€” rather than fixed once at integration time.

What separates the two paths is when the activation happens and whether the checkout has to name the code β€” not the channel the customer is shopping through. The table below sets them side by side, and closes with what each model sends or calls on each path, so the consequence for your own system is explicit.

Digital pre-activationIndividual activation
When activation happensBefore the transaction, in the app or websiteDuring the transaction, at the checkout
What the customer doesActivates the offers they want, then identifies as usualPresents one code at a time
Who names the voucherNobody β€” Loyal Guru resolves the selection from stateThe POS, explicitly, code by code
Where the selection livesIn Loyal Guru, as voucher stateOn the coupon itself, until it is read at the checkout
Promo Engine sendscoupons_desired: "selected"coupons_desired: ["34433"]
Coupon Server callsGET /discounts with selected=trueGET /discounts, then locates each presented code in the response
note

Neither path is a channel. Digital pre-activation is not "e-commerce only": a customer who activated vouchers at home and then identifies at the till with their card, phone or QR is on the pre-activation path, and the physical store resolves exactly the same selection. Individual activation is not "paper only" either β€” the code can arrive printed on a receipt or a mailing, or on the customer's screen as a code or a QR. The integration consequence is the same in both cases: the checkout receives one code at a time and must send it explicitly.

Digital pre-activation has a precondition the checkout does not control: the customer must have activated the voucher somewhere else first. That flow is shared by both models and documented separately β€” see Vouchers Pre-Activation.

A third option skips activation entirely: coupons_desired: "all" applies every voucher assigned to the customer without asking them to choose anything. It removes the precondition, and with it the customer's control over which offers are spent.

The four combinations​

The two decisions are independent, so every project lands on one of four combinations β€” the column is the model it chose, the row is how the voucher reached the transaction. Each cell is documented as a sequence diagram on the model page it belongs to:

Promo EngineCoupon Server
Digital pre-activationThe cart asks for the selection, Loyal Guru resolves it and returns the calculated effects β€” sequence diagramYour POS reads the selection from GET /discounts and applies the rules it gets back β€” sequence diagram
Individual activationThe cart names each presented code explicitly and Loyal Guru returns the calculated effects β€” sequence diagramYour POS locates each presented code in the GET /discounts response and calculates the discount itself β€” sequence diagram

The asymmetry is in the rows, not the columns: both cells in the top row depend on the same pre-activation flow, which belongs to neither model and is therefore documented once for both. The bottom row has no precondition β€” the code arrives at the checkout and the checkout names it.

Guides​

With both decisions settled, these are the guides that describe the implementation. The first two are the model guides β€” read the one that applies to your project. The third describes the activation flow that both models depend on.

  • Promo Engine β€” the integration when Loyal Guru calculates the price: what to send in the cart, how to read the discounts, points and cashback it returns, and how both activation paths look as sequence diagrams.
  • Coupon Server β€” the integration when your POS calculates the price: which campaign, coupon and voucher data to read from GET /discounts, how to apply it locally, and how to confirm what you applied. It carries the field-by-field reference for interpreting the response β€” Reading from GET, where most of the development effort goes β€” and Vouchers redeem vs Discounts redeem, which settles which endpoint confirms a redemption and when.
  • Vouchers Pre-Activation β€” the app and website flow that produces the selection, and the GET /discounts parameters that read it back. It belongs to both models: digital pre-activation depends on it in either one.