Skip to content

feat(quickbooks): add sales and accounts receivable - #6130

Merged
BillLeoutsakosvl346 merged 12 commits into
feat/quickbooks-01-master-datafrom
feat/quickbooks-02-sales
Aug 3, 2026
Merged

feat(quickbooks): add sales and accounts receivable#6130
BillLeoutsakosvl346 merged 12 commits into
feat/quickbooks-01-master-datafrom
feat/quickbooks-02-sales

Conversation

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor

Summary

Adds the second stacked QuickBooks PR with 15 bounded sales and accounts-receivable operations, bringing the block to 25 operations total.

  • Read estimates, invoices, sales receipts, customer payments, credit memos, and refund receipts by list or ID
  • Create and sparse-update the six supported sales transaction types
  • Void invoices and customer payments with explicit confirmation
  • Parse bounded sales lines and invoice allocations without raw QuickBooks payloads
  • Preserve native QuickBooks records, IDs, and SyncToken values
  • Add generated docs and accountant-focused metadata

Safety and contracts

  • Targets feat/quickbooks-01-master-data as a stacked PR
  • Uses fixed entity/resource mappings and one QuickBooks request per action
  • No arbitrary queries, retries, automatic pagination, deletes, email, tax administration, or raw payloads
  • Response bodies remain capped at 8 MiB; pages, lines, and allocations are capped at 100
  • Contracts were verified against Intuit documentation, official examples, and a connected sandbox using sanitized disposable records

Validation

  • 421 focused QuickBooks, OAuth, registry, and output tests passed
  • Direct Sim TypeScript check passed
  • Full format check passed
  • Full lint check passed with only two pre-existing fit.fit() false-positive warnings
  • Strict API-contract validation passed
  • Bare-icon validation passed
  • Documentation generation passed
  • git diff --check passed
  • Independent gpt-5.6-sol high-reasoning review against staging completed with no remaining actionable findings

Stack

@vercel

vercel Bot commented Jul 31, 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 11:54pm

Request Review

@greptile-apps

greptile-apps Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds 15 bounded QuickBooks sales and accounts-receivable operations.

  • Supports list and by-ID reads for estimates, invoices, sales receipts, customer payments, credit memos, and refund receipts.
  • Adds create and sparse-update operations for all six transaction types, plus confirmed void operations for invoices and customer payments.
  • Adds bounded sales-line and invoice-allocation parsing, block metadata, registry entries, workflow output types, focused tests, and generated documentation.

Confidence Score: 5/5

The PR appears safe to merge after its stacked base, with no actionable correctness or security defects identified.

The new operation identifiers, editor contracts, runtime parameter mappings, bounded parsers, request construction, response transformations, and registry entries remain aligned, and malformed or incomplete financial inputs are rejected before dispatch.

Important Files Changed

Filename Overview
apps/sim/tools/quickbooks/sales_utils.ts Adds strict bounded parsing and request-body construction for sales lines, payment allocations, creates, and sparse updates.
apps/sim/blocks/blocks/quickbooks.ts Exposes the new operations with coordinated parameter routing, conditional fields, and operation-specific outputs.
apps/sim/tools/quickbooks/read_sales_transactions.ts Implements fixed-mapping list and by-ID reads with bounded pagination and native transaction outputs.
apps/sim/tools/quickbooks/void_invoice.ts Adds explicitly confirmed invoice voiding while preserving the returned record ID and SyncToken.
apps/sim/tools/quickbooks/void_customer_payment.ts Adds explicitly confirmed customer-payment voiding through the payment update-and-void request contract.
apps/sim/tools/quickbooks/sales.test.ts Covers validation, payload construction, operation routing, response transformation, and void confirmation behavior.
apps/sim/tools/registry.ts Registers all newly added QuickBooks tools consistently with the block's allowed tool identifiers.

Sequence Diagram

