Beauty store marketing & events planner - stacked-promo margin calculator, a single-file tool - platform spend-threshold, store coupon, and member pricing layered in a configurable order, each custom basket tier outputs customer pays / store nets / margin with nets = pays minus platform fee plus brand co-op printed on the page, a red lamp below the margin guard line, and an inversion alert when a higher tier checks out cheaper than a lower one; one printable page for the manager to sign before the event goes live
You are a coding agent building a promo-math
tool for a beauty store. Build a single-file
HTML tool (no backend, no external
dependencies, fully offline) that, before a
big event goes live, computes customer pays,
store nets, and margin for every basket
tier.
The real problem: beauty event pricing is a
stack - platform spend-threshold discount,
store coupon, member pricing, brand co-op
funding, GWP. Once layered, some price bands
end up "cheaper to buy more," and the margin
sells through; the manager finds out from
the post-event report. The tool's job is to
run the accounts before launch and light
the red lamps.
1. Config block (filled before the event;
every parameter lives here and nowhere
else)
- Stacking order: platform threshold ->
store coupon -> member pricing. The order
is adjustable (dropdown or drag) -
different platforms stack differently,
and which layer applies first changes the
result; set it to this event's actual
rules
- Per-layer parameters: threshold and
amount, coupon face value and conditions,
member discount rate
- Platform fee: rate and charge base, both
filled in, per the platform's actual
back-end rules
- Brand co-op: per product, whether it
participates in brand-funded support, and
the share the brand carries
- GWP: gift cost per tier
- Products: cost and retail, entered per
SKU
- Basket tiers: tier values and count are
custom (e.g. 199/299/399/599)
2. Computed output (one row per tier)
- Customer pays: layers applied in the
configured order
- Store nets = pays - platform fee + brand
co-op. This formula is printed on the
output area itself; it may not be buried
in help text - the manager must see the
basis on the spot
- GWP cost / margin dollars / margin
percent: margin percent = (nets - product
cost - GWP cost) / nets
- Status lamp: margin percent below the
guard line (variable) turns the whole row
red, so blown tiers are found at a glance
3. Inversion check (automatic)
- If a higher tier's customer pays is lower
than a lower tier's: flag the row red
"price inversion," list the inverted range
(from tier X to tier Y, and by how much
the pays differ) with the note "bundling
up to X is cheaper"
- The check compares all tiers, not just
neighbors, and looks at pays only, never
margin
4. Print output
- One click to an internal one-pager: tier /
pays / nets / GWP cost / margin dollars /
margin percent / status, with the
calculation basis on one line at the
bottom - for the manager to review and
sign before launch
Boundaries and prohibitions:
- Every rule parameter comes from the config
block; the tool ships with no preset
discounts, fee rates, or "industry
practice" numbers. On an empty config it
shows setup guidance only, never a default
calculation
- It runs the math and lights lamps: no
"smart pricing advice," no "optimal
price" output, and the words "smart" and
"AI pricing" appear nowhere in the UI
- Offline, no uploads; the config is stored
locally with a one-click clear
- Plain, restrained Chinese UI
Delivery order: start with a one-sentence
page-structure note, then the complete
single-file code, then usage advice for the
planner - how to fill the config block once
before each launch, and how to set tiers
against the store's basket distribution.
Why it is written this way
Making the stacking order a config item is the tool's first-priority design decision. The same coupon plus the same member discount yields a different customer pays depending on whether the threshold applies before or after the discount - platforms stack differently, and a tool that hardcodes the order silently produces wrong numbers on the second platform, wrong precisely because every step looks individually correct. Making the order draggable and re-runnable is what earns the phrase "configure per the platform's actual rules"; and because an order change forces every tier to recompute, the tier table stops being a price list for customers and becomes an x-ray for the planner: what happens in each price band under this particular order.
Printing "store nets = pays - platform fee + brand co-op" on the output area itself, with an explicit ban on burying it in help text, is the piece these calculators most often lack. A margin number that requires a signature demands that the signer know where it came from: at which step the platform fee comes off, where brand co-op goes back in, whether GWP cost sits in the margin denominator - leave any of that vague and the post-event reconciliation cannot close. With the formula fixed to the page, every margin percent can be re-computed on the spot with a pocket calculator; a number that survives re-computation deserves the word "review," and one that doesn't only deserves "reference."
Shipping with no preset discounts or fee rates, and showing only setup guidance on an empty config, guards against the default-value trap. Preload a conventional threshold and a plausible fee rate, and the person with no time to configure will run them as-is - the tool stops amplifying arithmetic and starts amplifying errors, and an error endorsed by a tool's UI is worse than no tool at all. The same logic bans pricing advice outright: pricing weighs inventory depth, competitor prices, and brand price control - a human decision. Let the tool emit a "suggested price" and it gets executed as authority; one mistake sells an entire tier through. The lamps come on, and whether and how to change the rules stays with the manager. The tool's job description is arithmetic; step past that and it starts underwriting liability.
The inversion check compares pays only and never touches margin, because inversion is purely a customer-behavior problem: customers discover on their own that adding a few dollars makes the total cheaper, and under the rising basket sizes the margin keeps thinning while the gifts keep stacking. The check must compare every tier, not just adjacent ones - inversions often sit across a non-adjacent gap with a coupon threshold hiding in between. The printable one-pager is what embeds the tool in the process: a sheet waiting for the manager's signature turns the math from the planner's self-check into a precondition of launch. A feature living in a browser tab constrains nothing; paper on a desk does.
Variables
| Variable | Description |
|---|---|
| Stacking order | Default sort is threshold -> coupon -> member pricing - varies by platform; set it per this event's actual platform rules, and re-run every tier whenever the order changes - never carry the last event's order into this one |
| Margin guard line | The margin-percent floor that lights the lamp - set against the store's rent/labor structure and category markup; skincare and color can carry separate lines. Better a high line and one loud rehearsal than a low line and permanently dark lamps |
| Platform fee rate and base | Per the platform's actual back-end rules - where the rate or charge base is uncertain, configure the conservative (higher) read, never the lower: the margin you compute should be a floor, not a hallucination |
| Basket tiers | 4-6 tiers mapped to the store's basket distribution - tiers must bracket each layer's thresholds; bands hugging a spend threshold invert most easily and deserve denser coverage |