Description
Add giftValue to purchasedValue only when includeGift is true.
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.
Add giftValue to purchasedValue only when includeGift is true.
When to use this tool
Use Coupon Gift Qualifying Base Flag when you need a transparent promotional price or eligibility term.
How to use the tool and how it works
- Enter purchasedValue, giftValue, suppliedThreshold, includeGift. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read qualifyingBase, qualifies. Inspect qualifies before interpreting the associated values.
Add giftValue to purchasedValue only when includeGift is true. Compare that qualifyingBase inclusively with suppliedThreshold.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| purchasedValue | Purchased Value | Required. Finite number; minimum 0. |
| giftValue | Gift Value | Required. Finite number; minimum 0. |
| suppliedThreshold | Supplied Threshold | Required. Finite number; minimum 0. |
| includeGift | Include Gift | Required. Boolean. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| qualifyingBase | Qualifying Base | Required. Finite number. |
| qualifies | Qualifies | Required. Boolean. |
{
"input": {
"purchasedValue": 80,
"giftValue": 30,
"suppliedThreshold": 100,
"includeGift": false
},
"output": {
"qualifyingBase": 80,
"qualifies": false
}
} Limitations and assumptions
- The inclusion rule is caller supplied; actual promotional terms, taxes, and item eligibility are not checked.
- 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
- Loyalty Tier Spend Progress Margin
Add eligibleSpend and pendingSpend for projectedSpend.
- Promotion Threshold Price Jump
Compare (thresholdQuantity - 1) × unitPriceBelow with thresholdQuantity × unitPriceAtOrAbove and return the signed jump.