Cost Centres - edmozley/freeitsm GitHub Wiki
Cost centres
Since 3.1.0 ยท Asked for in #160 ยท How it works underneath: Cost centres โ Developer Guide ยท From other systems: REST API: Cost centres
The codes your finance department charges costs to โ some organisations call them nominal or budget codes. System โ Cost Centres keeps the list, per company, and keeps it in step with your finance system by spreadsheet or by API.
This is the list itself. Charging assets and service bookings to a cost centre comes next; setting the list up now means it's ready, and already in step with finance, when that arrives.
What a cost centre is
A code, a name, an optional description, an optional parent (so you can build a hierarchy), and active or inactive.
Every cost centre belongs to one company. On a multi-company install the list follows the company switcher in the top bar, and two companies can both have a 0010. Choose All companies to see every company's list at once, with a Company column.
Codes are kept exactly as written
- Letters and numbers both work โ
0010,N1414,4000-100,CC.01โ up to 50 characters. - Leading zeros are kept. A code is text, never a number.
- Capitals are ignored when matching, so
N1414andn1414are the same code. - Spaces at either end are removed; nothing else is changed.
Inactive or delete?
Make it inactive. An inactive cost centre stays on everything already charged to it but isn't offered for anything new. Delete is for a mistake, and is refused while it has cost centres below it or anything charged to it.
Charging assets, contracts and people (3.5.0)
Each asset, contract and person can be charged to one cost centre - the Cost centre box beside Supplier on an asset, under Financial on a contract, and in the person editor (Tickets โ Users, Assets โ Users; shown on their People page). The list offers the active cost centres of the record's own company (a person with no company: the Default company's). Something already charged to one that has since been made inactive keeps it. Moving a contract or person to another company needs one of the new company's cost centres, or none.
- Assets โ Table has a Cost centre column to sort and filter by.
- The asset import takes a Cost centre column of codes (
0010,N1414) - always read as codes, never as ids. - Contracts from before 3.5.0 had a free-text box. Text matching a cost centre's code was linked on upgrade; anything else shows as Previously recorded: โฆ until a cost centre is chosen.
- The REST API takes
cost_centre_idon assets, contracts and requesters; contracts also take the code ascost_centre.
Importing and exporting
- Export downloads the list as an Excel workbook (.xlsx) or CSV: Code, Name, Description, Parent code, Active. The easiest way to prepare an import is to export, edit, and import again.
- Import reads .xlsx or CSV with headings in the first row. Only Code is required (plus Name for a new one). Common alternatives are recognised (Cost centre, Number, Kostenstelleโฆ), unknown columns are ignored, and CSVs with commas, semicolons or tabs all work.
- Codes already in the list are updated, new ones added, and nothing is deleted. Tick Make cost centres that are not in the file inactive when the file is your complete list.
- Preview shows exactly what will happen first. If any row has a problem, every problem is listed with its line number and nothing is imported.
โ ๏ธ Excel and CSV eat leading zeros. Open a CSV in Excel and save it, and
0010becomes10before FreeITSM ever sees it. Edit your list in the .xlsx export instead โ its codes are stored as text.
Syncing from your finance system
Your accounting or ERP system can send the whole list to POST /cost-centres/sync as often as you like โ nightly is typical. It works exactly like an import: matched on code, nothing duplicated, all or nothing, with a dry-run option. See REST API: Cost centres.
Who can manage them
Anyone who can open System. The full guide is in the app under System โ Help โ Cost Centres.
Related: Cost centres โ Developer Guide ยท REST API: Cost centres ยท Multi-company