docs
/
AI skills

Reconcile the bank

Tie each bank account to the books in Business Made Books › Bank. Bring in the bank's lines from a live feed or a statement file (CSV, OFX, QFX, QIF), auto-match them to journal entries, confirm, match by hand, add the rest to the books or ignore them, and check the books against the statement's ending balance. What each button posts, and how to undo it.

Reconciling means every line on the bank statement is matched to one journal entry in the books, and the bank's ledger account shows the same balance as the statement. It all happens in Business Made Books › Bank (/books/bank). For the Business Made side of the same screens, see Bank feed, Bank and Plaid setup and Auto-reconciliation. The endpoints are on the Business Made module page.

The AI does this with call_appengine against business-made/bank/… and business-made/books/… (appengine business-made/bank/bank.controller.ts).

A bank account is a bank_account record: bank name, display name, account number, type, currency and its Ledger account, which is the chart-of-accounts account that stands for it in the books (often 1000 Cash). Each line from the bank is a bank_transaction with a matchStatus:

matchStatusTab in Books › BankMeans
unmatchedTo reviewNot tied to anything yet.
matchedSuggestedAuto-match found its entry. A person still confirms it.
confirmedReconciledTied to one journal entry. Done.
ignoredIgnoredLeft out on purpose (a transfer already booked another way, a test charge).
removed, duplicatehiddenThe bank withdrew the line, or a statement line is the same as a feed line.

On a bank line a positive amount is money out. This is the sign Plaid uses. A statement import flips the file's sign to match, so a statement's −45.00 is saved as 45 (out) and +120.00 as −120 (in). Read the sign this way before you pick a counter-account.

Ask first

  • Which bank account, and which statement? The statement's end date and its ending balance.
  • Feed or file? Is the account connected to the bank (a live feed), or will they upload a statement file?
  • For lines that aren't in the books: which account each one belongs to (bank fees, a supplier, owner's draw, interest). Ask about any line you can't place. Don't guess.

Steps

1. Books › Bank: the account and its ledger account

Open Books › Bank and pick the account (/books/bank?account=<bank_account sk>). A new account is New bank account. The drawer asks for Bank name *, Display name, Account # *, Routing #, Type (Checking, Savings, Money market, Credit card, Loan), Currency, Current balance, Ledger account and Status.

Hands on: read the account with repo_find on bank_account. Check that data.glAccountCode (or data.ledgerAccountId) names an asset account for a bank, or a liability account for a credit card or a loan. Without one, nothing on this page can post. Add to books answers 412, and the statement check has no books balance to compare.

Check: GET business-made/bank/reconcile/summary?bankAccountId=<sk> answers the count on each tab.

Changing the Ledger account on an account linked through Plaid doesn't take. The Edit drawer saves only glAccountCode. Matching, Add to books, the statement check and a bill's "Paid from" all read data.ledgerAccountId first, and Plaid sets it (bank-reconcile.service.ts 172–177). Tested: with ledgerAccountId on 1991, editing the account to 1992 still matched and checked against 1991. Card payouts use glAccountCode, so the two now post to different accounts. If an account must move, tell the owner. Don't edit it and assume it moved.

2. Books › Bank: bring in the lines

There are two ways. Use either, or both on the same account.

A live feed (Plaid). Connect a bank opens Plaid's own window, where the owner signs in to their bank. The button is greyed out when Plaid isn't set up for the org (GET business-made/bank/status). An answer of 412 MFA_REQUIRED means the owner turns on two-step sign-in first (bank.controller.ts 34). New lines arrive when the bank tells Plaid (the TRANSACTIONS webhook, connect/vendor/plaid.connect.ts 81). POST business-made/bank/connections/<id>/sync fetches them now (there is no button for it). A Reconnect your bank badge means the bank wants the owner to sign in again. Refresh balances reads the bank's live balances. A sandbox org also shows Sandbox bank, which links a test bank without the popup.

Stop: the owner connects the bank, in their own browser. The AI never opens Plaid, never handles bank sign-ins, and never removes a connection without a yes. DELETE business-made/bank/connections/<id> unlinks it at Plaid and marks its accounts disconnected (plaid.service.ts 713).

A statement file. Import statement takes CSV, OFX, QFX or QIF from the bank's website (bank-statement-import.service.ts):

CallBodyWhat it does
POST business-made/bank/imports/preview{ bankAccountId, fileName, content, mapping? }Reads the file and shows each line as new, "Already imported" or "Already in bank feed". Saves nothing.
POST business-made/bank/importsthe sameSaves the new lines as unmatched. More than 500 new lines run in the background; read GET business-made/bank/imports/<id> until it's done.
GET business-made/bank/importsPast imports for the account.
POST business-made/bank/imports/<id>/undoRemoves that import's lines (step 4).
  • content is the file's text, up to 3.5 million characters (line 17).
  • For a CSV, the preview guesses the date, description and amount columns. Send mapping to correct it. The mapping is remembered for the account.
  • Dates are read day-first when the account's currency is GBP, EUR, NGN, AUD, NZD, ZAR, KES, GHS or INR.
  • A line already imported (same fingerprint) is skipped. A line the live feed already has, within 2 days, is skipped too, so the two sources never double up.

Hands on: preview first and show the person the count of new and skipped lines. Then import.

Check: tested, a 3-line CSV previewed with its columns found and imported as 3 unmatched lines. Importing the same file again showed all 3 as "Already imported".

3. Books › Bank: Auto-match

Auto-match (POST business-made/bank/reconcile/auto-match { bankAccountId }) looks for each To review line's entry among the posted journal entries (bank-reconcile.service.ts 186–238):

