> For the complete documentation index, see [llms.txt](https://docs.powerall.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.powerall.app/en/crm/sales-price-agreements.md).

# Sales price agreements

{% hint style="warning" %}
Sales price agreements are available at parts / warehouse license level **Advanced**
{% endhint %}

When you create a new sales order for a customer, the configured sales price of an item is of course used as the line amount. You can then adjust the line to change the price or add a discount. This works fine for ad hoc discounts, but if you have made a fixed price agreement with the customer you don't want to have to think about it all the time.

To record these price agreements in the system you can add 'Sales price agreements'. A price agreement consists of a number of parts:

* A description
* Dates during which the agreement is valid
* A base price type (sales price or purchase price)
* An optional priority
* An order type to which the price agreement applies
* Partner and item selection
* And of course a discount percentage or surcharge percentage

### Partner and item selection

A price agreement applies by default to all partners and items. Often you want to restrict this. This can be done in several ways:

* Selecting a fixed partner or item
* All partners or items with a specific [tag](/en/general/features-and-tags.md). This allows you to easily create a dynamic price agreement
* Set a condition. This lets you, for example, filter on multiple tags at once or select only items with a certain sales price

### Application

There is always only 1 price agreement that is applied (price agreements are therefore never combined). To determine which price agreement this is, the system follows a specific procedure:

{% stepper %}
{% step %}

### Filtering price agreements

All price agreements that meet the selection are loaded. The date is checked (expired price agreements are filtered out, for example) and the partner and item selection. For example, if a price agreement has no partner selection it always applies, regardless of the customer.
{% endstep %}

{% step %}

### Choose highest priority

By default a price agreement has priority 0. By assigning a higher or lower priority you can make certain price agreements weigh more heavily, regardless of the final discount level. The system only uses the price agreement with the highest priority.
{% endstep %}

{% step %}

### Sort by lowest price

The price agreements that meet the selection and have the highest priority are finally sorted by the price agreement that gives the lowest price (so the highest discount). For example, if you have agreed with a customer that they always get 10% discount but you also have a promotional discount of 5% on a specific item, you don't want the system to suddenly charge 5% for that item. If you do want that, you will need to give the lower price agreement a higher priority
{% endstep %}
{% endstepper %}

Once the system has determined which price agreement applies, it looks at the configured discount or surcharge. For a discount, the set discount is copied to the order line. For a surcharge, the unit price on the order line is adjusted (upwards), and the discount field remains empty. It is also possible to set a surcharge on the purchase price by setting the base price type to 'Purchase price'. In that case the surcharge is calculated over the purchase price rather than the sales price.

### Insight

When creating an order line you can see which price agreement was applied via the <i class="fa-info">:info:</i> button. Once the line is saved this is no longer visible, because the discount may have been changed afterwards. The price agreement therefore only determines the initial discount or price of an order line and is no longer relevant afterwards.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.powerall.app/en/crm/sales-price-agreements.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
