> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hightouch.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create your first sync

> Connect a source, build a model, connect a destination, and run your first Hightouch sync end to end.

*A sync sends the rows your model returns to a destination — a tool or app your team already works in.* This guide takes you from an empty workspace to a running sync in four steps.

A sync depends on three things existing first, so you build them in order:

1. [**Connect a source**](#connect-a-source) — where your data lives.
2. [**Set up a model**](#set-up-a-model) — the query that selects the rows to send.
3. [**Connect a destination**](#connect-a-destination) — where the data lands.
4. [**Configure the sync**](#configure-the-sync) — how and when the rows are sent.

If you already have a source, model, or destination, skip ahead to [Configure the sync](#configure-the-sync). New to Hightouch? Review the [core concepts](https://docs.hightouch.com/getting-started/concepts.md) first.

## Before you begin

* A Hightouch workspace with permission to create sources, models, destinations, and syncs.

## Connect a source

A [source](https://docs.hightouch.com/getting-started/concepts.md#sources) is where your organization's data lives, such as a data warehouse or database.

1. Go to the [**Sources** overview](https://app.hightouch.com/sources?from=docs) and click **Add source**.
2. Select the source you want to add.

> [!TIP]
>
> To test things out without a production source, use the B2B SaaS or B2C
> eCommerce [**Sample datasets**](https://docs.hightouch.com/sources/sample-data.md). They're at the end of
> the source list and need no credentials.

3. Enter the source's credentials. These differ by source. See the [source documentation](https://docs.hightouch.com/sources/overview.md) for details.
4. Click **Continue**. Hightouch tests the connection before it saves. If the test fails, re-enter your credentials.
5. Give the source a **Source name**. Include the environment and data it holds, especially if you'll connect more than one instance of the same source, such as a development and a production version.
6. Click **Finish**.

The source now appears on the [**Sources** overview](https://app.hightouch.com/sources?from=docs), ready to build models against.

## Set up a model

A [model](https://docs.hightouch.com/getting-started/concepts.md#models) defines which rows to pull from your source.

1. Go to the [**Models** overview](https://app.hightouch.com/models?from=docs) and click **Add model**.
2. Select the source you connected.
3. Choose a [modeling method](https://docs.hightouch.com/models/creating-models.md): SQL editor, table selector, dbt model, or Looker Look. The [Sample datasets](https://docs.hightouch.com/sources/sample-data.md) come with pre-populated SQL.
4. Preview the query, then click **Continue**. The preview shows the first 100 rows so you can confirm the model returns the records you intend to activate before you go further.
5. Give the model a **Model name** that describes its contents and purpose.
6. Select a **Primary key** — a column whose values are unique and stable for every row. Change data capture uses the primary key to track which rows were added, changed, or removed between runs, so a stable key is what lets syncs send diffs instead of everything. See [change data capture](https://docs.hightouch.com/syncs/cdc.md) for why this matters.
7. Click **Finish**.

The model now appears on the [**Models** overview](https://app.hightouch.com/models?from=docs).

## Connect a destination

A [destination](https://docs.hightouch.com/getting-started/concepts.md#destinations) is the tool or app you want to receive your data. Connect it before you configure the sync.

1. Go to the [**Destinations** overview](https://app.hightouch.com/destinations?from=docs) and click **Add destination**.
2. Select the destination you want to add and click **Continue**.

> [!TIP]
>
> To test things out without a production destination, use [Google
> Sheets](https://docs.hightouch.com/destinations/google-sheets.md). It's a [lite
> destination](https://docs.hightouch.com/pricing/ss-pricing.md) and quick to set up.

3. Authorize the connection or enter the destination's credentials. These differ by destination. See the [destination documentation](https://docs.hightouch.com/destinations/overview.md) for details.
4. Click **Continue**. Hightouch tests the connection before it saves. If the test fails, re-enter your credentials.
5. Give the destination a **Destination name**.
6. Click **Finish**.

The destination now appears on the [**Destinations** overview](https://app.hightouch.com/destinations?from=docs).

## Configure the sync

A [sync](https://docs.hightouch.com/getting-started/concepts.md#syncs) declares how your model's rows appear in the destination. With a source, model, and destination in place, create it in the sync wizard.

1. Go to the [**Syncs** overview](https://app.hightouch.com/syncs?from=docs) and click **Add sync**.
2. Select the model to pull data from.
3. Select the destination to send data to.
4. Configure how the sync writes to the destination. The options here are destination-specific, but most syncs involve three decisions:

| Decision | What you choose | Guidance |
| - | - | - |
| Sync type and mode | The object to write to and whether to insert, update, or upsert records. | [Choose a sync type and mode](https://docs.hightouch.com/syncs/types-and-modes.md) |
| Record matching | The destination field and model column used to find the right record. | [Match records to destination records](https://docs.hightouch.com/syncs/record-matching.md) |
| Field mapping | Which model columns map to which destination fields. | [Map model columns to destination fields](https://docs.hightouch.com/syncs/mapping-data.md) |

5. Click **Continue**.
6. Name the sync and set its schedule. A schedule is required — even "manual only" is a choice. See [schedule a sync](https://docs.hightouch.com/syncs/schedule-sync-ui.md) for the available schedule types.
7. Click **Finish**.

You land on the sync's overview page, where you can run it, edit its **Configuration** and **Schedule**, set up [alerts](https://docs.hightouch.com/syncs/alerting.md), and open the [debugger](https://docs.hightouch.com/syncs/debugger.md) to inspect past runs.

## Run and verify your first sync

The sync doesn't run on its own until its schedule fires. To run it now, click **Run**.

When the run finishes, confirm it did what you expected:

* **Row count** — the number of rows the sync attempted matches the row count from your model preview.
* **Operation type** — the run added, changed, or removed the rows you expected. The first run of an upsert sync usually adds every row.
* **Rejected rows** — the run rejected zero rows. A run can succeed at the top level while individual rows fail, so check this even on a successful run.
* **Destination record** — open one record in the destination and confirm the mapped fields arrived with the right values.

## If the result is unexpected

* **Rejected rows or a failed run** — open the run and use the [debugger](https://docs.hightouch.com/syncs/debugger.md) to inspect the request and response for a specific row.
* **A known error message** — look it up in the [sync error codes](https://docs.hightouch.com/developer-tools/error-codes.md) reference.
* **Wrong records updated** — recheck your [record matching](https://docs.hightouch.com/syncs/record-matching.md) column. A non-unique matching field can update the wrong destination record.
* **Wrong or missing field values** — recheck your [field mapping](https://docs.hightouch.com/syncs/mapping-data.md).

## Next steps

* [Schedule the sync](https://docs.hightouch.com/syncs/schedule-sync-ui.md) to run on the cadence your workflow needs.
* [Configure alerts](https://docs.hightouch.com/syncs/alerting.md) so you're notified when a run fails.
* [Understand change data capture](https://docs.hightouch.com/syncs/cdc.md) to see how Hightouch decides what to send on each run.
