Matthew Jeter M. Ziemba

Desktop accounting connector

Connects a QuickBooks Desktop company file to HubSpot through the Web Connector’s SOAP protocol, for sales by trade and sales recognized in the month each line was sold.

For
A residential roofing and solar contractor
When
February 2026 to now
Status
In production since June 2026
Role
Sole developer and operator, infrastructure included

Data paths and guards

Slack alertsSync queueWeb ConnectorQuickBooks DesktopSlack alertsSync queueWeb ConnectorQuickBooks DesktopSOAP serverPolls every 5 minutesqbXML requestsEach requestClaims, state, crosswalkMatched records and rollupsHubSpotWebhooks and settingsThrottled alertsTransport-fault loggingModified-date watermarksServe-count breakerWrites gated offRead-back before linking SlackSync queueWeb ConnectorQuickBooksSlackSync queueWeb ConnectorQuickBooksSOAPabcdeHubSpotfg
  1. HubSpot: Deals, line items and contacts; the deal card and the settings app.
  2. Slack alerts: Throttled alerts on sync errors, dead letters, stale work and Web Connector sign-ins.
  3. SOAP server: Node.js on Vercel: the SOAP endpoint, webhooks, settings routes and 4 crons.
  4. Sync queue: Queue, claims, watermarks, dead letters, session state and the record crosswalk, in 12 tables.
  5. Web Connector: QuickBooks’ own Web Connector on the client’s PC; it calls the server, never the other way round.
  6. QuickBooks Desktop: The company file: customers, jobs, invoices, estimates, bills and items.
  7. From Web Connector to SOAP server: Polls every 5 minutes. Sign-in, a request for work, then each qbXML response. The Web Connector’s own timer, every 5 minutes.
  8. From SOAP server to Web Connector: qbXML requests. Queued queries built from 29 qbXML templates, limited by modified-date watermark. Each poll that asks for work.
  9. From Web Connector to QuickBooks Desktop: Each request. qbXML queries run against the company file. Each request the server serves.
  10. From SOAP server to Sync queue: Claims, state, crosswalk. Queue claims, session state, watermarks, dead letters and the id crosswalk. Every SOAP call and every cron.
  11. From SOAP server to HubSpot: Matched records and rollups. Customer links, line items, sales by month and by trade, and job-cost fields. Each mapped response.
  12. From HubSpot to SOAP server: Webhooks and settings. Deal, line item, contact and company changes, and actions from the settings app. Signed HubSpot webhooks, and settings actions.
  13. From SOAP server to Slack alerts: Throttled alerts. Sync errors, new dead letters, stale work and Web Connector sign-ins, each held to a cooldown. A failed sync, a new dead letter, or the 30-minute health check.
  14. On Polls every 5 minutes: Transport-fault logging. Every failed SOAP exchange is logged with its cause, so a parser fault shows the first time it happens.
  15. On qbXML requests: Modified-date watermarks. Each poll asks only for records changed since the last watermark, with a short overlap.
  16. On Claims, state, crosswalk: Serve-count breaker. A request served too many times goes to dead letters, and create-once requests keep their count across retries.
  17. On Each request: Writes gated off. Production serves only read queries: all 67,448 completed operations were reads. The write path is built and gated.
  18. On Matched records and rollups: Read-back before linking. A proposed customer link is written only after a HubSpot read-back confirms it.
  • Built by me
  • Platforms I connect to
  • Guards
  • In production

Data paths
Polls every 5 minutes Sign-in, a request for work, then each qbXML response
qbXML requests Queued queries built from 29 qbXML templates, limited by modified-date watermark
Each request qbXML queries run against the company file
Claims, state, crosswalk Queue claims, session state, watermarks, dead letters and the id crosswalk
Records in HubSpot
Matched records and rollups Customer links, line items, sales by month and by trade, and job-cost fields
Webhooks and settings Deal, line item, contact and company changes, and actions from the settings app
Throttled alerts Sync errors, new dead letters, stale work and Web Connector sign-ins, each held to a cooldown
  1. Systems

    QuickBooks Desktop has no cloud API. Its Web Connector, on the client’s PC, calls out to a SOAP server on Vercel functions, which keeps its queue and state in Supabase Postgres and its alerts in Slack. The business runs in HubSpot.

  2. Data paths

    Every 5 minutes the Web Connector signs in and asks for work. The server claims queued qbXML queries from 29 templates and serves them; the connector runs each one against the company file and returns the result.

    • a Polls every 5 minutes
    • b qbXML requests
    • c Each request
    • d Claims, state, crosswalk
  3. Records in HubSpot

    Responses become matched customers, line items, sales by month and by trade, and job-cost fields in HubSpot. Signed webhooks and the settings app send changes and setup back to the queue. Failures post to Slack, throttled so one fault cannot flood the channel.

    • e Matched records and rollups
    • f Webhooks and settings
    • g Throttled alerts
  4. Guards

    Faults are logged on first sight, polls ask only for changes, and a request that keeps failing goes to dead letters. Writes to the ledger stay gated off, and no customer link is written before a read-back.

    • Transport-fault logging on a
    • Modified-date watermarks on b
    • Serve-count breaker on d
    • Writes gated off on c
    • Read-back before linking on e
  5. Result

    Sales recognition reconciles to the cent across 3,709 deals, 5,078 past line items now carry a trade, and no record has ever been written to QuickBooks.

