# Rules, quick entries and duplicates

> Write categorisation rules that propose the booking of new bank activity (with if-then-else chains, split templates and amount conditions), import rules from QuickBooks, Xero or Zoho Books, let small recurring lines post by themselves as quick entries, and catch the same movement arriving twice.

Source: /help/en/bank/rules-splits-and-duplicates

Rules are the free, deterministic half of bank categorisation. A rule looks at every **new** bank line (feed, statement or processor; never a line that is already matched, categorised or excluded) and proposes how to book it. The proposal waits in the Bank page's triage view until you confirm it; only a **quick entry** (one explicit opt-in per rule) posts by itself, and only under a ceiling.

## 1. Write a rule (F-CATEG-003)

Bank → **Rules** → **New rule**.

- **Apply when** all conditions match, or any of them. Conditions are over the **counterparty**, the **description**, the **reference**, the whole **bank text**, the **memo**, the **amount** (between, divisible by, greater than, less than), the **bank account**, the **direction** (money in or out) and the **currency**. Text conditions take *contains*, *does not contain*, *equals*, *starts with* or *matches* (a regular expression).
- **Then** record the line as an expense, a deposit (other income), a withdrawal (a cost without a document) or a transfer, with the account, the counterparty (an existing contact, or a name created on the first posting), the VAT category and reverse charge, a cost centre, and optionally a **split template** (shares in percent across accounts or cost centres; the last share absorbs rounding).
- **Else rule**: when this rule does not match, the else rule is tried before the next rule. Chains make an if-then-else: "ETISALAT over 1,000 to the Sales cost centre, else ETISALAT to communication".
- **Priority**: lower runs first. The first hit wins.

The scenario of user testing: the rule **"DEWA, divisible by 100, utilities"** (bank text contains DEWA, amount divisible by 100 → 6110 Utilities, VAT S, counterparty DEWA). A DEWA line of 500 is a rule hit; one of 530 is not and goes to the provider or to Needs review. Because the rule asked for a round amount, the *Divisible by 100* signal is not raised on its hits.

Rules run when a line arrives (the daily job) and on **Classify now**; the hit count on the Rules page tells you which rules work.

## 2. Quick entries (F-BANK-010)

Tick **Quick entry** on a rule for a recurring small vendor: bank charges, a subscription, a parking fee. A hit under the organisation ceiling (**Settings → Accounting → Posting of documents → Quick-entry ceiling**, default AED 1,000) posts from the job through the same function a person would use, with an audit row (`bank.quick_entry_posted`) and a feedback row, and the line shows in the triage group **Posted from the queue**. Over the ceiling, or with a possible duplicate, the line waits like any other rule hit. A quick-entry rule names its account and records an expense, deposit or withdrawal, never a transfer.

A posting approval tier for the source **Rule** (see [Posting approvals](/help/en/settings/posting-approvals)) sends quick entries to the Approvals inbox instead of posting them.

## 3. Import rules from another system

**Rules → Import rules** reads a rules export from **QuickBooks Online** (Rule name, Apply to, Conditions, Category, Payee, Auto-add), **Xero** (Rule Name, Conditions, Contact, Account Code, Tax Rate) or **Zoho Books** (Rule Name, Transaction Type, Field, Comparator, Value, Category), as CSV or Excel. Accounts are matched by code or name against your chart; the counterparty becomes a contact when a contact of that name exists, else a name to create on posting; the tax rate maps to S, Z, E, O or AE; "Auto-add" becomes a quick entry.

Every rule that cannot be read is **named with the reason** (an account the chart does not have, a condition that could not be parsed, a row without a name); the others are created active. Fix the named rows in the file and import again, or create those rules by hand.

## 4. Suggested rules

With AI categorisation on, the provider notices three or more lines from the same vendor booked to the same account and proposes a rule under **Suggested rules** on the Rules page. **Create rule** creates it (you can edit it afterwards); **Dismiss** forgets it. A suggestion is never applied by itself.

## 5. Splits (F-CATEG-005)

A rule's split template, the Categorise dialog and the New transaction dialog all produce one ledger line per share with its own account and dimensions; the rows must add up to the line. The triage view marks a split proposal with the **Split** signal so a person confirms the shares. A row on a withdrawal or deposit may name another **entity** of the group: the share books to the intercompany account here and to the chosen account in the entity's own ledger (see [Review and categorise → Splits](/help/en/bank/review-and-categorise-transactions)).

## 6. Duplicates (F-CATEG-013)

The same movement can arrive twice: by feed and by statement upload, or by feed and by **payment processor sync** (the card payment on the processor's clearing account and its settlement on the bank). **Bank → Duplicates** lists candidate pairs: same amount and currency, dates within two days, and the same reference, the same description, the same counterparty, or processor and feed on the same day; on one account or the processor clearing account.

- **Keep this, exclude the other**: the other line is excluded (ignored) with a memo naming the one kept. A matched line is never excluded; unmatch it first.
- **Not a duplicate**: the pair is remembered and never reported again.

A line with a candidate carries the **Possible duplicate** signal in triage and lands in Needs review; a quick entry never posts it.

**Intercompany transfers.** When the organisation belongs to an entity group, the list also pairs a debit line here with the matching credit line in another entity you may open (the same amount and currency, dates within two days, both still open), reason *intercompany transfer*, with the other entity's name. Nothing is booked until you act: **Record as intercompany transfer** books the pair as one transfer across the two entities (four entries, both lines matched to their own leg, see [Transfers → Across entities](/help/en/bank/transfers-fx-and-deposits)); **Not a duplicate** remembers the pair in both. Legs that differ by a fee are recorded from the Transfer dialog instead. A member of one entity alone never sees the other entity's lines.

## In the API and the MCP server

- `GET/POST /bank/rules`, `PATCH/DELETE /bank/rules/{id}` (`list_categorisation_rules`, `save_categorisation_rule`); `POST /bank/rules/import {source, rows}` (`import_categorisation_rules`); `GET /bank/rule-suggestions`, `POST …/{id}/accept`, `POST …/{id}/dismiss`.
- `GET /bank/duplicates` (`list_bank_duplicates`); `POST /bank/duplicates/{id}/dismiss {otherId}`; `POST /bank/duplicates/{id}/confirm {keepId}`.
- Rules and quick entries run in `POST /bank/classify` (`classify_bank_activity`) and the daily job.

Related:

- [Review and categorise transactions](/help/en/bank/review-and-categorise-transactions)
- [Payment processors](/help/en/integrations/payment-processors)
- [Posting approvals](/help/en/settings/posting-approvals)
