# CalculationOverride

> Per-customer-group calculation overrides, serialised into one column.

Source: CBX documentation, version 4.0 preview (unreleased). Canonical page: https://docs.configbox.at/docs/4.0-preview/technical/property-types/calculationoverride. Last updated 2026-07-27.

---
Per-customer-group calculation overrides, serialised into one column.

**Storage kind:** `column` · **Column:** `text`

Use it to let a shop owner point specific customer groups at a different calculation than the
default — trade pricing that uses a different formula, not merely a different number. When the
difference is just a number, [`groupPrice`](https://docs.configbox.at/docs/4.0-preview/technical/property-types/groupprice) is the lighter tool.

## Settings

| Setting | Meaning |
|---|---|
| `overridePropertyName` | The [`calculation`](https://docs.configbox.at/docs/4.0-preview/technical/property-types/calculation) property this overrides |

## Notes

Structurally the sibling of [`groupPrice`](https://docs.configbox.at/docs/4.0-preview/technical/property-types/groupprice): a JSON list keyed by customer group,
posted from a hidden input, stored in one `text` column, showing a count in the list rather than the
values.

It carried the same silently-discarding bug and the same fix — a value that does not decode to an
array is treated as empty rather than iterated.

`copyOverrides()` runs during a record copy so the copy's overrides point at the **copied**
calculations rather than the originals — the same reasoning as
[`calculation`](https://docs.configbox.at/docs/4.0-preview/technical/property-types/calculation)'s `copyCalculation()`, and it has to happen there too or a duplicated
product's group pricing would quietly drive the source product's formulas. It honours
`storeExternally`.

The same querying caveat applies as for `groupPrice`: the set lives in one column, so "which records
override for group 7" is not a SQL question.

@see groupprice.md
@see calculation.md