sequenceDiagram
  participant Workflow
  participant Block as QuickBooks Block
  participant Tool as QuickBooks Tool
  participant QBO as QuickBooks Online
  Workflow->>Block: Select sales/receivables operation
  Block->>Block: Parse bounded lines, allocations, and parameters
  Block->>Tool: Dispatch registered operation
  Tool->>QBO: One authenticated read or mutation request
  QBO-->>Tool: Native transaction response
  Tool-->>Workflow: Bounded record, IDs, SyncToken, and pagination metadata
Loading

Reviews (1): Last reviewed commit: "fix(quickbooks): address independent sal..." | Re-trigger Greptile

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

bugbot run

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

bugbot run verbose=true

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

cursor review

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@cursor review

@cursor

cursor Bot commented Jul 31, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Document routes perform authenticated external fetches and user file I/O with size and SSRF mitigations; incorrect handling could leak files or accept malicious uploads, though the diff adds explicit guards and tests.

Overview
This PR massively expands the English QuickBooks integration docs and adds three internal API routes for transaction PDFs and attachments, with a large Vitest suite for those routes.

The docs now describe the full bounded QuickBooks block: OAuth company binding, list/by-ID reads with manual pagination, sparse updates, void semantics, sandbox vs production, financial reports, and document limits. They replace narrow list actions with unified read actions for sales, purchasing, and accounting transactions, document employee create/update, optional requestId on creates and optional activeStatus on updates, and catalog dozens of actions (estimates through journal entries, reports, email, PDF, attachments).

The new routes authenticate via internal auth, validate contracts, call Intuit (direct PDF or multipart upload for file attachments), enforce file size limits, tool file authorization on uploads, sanitize filenames, validate PDF bytes, and for attachment downloads resolve a temporary URL then fetch via DNS-validated pinned IP before storing files as execution or copilot uploads. Requests honor abort signals so cancelled workflows do not persist partial downloads.

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

Comment thread apps/sim/tools/quickbooks/read_sales_transactions.ts Outdated
Comment thread apps/sim/tools/quickbooks/sales_utils.ts Outdated

@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 ad88f00. Configure here.

Comment thread apps/sim/blocks/blocks/quickbooks.ts
* feat(quickbooks): add safe purchasing and payables tools

* feat(quickbooks): expose purchasing and payables operations

* docs(quickbooks): document purchasing and payables tools

* fix(quickbooks): require current purchase payment type

* fix(quickbooks): allow rounded purchasing line totals

* fix(quickbooks): generate purchasing arrays correctly

* fix(quickbooks): validate bill payment accounts

* fix(quickbooks): validate bill allocations before account lookup

* chore(tools): sync purchasing metadata

* fix(quickbooks): sanitize bill payment faults