RuleValue
Datewithin 5 days of the bank line
Amountexact: what the entry moved through the bank's ledger account, else the entry's total
Directionmoney in matches money in, out matches out
Score0.5, plus 0.3 same day (0.25 a day off, 0.15 two days, 0.08 three), plus 0.2 if the name is in the entry's description, minus 0.15 if the entry doesn't touch the bank's ledger account
Links it whenscore is 0.75 or more, it beats the next entry by 0.15, and the direction is known

An entry is never used for two lines. A linked line moves to Suggested. It isn't reconciled yet. The answer is { scanned, matched, needsReview }, and the screen says "Matched X of Y. Z still need a look."

Check: tested, 3 lines and 1 posted entry for the same amount and day: {"scanned":3,"matched":1,"needsReview":2}.

4. Books › Bank: go through the lines

On Suggested, each line shows the entry it found:

  • Confirm (POST business-made/bank/transactions/<id>/confirm) moves it to Reconciled.
  • Undo (POST …/transactions/<id>/unmatch) sends it back to To review.

On To review, each line has three buttons:

ButtonCallWhat it does
Match to an existing entryGET …/transactions/<id>/match-candidates?amount=&from=&to=&q=, then POST …/transactions/<id>/confirm { entryId }Searches posted entries (by default the line's amount, 14 days either side), then ties the line to the one picked. Refused if the entry isn't posted (BANK_ENTRY_NOT_IN_FORCE) or is already on another line (BANK_ENTRY_ALREADY_MATCHED).
Add to booksPOST …/transactions/<id>/create-entry { counterAccountCode, description?, businessLocationId? }Posts a new journal entry: the bank's ledger account on one side, the account picked on the other (an expense, income, revenue or liability account). The line is Reconciled.
IgnorePOST …/transactions/<id>/ignoreMoves it to Ignored.

On Reconciled, Reopen (…/unmatch) sends a line back to To review.

Stop: before Add to books. It posts to the ledger. Show the line, the account and which side is which, and wait for yes. Use Match to an existing entry when the money is already in the books (a sale, a bill payment, a payroll run). Otherwise it's booked twice.

Add to books is refused for a duplicate line (BANK_TXN_DUPLICATE) and a line still pending at the bank (BANK_TXN_PENDING). It's also refused for a line already booked: 409 BANK_TXN_ALREADY_BOOKED (bank-reconcile.service.ts 348). Tested: after Confirm, Add to books on the same line answered 409.

An entry from Add to books stays in the books when the line is undone. Reopen or Undo frees the line but leaves the journal entry posted. Undoing the import removes the lines but keeps their entries (tested). The Journal won't reverse a bank-feed entry: "...recorded automatically for a bank-feed. Correct it in Banking" (tested). To take one back out, record an Adjusting entry on it in Books › Journal. Don't Add to books a second time.

Undo an import with POST business-made/bank/imports/<id>/undo. It's refused while any of its lines is Suggested or Reconciled: IMPORT_IN_USE. Undo or Reopen those first. Tested: refused, then {"undone":true,"removed":3} once the lines were unmatched.

Check: To review shows 0 for the statement's dates.

5. Books › Bank: check against the statement

Under Statement imports on the account, enter the Statement end date and the Statement ending balance, then Check against books. They are filled in from the last import when its file carried a closing balance. Or call GET business-made/bank/reconcile/statement-balance?bankAccountId=<sk>&asOf=<YYYY-MM-DD>&statementBalance=<n> (bank-statement-import.service.ts 521). The answer is { asOf, statementBalance, booksBalance, difference, reconciled, ledgerAccountCode, ledgerAccountName, linesToReview }.

  • "Reconciled: difference $0.00": the ledger account's balance on that date equals the statement.
  • "Difference $X · N lines up to this date still to review": go back to step 4.

Check: tested, the statement balance 65.01 on the statement date answered reconciled: true, linesToReview: 0.

When the difference isn't 0 and nothing is left to review, it comes from entries already in the books. Read the account in Books › Ledger (/books/ledger?account=<code>, GET business-made/books/ledger/<code>) for an entry that is dated wrong, booked twice, or sits on the wrong account. A fix goes in as an adjusting entry; see Chart of accounts, journal and ledger. Show the person what you found before posting anything.

Card payouts (Stripe or the till's processor sending its batch to the bank) are booked with Record card payout on the account. It posts the payout against card clearing (1050), with the fees, via POST business-made/books/card-payout { amount, fees, date, reference?, bankAccountId? }. The bank line then matches that entry. Stop before posting one.

When it's done

  • To review and Suggested have no lines dated on or before the statement date.
  • The statement check reads "Reconciled: difference $0.00".
  • For a month end, mark Bank reconciliation done in Books › Period close with a note; see Month-end close.

What it can't do yet

  • Remapping a Plaid-linked account's ledger account (step 1).
  • Reversing an Add to books entry from Banking. Undo, Reopen and import undo leave it posted. Only an adjusting entry in the Journal takes it out (step 4).
  • No saved reconciliation. The statement check isn't stored. Write the result in the Period close note.
  • Connecting a bank for the owner. Plaid's window needs the owner.

Don'ts

  • Don't connect, sync or remove a bank connection without the owner.
  • Don't Add to books a line whose money is already in the books. Match it.
  • Don't Add to books again after a Reopen or an import undo. The first entry is still there.
  • Don't Ignore a line to make the difference go away.
  • Don't guess a counter-account. Ask.
  • Don't edit a Plaid-linked account's Ledger account and report it as moved.