ml-connector
QuickBooks OnlineTwilio

QuickBooks Online and Twilio integration

QuickBooks Online manages your business accounting and financial records. Twilio manages your communications: SMS, voice calls, and messaging at scale. Connecting them means your customer contact data in QuickBooks automatically flows into Twilio for outbound campaigns and alerts, and every SMS or call Twilio processes can be logged into QuickBooks Online as a transaction record for billing and auditing. Communications and accounting stay synchronized without manual data entry or separate record-keeping.

How QuickBooks Online works

QuickBooks Online exposes customers, vendors, employees, invoices, bills, accounts, journal entries, and reference data through the REST Accounting API v3. Webhooks push entity changes (Create, Update, Delete, Merge, Void) for most core entities, though payloads contain only the entity ID and operation, requiring a follow-up fetch for full details. A Change Data Capture (CDC) endpoint at /cdc also polls changes within the last 30 days. Authentication uses OAuth 2.0 Authorization Code flow with short-lived access tokens (1 hour) and rotating refresh tokens. Each customer connection stores the realm_id (company identifier) and must re-authenticate if the refresh token rotates stale.

How Twilio works

Twilio is a communications platform offering REST APIs for SMS, MMS, voice calls, and messaging services. It authenticates with HTTP Basic Auth using Account SID and Auth Token, or with API Key credentials for fine-grained access control. Twilio pushes webhooks for message events (incoming, status changes such as sent, delivered, or failed) and call events (incoming, status changes such as answered or completed). Twilio does not expose financial entities such as invoices, purchase orders, GL accounts, or vendors: it is a messaging platform, not an ERP. Webhook handlers must be idempotent and handle retries gracefully.

What moves between them

Customer and vendor records flow from QuickBooks Online into Twilio, so Twilio contact lists stay synchronized with your QuickBooks customer base. Twilio message and call activity flows back into QuickBooks Online as service transactions: each SMS or call is logged as a journal entry or invoice line item allocated to the appropriate QuickBooks account for communications expense. The flow is bidirectional for reference data and unidirectional (Twilio into QBO) for activity records. Sync cadence is on demand or on a daily schedule.

How ml-connector handles it

ml-connector stores both credential sets encrypted: the QuickBooks OAuth 2.0 refresh token (refreshed automatically before expiry) and the Twilio Account SID with Auth Token. On the QuickBooks side, it uses the CDC endpoint to poll for customer and vendor changes in batches, since QuickBooks webhook payloads contain only entity IDs and require full-record fetches. Those customer and vendor records are then written to Twilio's contact database within a messaging service. On the Twilio side, ml-connector accepts webhook callbacks for incoming messages, sent/delivery status events, incoming calls, and call completion events, captures the activity with timestamps and direction, and posts each as a journal entry in QuickBooks Online under a configured communications expense account, tagged with the customer or external caller phone number. Refresh token rotation in QuickBooks is handled transparently: if a refresh fails, the customer is alerted to re-authorize. Twilio webhook signatures are validated on receipt using HMAC-SHA1 with the Auth Token as the shared key. All records carry full audit trails and timestamps.

A real-world example

A mid-market business process outsourcing (BPO) firm uses QuickBooks Online for billing and accounting across multiple client accounts. They use Twilio for customer notifications, appointment reminders, and callback routing across their contact center. Before the integration, each SMS campaign required manually exporting customer lists from QuickBooks, loading them into Twilio outside the normal workflow, and separately tracking communication volume for billing clients back at cost. With QuickBooks Online and Twilio connected, the customer roster syncs automatically, ensuring Twilio always reaches the right phone numbers, and every outbound and inbound message is logged into QuickBooks as a communications expense, either as a direct line item on a client invoice or as a service charge allocated to the appropriate cost center.

What you can do

  • Sync QuickBooks Online customer and vendor records into Twilio messaging services for campaign targeting and contact management.
  • Log every Twilio SMS and call as a journal entry or invoice line in QuickBooks Online under a communications expense account.
  • Validate Twilio webhook signatures using HMAC-SHA1 and Auth Token to ensure message authenticity.
  • Refresh QuickBooks OAuth 2.0 credentials transparently before access tokens expire, with customer alert on rotation failure.
  • Poll QuickBooks CDC endpoint for customer and vendor changes within 30 days, batching updates for efficient synchronization.

Questions

What data actually moves between QuickBooks Online and Twilio?
Customer and vendor records from QuickBooks Online move into Twilio for contact management. Twilio message and call activity (SMS sent, delivered, failed, incoming, calls answered, calls missed) flows back into QuickBooks Online as journal entries or invoice line items for billing and audit. Twilio has no financial entities such as invoices or GL accounts, so it is a unidirectional flow for activity records and bidirectional for reference contacts.
How does ml-connector handle QuickBooks webhook payloads that only contain entity IDs?
QuickBooks webhooks fire on entity changes but include only the entity ID, operation, and timestamp. ml-connector fetches the full record immediately via a REST GET request to the Accounting API, using the authenticated OAuth session, so the complete customer or vendor data is available for sync into Twilio. This fetch-on-notification pattern adds latency but ensures data consistency.
How are Twilio messages and calls recorded in QuickBooks Online?
Each Twilio message or call event (sent, delivered, failed, incoming, or completed) is posted to QuickBooks Online as a journal entry line, capturing the event timestamp, phone number, and status. The entry is categorized under a configured communications expense account so total SMS and voice costs roll up for billing and reporting. Entries are tagged with the customer phone number for reconciliation.

Related integrations

Connect QuickBooks Online and Twilio

Free to use. Add your credentials, ping your real systems, and see if we fit.

Get started