--- title: Sync with QuickBooks description: How your agent keeps QuickBooks matched to Doing Work on the shop's schedule. Free field service software for trade shops up to $1,000/month in payments. url: https://doingwork.work/docs/sync-quickbooks/ --- # Sync with QuickBooks Your agent can sync with QuickBooks. The sync runs through your agent's own QuickBooks connection, on the schedule you pick. Daily is a good default. You tell your agent which accounts and items to use, and it asks you about anything it can't match. Doing Work has no QuickBooks connection of its own. ## Each run - Call [sync.changes](https://doingwork.work/docs/reference/sync-changes/) with the `next_cursor` you saved last time. The first run can start from `updated_since`. Page until `has_more` is false, then save the last `next_cursor`. - Each row is one invoice, payment, refund or customer with its current details, so you never replay history. - If `external_refs` has a `quickbooks` id, update that QuickBooks record. If not, look for a match, create one if there is none, then call [sync.setRef](https://doingwork.work/docs/reference/sync-setref/) with the QuickBooks id. - A record can show up again in a later run. The saved id makes that safe: running the same sync twice changes nothing. - To catch anything missed, call sync.changes with `system=quickbooks` and `unsynced=true`. [sync.findRefs](https://doingwork.work/docs/reference/sync-findrefs/) goes from a QuickBooks id back to the Doing Work record. ## Match bank deposits List payouts with [payouts.list](https://doingwork.work/docs/reference/payouts-list/) and read each with [payouts.get](https://doingwork.work/docs/reference/payouts-get/). It lists every payment and refund in the payout with the processor fee, the Doing Work fee and the net. The nets add up to the deposit. Record both fees as expenses so the deposit, the invoices and the fees line up. The `payout.paid` event tells you when a new payout lands. Owner or office only. Amounts need the see_prices permission. ## Export your books If your agent syncs QuickBooks for you, keep using that. It keeps every invoice, payment and fee matched. For a bookkeeper, or if you import by hand, ask for a month of books with `books.export`. You get one ZIP with: - A ledger CSV: every invoice, void, payment, refund, fee and payout. - QuickBooks Online invoice import files. - QuickBooks Online bank upload files for a clearing account. - A README that says how to import each file. Fees are dated on the payout they came out of, so each payout adds up to what reached your bank. Asking for the same month again gives the same file. Payments imported from old software are left out unless you ask for them. Owner or office only, and amounts need the see_prices and see_costs permissions. `books.exports` lists past exports.