GL Accounts

A chart of accounts semantic contract, defining financial account hierarchy used for reporting and metrics.

Semantic Contract

Definitions

ColumnDescription
idUnique identifier for the GL account.
nameName of the GL account (e.g., Revenue, Cost of Goods Sold, Marketing Expense).
parent_glSelf-reference to the GL account for hierarchy (nullable if top-level).
gl_account_type_idReference to the GL Account Type.
business_unit_idReference to the business unit (only if segmented; links to Business Units).

Sample & Implementation

The GL Accounts IDs 3000, 5000, 7000, 8000 are reserved for gross_margin, contribution_margin, total_cost, and ebitda. If you need to repurpose these IDs, make sure to adjust the related transformations accordingly: PnL Metrics.

We favor an opinionated numbering scheme that follows a parent > children structure. For example, revenue is defined as 1000, and their children 1010, 1020, and 1030. This allows for better organisation and displaying later in reports.

Select if GL Accounts are segmented by business units

A list of GL Accounts
idnameparent_glgl_account_type_id
1000revenue1
1010subscriptions1000
1020services1000
1030others1000
2000cogs1
2010payment_fees2000
2020other_costs2000
CREATE TABLE IF NOT EXISTS gl_accounts (
    id INTEGER PRIMARY KEY,
    name VARCHAR NOT NULL,
    parent_gl INTEGER,
    gl_account_type_id INTEGER,
    FOREIGN KEY (gl_account_type_id) REFERENCES gl_accounts_types(id)
)

Data Format

Select if GL Accounts are segmented by business units

Field

Type

Dependencies

On this page