# OneSignal New Destination

## Destination Info

* Accepts [Identify](/docs/segment/connections/spec/identify), [Track](/docs/segment/connections/spec/track) calls.
* Refer to it as **OneSignal New**, **OneSignal (New)** 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.

[OneSignal](https://onesignal.com/?utm_source=segmentio\&utm_medium=docs\&utm_campaign=partners) is the market leader in driving customer engagement with multi-channel messaging across Web and Mobile Push, In-App Messages, SMS, and Email subscribers.

This destination is maintained by OneSignal. For any issues with the destination, [contact the OneSignal support team](mailto:support@onesignal.com).

> \[!NOTE]
>
> The OneSignal Destination is available to customers on OneSignal Growth, Professional, and Enterprise plans.

## Getting started

1. Log in to the [OneSignal dashboard](https://app.onesignal.com/).
2. Navigate to **Segment App > Settings > Analytics > Segment.com** and click **Activate**.
3. The Segment App opens in a new window. Log in to authenticate the connection from OneSignal.
4. Select the workspace and source to connect with OneSignal.

> \[!NOTE]
>
> OneSignal maps the `userId` field to the **[External User ID](https://documentation.onesignal.com/docs/onboarding-with-onesignal#step-3-connect-user-data-to-onesignal)** field in OneSignal.

## Supported methods

OneSignal supports the following methods, as specified in the [Segment Spec](/docs/segment/connections/spec).

### Identify

Send [Identify](/docs/segment/connections/spec/identify) calls to update users. For example:

```js
analytics.identify('userId123', {
  firstName: 'John',
  lastName: 'Doe',
     country: 'USA'
});
```

Segment sends Identify traits as [Player Data Tags](https://documentation.onesignal.com/docs/add-user-data-tags) in OneSignal.

> \[!WARNING]
>
> OneSignal doesn't accept nested objects or arrays as user properties.

![OneSignal Users page showing user list with options, phone numbers, and email addresses.](https://docs-resources.prod.twilio.com/0587317af3a83c1a997ffc03a77aaf17deb530966b5639fe9e40173b04fb1a3b.png)

> \[!NOTE]
>
> Your OneSignal plan may cap incoming Data Tags. Once you've reached your Data Tag limit, your user traits won't update in your OneSignal destination.

### Track

Send [Track](/docs/segment/connections/spec/track) calls to update Data Tags. For example:

```js
analytics.track('Add to Cart', {
    product_name: 'Sunglasses',
    brand: 'Rayban'
})
```

OneSignal stores Track properties as Data Tags but drops the event name. In the example, `Add to Cart` is dropped.

To keep the event names on OneSignal Data Tags, append the event name to the properties. For example, `Add_to_Cart_brand` instead of `brand`.

![OneSignal dashboard showing eShoppe campaign notification with personalized message for Cheryl Carter.](https://docs-resources.prod.twilio.com/9c415d2d8d194b921f8325095a5595fe1333f1f8d4de361de1845d940a8867e2.png)

## Engage

You can send Computed Traits and Audiences generated using [Engage](/docs/segment/engage) to OneSignal.

### Audiences

Engage audiences appear as a [segment](https://documentation.onesignal.com/docs/segmentation) in OneSignal.

Track calls from Audiences create a OneSignal [segment](https://documentation.onesignal.com/docs/segmentation) with the audience name.

Identify calls from Audiences create a OneSignal [segment](https://documentation.onesignal.com/docs/segmentation) with the audience name and add Data Tags on all the matching user records.

![OneSignal eShoppe dashboard showing audience segments like 'People Who Purchased' with 300 estimated users.](https://docs-resources.prod.twilio.com/a47a6399156c3a78230bc3cfd1a4f2155865e69e2b90417df471b2b461f0adc6.jpg)

Audiences sends Identify and Track calls to OneSignal when a user enters or exits the Audience.

### Computed Traits

OneSignal stores Track and Identify calls from Engage Computed Traits as [Data Tags](https://documentation.onesignal.com/docs/add-user-data-tags) for the OneSignal User/Player's records.

## FAQ

#### How do I manage Segment's Reserved and Custom Traits?

* Segment sends user traits to OneSignal as Data Tags. The number of data tags OneSignal allows depends on your OneSignal pricing plan. OneSignal drops the data tags that go over your set number.
* OneSignal always updates the `firstName` and the `lastName` properties for matching users. All other traits are added or updated on a first-come basis. `firstName` and `lastName` tags are stored as `first_name` and `last_name`.
* Send User properties to OneSignal with blank or `null` values to remove the corresponding Data Tag from the OneSignal user record.
* OneSignal doesn't store `email` and `phone` properties. To update `email` and `phone` properties in OneSignal, create a player record with the email address and/or a phone number and map those records with the External\_User\_ID. Additional properties from Segment map across all your matching records, including email and phone number records.

## Settings

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

| Field   | Description                                                   | Required | Type   |
| ------- | ------------------------------------------------------------- | -------- | ------ |
| API Key | You can find your API Key in your OneSignal app settings page | Yes      | string |
| App Id  | You App Id                                                    | Yes      | string |
