Skip to content

article

Bank Rules: Auto-Categorize Imported Transactions

Write persistent rules that automatically code imported bank lines to a GL account, set a payee or memo, tag a class or location, and optionally post to the ledger.

What Bank Rules do

Before Bank Rules, StretchBooks could match an imported bank line to an existing invoice, bill, or payment — but a line with no matching document had to be coded by hand. Bank Rules let you write a persistent rule once and have every future import that matches it coded automatically. This is the daily-driver loop from Xero Bank Rules and QuickBooks Rules.

A rule can:

  • Match a line by its description, counterparty, or amount, using operators such as contains, equals, starts with, regex, and amount comparisons (greater than, between, and so on).
  • Apply to money-out (spend), money-in (receive), or both.
  • Code the line to a target GL account, optionally set a counterparty and memo, and tag a class or location (tracking category).
  • Auto-post the settlement to your ledger when you want the rule to complete the entry end to end.

Rules run in priority order — the first enabled rule that matches wins — and each rule keeps a hit count and a last-applied date.

How it works

  1. Import a bank statement (CSV or OFX) as usual.
  2. StretchBooks evaluates your enabled rules against each uncategorized line and shows you which rule codes each line (a dry-run preview that writes nothing).
  3. Apply the rules to annotate the lines with their target account (and payee/memo/class). If a rule is set to auto-post — and reconciliation posting is enabled — the entry is posted to the general ledger.
  4. Any line no rule matches is left for you to code by hand, exactly as before.

Availability

Rolling out. The Bank Rules engine is complete, tested, and wired into both the admin and workspace surfaces, but it is released behind a feature flag and the in-app rule-builder screen is being finished. Until it is enabled for your account, imported lines continue to be coded manually. Auto-posting additionally requires bank reconciliation to be enabled.

Good to know

  • A rule must have at least one condition — there are no blanket "match everything" rules, so a rule can never sweep unintended lines into an account.
  • A class/location tag set by a rule flows through to the real ledger entry, not just the bank line.
  • Deleting a rule detaches it from past lines but preserves your posted ledger history.

Was this helpful?

Help us improve this article

Use these controls to share whether this answer solved the issue. Feedback helps prioritize updates to StretchSuite Support.