The question: "I imported a few hundred UPI transactions and none are categorised because the merchant names look like random codes. How do I auto categorise UPI transactions without tagging each row by hand?" Short answer: you do not need to tag hundreds of rows. A dozen well-chosen rules usually cover most of them, and the rest is a ten-minute clean-up.
Why do UPI rows look so cryptic?
The text on a statement line is whatever the payer's bank and the receiving handle put together: a handle, a reference number, sometimes a person's name instead of a shop name. Two payments to the same tea stall can show different text. So a rule must key on the stable part of the text, not the whole line.
What is the order of attack?
- Sort the imported rows by description and look at the repeats. Repeats are where the savings are.
- List the top ten or twelve recurring names: the milk vendor, the vegetable seller, the cab handle, the electricity payment, the OTT subscription.
- For each, find the shortest chunk of text that always appears and never appears in anything else.
- Create a rule: if the description contains that chunk, assign this category.
- Rerun or re-review the rows and see what is left.
- Fix the leftovers by hand once, and let your corrections teach the history.
How much work does this actually save?
Take a hypothetical import of 240 rows. After sorting you see that 12 recurring names account for about 150 of them. Writing 12 rules takes maybe fifteen minutes. That leaves 90 rows. Of those, perhaps 40 are one-off person-to-person payments you must judge yourself and 50 are small shops that appear twice or thrice. You label those 90 once, in a single pass, and next month's import starts with far fewer unknowns.
| Step | Rows left uncategorised |
|---|---|
| After import | 240 |
| After 12 merchant rules | 90 |
| After one manual pass | 0 |
| Next month's import (same rules and history) | A fraction of 90 |
How does SpendixAI order this?
SpendixAI works in stages: your own rules come first, then your history and similar merchants, and only if AI is switched on, an AI model handles what remains, using the cleaned-up merchant name and an amount band rather than your name, account numbers or balances. You can switch AI off per feature or entirely, and unmatched rows are then held for review. Corrections become history, and you can add merchant aliases.
What should I check before trusting the result?
- Does a rule match too widely? A chunk like "PAY" would catch everything.
- Are person-to-person payments sitting in a shop category by mistake?
- Do the category totals add up to the statement total?
- Did you skim the first import review before saving?
What is the honest limit?
No rule or model will correctly guess a payment to a person's name; only you know whether it was rent, a loan back to a friend or a gift. Expect a small permanent manual pile and treat it as normal.
How do I pick the stable chunk of text?
Open three rows for the same shop and read them side by side. Whatever is identical in all three is your candidate: a short handle, a trade name, a fixed word. Ignore reference numbers and dates because they change every time. Then search your whole import for that chunk. If it matches only the rows you expect, it is a good rule. If it also matches a stranger, lengthen the chunk.
Good rules are boring. A milk vendor, a metro card top-up and a gas cylinder booking each repeat predictably, and writing them takes a minute each. Leave the unpredictable ones, like a payment to a friend, for your own judgement.
Your next fifteen minutes
- Sort by description and note the top twelve repeats.
- Write one rule per repeat using the shortest stable chunk.
- Review leftovers once and let corrections stick.
Useful ideas start with a clearer picture of your own spending.
Explore your reports

