Documentation Index
Fetch the complete documentation index at: https://docs.ntropii.com/llms.txt
Use this file to discover all available pages before exploring further.
ntro.capabilities.gl is the external accounting system integration layer: one stable Python surface (GLProvider, resource clients, typed models) regardless of whether the customer connects via ApiDeck Unified or a future direct provider.
It is distinct from:
| Layer | Role |
|---|---|
ntro.accounting | Fund-ops domain models (trial balance shape, journal proposals, validation) inside Ntropii. |
ntro.subledger | Tenant ledgers.* rows and lifecycle before/at posting. |
ntro.capabilities.gl | Read/write the customer’s GL (bills, invoices, TB reports, …) through the unified provider. |
BillProposal, etc.) strip Ntropii-only metadata before crossing into gl — see ntro.subledger.proposals and the ApiDeck adapter docs in source.
Install
[gl] extra pulls apideck_unify (Unity Accounting SDK). Worker images that post to Xero/QBO via ApiDeck should include this extra — same as runbooks that call gl.for_entity.
Workflow authoring typically still pins ntro[workflow] for Temporal + capabilities; add [gl] when the runbook posts to a connected ledger.
Resolve a provider
Providers are selected fromtenant.config.gl:
provider— e.g."apideck".options— provider-specific connection (consumer id, service id, etc.), populated after the tenant completes GL connect in Ntropii Workspace.
tenant.config.gl.provider is missing or unknown, resolution raises ProviderNotRegisteredError or ConnectionError_ — handle these in activities (many runbooks short-circuit posting when no GL is configured).
Example: post bills from approved expenses
Fromexpense_processor.post_expenses_to_gl — proposals built from subledger rows, then provider.bills.create with an idempotency external id:
external_id; providers must honour deduplication and expose find_by_external_id so Temporal retries stay safe.
Errors you should handle
| Exception | Typical meaning |
|---|---|
ConnectionError_ | GL not linked / credentials missing. |
ValidationFailedError | Provider rejected payload (posted journal, invalid account, …). |
IdempotencyConflictError | Same external_id, different body — logic bug or race. |
TransientProviderError | Retryable — often re-raised so Temporal retries the activity. |
Models
Types such asJournalEntry, Bill, LedgerAccount, … are re-exported from ntro.capabilities.gl.models (ApiDeck Unified shapes). Prefer importing from gl.models in runbook code so upgrades stay centralized.
Related
Accounting
Domain journals and proposals before external posting.
Subledgers
Typed rows and
propose_for_gl metadata.Data plane
Resolving tenant DB connections inside activities.