> ## Documentation Index
> Fetch the complete documentation index at: https://docs.retailgrid.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Pricing rules guide

> Business-user walkthrough of the 8 Dynamic Pricing rule types with parameters and worked examples

This guide explains the 8 rule types behind [Dynamic Pricing](/agents/dynamic-pricing) for the people who own the pricing decisions - category managers, pricing analysts, commercial leads. For each rule: what it does in plain language, the business value, every parameter, and a worked example.

<Note>
  This is the business-oriented companion to the [Dynamic Pricing reference](/agents/dynamic-pricing), which covers the full technical detail - corridor mechanics, fallback behavior, output columns, and the Price Analysis panel. The same rules also run as the **Apply Pricing Rules** step in the [Price Optimization](/agents/price-optimization) workflow, acting as guardrails on the model's recommended prices.
</Note>

## How the pricing agent thinks

Four ideas explain everything else. Rules don't fight each other - each one narrows a **price corridor**, and the final price is picked from what's left.

<Columns cols={2}>
  <Card title="The price corridor" icon="ruler-horizontal">
    Every rule translates into a range of acceptable prices. "Margin at least 25%" is a corridor. "Match the competitor ±2%" is a corridor. "Don't touch this price" is a corridor of exactly one point.
  </Card>

  <Card title="Priority order" icon="list-ol">
    Rules run by their **Priority** number (1 = highest, max 50). Each rule intersects its corridor with what previous rules left. The visual order in the Rules tab is cosmetic - only Priority matters.
  </Card>

  <Card title="Closest to current price" icon="crosshairs">
    After all rules run, the final price is the point inside the surviving corridor **closest to the current price**. The agent moves prices as little as it can while satisfying every rule.
  </Card>

  <Card title="Scope with Conditions" icon="filter">
    Any rule can be limited to specific rows with **Conditions** - column + operator + value filters combined with AND. In SKU-Store view, store attributes (country, channel, pricing zone) work as condition columns too.
  </Card>
</Columns>

When a rule's corridor doesn't overlap what's left, the rule is **violated**. With the default fallback (Follow priority) it's flagged and the calculation continues; with Return error the row halts instead. Violations are information, not failures - they show you where two rules encode conflicting intent.

## The 8 rule types

### 1. Fixed Price - lock a price exactly where it is

Locks every matching row to its current price. No later rule can move it.

**Why you'd use it:** some prices aren't the algorithm's to change - items on a printed flyer, prices agreed with a supplier, regulated SKUs, manually approved prices. Fixed Price lets you automate the rest of the assortment with full confidence these stay put.

| Setting  | What it means                                                                   |
| :------- | :------------------------------------------------------------------------------ |
| - (none) | No parameters of its own. Control *which* rows it locks through **Conditions**. |

**Example - grocery.** The weekly flyer advertises private-label olive oil at €6.99. Competitors sell at €7.49 and your margin rule would push the price up - but the flyer is printed. `Fixed Price · Priority 1 · Conditions: on_promo IS TRUE` keeps every promo SKU exactly where it is while the rest of the category reprices normally. Later rules that target these rows will show as violated - that's the audit trail telling you the lock won.

### 2. Price Change Limit - guardrails on movement

Caps how far other rules can move a price (**Maximum**), or forbids changes smaller than a threshold (**Minimum** - the "dead zone").

**Why you'd use it:** price stability is customer trust. A shopper who saw €49.99 yesterday and €64.99 today feels cheated, and repricing thousands of SKUs by two cents creates operational noise for nothing. Change limits keep automation inside boundaries your commercial team can defend.

| Setting    | What it means                                                                                                                                 |
| :--------- | :-------------------------------------------------------------------------------------------------------------------------------------------- |
| Limit Type | **Maximum** caps total movement: corridor `[current - decrease, current + increase]`. **Minimum** forbids changes smaller than the threshold. |
| Increase   | Percent or Absolute, with a value - how far the price may rise (Maximum) or the smallest allowed rise (Minimum).                              |
| Decrease   | Percent or Absolute, with a value - the same for downward movement.                                                                           |

**Example - electronics.** A 55" TV sells at €499. Competitor matching runs daily, but a rival's flash sale shouldn't drag your price off a cliff overnight. `Maximum · Increase 5% · Decrease 5%` keeps today's price inside €474.05 - €523.95; if the market really moved, the price walks there over several runs. A second rule, `Minimum · Absolute 0.10`, tells the agent not to bother with changes under 10 cents.

### 3. Price Change - actively move prices

Adjusts matching prices by a percent, a fixed amount, or a value read from another column. The adjustment is always computed from the **current price** (the base), never from what earlier rules produced - so stacked rules stay predictable.

**Why you'd use it:** markdowns, cost pass-throughs, and campaigns without a spreadsheet - one rule, thousands of rows, fully auditable.

