Subaccounts
1. Overview
The Subaccounts module in Sumo Ledger allows you to view and manage sub-level accounts that exist beneath product accounts. A subaccount represents a specific ledger or balance bucket within a parent account — for example, a customer account may have subaccounts for different asset types, fee categories, or transaction slugs.
Subaccounts are where actual debit and credit balances are tracked. They provide the granular financial detail that rolls up into the parent account and, ultimately, into financial reports.
Navigation: Subaccounts (main sidebar menu)
URL: https://las.ledger.raralabs.dev/product-subaccount
2. Subaccounts Page
2.1 Filter Controls
The page requires you to select filter criteria before displaying data:
| Filter | Description |
|---|---|
| Product | A dropdown to select the product type (e.g., customer, loan, user_holdings). |
| Slug | A dropdown to select the account slug (the specific ledger or balance category within the product). |
| Asset | A dropdown to select the asset type (e.g., defaultNpr, Points). |
| Get Sub Accounts | A button that executes the query and loads the results based on the selected filters. |
All three filters narrow down the subaccount list. You must select at least a Product and click "Get Sub Accounts" to view results.
2.2 Subaccounts Table
After filtering, the table displays matching subaccounts with the following columns:
| Column | Description |
|---|---|
| Ref ID | The reference ID of the parent account. |
| Account ID | The system-generated unique ID of the parent account. |
| Product Account Name | The name of the parent product account. |
| Sub Account Name | The name or slug of the subaccount. |
| Total DR | The total debit amount posted to this subaccount. |
| Total CR | The total credit amount posted to this subaccount. |
| State | The current state of the subaccount (e.g., ACTIVE, DORMANT). |
| Balance | The current balance of the subaccount (Total DR minus Total CR, or vice versa depending on the account type). |
2.3 Table Controls
| Element | Description |
|---|---|
| Filter | Additional inline filters for narrowing results. |
| Search | Free-text search across subaccount fields. |
| Options | Configure which columns are visible. |
| View | Toggle table layout. |
| Pagination | View 100 items per page with navigation controls. |
3. How Subaccounts Work
Relationship to Accounts
Each product account (visible in the Accounts module) can have multiple subaccounts. The subaccounts are created automatically based on the product's configuration — specifically, the slugs and asset types defined in the product setup.
For example, a customer product account might have subaccounts for:
primary(NPR) — the main balance ledgerfee_receivable(NPR) — fees owed by the customerinterest_accrued(NPR) — accrued interest
Debit and Credit Tracking
Every transaction posting updates the Total DR or Total CR of the relevant subaccount. The Balance column reflects the net position.
4. Best Practices
- Always select filters before querying. The page does not load data by default — you must choose a Product and click Get Sub Accounts.
- Use the Slug filter to focus on specific ledger types. This is useful when auditing a particular balance category across all accounts.
- Monitor subaccount balances regularly. Discrepancies between expected and actual balances at the subaccount level are easier to investigate than at the account level.
- Cross-reference with Postings and Journals reports. If a subaccount balance looks unexpected, use the Postings or Journals report to trace the individual debit and credit entries.