Skip to content

How pricing rules work

Audience: commercial, reservations and product people who need to know why a booking got a discount — or why it didn't. No code, no jargon that isn't explained.

Everything here was read from the system itself, at the version dated 13 August 2026. Where the system doesn't say why something works a certain way, this document says so rather than guessing.

What this covers. Which discounts attach to a booking and why, and — from How the number is actually worked out onwards — how the price itself is assembled. What it still cannot tell you is where a rate comes from: the lookup against suppliers, Tourplan and dynamic pricing is not documented. So this explains why a rule did or didn't apply, and how the arithmetic treats it, but not whether the underlying rate was right.


The one-paragraph version

A pricing rule is a row in a table, not a piece of programming. Someone in the business creates it, sets its dates, ticks the conditions that make a booking eligible, and gives it a discount percentage. When a booking is priced, the system pulls every rule that is currently active, throws away the ones that don't fit this booking, sorts what's left by a priority number, and applies them. There are 23 different kinds of rule, each with its own extra conditions, and each booking gets re-tested every time anything about it changes.


What a rule is made of

One rule has 54 settings. The ones that matter most:

Setting What it does
From / To date The travel window the rule covers. Both are required.
Booking created from / to Limits the rule to bookings made in a period — different from travel dates.
All agencies On by default. Turn it off and you must name the agencies it applies to.
Weighting Priority. Lower numbers are applied first. Required for exclusive rules.
Exclusive On by default. An exclusive rule doesn't stack with other exclusive rules.
Selectable Off by default. When on, the rule does not apply automatically — a consultant has to choose it.
Only manager can include Restricts who is allowed to turn a selectable rule on.
Discount percentage The actual number.
Active The on/off switch.

Plus a long tail of conditions — minimum nights, minimum camps, maximum guests, maximum rooms, whether children count, whether single supplements are included, whether mandatory extras are excluded, and so on.

The 23 kinds of rule

Each kind adds its own conditions on top of the settings above:

  • Length-based — Long Stay, Single Stay, Free Night On Us, Occupancy Discount
  • Location-based — Targeted Camp Discount, Targeted Area Discount, Targeted Option
  • Flying — Discounted Flying, Use of Wilderness Air, Non-Use of Wilderness Air
  • Who the guest is — Residents, SADC, Shareholder, Pimped Leads
  • When they booked — Early Bird, and the "last minute" setting available on any rule
  • Packages and alternatives — Accommodation Alternate Option, Packages Sequence, Flights & Services Alternate Option
  • Commercial — Agency Rates, Admin Fee, Free Activity, Taking Up Potential Dead Beds

Three of these start at 100% when you create them: Discounted Flying, Free Activity and Free Night On Us. That is presumably deliberate — they mean "give this away" — but it does mean a half-configured rule of those kinds is a complete giveaway rather than a small one. Most other kinds start at 0%, which is harmless until configured.


How a booking gets its discounts

Every time a booking is repriced — and that happens on almost any change, including changes made through the partner API — the system runs this sequence.

1. Is this booking allowed to be priced at all?

Bookings more than three months past their trip end date cannot be repriced, and the consultant sees:

"You cannot change pricing on a booking that is more than 3 months after trip end date"

That limit only applies to bookings that have travelled or been cancelled. Drafts and live bookings reprice regardless of age.

2. Are pricing rules switched on for this booking?

Two independent switches can turn rules off for the whole booking:

  • the holiday type can say "no pricing rules"
  • the Wish rate type can say "no pricing rules"

Either one disables the lot. If neither is set, rules apply.

There is also a silent one: bookings that come from Siteminder on the BC channel get no pricing rules at all. Nothing is logged and nothing on the booking records it, so this is invisible unless you know to look for it.

3. Which rules are even candidates?

The system fetches rules that are active, whose travel window overlaps the itinerary, and that aren't flagged as SADC-only or leads-only. Then it removes any rule someone has manually excluded from this booking.

Note "overlaps" — a rule qualifies if it covers any part of the trip, not only if it covers the whole thing.

4. Three filters

Booking created date — drops rules whose "bookings created" window doesn't contain the date the party was created.