| Setting    | What it means                                                                                                                     |
| :--------- | :-------------------------------------------------------------------------------------------------------------------------------- |
| Value Type | **Percent** relative change · **Absolute** fixed amount · **Column** per-row amount from a numeric column.                        |
| Value      | The number itself (`-20` for a 20% markdown, `0.50` for +50 cents) or the column to read. Negative decreases, positive increases. |

**Example - fashion.** End of summer: everything tagged `season = SS26` with more than 12 weeks of stock cover goes 20% off. `Percent · -20 · Conditions: season = SS26 AND stock_cover_weeks > 12` takes the €59.00 linen shirt to €47.20 and the €89.00 midi dress to €71.20. Pair it with a Margin Rule so no markdown cuts through the floor, and Price Rounding to land on .95 endings.

### 4. Price Match - position against a reference

Aligns your price to a **reference column** - typically a competitor price, but any numeric column works. **Equals** matches it exactly; **Between** defines a positioning band around it.

**Why you'd use it:** on the key-value items that shape your price image, "never more than 3% above the cheapest competitor" is worth more than any across-the-board discount - shoppers judge the whole store by those SKUs. The band keeps you competitive without following every competitor move to the cent.

| Setting          | What it means                                                                                                    |
| :--------------- | :--------------------------------------------------------------------------------------------------------------- |
| Reference Column | The numeric column to position against - e.g. `cheapest_competitor`, `market_median`, or your own MSRP column.   |
| Operator         | **Equals** match exactly · **Between** stay inside a band.                                                       |
| From / To        | With Between: percent bounds below and above the reference. `From 2, To 3` = anywhere from 2% below to 3% above. |

**Example - electronics.** Your KVI list must track the market. The cheapest competitor sells the bestselling coffee machine at €179.00. `Between · From 2 · To 3 · Conditions: role = KVI` gives a corridor of €175.42 - €184.37. Your current €189.00 sits above the band, so the agent pulls it to €184.37 - and rounding lands it on €183.99.

### 5. Sync Prices - one price for the whole family

Forces all rows sharing a value in a **group column** to end at one identical final price.

**Why you'd use it:** nothing erodes trust faster than the strawberry yogurt costing more than the vanilla next to it, or the same t-shirt priced differently per color. Variant families are also where manual pricing errors hide. Sync makes consistency automatic.

| Setting      | What it means                                                                                             |
| :----------- | :-------------------------------------------------------------------------------------------------------- |
| Group Column | A text or categorical column whose shared value defines the family - e.g. `product_family`, `style_code`. |

The shared price is chosen by a cascade: the **mode** if two or more members already share a current price, otherwise the **highest-selling member's price** (when a `sales_units` column exists), otherwise the **median**. If other rules leave the group's corridors only partly overlapping, the engine drops outlier SKUs from the sync and prices them individually rather than breaking the whole group.

**Example - grocery.** Six flavors of own-brand 150g yogurt drifted apart over months of one-off edits: four at €1.19, one at €1.15, one at €1.29. `Sync Prices · Group Column: product_line` finds the mode - €1.19 - and all six flavors land there in one run.

### 6. Margin Rule - protect profitability

Constrains price from **cost** via a margin or markup target - exactly, or as a range. Usually the non-negotiable floor under everything else.

**Why you'd use it:** competitor matching and markdowns are only safe when something guarantees you're still making money. A margin floor means the agent can chase the market on Monday and you can still explain the P\&L on Friday.

| Setting         | What it means                                                                                                                                               |
| :-------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Margin Type     | **Margin** profit as % of selling price · **Markup** profit as % of cost. A 25% margin ≈ a 33% markup - pick the one your team reports in.                  |
| Constraint      | **Exact** hit the target precisely · **Between** stay inside a From-To range (this is how you build a floor).                                               |
| Value Source    | **Percent** · **Absolute** (a fixed amount on top of cost) · **Column** (a per-row percent, e.g. per-category targets; Column requires Constraint = Exact). |
| Value / From-To | The target number, or the range bounds with Between.                                                                                                        |

The boundary math: margin percent gives `cost / (1 - T)`, markup percent gives `cost * (1 + T)`, absolute gives `cost + value` (with `T = value / 100`).

**Example - pet supplies.** Premium dog food costs €18.00 a bag; category policy is margin between 25% and 45%. That's a corridor of €24.00 - €32.73. Competitor matching can roam inside the band - but a rival at €22.99 won't drag you below €24.00; the match rule shows as violated and the floor holds.

### 7. Price Rounding - land on the endings customers expect

Forces final prices onto allowed endings - .99, .95, whole euros, whatever your price image calls for. Rounding is special: it **always runs after every other rule**, regardless of its position in the priority list.

