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

# Planhat

> Sync real-time analytics and enrich customer data in Planhat to optimize your customer management and growth

## Supported syncing

| Type | Description | Supported Sync Modes | API Reference |
| - | - | - | - |
| **Assets** | Sync data from any source to Planhat assets | Upsert, Update, Insert | [Assets endpoint](https://docs.planhat.com/#assets) |
| **Campaigns** | Sync data from any source to Planhat campaigns | Upsert, Update, Insert | [Campaigns endpoint](https://docs.planhat.com/#campaigns) |
| **Company** | Sync data from any source to Planhat company | Upsert, Update, Insert | [Company endpoint](https://docs.planhat.com/#companies) |
| **Conversations** | Sync data from any source to Planhat conversations | Upsert, Update, Insert | [Conversations endpoint](https://docs.planhat.com/#conversations) |
| **Endusers** | Sync data from any source to Planhat endusers | Upsert, Update, Insert | [Endusers endpoint](https://docs.planhat.com/#endusers) |
| **Invoices** | Sync data from any source to Planhat invoices | Upsert, Update, Insert | [Invoices endpoint](https://docs.planhat.com/#invoices) |
| **Issues** | Sync data from any source to Planhat issues | Upsert, Update, Insert | [Issues endpoint](https://docs.planhat.com/#issues) |
| **Licenses** | Sync data from any source to Planhat licenses | Upsert, Update, Insert | [Licenses endpoint](https://docs.planhat.com/#licenses) |
| **Metrics** | Sync data from any source to Planhat metrics | Insert | [Metrics endpoint](https://docs.planhat.com/#bulkinsert_metrics) |
| **Notes** | Sync data from any source to Planhat notes | Upsert, Update, Insert | [Notes endpoint](https://docs.planhat.com/#notes) |
| **Opportunities** | Sync data from any source to Planhat opportunities | Upsert, Update, Insert | [Opportunities endpoint](https://docs.planhat.com/#opportunities) |
| **Projects** | Sync data from any source to Planhat projects | Upsert, Update, Insert | [Projects endpoint](https://docs.planhat.com/#projects) |
| **Sales** | Sync data from any source to Planhat sales | Upsert, Update, Insert | [Sales endpoint](https://docs.planhat.com/#sales) |
| **User Activities** | Sync data from any source to Planhat user activities | Insert | [User Activities endpoint](https://docs.planhat.com/#activity_bulk) |

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 Planhat

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

* **API Access Token**: You can generate an API token under the **Settings > Service Accounts** section in Planhat.
* **Tenant UUID**: You only need to provide a Tenant UUID if you plan to sync to **Metrics** or **User Activities**. You can get your Tenant UUID under in the **Developer** section in Planhat.

![How to get your Tenant UUID](https://mintcdn.com/hightouch-3c037897/L_vQfA0JQEpeGUUo/images/destinations/destinations-planhat-tenant-token.png?fit=max\&auto=format\&n=L_vQfA0JQEpeGUUo\&q=85\&s=f21a24cc68d37b5dd51b20465e3f94f9)

* **Region**: You only need to provide a region if your Planhat app subdomain isn't `app`. For example, if your app URL is `app-us1.planhat.com`, then enter `us1`. If your app URL is `app.planhat.com`, leave the region blank.

## Sync configuration

Once you've set up your Planhat 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 Planhat destination you want to sync to.

### Syncing companies

Companies or accounts are your customers.
Depending on your business these might be agencies, schools, other businesses or something else.
Companies can also be your previous customers and or prospects.

#### Record matching

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

* **ID**
* **Source ID**
* **External ID**

> [!NOTE]
>
> In **Insert** mode, Planhat automatically generates an identifier for every
> new record synced, so there is no need to match an existing record.

#### Field mapping

Hightouch lets you sync company 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 company fields.
Ensure your model columns data types match the data types of the fields you want to sync to.

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

> [!NOTE]
>
> **Delete** is only available on **Upsert** mode and **Clear** is available for
> **Upsert** and **Update** mode.

| Behavior | Description |
| - | - |
| **Do nothing** | Keep the company in Planhat with all its synced fields |
| **Clear** | Clear all the mapped fields, but keep the company in Planhat |
| **Delete** | Delete the synced companys from Planhat |

### Syncing endusers

An enduser represents an individual at one of your customers, typically a user of your product, a business contact or both.

#### Record matching

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

* **ID**
* **Source ID**
* **External ID**

> [!NOTE]
>
> In **Insert** mode, Planhat automatically generates an identifier for every
> new record synced, so there is no need to match an existing record.

#### Field mapping

Hightouch lets you sync enduser 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 enduser fields.
Ensure your model columns data types match the data types of the fields you want to sync to.

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

> [!NOTE]
>
> **Delete** is only available on **Upsert** mode and **Clear** is available for
> **Upsert** and **Update** mode.

| Behavior | Description |
| - | - |
| **Do nothing** | Keep the enduser in Planhat with all its synced fields |
| **Clear** | Clear all the mapped fields, but keep the enduser in Planhat |
| **Delete** | Delete the synced endusers from Planhat |

### Syncing sales

Sales represents not recurring revenue (NRR), like an onboarding fee, or a one-off professional services project.

#### Record matching

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

* **ID**
* **Source ID**
* **External ID**

> [!NOTE]
>
> In **Insert** mode, Planhat automatically generates an identifier for every
> new record synced, so there is no need to match an existing record.

#### Field mapping

Hightouch lets you sync sale 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 sale fields.
Ensure your model columns data types match the data types of the fields you want to sync to.

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

> [!NOTE]
>
> **Delete** is only available on **Upsert** mode and **Clear** is available for
> **Upsert** and **Update** mode.

| Behavior | Description |
| - | - |
| **Do nothing** | Keep the sale in Planhat with all its synced fields |
| **Clear** | Clear all the mapped fields, but keep the sale in Planhat |
| **Delete** | Delete the synced sales from Planhat |

### Syncing invoices

Planhat automatically generates invoices when a license is created or renewed.
Invoices can include multiple line items.

#### Record matching

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

* **ID**
* **Source ID**
* **External ID**

> [!NOTE]
>
> In **Insert** mode, Planhat automatically generates an identifier for every
> new record synced, so there is no need to match an existing record.

#### Field mapping

Hightouch lets you sync invoice 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 invoice fields.
Ensure your model columns data types match the data types of the fields you want to sync to.

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

> [!NOTE]
>
> **Delete** is only available on **Upsert** mode and **Clear** is available for
> **Upsert** and **Update** mode.

| Behavior | Description |
| - | - |
| **Do nothing** | Keep the invoice in Planhat with all its synced fields |
| **Clear** | Clear all the mapped fields, but keep the invoice in Planhat |
| **Delete** | Delete the synced invoices from Planhat |

### Syncing licenses

Licenses represent your customers' subcriptions to your service and is the base for MRR or ARR calculations and most revenue reports.

#### Record matching

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

* **ID**
* **Source ID**
* **External ID**

> [!NOTE]
>
> In **Insert** mode, Planhat automatically generates an identifier for every
> new record synced, so there is no need to match an existing record.

#### Field mapping

Hightouch lets you sync license 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 license fields.
Ensure your model columns data types match the data types of the fields you want to sync to.

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

> [!NOTE]
>
> **Delete** is only available on **Upsert** mode and **Clear** is available for
> **Upsert** and **Update** mode.

| Behavior | Description |
| - | - |
| **Do nothing** | Keep the license in Planhat with all its synced fields |
| **Clear** | Clear all the mapped fields, but keep the license in Planhat |
| **Delete** | Delete the synced licenses from Planhat |

### Syncing metrics

Syncing metrics lets you track dimensional data in Planhat.
While [user activity](#syncing-user-activites) says a lot about user engagement, it doesn't always reflect the value created.
Dimension data is a set of model level metrics (Company by default) to understand how well your customers are doing, and the value they get out of your service.

> [!WARNING]
>
> To ensure syncs send each event, your event model must use a truly unique [primary key](https://docs.hightouch.com/getting-started/concepts.md#unique-primary-key-requirement). See the [events syncs](https://docs.hightouch.com/syncs/types-and-modes.md#event-syncs) documentation for more information.

#### Field mapping

Hightouch lets you sync event properties via field mapping. For more information on event properties you can sync into, visit [Planhat's docs](https://docs.planhat.com/#bulkinsert_metrics).

### Syncing user activities

Syncing user activites lets you track endusers's actions in Planhat.
Keeping track of your endusers activity is an important part of the Customer Success effort.

> [!WARNING]
>
> To ensure syncs send each event, your event model must use a truly unique [primary key](https://docs.hightouch.com/getting-started/concepts.md#unique-primary-key-requirement). See the [events syncs](https://docs.hightouch.com/syncs/types-and-modes.md#event-syncs) documentation for more information.

#### Field mapping

Hightouch lets you sync event properties via field mapping. For more information on event properties you can sync into, visit [Planhat's docs](https://docs.planhat.com/#activity_bulk).

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

### Failed user activities

When receiving [user activities](#syncing-user-activities), Planhat's API always returns an `OK` successful response even if the user activity payload contains invalid data.

You can find these failed user events in Planhat in **Customer Intelligence > Trends & Analytics > User Activities** by clicking the **Show failed activities** icon.

![Failed events in Planhat](https://mintcdn.com/hightouch-3c037897/L_vQfA0JQEpeGUUo/images/destinations/destinations-planhat-user-activity-incomplete.png?fit=max\&auto=format\&n=L_vQfA0JQEpeGUUo\&q=85\&s=2e218d2b37dcb5cf16fa5bdb8934d98b)
