Skip to main content

QuickBooks Integration

Overview of the QuickBooks Online (QBO) integration — daily ETL extracts and the ACH Remittance workflow.

What's in this section

  • QuickBooks ETL — Daily extract of 11 QB entities to PostgreSQL via Prefect
  • ACH Remittance — Automated daily ACH payment emails to vendors

ETL Overview

The quickbooks-etl project extracts data from QuickBooks Online daily to PostgreSQL (wasteology_dev, qbo schema). It runs on the enevo-aci-pool work pool in the Production Azure subscription.

Deployments

DeploymentScheduleDescription
qbo-daily-extractDaily 6:00 AM UTCFull extract of all 11 QBO entities
qbo-full-refreshManual onlyNuclear option — rebuild from scratch

Both deployments use full extraction mode. Incremental extraction was abandoned due to data loss risk — QB entities don't all support reliable watermarks.

Entities Extracted

EntityQB ObjectPostgreSQL Table
AccountsChart of accountsqbo.stg_qbo_accounts
VendorsAP vendorsqbo.stg_qbo_vendors
CustomersAR customersqbo.stg_qbo_customers
BillsAP billsqbo.stg_qbo_bills
Bill PaymentsACH/check paymentsqbo.stg_qbo_bill_payments
InvoicesAR invoicesqbo.stg_qbo_invoices
PurchasesPO/expenseqbo.stg_qbo_purchases
TransfersBank transfersqbo.stg_qbo_transfers
Journal EntriesJEqbo.stg_qbo_journal_entries
DepositsBank depositsqbo.stg_qbo_deposits
Vendor CreditsAP creditsqbo.stg_qbo_vendor_credits

Credential Strategy

QBO credentials follow a mixed strategy (see Prefect — Deploying a Flow):

CredentialHow storedWhy
QBO_CLIENT_ID, QBO_CLIENT_SECRET, QBO_REALM_IDKV-injected literalsStatic — never change during flow run
QBO_ACCESS_TOKEN, QBO_REFRESH_TOKENPrefect block refsFlow writes refreshed tokens back on every run
DB passwordsKV-injected literalsStatic

Dashboard

The QuickBooks page in Palantiri provides: ACH payment validation, vendor contact management, and financial views.

Running a Full Refresh

Use qbo-full-refresh when data looks inconsistent or a QB entity was backfilled:

  1. Go to app.prefect.cloudDeployments
  2. Find qbo-full-refresh
  3. Click RunQuick Run
  4. Monitor in Flow Runs — typically takes 5–15 minutes
warning

A full refresh truncates and reloads all tables. Don't run during business hours if downstream reports are in use.

Source Repo

~/projects/quickbooks-etl — ADO: dev.azure.com/wasteology/Wasteology/_git/quickbooks-etl