Skip to content

feat(quickbooks): add accountant-focused financial reports - #6197

Open
BillLeoutsakosvl346 wants to merge 4 commits into
feat/quickbooks-04a-po-bill-linkingfrom
feat/quickbooks-05-reports
Open

feat(quickbooks): add accountant-focused financial reports#6197
BillLeoutsakosvl346 wants to merge 4 commits into
feat/quickbooks-04a-po-bill-linkingfrom
feat/quickbooks-05-reports

Conversation

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor

Summary

  • add one compact Run Financial Report operation backed by 14 sandbox-verified QuickBooks reports
  • support verified date, accounting-basis, summarization, entity, and aging controls through a fixed per-report matrix
  • add Class and Department to Read Master Data so report filter IDs are discoverable
  • preserve native QuickBooks report headers, columns, nested rows, summaries, IDs, and links

Scope decisions

  • General Ledger is omitted because the sandbox returned QBO permission fault 5020 for GeneralLedgerDetail
  • transaction-type filtering is omitted because the tested parameter was silently ignored rather than proven
  • custom columns, multi-ID filters, Transaction List, and Inventory Valuation remain follow-up work
  • no OAuth, API-route, retry, pagination, caching, or mutation behavior was added

Safety

  • fixed report endpoints only; unsupported report/filter combinations fail before fetch
  • one GET per execution with retries disabled
  • existing minorversion=75, sandbox/production host selection, OAuth headers, fault handling, and 8 MiB response cap are reused
  • empty native reports remain successful; malformed report wrappers fail clearly

Validation

  • 13 QuickBooks-related test files / 515 tests
  • live sandbox contract proof for all 14 reports and Class/Department; final-code smoke for Profit and Loss and A/P Aging Summary
  • independent gpt-5.6-sol high-reasoning full-stack review against staging: no actionable findings
  • TypeScript, format, lint, tool metadata, docs, API validation, bare icons, client boundaries, and git diff --check

Stack

  • base: feat/quickbooks-04a-po-bill-linking
  • this PR is intentionally stacked and must not be merged before its parent

@vercel

vercel Bot commented Aug 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview Aug 3, 2026 8:00am

Request Review

@cursor

cursor Bot commented Aug 2, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Read-only report calls reuse existing OAuth and caps, but the change expands financial-reporting surface area and report filter handling; incorrect matrix wiring could send wrong parameters to live QuickBooks companies.

Overview
Adds Run Financial Report to the QuickBooks block: 14 fixed reports (balance sheet, P&L, trial balance, cash flow, aging, customer/vendor balance, sales, expenses) with native header, columns, and nested rows in the response. Report-specific advanced controls (dates, cash/accrual basis, summarize-by, entity filters, aging) only appear when QuickBooks supports them for that report type.

Read Master Data now includes Class and Department record types (with SubClass / SubDepartment on outputs) so workflows can discover IDs for report filters.

Block wiring maps UI sub-blocks to tool params via a per-report control matrix; unsupported combinations are omitted before the API call. Docs, integrations.json, block skills, and example workflow prompts are updated toward financial reporting and aging workflows instead of some prior purchase/expense-focused examples.

Reviewed by Cursor Bugbot for commit fc1bfdc. Bugbot is set up for automated code reviews on this repo. Configure here.

@greptile-apps

greptile-apps Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR adds a bounded QuickBooks financial-report operation covering 14 report types and extends master-data discovery with Class and Department.

  • Defines a fixed report endpoint and supported-control matrix with date, accounting-basis, summarization, entity-filter, and aging validation.
  • Preserves native QuickBooks report headers, columns, nested rows, IDs, and links in workflow outputs.
  • Registers the new tool across the QuickBooks block, tool registry, generated metadata, documentation, and tests.
  • Adds Class and Department list/by-ID reads so workflows can discover report-filter identifiers.

Confidence Score: 5/5

The PR appears safe to merge after its stated parent branch, with no concrete changed-code failure identified.

The report operation is consistently wired through the block, registry, request builder, response contract, generated metadata, documentation, and tests, while unsupported controls are rejected or discarded before the outbound request.

Important Files Changed

Filename Overview
apps/sim/tools/quickbooks/utils.ts Adds the fixed report matrix, validation, URL construction, native response transformation, and Class/Department entity mappings without an accepted defect.
apps/sim/tools/quickbooks/run_financial_report.ts Defines a bounded OAuth-backed GET tool with retries disabled, an 8 MiB response limit, and structured native report outputs.
apps/sim/blocks/blocks/quickbooks.ts Adds report-specific controls, visibility rules, post-resolution parameter coercion, stale-control filtering, and conditional outputs.
apps/sim/tools/quickbooks/types.ts Adds report, Class, and Department contracts plus nested output metadata aligned with the new operation.
apps/sim/tools/quickbooks/read_master_data.ts Extends the existing master-data reader to expose Class and Department through the established list and by-ID paths.
apps/sim/tools/quickbooks/reports.test.ts Covers all report endpoints, supported controls, validation failures, output preservation, response limits, UI conditions, and master-data discovery.
apps/sim/tools/registry.ts Registers the new financial-report tool consistently with the block access list and QuickBooks barrel export.
apps/docs/content/docs/en/integrations/quickbooks.mdx Documents report inputs, native outputs, Class/Department discovery, and the intended performance guidance.

Sequence Diagram

sequenceDiagram
  participant Workflow
  participant Block as QuickBooks Block
  participant Tool as Financial Report Tool
  participant QBO as QuickBooks Online
  Workflow->>Block: report type and supported controls
  Block->>Block: resolve values, coerce aging days, discard stale controls
  Block->>Tool: normalized report parameters and OAuth credential
  Tool->>Tool: validate support matrix and construct fixed URL
  Tool->>QBO: bounded GET, retries disabled
  QBO-->>Tool: native Header, Columns, Rows
  Tool->>Tool: validate report wrapper
  Tool-->>Workflow: preserved native report output
Loading

Reviews (1): Last reviewed commit: "feat(quickbooks): expose reports in bloc..." | Re-trigger Greptile

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 1edbb50. Configure here.

Comment thread apps/sim/blocks/blocks/quickbooks.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant