How to categorize bank transactions with AI

Categorizing financial transactions is a foundational, yet often tedious, task in bookkeeping. Fortunately, specialized tools—like the Map Transaction Category tool offered by Wesley AI—can streamline this process using artificial intelligence (AI). Here is a step-by-step guide based on using such a system to map your financial data effectively.
Step 1: Access and Upload Your Data
To imagine how effective this is, think of this AI tool as a highly efficient librarian. Instead of sorting thousands of books (transactions) by hand, you give the librarian a detailed catalog (the COA) and the librarian instantly finds the perfect shelf and category for every single book, marking any tricky ones for your quick review before they are permanently filed.

To begin, launch the Map Transaction Category tool from the Tools panel. This tool is designed to accept various transaction exports:
- Upload the File: You can use the picker or drag/drop functionality to upload a CSV, TSV, or pipe-delimited transaction export. Note that non-CSV files are rejected by the system.
- Confirm Headers: The tool provides a preview of the first 10 lines and counts the total rows, allowing you to confirm that your headers look correct before processing.
- Define Document Type: It is essential to choose the document type (e.g., bank statement, credit card, PayPal, Stripe, Square, QuickBooks, GL, expense report, or other). This selection helps the AI accurately interpret positive and negative amounts within your data.
- Add Context (Optional): You may optionally jot down vendor context—for instance, “This CSV is for Uber driver payouts”. This context is reused every time you map or reprocess, and the UI saves your last five notes locally for quick reuse.
Step 2: Establish Your Chart of Accounts (COA)

The COA defines the structure of your business finances. The system handles this in two ways:
- Default COA: The default mode utilizes Wesley’s built-in COA, which includes standard categories like assets, liabilities, equity, revenue, COGS, and expenses. Ready-made category/subcategory pairs are visible in the preview toggle.
- Custom COA: To use your existing structure, switch to “Use Custom COA” and upload your own CSV file. The backend passes this raw text to System with instructions to auto-detect critical columns, such as account numbers and descriptions, so you are not bound by strict formatting requirements.
- If you lack a template, you can download the bundled
default_chart_of_accounts.csvsample from the modal, inspect it in the inline preview, and adapt it before uploading. Once a custom COA is attached, you can still peek at the current COA or swap files without having to reload the entire modal.
Step 3: AI Processing and Mapping

When you are ready, click Map to CoA. The file is base64-encoded and securely posted for processing, enforcing Clerk authentication.
The server streams the CSV into 10-transaction chunks, processing up to 10 concurrent requests. The core intelligence receives your crucial instructions—the document type, optional vendor context, and the custom COA text. It then returns JSON mappings for every row, including the date, description, amount, category, explanation, and a confidence score.
During processing, the UI shows progress per-chunk (pending/processing/completed/error) and is designed to handle partial failures gracefully, ensuring you receive a descriptive error if all chunks fail.
Step 4: Review, Edit, and Export

After processing, it is vital to review the results:
- Review Confidence: The transactions appear in a table (with a 10-row preview that can expand to all rows) and include confidence badges. Hover tips are available to remind reviewers how to interpret the confidence colors.
- Manual Edits: You can click a category or the edit icon to open a searchable COA dropdown, sourced from QuickBooks accounts (if available) plus any filtered results. When rows are manually edited, they turn blue, and the manual edits are forced to “high” confidence so you can easily spot which lines represent final overrides.
- Reprocess Trouble Rows: If certain rows prove difficult for the AI, use the checkboxes and select Reprocess Selected. This action sends those troublesome rows back through the system, rerunning with the latest vendor context and swapping the results in place.
-
- Final Export: Once satisfied, use Confirm & Create Download. This locks the table, builds an enhanced CSV (including your edits) in-memory, and provides a download link named
coa_mapped_.csv. If the modal was opened from a chat sidebar, confirmation also pushes a summary message and the download link back into the conversation for teammates.
- Final Export: Once satisfied, use Confirm & Create Download. This locks the table, builds an enhanced CSV (including your edits) in-memory, and provides a download link named
This process transforms raw transaction data into fully categorized financial records, harnessing the speed of AI to align your transactions with your specific Chart of Accounts.
Share this article
Related reads
Discover other posts that cover similar topics.

