Skip to content

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

Open
BillLeoutsakosvl346 wants to merge 8 commits into
feat/quickbooks-01-master-datafrom
feat/quickbooks-02-sales
Open

feat(quickbooks): add sales and accounts receivable#6130
BillLeoutsakosvl346 wants to merge 8 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.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Jul 31, 2026 9:43pm

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
Creates and voids live QuickBooks financial records in production credentials; validation and bounded inputs reduce risk but incorrect workflows could still post bad payments or voids.

Overview
Expands the QuickBooks block from 10 to 25 operations with bounded sales and receivables workflows (estimates, invoices, sales receipts, customer payments, credit memos, refund receipts), while keeping existing purchase-order and bill list reads.

New capabilities include list/by-ID sales transaction reads, create and sparse-update for the six document types, and void for invoices and payments with explicit confirmVoid. Shared sales_utils validates bounded JSON lines and invoice allocations (no raw QuickBooks payloads), builds request bodies, and enforces caps (100 lines/allocations, 8 MiB responses). Create actions for master data and sales now accept optional Intuit requestId idempotency on the query string.

The block UI gains matching sub-blocks (transaction type, lines, payment fields, void confirmation) and output conditions now support or branches so list pagination outputs show for master-data, sales list reads, and PO/bill lists. Docs, integrations.json, block meta prompts/skills, and tests are updated accordingly; assertQuickBooksCompanyInfo centralizes company validation in the client and get-company-info tool.

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

Comment thread apps/sim/tools/quickbooks/read_sales_transactions.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 cb1e5a7. Configure here.

Comment thread apps/sim/tools/quickbooks/sales_utils.ts Outdated
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