Last minute — for rules marked last-minute, the booking must have been created within the rule's lead-time window before travel. Two things worth knowing:

  • A last-minute rule with no lead time set is thrown away, not treated as always-valid.
  • The comparison uses the date the party was created, not today. Repricing an old booking will not accidentally make it last-minute.

Agency — if "all agencies" is on, the rule survives. If not, the agency must be on the rule's list. There is a trap here: a rule can have both an "applies to these agencies" list and an "excluded agencies" list, and the exclusion list is only consulted when the applies-to list is empty. If someone fills in both, the exclusions are ignored.

5. Exclusive first, by weighting

Surviving rules are split into exclusive and non-exclusive. Exclusive ones are considered first, in weighting order, lowest first. The system tells you this itself when you try to save an exclusive rule without a weighting:

"You must give a weighting, the lowest weighting rules will be applied first"

Two settings bend this: a rule marked "can combine with other exclusive rules", and a rule marked Universal, described in the system as "applies in addition to any exclusive rule".

6. Each kind checks its own conditions

Finally each rule is handed to the logic for its kind — minimum nights, minimum camps, eligible suppliers, and so on. One of those 23 has been traced in detail (discounted flying); the pattern it follows is described in ../deep-dives/pricing-calculation.md. The other 22 are assumed to follow the same shape, which is an assumption, not a verified fact.

One behaviour from that tracing is worth knowing here: a stay that only partly overlaps the rule's date window is clipped — only the nights inside the window count toward the rule's minimums. And since October 2021 a de-duplication guard was deliberately removed, so one property can be counted more than once toward a "minimum camps" requirement.


Selectable rules — the ones a consultant chooses

A rule marked Selectable does not apply on its own. The system describes it as:

"This mean it will not apply automatically, but initially be excluded from pricing unless it is manually applied/selected"

When such a rule would have qualified but hasn't been chosen, the booking is flagged as having discounts available. That flag is what lets the interface tell a consultant "there's something you could apply here". "Only manager can include" controls who may do it.

Worth knowing: choosing a rule wipes the existing costing for that group of guests and rebuilds it. That is normal and expected, but it means the numbers visibly change the moment a rule is applied, before any new figures appear.


Where this goes wrong

One broken line silences every discount on the booking. If any booking line is missing its number of days/nights, the system abandons rule checking for the entire booking and logs:

"Missing days/nights on bookingline … Pricing rules not checked - please reprice or refer to Support if problem persists"

Every other line loses its discounts too. If a booking that should obviously qualify gets nothing at all, this is the first thing to check.

Some agency codes are written into the system, not configured. Five agency codes — ZZZ016, ZZZ026, ZZZ038, ZZZ012 and SAF096 — are embedded in the logic that routes members' and SADC bookings. Adding a new members' agency is therefore a development change and a release, not a configuration change. There is also an internal note listing a sixth code, ZZZ017, that the logic does not actually check — so either the note is out of date or a case is missing.

Nothing checks the discount percentage. No range validation exists on rule maintenance, so a mistyped 100 where 10 was meant will save without complaint.

Rules churn. A note left in the system by a developer — "If had a pricing rule, we set it to reprice because it could lose this rule - FIX this" — describes real behaviour: bookings with rules attached are fully recalculated on every pricing pass, even when the same rule would qualify again.

Some settings do nothing. At least four fields on the rule screen are dead — one is even labelled "NOT USED" in the system, and others are named _OLD or DNU ("do not use"). They are still editable by administrators, so they invite being filled in.


How the number is actually worked out

The rules decide whether you get a discount. Turning that into a price is a separate machine, and a few of its behaviours surprise people.

Tax is already inside the price. Every tax figure is extracted from a price rather than added to it — a 15% rate takes 15/115ths of the gross, not 15% on top. If you are reconciling against a system that adds tax on, the two will not agree by construction.

Tax is worked out twice, once on cost and once on the margin, using two different rates. Which markup rate applies depends on the agency's tax indicator; several indicator values result in no markup tax at all.

Selling below cost is handled deliberately. Tax is then based on the selling price rather than cost, so the tax never exceeds the revenue. A related quirk: negative markup tax is forced to zero, unless the line's costs were allocated to other lines. There is a developer note saying this clamping should have been removed "because TP calcs it anyway" — it wasn't. If Tourplan produces negative VAT on below-cost lines and Window doesn't, they will disagree.

