Description
Subtract minimumSubtotal from nonnegative basketSubtotal for margin and compare inclusively for eligible.
Fixed and percentage discounts act differently and may produce different prices when their order changes. Threshold pricing also depends on whether a new rate applies to all units.
Subtract minimumSubtotal from nonnegative basketSubtotal for margin and compare inclusively for eligible.
When to use this tool
Use Coupon Basket Minimum Margin when you need a transparent promotional price or eligibility term.
How to use the tool and how it works
- Enter basketSubtotal, minimumSubtotal. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read margin, eligible. Inspect eligible before interpreting the associated values.
Subtract minimumSubtotal from nonnegative basketSubtotal for margin and compare inclusively for eligible.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| basketSubtotal | Basket Subtotal | Required. Finite number; minimum 0. |
| minimumSubtotal | Minimum Subtotal | Required. Finite number; minimum 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| margin | Signed allowance remaining under the subtraction order above. | Required. Finite number. |
| eligible | Eligible | Required. Boolean. |
{
"input": {
"basketSubtotal": 55,
"minimumSubtotal": 50
},
"output": {
"margin": 5,
"eligible": true
}
} Limitations and assumptions
- This checks the supplied subtotal rule only; coupon validity, qualifying items, discounts, taxes, and actual offer terms 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
Check actual offer terms, item eligibility, taxes, and monetary rounding before applying a computed price.
References
Similar or alternative tools
- Promotion Coupon Expiry Label
Display valid through expiry and mark expired only for dates strictly after it.
- Subscription Renewal Credit
Subtract creditAmount from renewalCharge with a zero floor for amountDue and return the reverse excess with a zero floor as excessCredit.