Help / Importing Transactions

How rules apply during import

After the import wizard has parsed the CSV, mapped columns, and filtered duplicates, it passes each incoming transaction through your rules before saving. This page explains the order of operations and what does and doesn't get filled in.

What rules do at import time

For each incoming transaction, LedgerBear walks your list of rules and looks for the most specific one that applies. A rule applies when:

  • It's active.
  • Its account scope matches — either the rule is scoped to All Accounts, or it's scoped to the exact account you're importing into.
  • Its memo pattern matches the transaction's memo, using the rule's operator (Begins With, Ends With, Contains, or Equals; case-insensitive, whitespace-trimmed).

When a matching rule is found, LedgerBear applies its values to the incoming transaction — but only where the transaction doesn't already have a value:

  • If the rule has a Payee and the transaction's payee is empty, the rule's payee is filled in.
  • If the rule has a Category and the transaction's category is empty, the rule's category is assigned.

The transaction's own values take priority. If the CSV already provided a payee, or you mapped a Category column, the rule won't overwrite those.

Only one rule runs per transaction. When multiple rules match the same memo, LedgerBear picks the one with the longest memo pattern — the most specific match wins. If two rules have patterns of equal length, the one whose payee comes first alphabetically is chosen. This means you can safely write a broad rule like Contains ACME alongside a narrower rule like Contains ACME Corp HQ and the narrower rule will always take priority for memos that match both.

Typical setups

Categorize every grocery run. Create a rule scoped to All Accounts with Begins With TRADER JOE pointing at Food & Dining > Groceries. Every import that includes grocery runs will come in pre-categorized.

Clean up terse payees. Bank exports often give you raw strings like SQ *AMY'S BREAKFAST BOUL. A rule with Contains AMYS BREAKFAST and a Payee override of Amy's Breakfast makes that automatic.

Credit-card payoffs. A rule on your checking account with Contains CHASE CC PAYMENT pointing at a Transfer category helps those entries show up correctly in Cashflow totals.

What rules won't do

  • They won't fire on transactions already in the account — only on incoming imports and on transactions you manually add. To apply new rules to historical data, you can re-import the CSV with Update existing transactions enabled, which sends the old rows back through the rules engine.
  • They won't change the Amount or Date of a transaction. Only Payee and Category.
  • They won't chain — only one rule fires per transaction. If you need combined behavior, you'll need a more specific rule.

See Writing a rule for the full mechanics of creating one.