# Nat Destination

## Destination Info

* Accepts [Identify](/docs/segment/connections/spec/identify) calls.
* Refer to it as **Nat** in the [Integrations object.](/docs/segment/guides/filtering-data/#filtering-with-the-integrations-object)
* This integration is **partner owned.** Please reach out to the partner's support for any issues.

[Nat.app](https://nat.app?utm_source=segmentio\&utm_medium=docs\&utm_campaign=partners) is a CRM tool for founders and sales people that makes it easy to stay in touch with users and find product market fit.

This destination is maintained by Nat.app. For any issues with the destination, [contact the Nat team](mailto:segment@nat.app).

## Getting Started

1. From the Destinations catalog page in the Segment App, click "Add Destination".
2. Search for "Nat.app" in the Destinations Catalog, and select the "Nat.app" destination.
3. Choose which Source should send data to the "Nat.app" destination.
4. Go to the [Nat.app settings page](https://contacts.nat.app/settings), find and copy the "API key".
5. Enter the "API Key" in the "Nat.app" destination settings in Segment.

## Identify

If you aren't familiar with the Segment Spec, read the documentation to learn what the [Identify method](/docs/segment/connections/spec/identify/) does. An example call would look like:

```js
analytics.identify('userId123', {
  email: 'john.doe@example.com'
});
```

Identify calls are sent to Nat.app as an `identify` event.

> \[!WARNING]
>
> Nat.app only accepts Identify calls. They must contain an `email` and a `timestamp` or else Nat.app will not accept them.

If an `identify` event contains an email, it is added to the timeline of the contact record for that email address as an interaction. Nat only generates one event per day per contact to keep Nat's *closeness indicator* accurate.

You can also include a `url` that is added as a description to the event in the user's timeline.

Here is an example of an `identify` even that has been added to a timeline:

![Timeline showing contact visited website with URL contacts.nat.app/contacts.](https://docs-resources.prod.twilio.com/162a7b51c1df7be552a0c4b8b883f38e835f29b346159f864d7214da5816a710.png)

## Accepted data format

Nat accepts several types of data formats to make the integration as easy as possible. There is a recommended format as well as alternative formats.

### Recommended format - with traits & page

In the recommended format, the user email is stored in `traits`, and the url in `page`.

```js
{
"type": "identify",
"timestamp": "2020-05-31T17:55:47.263Z",
"traits": {
    "email": "peter@example.com"
  },
"page": {
      "url": "https://example.com"
    }
}
```

### Alternative formats

Nat also accepts other formats to meet specific customer needs. Contact [segment@nat.app](mailto:segment@nat.app) if you need a custom format.

#### Example 1 - Without traits or url information

```js
        {
      "timestamp": "2020-05-31T17:55:47.263Z",
      "type": "identify",
      "email": "test@example.com"
    }
```

#### Example 2 - With event information but without traits

In this case, the `event ` replaces the `url` in the app.

```js
    {
      "timestamp": "2020-05-31T17:55:47.263Z",
      "type": "identify",
      "email": "test@example.com",
      "event": "User logged in",

      },
    }
```

## Required & Optional data

**Required: email & timestamp**
If the integration can't identify an `email` and a `timestamp`, it returns an error. Please follow the recommended format.

**Optional: url**
A description data point is optional and must be called `url`. It is added in the timeline as illustrated in the image above. If `url` is not included, a standard message is be added to the timeline instead.

## 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 Nat  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   |
| ------- | -------------------------------------------------------------------------------- | -------- | ------ |
| API Key | Visit the Settings page (https://contacts.nat.app/settings) to get your API key. | Yes      | string |