**Why you'd use it:** a shelf full of €12.37 and €8.42 quietly damages price perception. Charm endings are among the best-documented effects in retail, and different endings can signal different things - .99 for value lines, clean numbers for premium. Rounding makes automated prices look deliberately set by a merchant.

| Setting            | What it means                                                                                                           |
| :----------------- | :---------------------------------------------------------------------------------------------------------------------- |
| Price Scope        | All prices, or a price-range filter (Equals / Between) - so cheap and expensive items can follow different conventions. |
| Pattern            | Comma-separated allowed endings, e.g. `*.99, *.95`.                                                                     |
| Excluded endings   | Patterns to avoid, e.g. `*.00`.                                                                                         |
| Rounding Direction | **Up** · **Down** · **Closest** - which valid ending to move to, always staying inside the feasible range.              |

**Example - home & DIY.** Two rounding rules split the assortment: under €100, `Pattern *.99, *.95 · Closest` turns a computed €12.78 into €12.95; from €100 up, `Pattern *9.00 · Down` turns €342.60 into €339.00. Budget items get charm endings; big-ticket items get clean merchant numbers.

### 8. Price Relations - keep a deliberate price ladder

Where Sync makes a group identical, Price Relations keeps a group **deliberately different** - maintaining a structured gap between members, on the shelf price or on **unit price** (per kg / per litre).

**Why you'd use it:** good-better-best only works if the gaps tell the story - if "better" creeps within 50 cents of "best", the ladder collapses. Same for pack architecture: the 1kg bag must beat the 500g bag per kilo, always. Price Relations encodes that merchandising logic so no individual reprice can break it.

| Setting                | What it means                                                                                                             |
| :--------------------- | :------------------------------------------------------------------------------------------------------------------------ |
| Group Column           | The column defining the ladder - e.g. `ladder_group`, `pack_family`.                                                      |
| Price Type             | **Price** the shelf price · **Unit Price** per unit of measure - the right choice for pack-size families.                 |
| Relationship Type      | **One by one** each item steps down from the previous · **Same gap** every member holds a consistent gap from the anchor. |
| Gap Value Type + Value | Percent or Absolute, plus the gap size (e.g. 15% or €5.00).                                                               |
| Anchor Logic           | **Highest priced** the most expensive member anchors the ladder · **Explicit item** you name the anchor SKU.              |

**Example - fashion.** A t-shirt wall runs good-better-best, anchored by the premium pima tee at €39.90. `One by one · Percent 25 · Anchor: Highest priced` steps the ladder to €29.93 and €22.44; rounding polishes those to €29.95 and €22.45. When the anchor moves - a markdown, a cost change - the whole ladder follows automatically.

## One SKU through four rules

Real strategies stack rules. A 55" TV - current price €499.00, cost €380.00, cheapest competitor €479.00 - through a typical electronics strategy:

| Priority | Rule                                                  | Corridor it produces | Running feasible range |
| :------- | :---------------------------------------------------- | :------------------- | :--------------------- |
| 1        | Margin Rule - margin between 15% and 60%              | €447.06 - €950.00    | €447.06 - €950.00      |
| 2        | Price Match - cheapest\_competitor, Between -2% / +3% | €469.42 - €493.37    | €469.42 - €493.37      |
| 3        | Price Change Limit - Maximum ±5%                      | €474.05 - €523.95    | €474.05 - €493.37      |
| 4        | Price Rounding - `*.99`, Closest *(always runs last)* | allowed endings only | final: **€492.99**     |

The point in the feasible range closest to the current €499 is the upper edge, €493.37; rounding takes it to the nearest allowed ending inside the range, €492.99. Result: €6 sharper than yesterday, within 3% of the cheapest competitor, 22.9% margin, a shelf-friendly ending - and every step visible in the Price Analysis panel.

## Tips for building strategies

* **Order by how negotiable a rule is.** Locks first (Fixed Price), then hard constraints (Margin floor, Change Limit), then targets (Price Match, Price Change, Sync, Relations). Rounding can sit anywhere - it always runs last.
* **Test on the sample first.** Run against **Sample 10 Rows** (Parameters tab) and check the Price Analysis panel on a few rows before committing to the full dataset.
* **Violations are information.** Recurring violations usually mean two rules encode conflicting intent. Reserve **Return error** for true red lines.
* **Use Conditions generously.** The same Margin Rule with different Conditions becomes a per-category margin policy; in SKU-Store view, store-attribute conditions give you country- or channel-specific strategies.
* **Set Priority explicitly.** When a result surprises you, check the Priority numbers before anything else.

## Related

* [Dynamic Pricing](/agents/dynamic-pricing) - full technical reference for the rules engine
* [Price Optimization](/agents/price-optimization) - model-recommended prices, with rules as guardrails
* [Review and approve price changes](/agents/price-approval)
* [Agents overview](/agents/overview)
