No more than so many manager approvals for a discount per store per day
The customer asks: No more than so many manager discount approvals per store per day
- Verdict: Ready, with limits (5)
- Door: Save rules · area: Till controls and approvals › Manager approvals
- Recipe: Save rules: one tax id per customer group, and a submit kept for a role
- Sample: S18 — Members-only rule guard (a check before payment)
- Checked: run by the product 2026-10-18 (the eleventh approval refused at the manager's Approve, walked on three frames); not run by a kit sample on a sandbox
What you build
One save rule of kind count_per_day on the approval request: the store's managers may give so many discount approvals a day, and the next is refused when the manager presses Approve, in the retailer's words (contracts/pages/save_rules.md §8, the worked example; recipes/save_rules.md). Sample S18's README carries it.
Limits
- It counts approvals given: one given and never used still counts; one that ran out and was given again counts twice. A sale using an approval never counts it again.
- Approvals given offline are not counted.
- An Action request, the record an action approved in person leaves after it ran, is only flagged, never refused. A count rule never sits on a sale or the day close.
- The request's store is the register's POS Profile's warehouse, so a store with several registers has one count.
- A partner's own count of the approvals its check before payment asks for stays a route (sample S23), and is answered at Pay.
Tell the customer
After the day's limit, a manager's further discount approval for that store is refused at Approve with our sentence, and the cashier sells at the normal price; approvals given offline are not counted.
What next
- Tell the customer the 5 limits above, and write them into the proposal.
- Follow the recipe: Save rules: one tax id per customer group, and a submit kept for a role.
- Copy the sample: S18 — Members-only rule guard (a check before payment), and change it.
- Build and test it on your sandbox (request one if you have none; what is on it).
- Run the checks: your own tests, the kit's checks and the money kit's release gate (the release gate).
- Release through the customer's own release gate (The customer's release gate); an app other retailers install goes through the App library.
Related needs
- A coupon or a loyalty points balance pays no more than part of the sale — Ready, with limits (1)
- No more than a set number of lines on one sale — Ready, with limits (1)
- A rule that depends on which terminal the sale is on, beyond its POS profile — Ready, with limits (4)
- A cashier creating a customer whose mobile number is already on another one gets the existing customer, not a duplicate — Ready, with limits (4)
Start a project shortlist with this need · Put it in your blueprint · Every need