* feat(quickbooks): add general accounting operations (#6185)

* feat(quickbooks): add accounting transaction tools

* feat(quickbooks): expose accounting operations

* docs(quickbooks): generate accounting catalog

* fix(quickbooks): preserve accounting amount precision

* fix(quickbooks): balance journal entries in exact cents

* fix(quickbooks): include account in deposit updates

* chore(quickbooks): sync accounting catalog

* feat(quickbooks): add observable PO-to-bill linking (#6194)

* feat(quickbooks): link bills to purchase order lines

* docs(quickbooks): document observable bill linking

* fix(quickbooks): document purchase order link identifiers

* fix(quickbooks): keep shared line example valid

* chore(quickbooks): sync bill linking catalog

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

* feat(quickbooks): add verified financial report contracts

* feat(quickbooks): expose reports in block and catalog

* test(quickbooks): cover null report filters

* fix(quickbooks): expose report header time

* chore(quickbooks): sync reports catalog

* feat(quickbooks): add documents and attachments (#6200)

* feat(quickbooks): add document and attachment tools

* feat(quickbooks): add bounded document file routes

* feat(quickbooks): expose document workflows

* fix(quickbooks): enforce attachment upload bounds

* fix(quickbooks): tighten document handling

* fix(quickbooks): align file response limits

* test(quickbooks): cover missing PDF content type

* test(quickbooks): cover attachment MIME fallback

* fix(quickbooks): redact attachment access URLs

* fix(quickbooks): store downloaded documents safely

* fix(quickbooks): stop cancelled attachment downloads

* fix(quickbooks): correct document schemas and upload bytes

* chore(quickbooks): sync document catalog

* feat(quickbooks): add accountant filters (#6208)

* feat(quickbooks): add safe n8n parity tools

* feat(quickbooks): expose accountant parity options

* fix(quickbooks): address parity review findings

* fix(quickbooks): require recipient for payment email

* chore(quickbooks): sync parity catalog

---------

Co-authored-by: Bill Leoutsakos <billleoutsakos@Bills-MacBook-Pro.local>

---------

Co-authored-by: Bill Leoutsakos <billleoutsakos@Mac.localdomain>
Co-authored-by: Bill Leoutsakos <billleoutsakos@Bills-MacBook-Pro.local>

---------

Co-authored-by: Bill Leoutsakos <billleoutsakos@Mac.localdomain>
Co-authored-by: Bill Leoutsakos <billleoutsakos@Bills-MacBook-Pro.local>

---------

Co-authored-by: Bill Leoutsakos <billleoutsakos@Mac.localdomain>
Co-authored-by: Bill Leoutsakos <billleoutsakos@Bills-MacBook-Pro.local>

---------

Co-authored-by: Bill Leoutsakos <billleoutsakos@Bills-MacBook-Pro.local>
Co-authored-by: Bill Leoutsakos <billleoutsakos@Mac.localdomain>

---------

Co-authored-by: Bill Leoutsakos <billleoutsakos@Mac.localdomain>
Co-authored-by: Bill Leoutsakos <billleoutsakos@Bills-MacBook-Pro.local>
@BillLeoutsakosvl346
BillLeoutsakosvl346 merged commit 6e42e48 into feat/quickbooks-01-master-data Aug 3, 2026
3 of 4 checks passed
BillLeoutsakosvl346 added a commit that referenced this pull request Aug 3, 2026
* feat(quickbooks): add master data and CRUD tools

* feat(quickbooks): expose compact master data operations

* docs(quickbooks): document master data actions

* fix(quickbooks): harden master data outputs

* fix(redaction): preserve workflow state tokens

* fix(quickbooks): address integration review findings

* fix(quickbooks): align item updates and generated docs

* fix(quickbooks): sanitize customer tax identifiers

* fix(quickbooks): preserve read-write compatibility

* fix(quickbooks): use action-first operation labels

* test(quickbooks): align operation label expectations

* fix(quickbooks): align catalog operation labels

* fix(redaction): cover namespaced secret fields

* fix(quickbooks): expose master data pagination metadata

* fix(quickbooks): omit null optional values

* fix(quickbooks): validate master data inputs

* chore(tools): sync master data metadata

* fix(redaction): anchor workflow token allowlist

* feat(quickbooks): add sales and accounts receivable (#6130)

* feat(quickbooks): add bounded sales transaction reads

* feat(quickbooks): add sales and receivables mutations

* feat(quickbooks): expose sales operations in the block

* fix(quickbooks): address independent sales review

* fix(quickbooks): address final integration review

* fix(quickbooks): clarify master data output metadata

* fix(quickbooks): mark sales pagination outputs optional

* fix(quickbooks): validate calculated sales amounts

* fix(quickbooks): generate sales arrays correctly

* fix(quickbooks): align sales metadata conditions

* chore(tools): sync sales metadata

* feat(quickbooks): add purchasing and payables (#6159)

* feat(quickbooks): add safe purchasing and payables tools

* feat(quickbooks): expose purchasing and payables operations

* docs(quickbooks): document purchasing and payables tools

* fix(quickbooks): require current purchase payment type

* fix(quickbooks): allow rounded purchasing line totals

* fix(quickbooks): generate purchasing arrays correctly

* fix(quickbooks): validate bill payment accounts

* fix(quickbooks): validate bill allocations before account lookup

* chore(tools): sync purchasing metadata

* fix(quickbooks): sanitize bill payment faults

* feat(quickbooks): add general accounting operations (#6185)

* feat(quickbooks): add accounting transaction tools

* feat(quickbooks): expose accounting operations

* docs(quickbooks): generate accounting catalog

* fix(quickbooks): preserve accounting amount precision

* fix(quickbooks): balance journal entries in exact cents

* fix(quickbooks): include account in deposit updates

* chore(quickbooks): sync accounting catalog

* feat(quickbooks): add observable PO-to-bill linking (#6194)

* feat(quickbooks): link bills to purchase order lines

* docs(quickbooks): document observable bill linking

* fix(quickbooks): document purchase order link identifiers

* fix(quickbooks): keep shared line example valid

* chore(quickbooks): sync bill linking catalog

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

* feat(quickbooks): add verified financial report contracts

* feat(quickbooks): expose reports in block and catalog

* test(quickbooks): cover null report filters

* fix(quickbooks): expose report header time

* chore(quickbooks): sync reports catalog

* feat(quickbooks): add documents and attachments (#6200)

* feat(quickbooks): add document and attachment tools

* feat(quickbooks): add bounded document file routes

* feat(quickbooks): expose document workflows

* fix(quickbooks): enforce attachment upload bounds

* fix(quickbooks): tighten document handling

* fix(quickbooks): align file response limits

* test(quickbooks): cover missing PDF content type

* test(quickbooks): cover attachment MIME fallback

* fix(quickbooks): redact attachment access URLs

* fix(quickbooks): store downloaded documents safely

* fix(quickbooks): stop cancelled attachment downloads

* fix(quickbooks): correct document schemas and upload bytes

* chore(quickbooks): sync document catalog

* feat(quickbooks): add accountant filters (#6208)

* feat(quickbooks): add safe n8n parity tools

* feat(quickbooks): expose accountant parity options

* fix(quickbooks): address parity review findings

* fix(quickbooks): require recipient for payment email

* chore(quickbooks): sync parity catalog

---------

Co-authored-by: Bill Leoutsakos <billleoutsakos@Bills-MacBook-Pro.local>

---------

Co-authored-by: Bill Leoutsakos <billleoutsakos@Mac.localdomain>
Co-authored-by: Bill Leoutsakos <billleoutsakos@Bills-MacBook-Pro.local>

---------

Co-authored-by: Bill Leoutsakos <billleoutsakos@Mac.localdomain>
Co-authored-by: Bill Leoutsakos <billleoutsakos@Bills-MacBook-Pro.local>

---------

Co-authored-by: Bill Leoutsakos <billleoutsakos@Mac.localdomain>
Co-authored-by: Bill Leoutsakos <billleoutsakos@Bills-MacBook-Pro.local>

---------

Co-authored-by: Bill Leoutsakos <billleoutsakos@Bills-MacBook-Pro.local>
Co-authored-by: Bill Leoutsakos <billleoutsakos@Mac.localdomain>

---------

Co-authored-by: Bill Leoutsakos <billleoutsakos@Mac.localdomain>
Co-authored-by: Bill Leoutsakos <billleoutsakos@Bills-MacBook-Pro.local>

---------

Co-authored-by: Bill Leoutsakos <billleoutsakos@Bills-MacBook-Pro.local>
Co-authored-by: Bill Leoutsakos <billleoutsakos@Mac.localdomain>

---------

Co-authored-by: Bill Leoutsakos <billleoutsakos@Bills-MacBook-Pro.local>
Co-authored-by: Bill Leoutsakos <billleoutsakos@Mac.localdomain>
@waleedlatif1
waleedlatif1 deleted the feat/quickbooks-02-sales branch August 4, 2026 02:29
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