Home / Help Center / pos-app / Sell / Billing / Clearance Discounts
🏷️ Sell / Billing

Clearance Discounts

Clearance Discounts (internally called Markdown Rules) let you define discounts that switch themselves on and off automatically at billing based on the time of day — e.g. a Happy Hour on drinks from 5–7 PM, or an end-of-day markdown on bakery items after 8 PM.

📍 Menu path: Sell / Billing → Clearance Discounts
👤 Who uses it: All roles with Billing access (featureKey: promotions)
🏷️ Plan tier: advanced+

Overview

Each rule has a name, a start time and an optional end time, a discount (either a percentage off the selling price or a flat ₹ amount off the bill), which days of the week it applies on, and what it applies to — all items, one or more categories, or specific products.

When two or more rules could apply at the same moment, the Priority number decides which one wins: 1 is highest priority and is applied first.

The page shows a live green "Active right now" banner listing every rule that is currently in effect, based on the shop's current time, so staff can see at a glance what is discounted before printing a bill.

A rule can be paused without deleting it — paused rules stay in the list (dimmed) but never apply at checkout until reactivated.

Before You Start

Step-by-Step Guide

1 Create a Happy Hour or clearance rule

  1. Click New rule.
  2. Enter a Rule name (e.g. "Happy Hour", "Early Bird", "End-of-day").
  3. Set Starts at and, optionally, Ends at — leaving Ends at blank means the discount runs from the start time until midnight.
  4. Choose the discount type: % Off (percentage of selling price) or ₹ Flat (a fixed amount off the whole bill), then enter the value.
  5. Pick Applicable days by toggling Mon–Sun, or leave blank for every day; use the All/Clear toggle to select or clear all seven at once.
  6. Choose what the rule applies to under Apply to: All items, Categories (select one or more from the shop's category chips), or Specific items (search and add individual products).
  7. Set a Priority number if you have overlapping rules (lower number = applied first when two rules could both match).
  8. Add an optional internal Note, then click Save rule.

2 Pause, edit or delete a rule

  1. Click the toggle icon on a rule's row to instantly pause (grey "Paused" badge) or reactivate it without opening the editor.
  2. Click the pencil icon to reopen the same form pre-filled for editing.
  3. Click the trash icon to permanently delete a rule after confirming the browser prompt.

3 Check what is discounted right now

  1. Look at the green Active right now banner at the top of the list — it only appears when at least one rule is currently live, and shows each active rule's name, discount, and end time if it has one.
  2. At checkout, the POS billing screen shows a "Markdown active" badge and applies the matching rule's discount automatically — no manual action needed at the register.

Every Field & Button, Explained

Field / ButtonWhat it does
Rule nameInternal label shown in the list and on the "Active right now" banner; not printed on the customer bill.
Starts at / Ends atTime-of-day window the rule is active in; Ends at is optional — blank means it runs until midnight.
% Off / ₹ Flat toggleSwitches the discount between a percentage of the selling price and a fixed rupee amount off the whole bill.
Applicable daysMon–Sun day toggles; leaving all unselected (or using "All") means the rule applies every day.
Apply to (All items / Categories / Specific items)Scopes the discount to the entire catalog, one or more categories, or a hand-picked list of products.
PriorityLower number wins when multiple rules could apply to the same bill at the same moment; default is 10.
NotesFree-text internal note, not shown to the customer.
Active right now bannerLive, auto-computed list of every rule whose day-of-week and time window currently matches the shop clock.
LIVE badge on a rule rowShown on an individual rule when it is currently in effect (same computation as the banner, per-row).
Paused badge / toggle iconA paused rule never applies at billing regardless of its time window, until switched back on.
P1–P3 badgeShown next to rules with a priority of 3 or lower, as a visual flag that they take precedence over most other rules.

Tips & Best Practices

Troubleshooting & FAQ

Why does the sidebar not show Clearance Discounts at all?
The page requires the promotions feature on the Advanced plan tier or above. On lower tiers the menu item and route are hidden rather than shown disabled.
Two rules both matched the same bill — which one applied?
The rule with the lower Priority number is applied. Check both rules' Priority values in the list and lower the number on whichever should win.
A rule I created is not discounting anything at checkout.
Confirm it is not Paused (grey badge), that today's day is included in Applicable days, and that the current time falls between Starts at and Ends at.
Can a markdown rule discount a specific product only during weekends?
Yes — set Apply to → Specific items and search for the product, then toggle only Sat and Sun under Applicable days.

🧑‍💻 Developer Notes

Source component(s):

  • frontend-app/packages/pos-react-lib/src/pages/fnb/MarkdownRulesPage.jsx

Backend endpoints used:

  • GET /markdown-rules (list)
  • POST /markdown-rules (create)
  • PUT /markdown-rules/:id (update / pause-unpause)
  • DELETE /markdown-rules/:id (delete)
  • GET /markdown-rules/active-now (server-side "is a rule live right now" check, used elsewhere at billing time)

Related tables (db-core repositories):

  • MarkdownRule

Feature flag key: promotions (requires advanced plan tier or above)

Mounted generically at pos-app's /markdown-rules route as <MarkdownRulesPage apiPrefix="" /> (App.js aliases it as GenMarkdownRulesPage), backed by backend/src/routes/markdown-rules.routes.jsmarkdown-rules.controller. The client computes isActiveNow() locally from applicableDays + startTime/endTime against the browser clock purely for the "Active right now" banner and LIVE badges; the authoritative discount application at checkout re-evaluates the same rule fields server-side (or via the /active-now endpoint) so a stale client clock cannot desync the discount actually billed.