General Ledger Account
General Ledger Account
Overview
General Ledger Accounts are the categories in your chart of accounts that classify financial transactions. Each account represents a specific type of asset, liability, equity, revenue, or expense. When transactions occur, they post to these accounts, and the account balances form the basis of your financial statements.
Accounts follow a hierarchical structure that organizes your financial data. Parent accounts group related child accounts - for example, a "Cash" parent might have child accounts for different bank accounts or payment processors. This hierarchy lets you report at summary levels (total cash) or drill down to detail (specific bank account), supporting both high-level financial analysis and detailed investigation.
The account type determines how an account behaves financially. Asset accounts have debit balances and increase with debits. Liability and equity accounts have credit balances and increase with credits. Revenue accounts have credit balances. Expense accounts have debit balances. The system uses these rules to automatically maintain correct balances as transactions post.
Account status controls whether an account can be used. Active accounts accept new transactions. Inactive accounts are retained for historical reporting but can't be used for new entries. This lets you phase out old accounts without losing historical data, keeping your chart of accounts clean while maintaining a complete financial history.
Some accounts have special designations for specific business purposes. You might designate a default account for inventory, another for cost of goods sold, another for accounts receivable. These designations help the system automatically choose the correct accounts when posting transactions, reducing the chance of errors and ensuring consistency.
The GraphQL API lets you query accounts to see their structure, balances, and activity. You can retrieve the full chart of accounts to display in reports or selection lists. You can look up specific accounts to verify their settings. You can analyze account balances over time to understand financial trends. These queries support both operational use (selecting accounts for transactions) and financial analysis (understanding where your money is).
GraphQL API
The generalLedgerAccount collection provides access to generalLedgerAccount data via the GraphQL API. All queries use the Relay connection specification with cursor-based pagination.
Query Name:generalLedgerAccountViewConnection
Available Features:
- Cursor-based pagination (first/last/after/before)
Query Examples
Basic Query
The generalLedgerAccount collection is accessed via the generalLedgerAccountViewConnection query, which returns a Relay-style connection with pagination support.
query {
generalLedgerAccountViewConnection(first: 10) {
edges {
node {
account
code
glAccountUrl
group
name
}
}
pageInfo {
hasNextPage
endCursor
}
}
}
Pagination
Use cursor-based pagination to retrieve large datasets:
# First page
query {
generalLedgerAccountViewConnection(first: 50) {
edges {
node { account }
}
pageInfo {
hasNextPage
endCursor
}
}
}
# Subsequent pages
query {
generalLedgerAccountViewConnection(first: 50, after: "cursor-from-previous-page") {
edges {
node { account }
}
pageInfo {
hasNextPage
endCursor
}
}
}
Summary and Aggregation
This collection supports metrics aggregation through the summary field. You can calculate totals, averages, counts, and other aggregate values across filtered data.
Note: This collection does not support groupBy dimensions. For dimensional analysis, use collections like product, order, or invoice.
Query Structure
generalLedgerAccountViewConnection(filters...) {
summary {
errorCode
errorMessage
metrics {
# Calculated metrics (see table below)
}
}
}
Available Metrics
This collection provides 1 metric that can be aggregated:
| Metric | Parameters | Description |
|---|---|---|
count |
None | Count of items in the result set |
Common Parameters:
operator- Aggregation function:sum,mean,min,maxtransform- Mathematical transformation:absdateRange- Filter to specific date rangefacilityUrlList- Filter to specific facilities
Examples
Example 1: Total generalLedgerAccount Metrics
Calculate aggregate metrics across all generalLedgerAccount records:
query {
generalLedgerAccountViewConnection(first: 1) {
summary {
errorCode
errorMessage
metrics {
totalCount: count
}
}
}
}
Expected result structure:
{
"data": {
"generalLedgerAccountViewConnection": {
"summary": {
"errorCode": null,
"errorMessage": null,
"metrics": {
"totalCount": [1523]
}
}
}
}
}
Fields
This collection has 7 fields:
- 7 simple fields
- 0 enum fields (with predefined values)
- 0 parameterized fields (accept query options)
Simple Fields
account
A formatted, user-friendly display field that combines the account code and name into a single readable string. This field presents the general ledger account information in the format "code · name" (for example, "A0900 · Accounts Receivable" or "A1000 · COGS Account"), making it easy to identify accounts at a glance.
Label: Account
Sortable: No
code
The unique account code identifier for the general ledger account, typically a numeric or alphanumeric string (e.g., 'A0900', 'A0901', '121'). This field is used to identify and reference accounts in financial reports.
Label: Code
Sortable: No
glAccountUrl
The unique identifier for a general ledger account, serving as the primary key for the account record. This field is automatically generated by the server and uniquely identifies each general ledger account in the system.
Label: Account URL
Sortable: No
group
The top-level account category in the general ledger account taxonomy hierarchy. Each account belongs to a specific type and provides a high-level classification that determines how the account appears in financial statements and reports.
Label: Group
Sortable: No
name
The descriptive name of the general ledger account, providing a human-readable label that explains the account's purpose.
Label: Name
Sortable: No
type
The account taxonomy classification that categorizes this general ledger account within the chart of accounts hierarchy.
Label: Type
Sortable: No
usage
A computed field that displays where and how the general ledger account is currently being used throughout the system. This field presents this information as a comma-separated list of usage labels.
Label: Usage
Sortable: No
Relations
No relations available.
Filters
No filters available.
Updated 9 months ago.