Dimensions and segments
How many ways can a company slice its profit and loss? Two in Xero, named by the user. Two in QuickBooks, named by Intuit. Unlimited in NetSuite, named by the user and discovered at runtime. This is why a dimensional filter bar cannot be a static component.
Endpoints
Xero
GET /TrackingCategories
Categories with options
QBO
SELECT * FROM Class / Department
Two fixed entities
NetSuite
customsegment metadata + cseg_* fields
Field keys are discovered per account
The same concept in three vocabularies
Read across a row. An empty cell means the concept has nowhere to live in that system. Design around it; don't paper over it.
- Native
- — A field or object exists for it
- Partial
- — Exists with a caveat that changes what you can build
- Derived
- — Not stored — you compute it
- Absent
- — Nothing in the API
What differs, and what to do about it
Each difference comes with how to handle it.
NetSuite dimension field names are not knowable in advance
NetSuiteA custom segment creates a field whose key is defined by the customer — cseg_product, cseg_channel, cseg_whatever. Two NetSuite accounts have different dimension schemas. No type literal in your code can name them.
Do — Fetch the customsegment metadata at connection time, store it as a Dimension[], and drive every filter, group-by and column from that list.
Xero's two-category limit is a wall, not a preference
XeroA client who wants department and project and location on Xero cannot have all three. There is no plan, no setting and no workaround inside Xero's tracking model.
Do — Say so, rather than offering a control that cannot be saved. A third dimension lives in our system, applied at the reporting layer and marked as ours.
Header dimensions and line dimensions are not the same fact
QBOQBO's Department is a header field. Fanning it down to lines at normalization makes reporting uniform, but writing per-line values back is impossible — the write silently keeps only one.
Do — Record appliesTo on each dimension. An edit UI shows a header control where the source stores it at the header, and a per-line control only where the source supports one.
The type the components consume
Components take Dimension[] and render n of them. The number of dimensions is data, and zero is a valid answer.
What this changes in the interface
Every difference above that reaches the screen, and what the component does about it.
- The dimension count is 0, 1, 2 or n
- FilterBar and DimensionPicker map over a Dimension[]. There is no Class prop and no Department prop anywhere in the system.
- Some dimensions are required on write
- Required-ness comes from the dimension metadata, so a NetSuite mandatory segment blocks submit with a field-level message rather than a server error after the fact.
- Xero caps at two
- The dimension settings screen states the cap and the current usage, rather than offering an add control that will fail.
Where the accounting is explained
What consumes this payload
The components read the normalized object above. Here are the surfaces it feeds, the glossary entries for its concepts, and the document that explains the accounting.
- DimensionPickerEntity always required; renders what the account demands.
- DrilldownSheetStatement line → the GL entries behind it.
- FluxAnalysisPeriod-over-period explanations.
- DimensionA non-account axis: entity, department, project
- The accounting modelEvery Lopifi component sits on one data model, and if the model is wrong no amount of design saves the product. This page defines it, from the journal line up to basis and materiality.
Compared acrossXero docsQuickBooks Online docsNetSuite docs