> ## Documentation Index
> Fetch the complete documentation index at: https://moengage.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Twilio Segment Engage

# Introduction

<Info>
  The Twilio Segment integration does not currently support [Unified Identity (Identity Resolution)](https://moengage-user-guide.mintlify.app/user-guide/data/user-data/unified-identity-identity-resolution) or [Portfolio](https://moengage-user-guide.mintlify.app/user-guide/settings/account/portfolio/portfolio).
</Info>

[Twilio Segment ](https://segment.com/) is a customer data platform that helps you collect, clean, and activate your customer data.

This article will give an overview of the connection between MoEngage and Twilio Segment Engage (earlier Segment Personas) and list a step-by-step approach to enabling the integration.

# Scope

The MoEngage and Twilio Segment integration allows you to use [Engage](https://segment.com/docs/personas/), Twilio Segment built-in audience builder, to create segments of users based on data you have already collected across various sources. These users will then be assigned user attributes or custom events that can be used to create MoEngage segments for use in MoEngage campaigns and flows.

# Integration

<Info>
  * Login credentials for MoEngage and Segment.
  * Segment Engage must be enabled for your segment account. You can validate this by navigating to Engage from the sidebar on your Segment dashboard.
</Info>

[Computed traits](https://segment.com/docs/personas/computed-traits/) and [audiences](https://segment.com/docs/personas/audiences/) can be sent to MoEngage as custom attributes or custom events.

* Traits and audiences sent using the *identify* call will appear in MoEngage as *Tracked Custom Attributes* with a value of *True.*
* Traits and audiences sent using the *track* call will appear in MoEngage as *Tracked User Events*.

When you connect the computed trait/audience to the MoEngage destination, you can choose your preferred method (or choose to use both).

## Sync time

The default integration for the MoEngage × Segment Engage connection is **Real Time.** But there are some filters that will disqualify the persona from syncing in real-time, including some time-based filters that restrict your audience’s size at the time of message send.

## Step 1: Create a Segment computed trait/audience

### Computed Trait

1. In Segment, navigate to the  *Computed Traits* in *Engage.*
2. Click *New Computed Trait.*
3. Create your computed trait or audience. A lightning bolt in the top corner of the page will indicate if the computation updates in real-time.

<img src="https://mintcdn.com/moengage/11KR3mwxT6FlowrU/images/partner_44425531631764.png?fit=max&auto=format&n=11KR3mwxT6FlowrU&q=85&s=32258cda51cd6890388c98a5d690fb16" alt="" width="2038" height="804" data-path="images/partner_44425531631764.png" />

4. Next, select  *MoEngage* as your destination.

<img src="https://mintcdn.com/moengage/11KR3mwxT6FlowrU/images/partner_44425508047380.png?fit=max&auto=format&n=11KR3mwxT6FlowrU&q=85&s=3fdaf2024baa6f70e89626680cc45d39" alt="" width="2046" height="940" data-path="images/partner_44425508047380.png" />

5. Preview by clicking *Review & Create*.\
   *Note-* By default, Segment queries all historical data to set the current value of the computed trait and audience. To omit this data, uncheck *Historical Backfill*.

<img src="https://mintcdn.com/moengage/11KR3mwxT6FlowrU/images/partner_44425531632532.png?fit=max&auto=format&n=11KR3mwxT6FlowrU&q=85&s=3a7a61e14b20e81a933f23745b2baf60" alt="" width="2050" height="798" data-path="images/partner_44425531632532.png" />

6. In the computed trait, adjust the connection settings based on how you would like your data sent to MoEngage.

### Audience

1. In Segment, navigate to the  *Audience* in *Engage.*
2. Click New.

<img src="https://mintcdn.com/moengage/0EdW-QMnfbsLxXT2/images/partner_5873711417108.png?fit=max&auto=format&n=0EdW-QMnfbsLxXT2&q=85&s=bde643e8e65653184723278b91547166" alt="Screenshot_2022-04-27_at_12.22.46_PM.png" width="2398" height="740" data-path="images/partner_5873711417108.png" />

3. Create your audience. A lightning bolt in the top corner of the page will indicate if the computation updates in real-time.

<img src="https://mintcdn.com/moengage/0EdW-QMnfbsLxXT2/images/partner_5873719003924.png?fit=max&auto=format&n=0EdW-QMnfbsLxXT2&q=85&s=f47effe039474be6ddf27f9a57acec54" alt="Screenshot_2022-04-27_at_12.25.56_PM.png" width="2800" height="1078" data-path="images/partner_5873719003924.png" />

4. Next, select  *MoEngage* as your destination.

<img src="https://mintcdn.com/moengage/11KR3mwxT6FlowrU/images/partner_44425508048148.png?fit=max&auto=format&n=11KR3mwxT6FlowrU&q=85&s=b60e7cf6004e1759a076c39646e31c75" alt="" width="2046" height="1102" data-path="images/partner_44425508048148.png" />

5. Preview your audience by clicking  *Review & Create*.\
   *Note-* By default, Segment queries all historical data to set the current value of the audience. To omit this data, uncheck *Historical Backfill*.

<img src="https://mintcdn.com/moengage/0EdW-QMnfbsLxXT2/images/partner_5873702066324.png?fit=max&auto=format&n=0EdW-QMnfbsLxXT2&q=85&s=c0e1fb4c80c22fa67b1f955dc8de37d5" alt="Screenshot_2022-04-27_at_12.27.04_PM.png" width="2206" height="1108" data-path="images/partner_5873702066324.png" />

6. In the computed trait or audience settings, adjust the connection settings based on how you would like your data sent to MoEngage.

<img src="https://mintcdn.com/moengage/0EdW-QMnfbsLxXT2/images/partner_5873748655892.png?fit=max&auto=format&n=0EdW-QMnfbsLxXT2&q=85&s=80e8eadfac0b6f53b723afc246101944" alt="Screenshot_2022-04-27_at_12.26.38_PM.png" width="1196" height="734" data-path="images/partner_5873748655892.png" />

## Step 2: Segment users in MoEngage

To create a segment of these users, navigate to *Segments >> Create Segment.* Next, based on which call you used:

* **Identify** : Select  *User Property* and select the specific attribute.

<img src="https://mintcdn.com/moengage/0EdW-QMnfbsLxXT2/images/partner_5873977244052.png?fit=max&auto=format&n=0EdW-QMnfbsLxXT2&q=85&s=eb798944942ce42e5325720cc2803244" alt="Screenshot_2022-04-27_at_12.55.14_PM.png" width="1120" height="812" data-path="images/partner_5873977244052.png" />

* **Track** : Select  *User Behaviour* and select the specific event.

<img src="https://mintcdn.com/moengage/0EdW-QMnfbsLxXT2/images/partner_5873934199572.png?fit=max&auto=format&n=0EdW-QMnfbsLxXT2&q=85&s=b8cb4d82879726bda44865160032d1e5" alt="Screenshot_2022-04-27_at_12.45.55_PM.png" width="1564" height="682" data-path="images/partner_5873934199572.png" />
