Configure discount calculation base

Prev Next

Use this setting when the business wants discount percentages in the storefront to be based either on the discounted unit price of each item or on the discounted subtotal of the whole line.

OrderCentral stores this behavior per storefront in the Discount Calculation Base setting. The setting supports two options:

  • Unit Price
  • Sub Total

If no value is configured, OrderCentral defaults to Unit Price.

What this setting changes

This setting controls the base used by the standard pricing service when percentage discounts are applied.

It affects the priced results used across standard storefront pricing flows that read storefront discount settings, including product pricing, list pricing, cart pricing, and shipment-related pricing requests. Buyers usually notice the change most clearly in the shopping cart, where the storefront shows:

  • line prices before and after discount
  • line subtotals
  • summarized discount percentages for grouped rows and rows with add-ons

The setting does not create a new discount type. It changes how the standard storefront calculates existing discounted prices and percentages.

Understand the two options

Unit Price

Use Unit Price when your storefront should preserve legacy discount behavior.

With this option, OrderCentral applies the discount to the unit price first, rounds the discounted unit result, and then multiplies that rounded value by quantity to produce the line subtotal.

This keeps per-unit pricing stable, but the resulting subtotal can differ slightly from a mathematically exact subtotal-based calculation when the discount produces repeating decimals.

Example:

  • unit price before discount: 100.00
  • quantity: 3
  • discount: 33.333%
  • discounted unit price after rounding: 66.67
  • resulting subtotal: 200.01

Sub Total

Use Sub Total when the business wants the discount to reflect the full line value instead of a rounded per-unit calculation.

With this option, OrderCentral calculates the discount from the full line subtotal first and then derives the per-unit price after discount from that subtotal result.

This is usually the better choice when buyers compare the discount percentage against the whole row value, especially for grouped items and add-ons.

Example:

  • unit price before discount: 100.00
  • quantity: 3
  • discount: 33.333%
  • line subtotal before discount: 300.00
  • discounted line subtotal: 200.00
  • derived unit price after discount: 66.67

When to use Unit Price versus Sub Total

Use Unit Price when:

  • the storefront must preserve existing pricing behavior from earlier implementations
  • downstream reviews are based primarily on rounded unit prices
  • a small rounding difference on the line subtotal is acceptable

Use Sub Total when:

  • buyers should see discount percentages that reflect the full summarized line value
  • grouped items contribute to a combined cart row
  • add-ons change the effective value of the cart row
  • the business wants subtotal-driven discount presentation and more stable summarized totals

Where the setting is stored

The setting is stored on the storefront configuration custom metadata record.

Setting details:

  • label: Discount Calculation Base
  • API name: Discount_Calculation_Base__c
  • object: Storefront_Configuration__mdt
  • field type: Picklist
  • display values: Unit Price and Sub Total
  • stored values: UnitPrice and SubTotal
  • default value: Unit Price

The field is subscriber-controlled, so different storefront configuration records can use different values.

Configure the setting

At the time of writing, the standard OrderCentral storefront configuration page exposes Discounts Apply Type, but it does not expose a visible control for Discount Calculation Base.

Treat this setting as an implementation-managed storefront metadata setting rather than a casual point-and-click admin option.

Use this rollout approach:

  1. Identify the storefront configuration record that controls the target storefront.
  2. Update the Discount Calculation Base value on the relevant Storefront_Configuration__mdt record.
  3. Set the value to UnitPrice to preserve legacy behavior or SubTotal to enable subtotal-based calculation.
  4. Save or deploy the metadata change through your normal governed implementation process.
  5. Re-test the affected storefront pricing experiences after the change is active.

If your delivery team uses a controlled metadata update path through implementation tooling or a custom admin process, follow that established process. Do not document a visible storefront configuration control for this field unless your own implementation has added one.

Why subtotal-based calculation matters for grouped items and add-ons

Subtotal-based calculation matters most when one visible cart row represents more than one priced element.

Grouped items:

  • the standard cart recalculates summarized row pricing from the grouped child items
  • subtotal-based calculation helps the displayed percentage align with the full grouped row value instead of a single-unit assumption

Add-ons:

  • the standard cart adds add-on pricing into the summarized before-discount and after-discount values for the row
  • subtotal-based calculation helps the displayed percentage reflect the combined row value that the buyer actually sees

For single-quantity items without grouped content or add-ons, the visible difference may be minimal or nonexistent. The strongest business case for Sub Total is usually a storefront with grouped products, option-heavy products, or add-on-heavy rows.

What buyers may notice after the change

After you change the setting, buyers may notice differences in:

  • discount percentages shown for grouped cart rows
  • discount percentages shown for rows with add-ons
  • line subtotal amounts in edge cases where rounding matters
  • consistency between the subtotal story and the displayed discount story across summarized cart rows

In many simple single-item scenarios, the visible pricing result will stay the same. The main difference appears in how the system derives the subtotal and summarized percentage when line composition or rounding complexity increases.

Validate discount behavior in the storefront

Use this checklist after updating the storefront configuration:

  1. Test a standard discounted item with quantity 1 and confirm pricing still matches expectations.
  2. Test a discounted item with quantity greater than 1 and a discount percentage that produces rounding, such as 33.333%, and compare the subtotal outcome under each setting.
  3. Test a grouped item and confirm the displayed discount percentage matches the summarized grouped row value.
  4. Test an item with add-ons and confirm the displayed discount percentage reflects the combined row pricing.
  5. Compare the Price and Subtotal columns in the shopping cart before and after the change.
  6. If your storefront shows discounted product pricing outside the cart, validate those product and list views as well, because the standard pricing service also uses the storefront discount settings.
  7. Re-test any custom pricing templates or custom cart rendering that assume discount percentages are always unit-price-based.

Known limitations and rollout notes

  • the default behavior remains Unit Price when the field is blank or not set
  • the visible storefront configuration component in the current standard UI does not show a dedicated Discount Calculation Base control
  • because of that UI gap, this setting should currently be rolled out by an implementation team using a governed storefront metadata update path
  • if your storefront includes custom pricing components, validate them carefully because custom rendering may assume unit-price-based discount logic even when the standard cart handles summarized pricing correctly