Skip to content

Main content

Basket Coupon Prorated Line Discount

Allocate a supplied basket coupon proportionally to one line value without rounding or selecting promotion eligibility.

Loading tool…

Description

Allocate a supplied basket coupon proportionally to one line.

Business metrics depend on event definitions, time windows, revenue and cost bases, and reporting scope. Observed sales during stockout do not by themselves verify latent demand, while a return contribution depends on which costs were already recognized. Local flags and signed balances are not a complete profitability or causal analysis.

Allocate a supplied basket coupon proportionally to one line.

When to use this tool

Use Basket Coupon Prorated Line Discount when you already have lineValue, basketValue, basketCoupon and need to allocate a supplied basket coupon proportionally to one line.

How to use the tool and how it works

  1. Enter lineValue, basketValue, basketCoupon. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read lineDiscount, discountedLineValue. Use the output convention below.

Require basket positive/finite, line within basket and coupon within basket; discount=(line/basket)*coupon, discountedLine=line-discount.1

Input fieldMeaning and unitsAccepted input
lineValueLine ValueRequired. Finite number; minimum 0.
basketValueBasket ValueRequired. Finite number; strictly above 0.
basketCouponBasket CouponRequired. Finite number; minimum 0.
Output fieldInterpretationReturned shape
lineDiscountLine DiscountRequired. Finite number.
discountedLineValueDiscounted Line ValueRequired. Finite number.
json
{
  "input": {
    "lineValue": 30,
    "basketValue": 120,
    "basketCoupon": 20
  },
  "output": {
    "lineDiscount": 5,
    "discountedLineValue": 25
  }
}

Limitations and assumptions

  • No whole-currency rounding or residual allocation is added. Eligibility, disjoint lines, actual coupon, tax and applied price are not verified.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
  • Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.

Alternative or Complementary methods

Reconcile source transactions, inventory and cohort records with the full metric definitions. Use complete forecasts, accounting and study designs where needed; individual contributions and supplied scenarios do not establish performance or causal effects.

References

  1. Calculation and input contract: business-analytics/basket-coupon-prorated-line-discount — tool.io

Similar or alternative tools