ItemSmart Configurator

KPI Formulas

SQL formulas for every KPI in the planning grid. Trusted SQL injected into ClickHouse queries.

5 configurations

Main KPI Formulas

Configure in form

Every KPI: SQL formula, aggregation type, dependencies, display metadata. TRUSTED SQL.

Important to know before configuring:

  • TRUSTED SQL — formulas run directly against ClickHouse. Never expose to user input.
  • A calculated KPI must list all {placeholder} KPIs in depends_on, otherwise topological sort fails.
  • Adding a KPI here doesn't make it visible — it also needs entries in grid_default_config and planning_grid_default_config.
  • arhaus has 71+ KPIs defined here. New clients often start with a subset.

No reference value is available; use the guided form or ask the AI Agent for help.

Configure in form

KPI Tooltip Metadata

Copy from reference

Human-readable descriptions for each KPI shown as info icons.

No reference value is available; use the guided form or ask the AI Agent for help.

Attribute Formulas

Edit in spreadsheet

Computed product attributes shown as columns (e.g. brand count, unique-or-count patterns).

No reference value is available; use the guided form or ask the AI Agent for help.

Editable KPIs List

Edit in spreadsheet

JSON array of KPI codes that users can directly edit in the grid.

Important to know before configuring:

  • Adding a KPI here without a corresponding formula in kpi_formula_json will cause errors.
  • The edit workflow (kpi_workflow) needs handler configurations for each editable KPI.
  • planning_grid/service.py does NOT use this config — it uses is_editable flags inside planning_grid_default_config.kpis. This config is consumed by grid_filter_preferences and bulk_edit_options.
  • Falls back to DEFAULT_EDITABLE_KPIS frozenset in grid_filter_preferences/service.py if missing.

No reference value is available; use the guided form or ask the AI Agent for help.

Related setup to check

Complete first: Main KPI Formulas

IAF KPI Definitions

Edit in spreadsheet

How each KPI is recalculated when IAF data changes.

No reference value is available; use the guided form or ask the AI Agent for help.