In this guide

Cost codes

Your own coding list — grouped, in your order, importable from a spreadsheet — that every estimate line, budget line, purchase order and bill rolls up by, and the account each posts to.

Page: Settings → Cost Codes

Setting up for the first time? Setting up your finances takes you through the eight steps in order, and Base can walk you through them.

What it is

Your own coding list, the spine every dollar rolls up by. Estimate lines, budget lines, purchase orders, bills and invoice lines each carry a cost code, so a job can be read by trade rather than by receipt. Codes can sit under other codes: a group such as Site works holds its own sub-codes (Excavation, Slab, Drainage), shown indented under it, in the order you set.

Each code has a kind (labour, material, subcontract, equipment, overhead or other), an optional trade link that auto-coding resolves through, and an optional account its bills post to.

Cost codes are Base's, not Xero's. The box at the top of the page says where the accounts come from:

  • Xero connected: the account a code posts to is picked from your Xero chart. Accounts themselves are added and changed on Settings → Chart of Accounts, not here. If Track cost codes in Xero is on, each code also becomes an option in Xero's Cost codes tracking category, the first time a bill coded to it goes to Xero.
  • Xero not connected: the account comes from Base's own chart of accounts. Connect Xero later and the accounts come from your Xero chart instead; your cost codes stay exactly as they are.

Base starts every business with a code per trade, and new rows code themselves from their trade, so upkeep is optional. This page is for the admin, once, and the bookkeeper when the accountant wants the codes laid out differently.

Before you start

  • You must be an organisation admin. The page redirects anyone else.
  • To pick accounts from a list, have your chart in place: Xero connected and read (Settings → Chart of Accounts → Refresh from Xero), or Base's own chart. Without a chart, the account is typed.
  • To import, have your list in Excel (.xlsx) or a CSV, with at least a code and a name per row. Download a template in the import panel gives you the columns.

How to

Import your codes from a spreadsheet

  1. Press Import from a spreadsheet above the library. The import panel opens there; drop your file on the box, or click it to choose one. Close it with the cross — a preview you have not imported or cancelled is kept.
  2. Base reads every row and shows what would happen, without saving anything:
    • New — a code you do not have yet.
    • Changes — a code you already have (matched by its code), with each change shown as before → after: name, kind, group, trade, account, or Restored for a deactivated code that is back.
    • No change — already the same.
    • Skipped — listed underneath with the row number and why (no code, no name, the code is in the file twice, and so on). Anything Base was unsure of shows in amber on its row, such as a kind or trade it did not recognise. Use the pills (All, New, Changes, No change, Check these) to narrow the list.
  3. If the file is your whole list, you can switch on Deactivate codes that aren't in this file. It names the codes it would hide. Nothing is ever deleted, and a code that something in the file sits under stays active.
  4. Press Import N codes. Exactly what you saw is saved, and the result says how many were added, updated and deactivated. Cancel throws the preview away.

Columns Base reads — only Code and Name are needed:

ColumnWhat goes in it
CodeThe code, e.g. 130 or 130.2. Also read from "Cost code" or "Number".
NameWhat the code is called. Also read from "Description".
KindLabour, material, subcontract, equipment (or plant, hire), overhead or other. Blank = Subcontract for a new code.
Parent codeThe code (or the name of the code) this one sits under. Also read from "Group" or "Category".
TradeA trade name such as Electrical or Plumbing & Gas, for auto-coding.
Xero accountThe account code its bills post to. Also read from "Account" or "GL code".

Without a parent column, Base works out the groups itself: 130.2 sits under 130; a name indented with spaces sits under the row above it; and a row with a name but no code is read as a heading, so the rows under it go into the code with that name if you have one.

Download a template or export your codes

In the import panel, Download a template gives a CSV with every column and a few example rows. Export your current codes (or Export codes at the top of the page) gives your active codes in the same layout and order — change it in Excel and import it back.

Group codes under a parent

  • An existing code: click its row, pick the group under Sits under, and press Save. Choose None — top level to take it out of a group. A code cannot sit under itself or one of its own sub-codes, so those are not offered.
  • A new code: pick Sits under in the Add a code form. It goes at the end of that group.

A group shows how many sub-codes it has. Moving or regrouping a code takes its own sub-codes with it.

Put codes in your order

Drag a row by its handle (the dots at the left) and drop it above or below another code in the same group, or press the up and down arrows on the row. The new order saves straight away and every code picker in Base follows it. Moving a group moves its sub-codes with it. Reordering is off while the search box has something in it — clear it first.

Find a code

Type in Search code or name. Matching codes show with the groups above them. Switch on Show inactive to see codes you have deactivated.

Change a code

  1. Click the row (or its pencil). It opens with the fields to change: code, name, sits under, kind, trade and account.
  2. Change what you need and press Save. Rows coded to it keep their code; the change applies from now on. Discard changes closes the row without saving.

Set the account a code posts to

Open the row and pick the account under Xero account (or Account when Xero is not connected). With a chart the list offers its cost accounts; without one, type the code. Default purchases account (or a blank box) means your default purchases account. Press Save. Bills and purchase orders coded here post to that account from the next push.

Add a code

Press Add a code above the library. The form opens there: enter the code (a sub-code often takes its group's number with a point, for example 130.2), a name, the group it sits under, the kind, a trade link and, if you like, the account its bills post to, and press Add code (or Enter). The form stays open with the group and kind kept, so you can add the next sub-code straight away; press Done or the cross to close it. New estimate lines, budget lines, purchase orders and costs matching its trade code to it automatically.

When the library is empty, the same two choices — Add a code and Import from a spreadsheet — sit in the middle of the empty list.

Retire a code

Press Deactivate on a row. The code is hidden from pickers and keeps its history; switch on Show inactive and press Restore to bring it back. A code you created yourself, once deactivated, can be deleted entirely with the bin icon; rows coded to it fall back to Uncoded and its sub-codes move to the top level. Deactivating is usually the better call.

Do it in chat

Attach your spreadsheet in chat and ask Base to import your cost codes: it shows you what it would add and change first, and saves only when you say so. Base can also group codes ("put these under Site works"), move a code up or down, add a sub-code, deactivate the ones you never use, recode a project, or show a job's cost-code rollup.

What happens on its own

  • New rows auto-code from their trade text through the trade link.
  • The library is seeded for every business from the trade taxonomy, the first time anyone opens it.
  • With Track cost codes in Xero on, a code is added as an option in Xero's Cost codes tracking category the first time a bill, purchase order or claim line coded to it goes to Xero.
  • Changes the assistant makes appear here without a reload.

Things that surprise people

  • A blank cell in an import never clears anything. A blank kind, trade or account leaves the code as it was. To clear one, change it on this page.
  • Excel drops leading zeros. A code typed as 010 in a number column arrives as 10. Format the code column as text before you save the file.
  • Importing never deletes. Codes not in the file stay as they are unless you switch on Deactivate codes that aren't in this file, and even then they are only hidden.
  • The sheet sets the order. Imported codes take the order they have in the file; codes not in the file keep their order after them.
  • A heading with no code cannot become a group on its own. Base cannot invent a code for it. Give the heading row a code in the sheet, and its rows go under it.
  • A deactivated code is hidden until you switch on Show inactive. Its history is intact. Only a deactivated code you created can be deleted.
  • An account typed by hand that is not in your chart fails the push. The import preview and Settings → Chart of Accounts both flag it.
  • Blank account means the default, not no account.
  • A row the assistant has filled in opens by itself with its Save showing, and a new code it fills in opens the Add a code form. Nothing is saved until you press it. Moving a code from chat is the exception: it saves, the same as pressing the arrows.