A source is the traceable feed behind imported values. Every actual in a model can be traced back to the rows that produced it.
Kinds of sources
- Connectors: an accounting or banking tool connected from the app (Pennylane, Qonto, Stripe and others). See Integrations.
- Files: a general ledger, a FEC, a DATEV export, a trial balance, a CSV, uploaded in the app or by an agent.
- Pushed rows: rows your system sends through the REST API, for example a monthly close.
- Other models: a line linked to a line of another Layerz model (an external reference), refreshed on demand.
From rows to lines
- Staging. The source's raw rows are kept as they came: date, account or key, label, amount.
- Mapping. Each source has its own mapping rules. A rule matches a key with a pattern (
706*,RET-*, a double key with a secondary pattern) and routes the row to a line, or to a list element of a line, optionally reversing its sign. A rule can also ignore rows on purpose. - Projection. Mapped rows are summed by period and written onto the branch the source feeds. A row no rule matches stays unmapped: it is reported, never guessed.
Mapping is the only routing: there is no fuzzy matching, so an unmapped row is visible until a rule covers it. A whole chart of accounts can be mapped in one call, and a new source can reuse the rules of a sibling (next year's ledger).
Syncing
A sync replays the projection: after a rule changes, after a new file version, after a connector pulls new rows. Each source owns its rows and its months, so several sources can feed the same lines (one ledger per fiscal year) without overwriting each other. The source's window follows the months it carries, and with it the model's cutover.
Audit
Every value written by a source can be listed back to its transactions, by line and by period. Credentials of connectors stay in the app and never transit through the API or MCP.