# Planhat Destination

## Destination Info

* Accepts [Page](/docs/segment/connections/spec/page), [Alias](/docs/segment/connections/spec/alias), [Group](/docs/segment/connections/spec/group), [Identify](/docs/segment/connections/spec/identify), [Track](/docs/segment/connections/spec/track) calls.
* Refer to it as **Planhat** in the [Integrations object.](/docs/segment/guides/filtering-data/#filtering-with-the-integrations-object)

## Getting started

You can get data from Segment to Planhat's [Customer Success Tool](http://www.planhat.com/) following these steps:

1. Once the Segment library is integrated with your product, toggle Planhat on in your Segment destinations.
2. Add your Planhat API Key which you can generate in Planhat under **App Settings > API Access**.

The Segment-Planhat destination is 100% handled through the Segment servers, so you don't need to bundle their iOS or Android SDKs. Your Segment SDK is enough.

The destination also supports Identify, Page, Track, and Group calls. For more information, see the [Segment Spec documentation](/docs/segment/connections/spec/).

## Identify

When you Identify a user, the user's information is passed on to Planhat with `userId` as Planhat's External User ID. Segment's special traits recognized as Planhat's standard contact profile fields (in parentheses) are:

* `name` (`name`).
* `title` (`title`).
* `email` (`email`).
* `user_id` (`externalId`).

In addition, all calls get Segment as 'source'.

If the `userId` or `traits.email` matches an existing Contact in Planhat the Identify-call is automatically associated with that Contact. Otherwise a new Contact is created in Planhat. New Contacts received from Segment can either be discarded or manually assigned to a Customer profile in Planhat.

## Engage

You can send computed traits and audiences generated using [Engage](/docs/segment/engage) to this destination as a **user property**. To learn more about Engage, schedule a [demo](https://segment.com/contact/demo).

For user-property destinations, an [identify](/docs/segment/connections/spec/identify/) call is sent to the destination for each user being added and removed. The property name is the snake\_cased version of the audience name, with a true/false value to indicate membership. For example, when a user first completes an order in the last 30 days, Engage sends an Identify call with the property `order_completed_last_30days: true`. When the user no longer satisfies this condition (for example, it's been more than 30 days since their last order), Engage sets that value to `false`.

When you first create an audience, Engage sends an Identify call for every user in that audience. Later audience syncs only send updates for users whose membership has changed since the last sync.

> \[!NOTE]
>
> Real-time audience syncs to Planhat  may take six or more hours for the initial sync to complete. Upon completion, a sync frequency of two to three hours is expected.

## Settings

Segment lets you change these destination settings from the Segment app without having to touch any code.

| Field        | Description                                                                                  | Required | Type   |
| ------------ | -------------------------------------------------------------------------------------------- | -------- | ------ |
| Tenant Token | Add your Planhat Tenant Token, which you can find in Planhat under App Settings > API Access | Yes      | string |
| subdomain    | Your Planhat API subdomain.                                                                  | No       | select |
