Skip to content
Coupon system—what I'm waiting for is "what about stacking

Coupon system—what I'm waiting for is "what about stacking

As an e-commerce product manager, I often throw out a line that sounds like a requirement: operations wants “50 off 300, effective on the big promo day, stackable with category coupons,” live within two weeks, and after that two or three new mechanics added every month.

A lot of people start drawing tables the moment they hear this: coupon_id, user_id, amount, status. The diagrams are quite complete, but the sentence I’m waiting for never comes: when two coupons stack, which one is calculated first, which price the threshold is based on, and how much gets refunded.

In interviews, coupons are treated as a table; in real systems, they are a set of pricing rules. The difference comes down to these follow-up questions.

Post 3/10 in this series · Previous: From add-to-cart to payment, what’s missed isn’t just the user · Next: Thirty thousand products in search results, whose ranking wins

First, break “coupon” into four objects

I require candidates to distinguish at least four layers: coupon template (rule definition), batch (issuance budget and time window), coupon instance (the one in the user’s hands), and redemption record (which order it was used on, how much it offset).

Layering isn’t for a prettier database; it’s for answering what operations asks every day. When an activity’s rules change, do already-issued coupons change too? The approach is to open a new version of the template while old instances keep pointing to the old version. If a batch over-issues, can it be traced? Budget and quantity caps live on the batch, which gives you somewhere to trace. When a user complains “I clearly have a coupon” but the order didn’t apply it, you need to follow the instance and redemption record to find out which step filtered them out.

Scope also needs to be clear at this layer: platform coupons, store coupons, category coupons, single-item coupons; whether they can combine across stores for the threshold; whether shipping and tax count toward the threshold. These are rule fields, not a note operations casually types into the backend.

There’s another object that’s often missed: eligibility. Who can claim, how many per person, new vs. existing customers, channel source, whether real-name verification is required. Whether eligibility is checked at claim time or redemption time directly determines whether scalpers can stockpile coupons in bulk. I usually follow up with: one person with three accounts each claiming one—how do you prevent that? Only when the discussion reaches this point does it move from “issuing coupons” to risk control.

State transitions belong to the same layer. Unused, locked, used, expired, voided—you need to draw how states migrate: lock the coupon on order placement, redeem on payment, release on cancellation or timeout. The easiest thing to miss here is concurrency: the same coupon used to place orders on two clients at once—what guarantees only one order redeems successfully? Writing “guaranteed no duplicate use” in the doc is useless; you have to specify who validates at what moment.

Stacking rules are the real subject of this question

Anyone can calculate a single coupon; what really determines system complexity is stacking.

TEXT5 lines
1
2
3
4
5
规则集(题设示例)
R1 平台满减:订单实付满 300 减 50,与店铺券可叠加,与平台券互斥
R2 品类券:指定品类商品金额满 200 减 30,可与平台满减叠加
R3 新客券:无门槛减 15,与任何券互斥
计价顺序:先算作用域内的商品小计 → 应用店铺/品类券 → 重算门槛 → 应用平台券 → 分摊到行项目

Every line of this configuration invites a follow-up.

Which price the threshold is based on. A user buys 320 yuan of stuff and a category coupon takes off 30 first—does the platform’s “300 threshold” still hold? Both interpretations are in use, but it must be nailed down in the product rules, and the front-end copy and checkout page must say the same thing. The worst implementation I’ve seen: the front end shows “qualified” based on the original price, checkout judges “not qualified” based on the post-discount amount, and the user comes to customer service holding a coupon they clearly have but can’t use.

Calculation order determines who pays. If the store coupon comes off first, the platform coupon’s threshold may be pushed below qualification; if the platform coupon comes off first, the store’s share changes. Order isn’t a technical detail—it determines how subsidy cost is split between platform and merchant, and getting it wrong turns directly into a finance problem.

flowchart LR
  A[作用域内商品小计] --> B[店铺券或品类券]
  B --> C[按优惠后金额重算门槛]
  C --> D[平台满减]
  D --> E[按行项目分摊]
  E --> F{券后价低于价格护栏}
  F -- 是 --> G[拦截并告警]
  F -- 否 --> H[落单]

Discount allocation is the watershed. One order with three items gets 80 off total—how much per item? This isn’t just a display issue: if the user returns one item, how much is refunded; what amount the invoice is issued for; whether merchant commission is taken on actual payment or original price; which store the platform subsidy in a cross-store order is attributed to. If a candidate proactively says “discounts must be allocated by line item, and refunds are based on the allocated actual payment,” I can basically conclude they’ve handled after-sales tickets.

