Skip to main content
Sync contacts, custom objects, relationships, and events from your warehouse’s tables and views into Conversion. Use your existing data models and schedule syncs to keep records up to date.

Supported Warehouses

BigQuery

Google BigQuery

Snowflake

Snowflake Data Cloud

ClickHouse

ClickHouse Cloud and self-hosted

Databricks

Databricks SQL warehouses

Amazon Redshift

Redshift Serverless and provisioned clusters

Key Concepts

Syncs

A sync defines what data to pull from your warehouse and how to map it to Conversion. Each sync includes:
  • A destination type: What kind of data you’re syncing (contacts, custom objects, or events)
  • A SQL query: The query that returns the data you want to sync
  • A schedule: How often the sync runs
You’ll typically create multiple syncs for a single warehouse connection: one for contacts, one for each custom object type, etc.

Field Mapping

Conversion maps the columns returned by your query to fields in Conversion by column name. The name (or AS alias) of each column in your SELECT clause must match the field key in Conversion exactly, including case.
If a column doesn’t match a known field on the destination, it’s ignored. Use AS to rename columns whenever your source name doesn’t match the Conversion field key.

Incremental Syncing

Use last_sync_time in your query to select only rows that have changed since the last successful sync. last_sync_time is a Unix timestamp in seconds (an integer) that you compare against a timestamp column in your source. On the first run it’s 0 (Unix epoch), so every row matches. On subsequent runs it’s the start time of the previous successful sync.
Because it’s an integer, don’t wrap {{last_sync_time}} in quotes. Most warehouses need a small conversion to compare it against a TIMESTAMP column; see the warehouse-specific guides for exact syntax (TIMESTAMP_SECONDS() in BigQuery, TO_TIMESTAMP() in Snowflake, toDateTime() in ClickHouse, from_unixtime() in Databricks, and TIMESTAMP 'epoch' + {{last_sync_time}} * INTERVAL '1 second' in Redshift).
Without a WHERE clause, each run reads the entire dataset. See Incremental Sync Strategies for time buffers and full syncs.

Unique Keys

Each sync requires a unique key that identifies records. This key determines how Conversion matches incoming rows to existing records:

What You Can Sync

Contacts

Sync contacts from your warehouse to create or update contact records in Conversion. Required columns (at least one of):
  • email: The contact’s email address. To create new contacts in Conversion, email address must be provided.
  • userId: Your system’s unique identifier for the contact.
If both are provided, userId is used to match the contact and email is stored on the contact record. Optional columns:
  • Any contact field (e.g., first_name, last_name, job_title, phone)
  • Custom field keys you’ve defined in Conversion

Company Fields

A contact sync can also update fields on each contact’s company. Alias the column to __company__ followed by the company field key. Every other column maps to a contact field, so a column named phone writes the contact’s phone and __company__phone writes the company’s. If the contact has no company yet, Conversion creates one.
Contacts at the same company usually share these values. If their rows disagree, the company keeps whichever value was written last.

Custom Objects

Sync custom objects to create or update records of a specific custom object type. Records are matched by their object ID. Setting one up for the first time? See Syncing Custom Objects from a Warehouse. Required columns:
  • object_id: Your unique identifier for this record. Conversion matches rows to existing records on this value across runs.
Optional columns:
If your query has no object_id column, Conversion uses a column named id instead.
You must create the custom object type in Conversion before setting up a sync. The sync will create and update individual objects of that type.

Custom Objects with Relationships

To link each record to a contact, a company, or a record of another custom object, add a relationship field to the custom object you’re syncing. Then alias a column in your query to that field’s key. The column’s value identifies the related record:
  • If the related record doesn’t exist yet, the link stays pending and completes if that record is created within a few days, for example by a later contacts sync. The sync never creates the related record.
  • A relationship field holds one related record. Rows that share an object_id overwrite each other’s value for it.
  • Set a relationship from the object that holds the field. The matching field on the related object (for example, a contact’s list of products) is read-only and can’t be synced.

Events