The discount you see is a residual, not a total of rules applied. It is calculated as "price before discount minus price after discount". Anything that lowers the selling price shows up as a discount, whatever the cause. Don't read the discount figure as evidence a particular rule fired.

Markup percentage is shown as 0 when cost is zero — even though a zero-cost, non-zero-sell line is infinitely marked up. Complimentary items therefore drag reported markup down rather than up.

Multi-currency bookings are totalled per currency, not converted. If a booking has lines in more than one currency, there is no single combined total produced here.

The self-check that forces re-pricing

The system totals every booking line two different ways — once per guest, once per detailed line — and compares them. If they differ by more than 0.1, the line is marked as not properly priced and will be recalculated next time.

That tolerance is a flat amount, not a percentage. On a very large booking a real discrepancy of 0.09 passes unnoticed; on a small line, a rounding artefact of 0.11 causes a reprice. If you see lines that repeatedly reprice for no visible reason, this is the first thing to check.

Guests must be allocated to rooms

If any guest is not allocated to a room, the line does not price at all — it is left unpriced rather than priced at zero, with the message:

"Not all guests have been allocated to rooms in booking … Please edit the booking line in booking file and amend the room configuration to correctly allocate the guests."

One thing that erases its own evidence

When a line prices successfully, the system deletes earlier "no pricing found" errors for that line. Not resolves — deletes. Any report on how often pricing fails will therefore understate it, and there is no trace that anything was removed.


Manual adjustments — when a consultant sets the price by hand

Separate from rules entirely. A consultant edits a price on a booking line, and three mechanisms constrain it: a category, a limit, and an approver.

Categories carry the policy. Every adjustment is filed under a category and sub-category, and the sub-category decides whether a USD limit applies, whether an explanatory note is required, and which documents must accompany it — costing doc, rate sheet, invoice, comms.

The limit is in US dollars, compared against how much the adjustment moved the booking's cost and sell totals. Over the limit and the consultant sees:

"This adjustment changes the cost price by $X which is above the allowed limit. The adjustment has been removed. You will need to select an appropriate reason and supply documentation"

Three things about that worth knowing:

  • The adjustment is applied and the whole booking repriced before the limit is checked. Rejection is an undo, not a refusal — which is why the message says "has been removed".
  • For non-USD bookings the amounts are converted at the current rate. But if no exchange rate is available, the check silently compares the local amounts against the dollar limit. For a weak currency that makes the limit far stricter than intended, with nothing recording that it happened.
  • Editing one price changes more than one line. The same figure is copied to every matching line for that guest group — same date, price type, age category, option. Expected, but larger in effect than it looks.

Approval cannot be self-granted. The nominated approver may be neither the person approving nor the owner of the booking; either case clears the nomination and warns:

"Unfortunately you are not allowed to approve your own discounts, a different person with the necessary rights must approve check and approve it"

A consequence worth anticipating: a manager cannot approve discounts on a booking they own. That will look like a permissions fault and is not one.

Withdrawing approval erases the discounts. Turning the approval flag off does not merely un-approve — it clears every manual discount on the booking.

Two audit weaknesses. The "applied by" name is only recorded for the first adjustment on a line, so a later change under review will name the wrong person. And an override to zero is recorded as a 100% discount, while an adjustment to a line that was already zero records 0% however much it moved.


Who can do what

Rule maintenance sits with the Pricing.Administrator role, which has read/write on every field of every rule type, including the dead ones. Including a selectable rule on a booking can be restricted per rule via "only manager can include".


Glossary

Term Meaning
Booking line One item on the itinerary — a camp stay, a flight, an activity.
Chargeable line A line that can carry a price. Travel nodes are not chargeable.
Party cost group A group of guests within a booking priced together.
Exclusive rule A discount that does not stack with other exclusive discounts.
Weighting Priority order. Lower is applied first.
Ring-fence The list of agencies a rule is restricted to.
Wish rate type Rate classification from the Wish system; can switch rules off.
SADC Southern African Development Community — regional resident pricing.

Where the detail lives