Another detail that’s easy to miss: whether a coupon can be split across multiple orders. Most promotional coupons can’t, but coupons with a balance (e.g., 20 off split into two 10-off uses) require a balance field on the instance, and refunds must return the balance too—otherwise the user finds they’ve “lost a coupon.”

Mutual exclusion and priority also need a definite answer. When two coupons are both usable, does the system auto-pick the best, let the user choose, or enforce by priority? Auto-picking the best sounds friendly, but it conflicts with the user’s wish to “save this one for next time,” and it makes redemption pace unpredictable for operations. I lean toward recommending the best by default, allowing switching, and logging “user manually switched”—that action itself is a very clean preference signal.

Loss prevention is the guardrail; don’t wait for post-hoc reconciliation

When a coupon system has an incident, it’s rarely a few cents miscalculated—it’s usually stacking producing combinations outside the rules, harvested in bulk.

I expect candidates to mention at least four kinds of guardrails:

  • Budget guardrail: batch total and quantity caps, automatic slowdown or halt as thresholds approach, real-time consumption visible to operations;
  • Price guardrail: block when post-coupon price falls below a threshold, to avoid stacking with flash prices, seckill prices, or employee prices into rock-bottom or even negative prices;
  • Claim guardrail: per-person limits, frequency control, dedup by device and account, a unified new-customer definition for new-customer coupons;
  • Rollback guardrail: what to do when rules are misconfigured and coupons are already issued—can you batch-freeze, void, or honor the original rules.

The fourth reveals maturity best. Rules will get misconfigured, especially when mechanics are added on the fly before a big promo. The question before launch isn’t “how do we guarantee no misconfiguration” but “can we stop the bleeding within ten minutes after misconfiguration.” I want concrete actions: freeze by batch, shut the entry point, keep already-redeemed orders, align the announcement, and whether the audit log can trace who changed which field when.

Price protection also surfaces here. The user buys and the price drops right after, or a bigger coupon is issued the next day—do you make up the difference? This isn’t a customer-service policy; it’s part of the promotion rules and must be decided when configuring the activity, or you’ll get a wave of complaints the week after the promo.

One more thing to watch day to day: cluster block details by rule. When one type of block suddenly spikes, most of the time it’s not that users turned bad—it’s that the rule was misconfigured.

Changing code every time a coupon type is added—a two-week schedule won’t last three months

For the last question I bring the topic back to scheduling: next month operations wants “buy N get X% off,” “second item half price,” “cross-store 30 off every 200”—how do you take that on.

Writing rules as if branches is the fastest and most expensive approach. Three coupon types means three branches; ten types plus all the stacking combinations quickly becomes a pile of code no one dares touch, with full regression on every release. What the product manager needs to deliver here isn’t a rules-engine architecture diagram, but the boundary of “how far operations can configure on their own.”

My habit is to draw a line between “configurable” and “needs engineering”: thresholds, amounts, time, audience, scope, stacking relationships, and priority go into configuration; new discount forms (percentage-based, per-item, tiered decreasing) require engineering to add a calculation type—but only once, after which all types of that kind are configurable. Configuration also needs preview and simulation: fill in the rules, throw in a few typical orders, and see each step’s pricing result and allocation breakdown on the spot. That simulation page prevents more incidents than any requirements doc.

Don’t skip canary release either. New rules first apply to internal accounts, then a small traffic percentage, watching redemption rate, average order value, post-coupon price distribution, and abnormal block volume, then full rollout. Effective times must specify timezone: big-promo activity switches are measured in seconds—whether “effective at midnight” means server time or user local time; get it wrong and you get a batch of complaints.

What I Listen for in This Question

The passing bar is being able to draw the four layers—template, batch, instance, and redemption—and explain the state transitions for claiming and redeeming.

A stronger candidate will proactively bring up stacking: pricing order, threshold recalculation, mutual-exclusion priority, and how discount allocation affects refunds and invoicing.

Extra credit goes to those who can steer the conversation toward financial loss and operational efficiency: how to stop the bleeding within ten minutes when something is misconfigured, whether next month’s new campaign mechanic requires code changes, and what data to retain after a campaign ends for retrospective analysis. None of this is in the literal ask of “design a coupon table,” yet it is exactly what e-commerce PMs actually deal with day to day.

I usually end with one question: once this system is live, what’s the first number you look at every morning? Answering “redemption rate” counts as competent; answering “first the anomaly-block count and the lowest post-coupon price, then the redemption rate” usually means they’ve been burned by coupon abuse.

About this Post

This post is written by Lu's Blog, licensed under CC BY-NC 4.0.

#E-commerce Products #Interview Questions #Marketing Systems

Comments