Skip to content

feat(quickbooks): add master data and simple CRUD - #6119

Merged
BillLeoutsakosvl346 merged 19 commits into
feat/quickbooks-integrationfrom
feat/quickbooks-01-master-data
Aug 3, 2026
Merged

feat(quickbooks): add master data and simple CRUD#6119
BillLeoutsakosvl346 merged 19 commits into
feat/quickbooks-integrationfrom
feat/quickbooks-01-master-data

Conversation

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor

Summary

Adds the first stacked QuickBooks expansion on top of feat/quickbooks-integration:

  • Replaces List Vendors with one compact Master Data: Read operation for Account, Customer, Vendor, Item, and Employee records
  • Adds explicit create/update operations for Customers and Vendors
  • Adds explicit create/update operations for Service and Non-inventory Items
  • Preserves the existing Company Info, Purchase Order, and Bill operations
  • Keeps fixed entity mappings, bounded pagination, one request per action, no retries, and explicit SyncToken sparse updates
  • Updates the QuickBooks block, registries, metadata, generated integration catalog, and docs

The block now exposes exactly ten operations. This PR does not add arbitrary queries, filtering infrastructure, remote selectors, inventory/category writes, or new OAuth scopes.

Validation

  • Focused QuickBooks/block/OAuth/registry suites: 277 tests passed
  • Full Sim suite: 1,257 files and 16,960 tests passed
  • TypeScript type-check
  • Formatter and lint checks
  • Strict API-contract validation
  • Bare-icon validation
  • git diff --check
  • Integration validation and memory-load audits
  • Live Intuit sandbox reads for Account, Customer, Vendor, Item, and Employee
  • Live Customer and Vendor create/update/deactivate/reactivate lifecycles
  • Live Service and Non-inventory Item create/update lifecycles
  • Duplicate-name and stale-SyncToken faults verified
  • One HTTP request per tool execution verified

Sandbox note

The local environment had one connected QuickBooks company, so the existing multi-company isolation behavior was not re-exercised in this child PR. No credentials or unsanitized accounting records are committed.

Stack

  • Base: feat/quickbooks-integration at the frozen parent SHA 970d3b1e4
  • Head: feat/quickbooks-01-master-data

This PR must not be merged automatically.

@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

@BillLeoutsakosvl346
BillLeoutsakosvl346 marked this pull request as ready for review July 31, 2026 03:43
@cursor

cursor Bot commented Jul 31, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
Document routes handle OAuth tokens, user file access, and external Intuit download URLs; mitigations (pinned IP, size limits, auth) are in place but mistakes could affect live company data or file security.

Overview
Docs: The QuickBooks integration page is rewritten from a narrow read-only procurement scope to a full action catalog. It adds a manual intro (OAuth company binding, list/by-ID pagination, sparse SyncToken updates, void semantics, sandbox vs production, reports, and document limits) and documents many new actions—consolidated Read Master Data, customer/employee/vendor/item CRUD, sales and purchasing transaction reads and mutations, accounting, financial reports, email, PDF download, and attachment read/add/download—replacing older list-only sections like quickbooks_list_bills / quickbooks_list_vendors.

API: New internal tool routes implement download transaction PDF, add attachment (note JSON or multipart file with workspace file authorization and size caps), and download attachment (short-lived Intuit URL via DNS-validated pinned fetch, then store as execution or copilot files). Responses expose file metadata without raw bytes; faults are sanitized. Vitest coverage exercises auth order, PDF validation, multipart upload, SSRF-safe downloads, abort signals, and 413 limits.

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

Comment thread apps/sim/blocks/blocks/quickbooks.ts Outdated
@greptile-apps

greptile-apps Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds consolidated QuickBooks master-data reads and explicit customer, vendor, and item mutations.

  • Replaces the vendor-list operation with list/by-ID reads for accounts, customers, vendors, items, and employees.
  • Adds sparse create and update tools for customers, vendors, Service items, and Non-inventory items.
  • Updates block configuration, tool registries, output metadata, tests, generated integration metadata, and documentation.

