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

# Learn the pricing policy from your sales history

> Use your invoiced orders to fill or update the pricing policy terms, review each learned value with its evidence, and apply the changes to your draft.

**Use your history** reads your invoiced orders and works out the markup each category, brand, segment, region, country, payment term, order-size tier, category floor and attribute value has carried in practice. You review every learned value against today's policy and choose which ones go into the draft. Nothing reaches live prices until you publish the draft.

## Before you start

* You need **Edit** on **Pricing policy**.
* Your role needs access to every customer and product. Otherwise the run is refused with **Learning from history needs access to every customer and product. Ask a member with full data access to run it.**
* A provider must be connected and synced. Without one, the button shows **No ERP connected** and offers **Connect ERP**.
* At least 3 months of invoiced orders are needed. With less, the button shows **Not enough history yet**.

The workspace minimum markup is never learned.

## Run it

**1. Start**

On **Pricing policy**, select **Use your history**. It is next to **Formula terms**, and on the empty state of a new policy.

**2. Choose the settings**

Set **Period**, **Existing values** and **What to fill**, described below, then select **Analyse**.

**3. Wait for the analysis**

The sheet shows **Reading your history** and its progress: reading invoiced orders, working out markups and customer terms, and checking the result against recent invoices.

**4. Review the learned values**

The review opens as **Learned from your history**, with one tab per term. Edit any **Learned** value, and include or leave out rows.

**5. Apply**

Select **Apply {n} changes**. The values go into the draft. Review them on the policy page and publish. See [Publish a policy change](/docs/strategy/publish-policy.md).

### Settings

| Setting | Options | Default |
| - | - | - |
| **Period** | **Last 6 months**, **Last 12 months**, **Last 2 years** to **Last 5 years** | **Last 12 months** |
| **Existing values** | **Only fill empty ones** or **Replace all** | **Replace all** |
| **What to fill** | **Category markup**, **Brand**, **Segment**, **Region**, **Country**, **Payment terms**, **Order size**, **Category floor**, **Attribute** | All on. At least one is required. |
| **Start from** | **What you charge** (from invoiced orders) or your provider's markup rules | Shown only when your provider supplies markup rules |

## Read the review

Each tab lists the values that differ from today's policy.

| Column | Meaning |
| - | - |
| **Today** | The value in the current policy. |
| **Learned** | The value learned from your orders. You can edit it in steps of 0.5 points. |
| **Change (pts)** | Learned minus today. |
| **Order lines** | How many order lines support the value. |
| **Evidence strength** | **High**, **Medium**, **Low** or **No sales**. |
| **Include** | Whether the row goes into the draft. |

A row is included by default only when its evidence is **High** or **Medium**, it changes the value by at least 0.5 points, and a category markup would not sit below its floor. A learned category floor is included only when it raises the current floor. With **Replace all**, a term other than a category that learns a value of about zero with strong evidence is proposed for removal.

Select rows and use **Include** or **Leave out** to change many at once, or **Include all** in the footer.

## When nothing is proposed

| Message | Meaning and fix |
| - | - |
| **No order lines were found in the selected period. Choose a longer period or sync invoices.** | Choose a longer **Period**, or check the invoice sync. |
| **{n} order lines were read and none could be used.** | The lines listed below the message lack a product category or cost, use a unit or currency that cannot be converted, name an unknown product, or are intercompany or channel sales. Fix the data or its mapping, then run again. |
| **No category has enough order lines to learn from.** | Choose a longer period. |
| **The learned values match the current policy. No change is proposed.** | Nothing to do. |
| **The learned values did not pass validation** | The learned values priced recent invoices less accurately than the current policy, so nothing was proposed. |
| **Learning could not be completed** | Select **Retry**. If it fails again, contact support. |

## Limits and conflicts

* Each member has one open review. Starting a new run replaces it.
* A learned value must be a multiple of 0.5 and at most 1,000 points either way. A category floor must be 0% or more.
* If the policy changes after learning starts, applying is refused with **The policy changed after learning started. Run Use your history again.**
* A review that was replaced or applied returns **This learning review is no longer open. Run Use your history again.**

## Start from your provider's markup rules

When your provider supplies markup rules and you choose them under **Start from**, a sheet lists **Proposed terms** and **Not used** rules, with the reason each rule is not used, such as **Scope is not modelled** or **Attribute not mapped**. Select **Accept into editor** to keep the proposed terms in your draft, or **Dismiss** to discard that draft. Nothing is published until you publish.

> [card] [Pricing policy](/docs/strategy/policy.md)
>
> The terms this flow fills in.

> [card] [Publish a policy change](/docs/strategy/publish-policy.md)
>
> Send the learned values live.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.