Admin · Setup

Import workbench

Paste JSON, see exactly what it will do, then apply through an audited database function. Applies run as you, so sign in first.

You are signed out
Previews still work, but every apply will be refused. Go to login.
EnvironmentReadyRoot env loaded
Remote writesTest windowGuarded CLIs
Bootstrap payloadValid1 company, 48 periods
Schema apply50 workbenchespnpm v2:migration-status

Executive

Semantic metrics

Back to the app

External AI briefing

Copy this prompt, paste it into ChatGPT/Claude with your Excel/CSV, then paste the returned JSON here.

PAN: not set — add at /app/company

VAT: not set — add at /app/company

Examples are templates, not gospel
Repo examples pass structural validation but use placeholder tax IDs and sample amounts. Your accountant should confirm statutory rules and opening balances before you apply in production.

Semantic Metrics JSON

Valid
229 lines

Preview

Validation only
Company
SCC
Dictionary
samman-os-v2
Metrics
12
Active
12
Money metrics
6
On demand
12
Presentation currency
5
12 warnings
  • payload.metrics[0].calculationSqlName is recorded as declared; apply reports it in unresolvedCalculationSqlNames if no such schema.function exists yet
  • payload.metrics[1].calculationSqlName is recorded as declared; apply reports it in unresolvedCalculationSqlNames if no such schema.function exists yet
  • payload.metrics[2].calculationSqlName is recorded as declared; apply reports it in unresolvedCalculationSqlNames if no such schema.function exists yet
  • payload.metrics[3].calculationSqlName is recorded as declared; apply reports it in unresolvedCalculationSqlNames if no such schema.function exists yet
  • payload.metrics[4].calculationSqlName is recorded as declared; apply reports it in unresolvedCalculationSqlNames if no such schema.function exists yet
  • payload.metrics[5].calculationSqlName is recorded as declared; apply reports it in unresolvedCalculationSqlNames if no such schema.function exists yet
  • payload.metrics[6].calculationSqlName is recorded as declared; apply reports it in unresolvedCalculationSqlNames if no such schema.function exists yet
  • payload.metrics[7].calculationSqlName is recorded as declared; apply reports it in unresolvedCalculationSqlNames if no such schema.function exists yet
  • payload.metrics[8].calculationSqlName is recorded as declared; apply reports it in unresolvedCalculationSqlNames if no such schema.function exists yet
  • payload.metrics[9].calculationSqlName is recorded as declared; apply reports it in unresolvedCalculationSqlNames if no such schema.function exists yet
  • payload.metrics[10].calculationSqlName is recorded as declared; apply reports it in unresolvedCalculationSqlNames if no such schema.function exists yet
  • payload.metrics[11].calculationSqlName is recorded as declared; apply reports it in unresolvedCalculationSqlNames if no such schema.function exists yet

Upserts metric definitions into the global executive.semantic_metrics dictionary by code. Requires executive.manage_registers in the company named by companyCode (that company's import ledger and audit trail record the run; the definitions themselves are not company-scoped and every signed-in user can read them). Re-importing the same dictionary is idempotent (updates in place). Importing a draft metric as active activates it; importing an active metric as draft returns it to draft; importing any metric as retired retires it. Retired definitions cannot be edited directly in the table and cannot change status again unless re-imported with a higher version (re-importing as retired at the same version updates the text in place); a lower version than the stored one is always refused. Source tables must exist in the database; a calculationSqlName that does not resolve to a function is accepted and listed in the result.

Runs app.apply_import('semantic_metrics') as you; the database re-checks your permission and records an audit event.