Summit Hub
← All guides

Xero category rules — tag invoice lines by their Xero code

Most cost lines land in the same category every single time. The site toilet off account 455 is always P&G. Anything coded SCAFF is Scaffolding. Instead of tagging those by hand on every deal, state the rule once and let the app do it.

Where it lives

Settings → Financials → Xero category rules (owner only), or go straight to /admin/settings/xero-categories.

Setting a rule

  1. Type the Xero code. This can be the account code from your chart of accounts

(455) or an item code (SCAFF) — whichever one your supplier invoices carry. Case doesn't matter.

  1. Pick the category it belongs to. The list is your own cost categories, the same

ones the estimate and cost-tracking pickers offer, plus *Invoiced Directly*.

  1. Add rule. Typing a code you've already got a rule for re-points it rather than

adding a second one — one code, one category.

What it does

From then on, every Xero invoice line that comes into the app carrying that code arrives already tagged with your category. It shows up categorised on the deal's Xero invoices list, in Cost Tracking, and in the Excel export — no different from a line you tagged yourself, and you can change it whenever you like.

What it deliberately doesn't do

  • It never overwrites a tag you set by hand. If a line already has a category, the

rule leaves it alone. Your judgement beats the rule, always.

  • It doesn't go back over invoices already in the app. A new rule applies to lines

that arrive after it — the ones already sitting on your deals stay exactly as they are.

  • Deleting a rule doesn't untag anything. Lines it already tagged keep their category,

the rule just stops applying to new ones. (Otherwise deleting a rule would quietly move money between categories in every report that reads them.)

If you switch a category off

Turn a category off in your category settings and any rule pointing at it goes quiet — the rules list marks it *category disabled, rule inactive* and no new line gets that label. The rule isn't deleted: switch the category back on and it starts working again on the next invoice refresh. Lines already tagged with it keep their category either way.

If nothing gets tagged

  • Check the code on the invoice line in Xero — it's the account code or the item code, not

the description.

  • A line that already has a category is skipped by design. Clear the category and the next

time that invoice refreshes, the rule applies.

  • Auto-tagging ships switched off (FEATURE_XERO_CODE_CATEGORY_RULES). If the page says

it's off for your deployment, your rules are saved and start working the moment it's turned on.