---
title: "Sort costs with vendor rules"
description: "File every receipt from a seller under the same part of the business and kind of cost, and match sellers whose bank name differs."
---

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

# Sort costs with vendor rules

Use this guide to stop correcting the same seller's filing every month. A vendor rule says: when the seller's name contains this text, file the receipt under this part of the business and this kind of cost. Your rules always win; when no rule matches, Clef picks the filing and flags it when unsure.

## Prerequisites

- A receipt from the seller, read and with the seller's name right.
- The parts of the business you want to file under, set in **Settings** > **Business**. See [Change settings in the app](/docs/how-to/change-settings-in-the-app/).

## Make a rule

1. **Open a receipt from the seller**

   Open any receipt from the seller, for example from **Receipts** To do or from **Home**.
2. **Open the rule form**

   On the receipt page, open **More** and then **Always file as**.
3. **Fill in the rule**

   - **Seller contains**: starts as the full seller name. Shorten it to the part that stays the same, for example `Hetzner`. Case, accents and endings such as "Ltd" or "Inc" are ignored.
   - **Part** and **Kind**: where these receipts belong.
   - **Also mentions** (optional): extra text that must appear in the receipt or its email, for example a project name, when one seller serves several parts of the business.
   - **Bank name** (optional): the payee name exactly as your bank shows it, when it differs from the seller name on the receipt. This lets payments match automatically.
   - **Priority**: when several rules match, the highest number wins.
   <Step title="Save">

   Select **Save rule**. You return to the receipt.

## Apply it to receipts you already have

Rules are used when a receipt is read. New receipts follow the rule straight away. A receipt already in the app keeps its filing until you either change **Part** and **Kind** on the receipt page yourself, or select **More** > **Read again**.

## Check that it worked

- **Settings** > **Business** > **Vendor rules** lists the rule as one row, such as "Hetzner → Hosting, infra", with its priority when it is not 0.
- The next receipt from the seller shows the rule's filing in **Part** and **Kind**, with no **Which part of the business?** or **What kind of cost is this?** flag.

## Fix "Which rule should win?"

This flag ("Two of your rules disagree.") means two or more rules match the receipt with the same, highest priority but file it differently. The receipt waits in **Receipts To do** until you pick the filing on it.

To stop it happening again, open **Settings** > **Business** > **Vendor rules**, select one of the rules, and either give it a higher **Priority** and select **Save**, or select **Remove**.

## Change or delete a rule

Open **Settings** > **Business** > **Vendor rules** and select the rule. Change any field and select **Save**, or select **Remove**, which the banner can undo. **Add rule** at the bottom of the list adds one without opening a receipt. Two rules cannot have the same **Seller contains** and **Also mentions** text.

## Related

- How rules, Clef and conflicts fit together: [How costs are sorted](/docs/explanation/how-costs-are-sorted/).
- How **Bank name** affects matching: [How matching works](/docs/explanation/how-matching-works/).

Source: https://receipts.nuits.net/docs/how-to/sort-costs-with-vendor-rules/index.mdx
