Help › Bookkeeping
Auto-categorize a supplier with rules
Updated
Supplier rules set the defaults HQ uses each time a bill comes in from a supplier (its currency, expense category, and tax handling) so you stop fixing the same supplier by hand.
- Go to Books › Expenses › Supplier Rules and click Add Rule (or set a Category on the supplier itself under Edit Supplier on the Suppliers page). When you change the currency or category on one of a supplier's bills, HQ also asks Remember this for the supplier: Save rule makes the change that supplier's rule, so its next bill or receipt arrives with it, and Not now leaves the rule alone. Nothing already in your books changes either way. Its box, Also update the supplier's bills and receipts still waiting for review, gives the supplier's Pending and Low confidence documents the same answer. A supplier rule fills in bills and receipts only; a bank or card charge takes its standing answer from Books › Banking › Rules.
- Choose the supplier and the defaults to apply, and optionally have it auto-approve or mark the supplier's bills recurring.
- Tick Also apply to this supplier's bills still in review to give the supplier's Pending and Low confidence bills the same defaults.
From then on, new bills from that supplier arrive pre-filled. The backfill reaches only the supplier's bills and receipts still in review. Anything you have already approved keeps what you approved it with, and that includes a receipt waiting for its bank match: nothing has posted on it yet, but it posts exactly as you approved it when the bank line arrives, so a rule changed afterwards must not change it. Discarded, cancelled and duplicate bills are never touched. To change an approved bill, edit that bill.
Auto-approve needs a Typical Amount. It only approves a bill whose total is close to that amount, so a rule without one has nothing to check a bill against: the Auto-approve box stays off until you enter a typical amount. A bill from an older rule that has auto-approve on but no typical amount waits in Pending, and its Extraction notes say the rule has no typical amount.
How close is up to you. A recurring rule asks for an Allowed Difference (%), filled in at 10% for a new rule: auto-approve only approves a bill whose total is within that much of the typical amount, above or below. The most it allows is 25%, because a monthly bill that moves by more than that is a different bill and you should look at it. A bill outside the allowed difference waits in Pending, and its Extraction notes give its amount, how far it is from the usual one and what the rule allows. An older rule saved with more than 25% is treated as 25%, and the editor asks you to lower it the next time you save the rule.
Auto-approve also checks the currency. The typical amount is in the rule's currency (or your business's own, if the rule names none), and HQ does not convert one currency into another to compare them. HQ checks the currency the document itself states, whether the bill arrived by email or from a watched folder, not the currency the bill was filed under. So a bill waits, with a note saying which currencies it saw, when its document names a different currency from the rule's, or when its document names no currency and the rule names none either. To stop that last one, set the supplier's currency on the rule: when the rule names a currency, a document that names none is read as the rule's.
Auto-approve also makes two checks on the bill's own figures, because its total can be right while its tax was read wrong, and approving it would claim that tax back on your return. A bill waits in Pending when its subtotal, taxes and charges miss its total by $25 or more, or when its GST or HST is more than 15% of the bill's total before sales tax (QST more than 9.975%). The rate check is skipped on a bill that carries duty, because import GST is charged on the value of the goods, which a brokerage bill does not show. Its Extraction notes say which check it failed, and a bill like that says so in its notes even when no rule is involved. These checks catch a tax read far too high; they do not catch a tax read into the wrong box at an ordinary rate, so still check the tax against the document before you approve a bill.
Auto-approve has three deliberate holds. A bill whose date HQ could not read with certainty always waits in Pending for you, even when the rule matches and the amount is within tolerance. Approving posts the bill to the date on it, which decides the return its GST lands on, so that is not a decision to make unattended. See "Approve a bill" for how to confirm the date in one click. And a document that calls itself a proforma always waits too: a proforma is a quote, not a bill you owe.
The third hold is about who sent it, because anyone can type a supplier's address into the From line of an email. A bill that arrived by email auto-approves only when all of these are true:
- Your mail provider (Gmail or Outlook) confirmed the message really came from the domain on the supplier rule. Set the rule's supplier domain, or emailed bills from that supplier always wait.
- That exact address has sent you a bill from this supplier before that you approved yourself. The first bill from any address always waits for you.
- The email came straight from the supplier. A bill you forwarded to yourself always waits.
- It did not come through a platform that sends email for many businesses: Shopify, Stripe, PayPal, Square, QuickBooks, Xero, Wave, FreshBooks, BILL, Zoho, Invoice2go, Sage or Interac, or a bulk email service such as Mailchimp. Each of those sends email for many businesses, so knowing the platform sent it cannot tell you which business billed you. A bill from one of them always waits, and so does every bill matched by a rule whose supplier domain belongs to one. That includes the platform's own bills, such as your Shopify subscription.
When one of these is not true, the bill waits in Pending and its Extraction notes start with "Not auto-approved" and say which one. Check the bill is genuine, then approve it as usual. Approving it is also what lets later bills from that address auto-approve, except a bill from one of those platforms, which always waits. On a mailbox connected by IMAP, HQ cannot read a provider's confirmation, so there it relies on the address having sent you a bill you approved before.
When a bill is auto-approved, HQ posts it to your books exactly as if you had pressed Approve yourself: the expense lands on the category the supplier rule or the supplier itself carries, and the payable is recorded so it can be matched to the bank line when it is paid. If that posting is refused, most often because the bill is dated inside a period you have closed, the bill stays in Pending for you instead of being approved with nothing behind it.
Auto-approve is off unless you turn it on here. The Dashboard's "mark as recurring" suggestion sets up the supplier's frequency, expected amount and category so its bills arrive pre-filled and HQ tells you when one is missing, but the bills still wait for your approval. Posting to your books unattended is a separate choice, and this is where you make it.
The Sales-Tax Default
A supplier rule can also answer "does this supplier charge sales tax?" once, instead of on every bill. Pick a Sales Tax treatment on the rule: Standard rate, GST/HST only, Zero-rated, Exempt, or No sales tax (foreign / not registered). It is the same list you get on a bank line and in Books › Banking › Rules, because it is the same question.
It is used in one situation only: when a bill from that supplier breaks out no tax of its own. Then HQ works the tax back out of the total at your book's provincial rate and fills the split, so the input tax credit is claimed instead of quietly buried in the expense. A bill whose document states its tax keeps exactly what the document says, and so does a bill that states a subtotal different from its total. The document always wins.
Bills filled this way say so above the tax fields, and every figure stays editable, so you can correct one the supplier charged differently.
Two things it deliberately does not do. It never changes bills you already have, not even the ones still in review when you tick Also apply to this supplier's bills still in review: it fills in a bill only as the bill arrives, so it can never move the tax on an entry already posted, possibly in a filed period. And it claims nothing on a foreign-currency bill, or on a book with no business province set under Settings › Business.
Line Splits: One Supplier, Several Accounts
Some suppliers always send mixed bills. A single monthly Shopify invoice can carry app subscriptions, the platform subscription, and shipping labels, and those belong in different accounts. A supplier rule's single category cannot say that, so the supplier's Line splits can: open the supplier on Books › Expenses › Suppliers and add rules like "lines containing Shipping go to Shipping & Freight" and "lines containing App go to Software".
From then on, when a bill from that supplier arrives, its Split across accounts editor comes pre-filled: each line that matches a pattern suggests its account, lines nothing matches fall back to the supplier's usual category, and a small note under a line says which rule filled it. Review the split and click Save line coding. Nothing posts until you save the split on the bill, and a line split never changes bills you already recorded.
You rarely need to type these rules by hand. The first time you split one of the supplier's bills yourself, HQ asks "Remember this split?" and offers the patterns it saw, ready to edit. Rules match in order and the first match wins, so put the more specific pattern above the general one.
Letting HQ Split Them for You
Once a supplier has line rules, you can tick Split this supplier's bills automatically. From then on a bill from that supplier can have its split recorded for you when you approve it, instead of waiting for you to save the split by hand.
It only does that when the bill comes out exactly like a split you have already approved for that supplier: the same patterns matching, landing on the same accounts, and the lines adding up to the bill to the cent. A line HQ has not seen before, a rule you have re-pointed at a different account, or a total that does not add up all mean the bill waits for you, as it does today. Approve that one split by hand and the new shape counts as approved from then on.
Two things it can never do. It never changes a bill you have already coded yourself: your split always wins. And it never changes your sales tax. An automatic split is limited to accounts that claim tax the same way the bill already would, so the input tax credit and the amount you owe the supplier come out to the cent identical whether the bill is split or not. Only which expense lines the cost appears under changes.
A bill HQ split for you says so at the top of its Split across accounts editor. Change any line and save to record it differently, or use Clear Line Coding to go back to a single account.
The sales-tax promise above is also what decides when an automatic split stops applying. If you later change the bill's own category, HQ checks the split again against your new choice. When the two no longer claim tax the same way, your choice wins: the bill posts to the category you just picked, and the automatic split goes back to being a suggestion, still listed on the bill for you to confirm if you want it. A split you saved yourself is never undone this way.
Changing your mind also changes what HQ does next time. If you drop a line from a bill's split and save, that line stops counting as approved, so a later bill with the same line waits for you again. Clear Line Coding does the same for every line on the bill. Splits you approved on the supplier's other bills are left alone. Merging two suppliers keeps the splits you approved on both. Where the two disagree about the same line, the supplier you kept wins, the same way its line rules do.
These rules are for bills that arrive as a document, matched on the sender's email domain. A supplier who only ever shows up as a line on your bank or card statement has no email domain to match, so its answer lives in a separate place: Books › Banking › Rules. Set both if a supplier reaches you both ways.
Linking a Rule to Its Supplier
A supplier often reaches you more than one way: two email domains, two trading names. Each way gets its own rule, but the supplier has only one answer to "what category?" or "do they charge sales tax?". Linking a rule to its supplier (from the rule editor's Supplier picker, or from the supplier's own page, opened from Books › Expenses › Suppliers) is how you tell HQ those rules are the same supplier.
When you link, the supplier adopts the rule's defaults as its one answer set, and every rule linked to that supplier uses those answers from then on, whichever of them matched the bill. If the rule you are linking disagrees with what the supplier already says (say one rule claims standard sales tax and another says zero-rated), HQ shows you both values and asks you to pick. Nothing is decided silently, and the link only happens once you choose.
Unlinking puts the rule back exactly as it was: it keeps its own defaults, and the supplier keeps its answers.
Recurring, auto-approve and the currency work the same way. On a linked rule the editor shows the supplier's answer, and saving a change there changes it for the supplier, so for every rule linked to it. Turning Auto-approve off on any of them turns it off for the supplier and for every rule linked to it, and it stays off if you unlink one later. Turning it on is refused while other rules are linked to the same supplier, because the bills those rules recognise would start approving themselves too. To auto-approve only what one rule recognises, clear its Supplier and save, then turn auto-approve on.
Linking a rule that has auto-approve off to a supplier that auto-approves is refused for the same reason. Turn auto-approve on in that rule first, with its typical amount, or turn it off for the supplier. The other way round is refused too: linking a rule that auto-approves to a supplier that does not, while other rules are linked to that supplier, would start auto-approving their bills as well. Turn auto-approve off in that rule first, then link it.
Some Domains Cannot Be a Rule
HQ will not let you build a rule on an email provider such as gmail.com or outlook.com, or on a domain belonging to one of your own connected mailboxes. Neither of those says who sent a bill.
A provider is shared by every sole trader who uses it, so a rule on it would code all of them the same way. One of your own domains is worse: it appears when you forward a receipt to yourself, so it describes how the bill reached you rather than who it came from. Match on the supplier's name instead, or on their own domain if they have one.
Marketplaces such as notice.alibaba.com are still allowed. They cover more than one supplier, but that is a real fact about how those bills reach you, and the supplier's page shows you which suppliers a rule touches.
When the Statement Calls Your Supplier Something Else
Some suppliers bill you under one name and appear on your bank or card statement under another. Amazon charges show up as AMZN MKTP, Wayfair as WF/, Canada Post as CPC / SCP. When that happens, HQ cannot tell from the name alone that the bill and the charge belong together, so it has less evidence that a suggested match is the right one.
You can tell it. Open Books › Expenses › Suppliers, open the supplier, choose Edit Supplier, and add the statement wording under Statement names:
- Put one name per line. The distinctive part is enough, so
AMZN MKTPrather than the whole line with its order number. - Save. HQ uses them from then on to confirm that a bill and a charge are the same supplier, and matching charges rise to the top of the Match picker.
Keep them specific. Generic words that appear on lots of unrelated charges (a
province code like ON, or VISA, PURCHASE, CAD) would confirm the wrong
match, so HQ refuses them and tells you which line it rejected.
Statement names only help HQ recognise a supplier. They never change a category, a currency, an amount, or anything in your books.
If the same supplier has ended up as two suppliers, say Amazon and Amazon.com.ca ULC, use Merge on the supplier page to combine them first, so everything you have taught HQ lives on one supplier.