Confidence Score: 4/5

This PR should not merge until legacy vendor-list workflows remain executable and Employee responses are filtered before entering workflow or agent output.

Removing the persisted operation ID creates wrong-tool or missing-tool execution paths, and raw Employee API objects can propagate sensitive fields that the public output schema intentionally omits.

Files Needing Attention: apps/sim/blocks/blocks/quickbooks.ts, apps/sim/tools/quickbooks/read_master_data.ts, apps/sim/tools/quickbooks/utils.ts, apps/sim/tools/quickbooks/types.ts

Security Review

Employee master-data reads pass raw QuickBooks records through the tool boundary, allowing sensitive fields such as SSN to reach workflow state, logs, clients, and LLM tool results. How this was verified: The Employee response type includes SSN, and the changed transform returns the unfiltered provider object directly through the executor.

Important Files Changed

Filename Overview
apps/sim/blocks/blocks/quickbooks.ts Expands the block to ten operations and maps their inputs, but removing the legacy vendor-list operation breaks persisted workflows.
apps/sim/tools/quickbooks/read_master_data.ts Adds list and by-ID reads for five entity types, including Employee records whose raw sensitive properties are not sanitized.
apps/sim/tools/quickbooks/utils.ts Adds shared entity, mutation, parsing, and validation helpers; the entity transform passes complete provider objects through unchanged.
apps/sim/tools/quickbooks/create_customer.ts Adds a bounded, non-retrying customer creation request with normalized optional fields.
apps/sim/tools/quickbooks/update_customer.ts Adds explicit SyncToken-based sparse customer updates and active-status changes.
apps/sim/tools/quickbooks/create_vendor.ts Adds vendor creation with normalized contact, address, account, and 1099 fields.
apps/sim/tools/quickbooks/update_vendor.ts Adds explicit SyncToken-based sparse vendor updates and active-status changes.
apps/sim/tools/quickbooks/create_item.ts Adds Service and Non-inventory item creation with account-reference and purchase-field validation.
apps/sim/tools/quickbooks/update_item.ts Adds sparse item updates with SyncToken concurrency control and numeric validation.
apps/sim/tools/quickbooks/types.ts Expands QuickBooks entity and output types, including sensitive Employee properties that can remain present at runtime.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Workflow[QuickBooks block] --> Selector{Operation}
  Selector --> Read[Master-data read]
  Selector --> Mutate[Customer, vendor, or item mutation]
  Read --> QB[QuickBooks Online API]
  Mutate --> QB
  QB --> Transform[Response transform]
  Transform --> Output[Workflow output]
Loading

Reviews (1): Last reviewed commit: "docs(quickbooks): document master data a..." | Re-trigger Greptile

Comment thread apps/sim/blocks/blocks/quickbooks.ts
Comment thread apps/sim/tools/quickbooks/utils.ts Outdated
Comment thread apps/sim/tools/quickbooks/read_master_data.ts
Comment thread apps/sim/tools/quickbooks/utils.ts
Comment thread apps/sim/lib/core/security/redaction.ts
Comment thread apps/sim/blocks/blocks/quickbooks.ts
Comment thread apps/sim/blocks/blocks/quickbooks.ts
Comment thread apps/sim/lib/core/security/redaction.ts
Comment thread apps/sim/blocks/blocks/quickbooks.ts
@BillLeoutsakosvl346
BillLeoutsakosvl346 force-pushed the feat/quickbooks-01-master-data branch from 64f660b to 74ad283 Compare August 3, 2026 20:59

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

Comment thread apps/sim/lib/core/security/redaction.ts
* 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>
@BillLeoutsakosvl346
BillLeoutsakosvl346 merged commit 161c8a7 into feat/quickbooks-integration Aug 3, 2026
3 of 4 checks passed
@waleedlatif1
waleedlatif1 deleted the feat/quickbooks-01-master-data 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