Pricing Variables

Pricing Variables

Overview

Pricing variables are named, computed values that act as intermediate steps in your pricing logic. Instead of writing one large formula, you can break the calculation into smaller, readable pieces — each stored as a variable — and reference them in later formulas or in the total price formula. You configure variables in Calculator Editor → Options & Pricing → Variables.

Steps

  1. In the Variables section, click + Add Variable.
  2. Give the variable a name (e.g., AREA or MATERIAL_RATE). This becomes the key you reference elsewhere.
  3. Enter a formula that computes the value. You can reference option values with OPT("KEY"), OPT_TOKEN("KEY"), or INPUT("KEY"), pricing tables with TABLE(), and other variables with VAR("KEY").
  4. Use the variable in other formulas by referencing it with VAR("KEY"), or pick it as the source of a visibility rule, value rule, or price-adjustment condition.
  5. Reorder or delete variables using the action buttons on each row.

Details

Field Description
Variable name A unique identifier used to reference this variable in other formulas via VAR("KEY").
Variable formula A formula expression that computes the variable's value. Can reference options, tables, and other variables.
  • Variables are evaluated in order from top to bottom, so a variable can reference any variable above it in the list.
  • Renaming a variable updates its key — make sure to update any formulas that reference the old name.
  • Variables appear in the formula editor's autocomplete suggestions.

Examples

  • Area calculation — Variable name: AREA, Formula: INPUT("WIDTH") * INPUT("HEIGHT"). Then use it in the total price formula: VAR("AREA") * TABLE("rates", OPT_TOKEN("MATERIAL")).
  • Weight per unit — Variable name: UNIT_WEIGHT, Formula: TABLE("weights", OPT_TOKEN("SIZE")). Reference VAR("UNIT_WEIGHT") in both the pricing formula and the weight calculation formula.