Initial Setup Guide
After ./deploy.sh the stack runs, the site exists and the warehouse is built, but empty. Everything Konsolidat needs is declared in konsol doctypes in the Frappe Desk; konsol writes each one to ClickHouse (epm_staging) as you save it, and the dbt build reads them from there. There are no seed files. This guide walks through the doctypes in the order they depend on each other. Doctype names and fields are from the konsol app on 2026-11-05.
Before you start
- Log in as
Administrator(password in.credentials), or as a user with the EPM Admin role. The Konsol workspace is at/desk/konsol; the close app (upload, checks, sign-off) is at/close. - Roles created on install: EPM User (viewer), EPM Analyst (group accountant: drafts adjustments, rates, ownership, intercompany; requests builds), EPM Admin (Close Lead: runs the close, approves builds and adjustments, signs off), Entity Accountant (uploads and submits trial balances and the base budget for their own entities), and the budget layer roles Budget Controller, Budget Manager, Budget Approver. Entity scope comes from Frappe User Permissions on Entity.
- Most saves below request a governed warehouse build (a Build Approval). Pending builds are listed under Builds waiting on the Konsol workspace; approve from the record's Actions menu. You can finish all the configuration first and approve one build at the end.
Step 1: Check EPM Settings
Desk, EPM Settings (System Manager only). The configurator fills the ClickHouse connection on every deploy, so on a Docker stack there is little to do here.
| Tab | What to check |
|---|---|
| ClickHouse | clickhouse_host is clickhouse, port 8123, user and password as in .env. clickhouse_secure only for a TLS ClickHouse |
| Airbyte | Leave until Step 7. skip_airbyte_sync makes Pipeline Runs skip the extract phase, useful on a site that only uploads trial balances |
| dbt & Access Control | dbt_project_path is /home/frappe/dbt_project. entity_permission_doctype and restrict_entities_by_default decide whether a user with no User Permission sees every entity or none |
| Close | default_amount_basis (period movement, year-to-date movement, or period-end balance) is used by uploads that do not declare one; the three tb_accepts_* boxes decide whether Opening, Closing and Adjustment periods take trial balances |
Verify the connection from the host:
curl -s -H "Host: konsolidat.local" http://localhost:8069/api/method/konsol.api.health
# "status": "ok"
Step 2: Entities
Desk, Entity (module EPM). One record per legal entity, in a tree.
| Field | Notes |
|---|---|
entity_code | The code trial balances and connectors use (data_area_id); konsol upper-cases it on save |
entity_name, country | |
parent_entity, is_group | Build the tree with group nodes above the legal entities |
functional_currency | Link to ISO Currency (seeded on install). The rate gate names an entity with none |
reporting_frequency | Monthly or Quarterly. Sign-off stays blocked until every in-scope entity has one |
status | Active, Dormant, Disposed |
erp_source | Which connector feeds it, if any |
Each entity's trial balance will arrive in its functional currency. Entity Fiscal Calendar maps an ERP data area to a fiscal calendar id when an ERP connector feeds it; entities that upload trial balances do not need it.
Step 3: Fiscal calendar
Desk, EPM Fiscal Year. One record per fiscal year; the period rows (EPM Fiscal Year Period) carry the dates the rates and close are keyed on.
- Create the year:
fiscal_year,start_date,end_date,period_pattern(Monthly (12), 13 Periods (4 Weeks), 4-4-5, or Custom),include_opening_period,include_closing_period. - Run Actions, Generate Periods. Each period gets
period_type(Opening, Regular, Closing, Adjustment),quarter, dates and a status (Open, Closed, Locked). - Save. konsol writes
epm_staging.fiscal_periods; a changed published calendar requests a build.
Then open Close Settings (module Consolidation, single) and declare the first close period (first_close_fiscal_year, first_close_fiscal_period). Until you do, no Regular period can be closed or locked. Close Settings also carries the policies the close needs before sign-off works: self_approval (Blocked, or Allowed with reason) and rate_move_threshold, both without a default; intercompany_declaration; the statement accounts for CTA and result; commentary thresholds; and the Deadlines and Holidays tables.
A period-end-balance trial balance also needs a Closing period and exactly one retained-earnings account in the chart (next step), because the warehouse books the year-end close itself.
Step 4: Chart of accounts
Desk, Main Account (module EPM). konsol defines the group chart; there is no adoption from the ERP (decided 2026-09-13).
Load it from one file:
- Open the Main Account list and click Upload chart. Attach a CSV, or an XLSX whose first sheet holds the chart. Required columns:
main_account,account_name,chart_of_accounts. Optional:parent_account,is_group,account_type(Asset, Liability, Equity, Revenue, Expense),statement_section,sub_section,normal_balance,time_balance(flow, balance),fx_method(closing, average, historical),is_posting,is_suspended,allow_ic,main_account_category,cf_category,cf_line_item,is_cash,is_retained_earnings,description. - The check reports what a load would do: new codes become Draft, existing rows are updated and keep their status, codes missing from the file are listed and never deleted. Fix the file until the check passes; nothing is written until then.
- Load. All rows are written in one transaction.
- Click Publish chart. Every Draft of that chart is published, parents first, and one governed
chartrebuild is requested.
Only the Close Lead (EPM Admin) may do this. Single accounts can also be created and published in the form. Flag exactly one account is_retained_earnings; mark intercompany accounts allow_ic and declare them in Intercompany Account (Step 6); set fx_method to historical on equity accounts that translate at historical rates.
Step 5: Semantic model
The semantic model is site-owned (konsol#230): konsol seeds Measures, Datasets and Scenarios on install if missing, and a site can change or retire them. Each has a status Draft, Published, Inactive; publishing writes the konsol-managed block of dbt_project/dbt_project.yml (dimensions, base_measures, fiscal vars) and requests a build.
Dimensions
Desk, Dimension. Ships empty; declare the ones you report on.
| Field | Notes |
|---|---|
dimension_name | Canonical column, for example dim_cost_center |
source_column | The raw column it comes from |
label, cube_type (string, number) | |
in_budget, in_trial_balance, in_journal, survives_close | Where the dimension is carried |
permission_doctype | A DocType whose User Permissions scope this dimension |
allocation_role | Kept for compatibility; nothing reads it since cost allocation was removed (konsol#264) |
Publish a dimension to add its column to the gold tables. Per-ERP source columns go on the Connector's Dimension Mappings; value crosswalks go in Dimension Mapping.
Measures
Desk, Measure: measure_name, expression (ClickHouse SQL), label, cube_type (sum, count, avg, last), status. Defaults include period_debit (sum(debit_amount)), period_credit, period_net_amount (sum(debit_amount) - sum(credit_amount)), transaction_count, ytd_net_amount, and the budget, variance, cash-flow and consolidated measures. A published measure is a valid measure argument of =K.EPM() and of konsol.api.epm_value.
Datasets
Desk, Dataset: one per gold fact (fact_name, clickhouse_table, dbt_model, scenario_key, measures and dimensions, default measure, grain). Defaults: gl_journal_entries (epm_gold.gold_trial_balance), budget_input (gold_spread_budget), variance_analysis, cashflow, consolidated. Add one only for a new fact table.
Scenarios
Desk, Scenario: scenario_id, scenario_name, scenario_type (actual, budget, forecast, strategic, operational), is_active. Defaults ACTUAL, BUDGET, FORECAST. Actuals come from trial balances and connectors; budgets from budget documents or =K.EPMSAVE().
Reporting hierarchies
Desk, Reporting Hierarchy with Reporting Hierarchy Member rows groups dimension values into nodes for =K.EPM(..., hierarchy, node). A hierarchy leaf is a dimension value, so the rows must carry that dimension.
Step 6: Consolidation structure and rates
Skip this step for a single legal entity.
Consolidation Group
Desk, Consolidation Group (module Consolidation). A tree: group nodes (is_group) above member rows that link an Entity (data_area_id). The group node carries reporting_currency, goodwill_method (partial, full), accounting_framework (IFRS, US GAAP, Local), goodwill treatment, acquisition-cost and bargain-purchase policies, the intercompany difference account and tolerance, and the accounts for goodwill, fair value adjustments, investment, NCI, bargain purchase gain and disposal gain or loss.
Ownership percentages and the consolidation method are not on the group. They are on Ownership Period.
Ownership Period
Desk, Ownership Period (submittable). One per entity per ownership span: consolidation_group, data_area_id, effective_date, end_date, ownership_pct, consolidation_method (full, proportional, equity, none), and the acquisition or disposal details. Submit is the approval: an Analyst drafts, the Close Lead approves from Actions, Approve. A later change is a new period that supersedes the old one (Rates, Ownership, Change ownership in the close app); approval ends the predecessor the day before.
Group Exchange Rate
Desk, Group Exchange Rate (submittable). The one source of truth for translation (decided 2026-09-13): from_currency, to_currency, rate_type (Closing, Average), fiscal_year, fiscal_period, quote and quoted_per. An ERP rate feed is only an input to Pre-fill from ERP. Approval publishes the rate to epm_staging.group_exchange_rates; gold_consolidated_trial_balance refuses to build while any translated key lacks a usable rate, and deploy.sh warns about the gaps before its dbt step. Correct an approved rate with a correction that supersedes it; a correction cannot be cancelled. Historical Equity Rate holds the historical rates for accounts whose fx_method is historical.
Intercompany
Intercompany Account declares each IC account and its counterpart. IC Elimination Rule (rule_type balance or unrealized_profit, debit and credit accounts, entity patterns, margin_pct, asset_account) drives gold_ic_eliminations. IC Balance rows (submittable) hold declared partner balances. If the group has no intercompany, set intercompany_declaration in Close Settings to "None in this group" so the screens say "not configured" rather than "reconciled".
Journals and deals
Consolidation Journal (top-side adjustments), Business Combination and Business Disposal are submittable and approved the same way. They are not setup; they belong to the close. See the Consolidation Guide.
Step 7: Connectors (optional)
Entities that upload trial balances need no connector. For an ERP:
- Install Airbyte:
bash scripts/setup-airbyte.shon the host. Fill the Airbyte tab of EPM Settings:airbyte_api_url,airbyte_client_id,airbyte_client_secret,airbyte_workspace_id,airbyte_destination_id, the source definition ids, andwebhook_secret. The destination is ClickHouse at172.30.0.10:8123, databaseepm_raw. - Create a Connector (module Pipeline):
connector_name,erp_type(d365_fo,d365_bc,sap_s4,sap_ecc,sap_b1,erpnext; adapters ship ford365_foanderpnextonly), the credentials in the Extract Credentials tab, the Legal Entities it serves, and the Dimension Mappings (this ERP's column for each canonical dimension).sync_frequency_minutes(default 1440) sets when its health turns Stale. - Click Test Extract, then Test & Provision Airbyte. The connector's
airbyte_source_idandairbyte_connection_idare filled in. - On the host, set
erp_sourcesindbt_project/dbt_project.ymlto the adapters you use ([d365_fo],[erpnext], or both) and commit. It defaults to empty and is deliberately not derived from Connectors (konsolidat#139, #207).
Details per ERP: D365 Integration, ERPNext Integration. SAP types can be registered but have no shipped adapter today.
Step 8: Copy the configuration with the CLI
The semantic model and connectors can be managed as files with konsol-cli, which talks to konsol.cli_api over the Frappe REST API (or bench execute inside the Docker stack). Generate an API key and secret for an EPM Admin user under User, Settings, API Access.
pip install -e konsol_cli # from the konsol-cli checkout
export KONSOL_BACKEND=api KONSOL_URL=http://localhost:8069 KONSOL_SITE=konsolidat.local
export KONSOL_API_KEY=... KONSOL_API_SECRET=...
konsol config export -o model.yaml # dimensions, measures, datasets, connectors
konsol config diff model.yaml # against another site
konsol config apply model.yaml --publish # apply a bundle; --prune removes what the file lacks
konsol schema apply # dbt vars, ClickHouse DDL, budget fields from the published config
konsol schema status
cli_api offers exactly five methods: apply_schema_api, get_schema_status_api, export_config_api, diff_config_api, apply_config_api (decided 2026-11-05). Everything else (publish a Dimension, test a Connector) is an ordinary document method the CLI calls directly. Entities, the chart, the fiscal calendar and rates are not in the bundle; load them in Desk as above.
Step 9: Load data and build
Trial balances
- One entity-period: Trial Balance Submission (Desk or
/close):data_area_id,fiscal_year,fiscal_period,amount_basis, the file. Submit writes the rows toepm_raw.trial_balance_submissionsand requests a build. - Many entities and periods in one file: Trial Balance Upload in Desk. Columns
data_area_id, fiscal_year, fiscal_period, main_account, debit, credit, currency, optionaldescription,partner,amount_basis. Check file reports every entity-period and whether it is ready (period open, entity known, accounts in the chart, basis declared). Load creates and submits one Trial Balance Submission per ready entity-period in a background job; Resume load continues a stopped one without loading a row twice. Only the Close Lead (EPM Admin) or a System Manager may load.
Choose the Amount Basis carefully: Period movement for a period or monthly export, Year-to-date movement for a YTD export, Period-end balance for a balances export. A wrong basis stops the next build by name (assert_tb_submission_has_basis, assert_entity_has_one_amount_basis).
Build the warehouse
Approve the pending Build Approval (Builds waiting, then Actions, Approve), or start a run: Desk, Pipeline Run, New, Run Pipeline. Creating a run needs System Manager; the button also checks the EPM Admin role. Statuses: Queued, Extracting, Transforming, Running, Completed, Failed, Cancelled. Tick skip_sync to build without an Airbyte extract. For a recurring build, create a Pipeline Schedule with a 5-field cron on a Pipeline definition.
After the first Completed run:
- Excel:
=K.EPM("<entity_code>", <year>, <period>, "<account>", "period_net_amount") - API:
GET /api/method/konsol.api.epm_value?entity=<entity_code>&year=<year>&period=<period>&account=<account>&measure=period_net_amount
Step 10: Budgeting (optional)
- Budget Cycle (submittable):
scenario_id,fiscal_year,deadline, status; the Budget Manager locks it. - Budget Sheet: one per cycle, entity and layer (base, challenge, management, board), with Budget Line rows per account and twelve period amounts.
- Budget Annual Input: an annual amount per scenario, entity, year and account with a
spread_profile_id. - Spread Profile: one row per profile and period with a
weight(for exampleEVEN, twelve rows of 1.0). - From Excel,
=K.EPMSAVE(amount, entity, year, period, account, scenarioId, layer)writes a cell.
See the Budgeting Guide and Budget Layers.
Checklist
| # | Step | Where | Required |
|---|---|---|---|
| 1 | EPM Settings checked | Desk, EPM Settings | yes (filled by the configurator) |
| 2 | Entities with functional currency and reporting frequency | Desk, Entity | yes |
| 3 | Fiscal year with generated periods; first close period in Close Settings | Desk, EPM Fiscal Year; Close Settings | yes |
| 4 | Chart uploaded and published | Desk, Main Account, Upload chart, Publish chart | yes |
| 5 | Dimensions, measures, scenarios published | Desk, Dimension, Measure, Scenario | dimensions optional |
| 6 | Consolidation Group tree, Ownership Periods, Group Exchange Rates, intercompany | Desk, Consolidation module | multi-entity only |
| 7 | Connector provisioned; erp_sources set | Desk, Connector; dbt_project.yml | ERP-fed entities only |
| 8 | Configuration exported with the CLI | konsol config export | optional |
| 9 | Trial balances loaded; build completed | Trial Balance Upload; Pipeline Run | yes |
| 10 | Budget cycle and sheets | Desk, Budget Cycle, Budget Sheet | if budgeting |
Next steps
- Excel Custom Functions: the 8
K.functions and your first=K.EPM()formula - Consolidation Guide: translation, eliminations, CTA
- Budgeting Guide and Budget Layers
- API Reference