Accounting integrations have an unforgiving property: every mistake is visible to an accountant eventually. When a client asked us to replace their QuickBooks Desktop Web Connector integration with QuickBooks Online, we designed for the failure cases first.
1. Tokens rotate, so plan for it
QuickBooks Online uses OAuth 2.0 with rotating refresh tokens: each refresh returns a new refresh token, and the old one stops working. If you refresh successfully but fail to save the new token, you are locked out until a human reconnects. We persist the new token atomically before using the access token, so the sync can run unattended for months.
2. Decide what syncs which way
Not everything should be two-way. We settled on:
- Two-way: Customers/Jobs, Vendors, Employees, Items, Classes and Accounts, tracked with NeedsPush/NeedsPull flags.
- One-way push: Purchase Orders, Time Activities, Journal Entries and Inventory Adjustments.
Transactions with missing required fields are held back rather than failing the whole run, and they show up in the run summary.
3. Never move the checkpoint past a failure
Incremental sync means "give me everything changed since the last checkpoint." The subtle bug is moving the checkpoint forward after a partially failed run, which silently skips records forever. Our checkpoint moves only when a run has zero failures, and we query with a small safety buffer to catch clock skew.
4. Match existing data before the first sync
Both systems already had customers. Blindly pushing would have created duplicates. We built duplicate detection plus resolution of the Customer → Job → Phase hierarchy. 192 of 194 records linked automatically, with none left unresolved.
5. Give operations a way in
Per-entity toggles, a configurable interval, an on-demand trigger from the legacy app, two small admin screens, run summaries and exit codes for monitoring. The best integration is one nobody has to think about, but when someone does need to, everything should be visible.
Planning a QuickBooks, PayPal or Stripe integration? We can help.