Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt

Use this file to discover all available pages before exploring further.

Module: FA (Finance & Accounting)
Feature: FA-16
Audience: Finance Admins (fa.analytics.configure permission)
Last Updated: 2026-02-13

Overview

This guide covers how to configure and manage the Financial Analytics module, including KPI definitions, dashboard widgets, and variance thresholds.

Configuring KPI Definitions

KPI definitions are stored in the fa_kpi_definitions table and control what metrics appear on the KPIs page.

Creating a KPI

Each KPI requires:
FieldDescriptionExample
kpi_codeUnique code within your orgDSO
kpi_nameDisplay nameDays Sales Outstanding
categoryOne of: liquidity, profitability, efficiency, leverage, growth, customefficiency
formulaDatabase function name to calculate the valuefa_calculate_dso
unitDisplay unit (days, ratio, percentage, currency)days
target_valueOrganization’s goal value30
threshold_warningValue that triggers yellow status45
threshold_criticalValue that triggers red status60
threshold_directionHow to interpret thresholdslower_is_better

Threshold Direction

DirectionWarning TriggerCritical Trigger
higher_is_betterValue drops below warningValue drops below critical
lower_is_betterValue rises above warningValue rises above critical
target_is_bestValue deviates from target by warning %Value deviates by critical %

Built-in Calculation Functions

FunctionParametersReturns
fa_calculate_dso(org_id, period_start, period_end)Days Sales Outstanding
fa_calculate_dpo(org_id, period_start, period_end)Days Payable Outstanding
fa_calculate_current_ratio(org_id, period_id)Current Ratio

Dashboard Widget Management

Widgets are stored in fa_dashboard_widgets and control the dashboard layout.

Widget Types

TypeDescription
kpi_cardSingle KPI value with trend
trend_chartRevenue/expense trend line chart
variance_tableBudget vs. actual table
cash_positionCash and bank balances
revenue_summaryRevenue breakdown
expense_summaryExpense breakdown
customCustom configuration via config JSONB

Layout

Widgets use a 12-column grid system:
  • position_x / position_y: Grid position (0-based)
  • width / height: Size in grid units (1-12)

Variance Threshold Configuration

The variance significance threshold is set in FA Module Settings:
  • Setting: variance_threshold_percent
  • Default: 10%
  • Range: 1–100%
  • Effect: Variances exceeding this percentage are flagged as “significant” on the Variance Analysis page
To change: Navigate to /fa/settings and update the “Variance Threshold %” field.

Permission Setup

Assign these permissions to roles via the Permissions admin page:
PermissionPurposeRecommended Roles
fa.dashboard.viewView financial dashboardfinance_admin, finance_staff, manager
fa.analytics.kpis.viewView KPIsfinance_admin, finance_staff
fa.analytics.trends.viewView trend analysisfinance_admin, finance_staff
fa.analytics.variance.viewView variance analysisfinance_admin, finance_staff
fa.analytics.configureCreate/edit KPI definitions and widgetsfinance_admin

KPI History (Audit)

The fa_kpi_history table is append-only — records cannot be updated or deleted. This ensures a complete audit trail of all KPI calculations over time. Each entry records:
  • The calculated value at that point in time
  • The previous value for trend comparison
  • The status (normal/warning/critical) at calculation time