> ## 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.

# Loops

> Send your product, marketing, and transactional emails for your app with Loops, the email platform built for SaaS. Empower your marketing teams to create, send and track beautiful email campaigns.

## Supported syncing

| Type | Description | Supported Sync Modes | API Reference |
| - | - | - | - |
| **Contacts** | Sync data from any source to Loops contacts | Upsert | [Contacts docs](https://loops.so/docs/api-reference/intro#contacts) |

For more information about sync modes, refer to the [sync modes](https://docs.hightouch.com/syncs/types-and-modes.md#sync-modes) docs.

## Connect to Loops

Go to the [**Destinations** overview page](https://app.hightouch.com/destinations?from=docs) and click the **Add destination** button. Select **Loops** and click **Continue**. You can then authenticate Hightouch to **Loops**.

Enter the following fields into Hightouch:

* **API key**

## Sync configuration

Once you've set up your Loops destination and have a [model](https://docs.hightouch.com/getting-started/concepts.md#models) to pull data from, you can set up your sync configuration to begin syncing data. Go to the [**Syncs** overview page](https://app.hightouch.com/syncs?from=docs) and click the **Add sync** button to begin. Then, select the relevant model and the Loops destination you want to sync to.

### Syncing contacts

Sync data from any source to Loops contacts.

#### Record matching

To match rows from your model to contacts in Loops, you need to select a model column and corresponding Loops field. You can match on any of the following Loops fields:

* **Email**
* **User Id**

#### Field mapping

Hightouch lets you sync contact fields via [field mapping](https://docs.hightouch.com/syncs/mapping-data.md).
You can map data from any of your model columns to default and custom contact fields.
Loops requires the **Email** field, so you must map it to complete your configuration.
If you send data for a custom field that doesn't exist, Hightouch adds the field.
Ensure your model's columns have the same data types as the fields you want to sync to.

> [!NOTE]
>
> For the **mailingLists** object, the API expects JSON objects with key-value pairs where the key is a mailing list ID and the value is a `boolean` denoting if the contact should be added (`true`) or removed (`false`) from the list. Go to [API Docs for Mailing Lists](https://loops.so/docs/api-reference/create-contact#param-mailing-lists) to learn more.
>
> <pre>
>   `{
>           "example-mailing-list-id-1": true,
>           "example-mailing-list-id-2": false
>           }`
> </pre>

#### Trigger Loops

Hightouch can trigger a Loop to start sending emails to your contacts. Build a Loop using the [Loop builder](https://loops.so/docs/loop-builder), and configure whether you'd like to trigger Loops in the sync form.

#### Delete behavior

The [delete behavior](https://docs.hightouch.com/syncs/overview.md#delete-behavior) you select dictates what to do when a row no longer appears in your model's query results. You have the following options:

| Behavior | Description |
| - | - |
| **Do nothing** | Keep the contact in Loops with all its synced fields |
| **Clear** | Clear all the mapped fields, but keep the contact in Loops |
| **Delete** | Delete the synced contacts from Loops |

## Tips and troubleshooting

To see the exact API requests and responses from each sync run, use the [live debugger](https://docs.hightouch.com/syncs/debugger.md). To get notified by Slack, PagerDuty, SMS, or email when a sync fails, set up [sync alerts](https://docs.hightouch.com/syncs/alerting.md). If you run into an issue this page doesn't cover, [contact support](#pylon-chat).
