Skip to content

Skill: Query GL Detail

The Query GL Detail skill retrieves aggregated general ledger detail records from Sage Intacct. This is the primary skill for answering questions about journal entries, account balances, and ledger activity across any dimension.

Parameter Type Required Description
group_by string Yes How to group results. Options: glaccount, department, location, vendor, customer, project, class, item, employee. Multiple values can be comma-separated.
start_date string Yes Start of the date range on BATCH_DATE (YYYY-MM-DD). GL detail queries require a date range.
end_date string Yes End of the date range on BATCH_DATE (YYYY-MM-DD).
module_key string No Filter by module (e.g., 2.AP for Accounts Payable, 3.AR for Accounts Receivable, 1.GL for General Ledger).
book_id string No Filter by book ID. Use ACCRUAL or CASH to select the accounting basis, or a custom book ID.
journal_symbol string No Filter by journal symbol (e.g., APJ for AP Journal, ARJ for AR Journal, GJ for General Journal).
glaccount string No Filter by GL account number.
department_id string No Filter by department ID.
location_id string No Filter by location ID.
vendor_id string No Filter by vendor ID.
customer_id string No Filter by customer ID.
project_id string No Filter by project ID.
class_id string No Filter by class ID.
employee_id string No Filter by employee ID.
offset integer No Number of records to skip for pagination. Defaults to 0.
limit integer No Maximum number of grouped records to return. Defaults to 100.

The skill automatically computes these aggregates for each group:

Aggregate Description
SUM(AMOUNT) Net amount (debits positive, credits negative) in base currency.
SUM(TRX_AMOUNT) Net amount in transaction currency.
COUNT(RECORDNO) Number of GL detail records in the group.

“What’s the GL activity for each department this month?”

The agent would invoke:

  • group_by: department
  • start_date: 2026-03-01
  • end_date: 2026-03-18

“Show me all AP journal entries to account 6000 in Q4 last year.”

The agent would invoke:

  • group_by: glaccount
  • start_date: 2025-10-01
  • end_date: 2025-12-31
  • module_key: 2.AP
  • glaccount: 6000

The skill returns an array of grouped records, each containing:

  • Group key(s) — the dimension value(s) used for grouping.
  • SUM_AMOUNT — net base-currency amount for the group.
  • SUM_TRX_AMOUNT — net transaction-currency amount.
  • COUNT_RECORDNO — number of journal entry lines in the group.

POST /api/sage-intacct/v1.0/query-gldetail


Related skills: Query GL Budget Items | Query AP Bill Items | Query AR Invoice Items