A decades-old desktop ledger with no cloud API

The contractor keeps its books in a QuickBooks Desktop company file and runs the business in HubSpot, with 40,000+ deals. QuickBooks Desktop has no cloud API and no native HubSpot connector. Finance needed sales by trade, sales counted in the month each line was sold, and job costing.

What I built

What the guards protect against

The risk The guard
A failing session reads as healthy on the dashboards. Transport-fault logging Every failed SOAP exchange is logged with its cause, so a parser fault shows the first time it happens.
A full re-read each cycle locks the QuickBooks file. Modified-date watermarks Each poll asks only for records changed since the last watermark, with a short overlap.
A failing request is served forever, or a create is retried into a duplicate. Serve-count breaker A request served too many times goes to dead letters, and create-once requests keep their count across retries.
A create retried after a dropped connection posts twice to a live ledger. Writes gated off Production serves only read queries: all 67,448 completed operations were reads. The write path is built and gated.
A rule matches on a first name alone and links the wrong customer. Read-back before linking A proposed customer link is written only after a HubSpot read-back confirms it.

Decisions

  1. Ask QuickBooks only for what changed

    Chose
    Each poll asks for the records changed since a modified-date watermark.
    Instead of
    Re-reading every customer and job each cycle. A full re-read is about 23K records each cycle and about 15,000 queries a day, and it holds the client’s QuickBooks file locked.
    Trade-off
    Each poll re-reads a 2-day overlap, and a poll with no starting point defaults to 2 years, never the whole file.
  2. Check every customer match before linking it

    Chose
    Proposed links are previewed first and written only after a HubSpot read-back confirms them.
    Instead of
    Writing the links the match rules propose. A rule can rest on one weak signal, such as a first name alone, and a wrong link puts one customer’s books on another’s record.
    Trade-off
    Links wait for review instead of writing themselves; the first seeding wrote 117.
  3. Two date rules, and no default

    Chose
    Encoded both date rules for when a line counts as sold, and made the backfill script refuse to run on a default.
    Instead of
    One date rule for every line. One date on every line of a deal folds added sales into the original sale, so the split finance asked for would show nothing added.
    Trade-off
    Every backfill has to name its date source before it runs.

Results

  • Sales recognition reconciled to the cent across 3,709 deals, with 0 reconciliation failures.
  • 5,078 past line items classified into 11 trades with 0 failed, taking the classified share from 0% to 73.7%.
  • Sales by trade and month on 3,548 closed deals, with 77.4% of their value classified.
  • Job costing given its first input: costs from 1,340 permits, summed onto their deals.

Kept from this build: an empty result is not an error. QuickBooks answers “no match” with status 1, so the connector reads the severity, and tests pinned to real responses prove true errors still fail.

Facts

  • On the first day of data, one Web Connector session completed 398 of 398 requests
  • 13,372 of 13,486 lines carried a sales date (99.15%) at the August spec check
  • At the trade backfill, trade columns plus Untraded added up to the total on all 3,713 deals, 0 violations
  • 836 tests, run on Node’s own test runner with no test dependencies
  1. Two-way ERP sync

    Date: Aug 2026

    Fact: 11,598 deals linked to the ERP

    Client: For a commercial roofing contractor

    Systems: Dataforma

    Status: In production

  2. QuickBooks job costing

    Date: Aug 2026

    Fact: On day one of a 3-day hackathon, an invoice posted through the approval gate

    Client: For contractors on HubSpot (a hackathon build)

    Systems: QuickBooks Online, Stripe and Claude

    Status: Active

  3. Per-trade deal budgets

    Date: Feb 2026

    Fact: Revenue, material and labor budgets across 11 trades

    Client: For a residential roofing and exteriors contractor

    Systems: SumoQuote and Zuper

    Status: In production