Sync events to record activity on contacts. Events appear on the contact’s timeline and can trigger workflows. Setting one up for the first time? See Syncing Custom Events from a Warehouse. Required columns:
  • userId or email: Identifies the contact the event belongs to (same rules as contacts: userId is preferred when available)
  • event_name: The name of the event
  • timestamp: When the event occurred
Optional columns:
  • Any event property
  • event_id: A unique identifier for the event, used for deduplication
event_id is optional but strongly recommended. We use it to deduplicate events, so it must be unique across all your event syncs; prefix it with the table name as shown. If the same event_id is synced twice (for example, when using a time buffer), we’ll ignore the duplicate.

Setting Up a Sync

1. Connect Your Warehouse

In Conversion, go to Settings → CRM and syncing → Connections and add a new connection for your warehouse type. You’ll need to provide connection credentials; the specific requirements vary by warehouse. See the warehouse-specific guides for the exact steps.
We recommend creating a dedicated read-only user for Conversion. This limits access to only the tables you need and makes it easy to revoke access if needed.

2. Create a Sync

After your warehouse connection is verified, open it and go to the Syncs tab to create a sync:
  1. Click Add Sync
  2. Select the destination type (Contacts, Custom Objects, or Events)
  3. For Custom Objects, select the specific object type
  4. Enter your SQL query
  5. Set the sync schedule
  6. Enable the sync

Write the Query with AI

The full-screen SQL editor can write the query for you. Choose the connection and destination type first, then describe the records to sync in the box at the bottom of the editor, for example:
Contacts from our customers table with their plan and signup date, only paying customers.
The AI reads your warehouse schema, looks up the values it filters on, and runs the query as a preview before writing it into the editor. If the editor already has a query, it changes that query instead. Review the summary and any notes shown above the box, such as a query that reads every row on each run, and use Undo to restore the previous query. Generating a query only changes what’s in the editor; it doesn’t run the sync.

3. Set the Schedule

Choose how often your sync runs:
If a sync is still running when the next scheduled run begins, we’ll skip that run. Choose a frequency that gives your query enough time to complete.
Queries that return millions of rows should not run more frequently than once per day. Large, frequent syncs can impact both your warehouse costs and Conversion performance.

Incremental Sync Strategies

Using last_sync_time

Use the timestamp filter shown in Incremental Syncing. See your warehouse’s guide for its timestamp conversion syntax.

Time-Buffered Queries

If your updated_at timestamps aren’t perfectly reliable, you can add a buffer to catch rows that might have been missed:
When using time-buffered queries, include an event_id column (for events) or rely on the unique key to handle duplicates. Conversion will update existing records rather than creating duplicates.

Full Syncs

For small tables or when you need to ensure complete accuracy, you can omit the WHERE clause to sync all rows on every run. This is less efficient but guarantees no rows are missed.

Monitoring and Troubleshooting

Sync History

View the history of each sync in the Syncs tab. Each run shows:
  • Start and end time
  • Number of rows processed
  • Number of successful and failed operations
  • Error details (if any)

Common Errors

Sync Taking Too Long

  • Filter by last_sync_time so each run only reads changed rows
  • Select only the columns you need
  • Reduce sync frequency for large datasets (see Set the Schedule)

Frequently Asked Questions

If a sync fails, we’ll retry on the next scheduled interval. Partial failures (where some rows succeed and others fail) are logged, and you can download error details from the sync history. Failed rows won’t affect successful rows.
Yes. You can create multiple syncs from the same warehouse, each with its own query and destination. This is common when you need to sync contacts and their related custom objects from different tables.
Yes. Use SQL functions to transform data before it reaches Conversion. For example, you can concatenate fields, convert types, or apply conditional logic.
last_sync_time is a Unix timestamp in seconds (UTC). Your query should compare against UTC timestamps. If your data uses a different timezone, convert it in your query.
Yes. Relationship columns are optional. If your query doesn’t select any, the records are created without relationships. You can add relationships later through a separate sync or via the API.
The sync doesn’t create the contact, and the link stays pending for a limited time. See Custom Objects with Relationships.