Sync to DB Overview
Sync to DB
With Sync to DB, Rollout lets you sync data from any connected CRM, TMS, or other integration directly into your database. This gives you full control to query, transform, and act on your users’ data without needing to call APIs or manage webhooks yourself.
How It Works
-
Provide Database Credentials
-
You supply Rollout with connection details for your database (e.g. database URL).
-
The user account must have permissions to:
-
Create tables
-
Create temporary tables
-
-
-
Schema Creation
-
Rollout automatically creates a schema in your database.
-
The schema maps as closely as possible to Rollout’s public API, with a few adjustments:
-
Native Postgres types (e.g.,
TIMESTAMP
) are used instead of ISO strings. -
Additional metadata is included so you can see which credentials and users each record is associated with.
-
-
-
Data Population and Updates
-
Rollout populates the tables with your users’ data.
-
We continuously update those tables as we discover changes via:
-
Webhooks
-
Polling the underlying integration API
-
-
-
Data Ownership and Access
-
Rollout is the only writer to these tables.
-
On your end, these tables are read-only.
-
Working With Updates
Since Rollout continuously updates your database, you’ll likely want to build logic on your side to respond to these changes. Common patterns include:
-
Polling jobs
Run periodic jobs that check for new or updated data. -
Database triggers
Create triggers on insert/update events to automatically:-
Send notifications to users
-
Transform the data into a shape used internally by your application
-
Queue downstream jobs or analytics
-
Example: User Notification Flow
-
Rollout syncs a new record into your
contacts
table. -
A DB trigger detects the insert and adds a row to your
notifications_queue
table. -
Your application consumes the queue and sends the user a real-time notification.
Key Assumptions
-
Rollout is the sole writer to the schema.
-
Your application should treat these tables as read-only.
-
You own how updates are consumed and acted on—via polling, triggers, or other data pipelines.
Benefits
-
Direct database access: Query your synced data with SQL instead of APIs.
-
Always fresh: Rollout keeps the tables updated in near real-time.
-
Schema consistency: Structure aligns with Rollout’s API, minimizing surprises.
-
Developer-friendly: Leverage jobs, triggers, or pipelines—whatever fits your stack.