# MoEngage (Actions) 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 **Moengage (Actions)** 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.

> \[!NOTE]
>
> This page is about the [Actions-framework](/docs/segment/connections/destinations/actions/) MoEngage Segment destination. There's also a page about the [non-Actions MoEngage Destination](/docs/segment/connections/destinations/catalog/moengage/). Both of these destinations receives data from Segment.

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

## Benefits of MoEngage (Actions) vs MoEngage Classic

MoEngage (Actions) provides the following benefits over the MoEngage Classic destination:

* **Data Consistency**. Data consistency between device-mode and cloud-mode. Earlier, data sent from device and cloud-mode would sometimes be mismatched with duplicated properties - this has now been fixed.
* **Better Mapping**. Using MoEngage Actions, you can now map incompatible properties with MoEngage-compatible properties. This significantly reduces your development bandwidth.
* **Region Support**. Support across all data clusters. Moengage provides an option to choose your Data Region where your app is present.
* **Better Configuration**. There are additional configurations for the JavaScript integration like custom Service Worker.

## Getting started

1. From the Segment web app, click **Catalog**, then click **Destinations**.
2. Search for **MoEngage (Actions)** and select it.
3. Click **Configure MoEngage**.
4. Select an existing Source to connect to MoEngage (Actions).
5. Finish the setup.
6. Configure the settings. See the table below for more information.

   | Field Name      | Description                                                                                                                        |
   | --------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
   | Name            | The name of the Moengage destination such as MoEngage prod, MoEngage test.                                                         |
   | App Id          | Navigate to Settings > API > General on your MoEngage dashboard to access the App ID.                                              |
   | App Key         | Navigate to Settings > API > General on your MoEngage dashboard to access the App Key.                                             |
   | Endpoint Region | This is your MoEngage data center. [Read more](https://help.moengage.com/hc/en-us/articles/360057030512-Data-Centers-in-MoEngage). |
7. Enable the toggle option to **Enable** the destination and click **Save changes**.

### Default Mapping

> \[!WARNING]
>
> Moengage provides preset values to all mappings and hence no changes are required in the Identify User Actions, and Track Event Actions.

## Destination Settings

| Field           | Description                   | Required | Type     |
| --------------- | ----------------------------- | -------- | -------- |
| Api Id          | Your Moengage API Id          | Yes      | string   |
| Api Key         | Your Moengage API Key         | Yes      | password |
| Endpoint Region | The region to send your data. | Yes      | select   |

## Available Actions

Build your own Mappings. Combine supported [triggers](/docs/segment/connections/destinations/actions/#components-of-a-destination-action) with the following Moengage-supported actions:

> \[!NOTE]
>
> Individual destination instances have support a maximum of 50 mappings.

* [Track Event](#track-event-23)
* [Identify User](#identify-user-13)

### Track Event

Send an event to Moengage.

Track Event is a **Cloud** action. The default Trigger is `type = "track"`

| Field                      | Description                                                                                                        | Required | Type     |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------ | -------- | -------- |
| Event type                 | The type of the event being performed.                                                                             | Yes      | STRING   |
| Event Name                 | The name of the event being performed.                                                                             | Yes      | STRING   |
| User ID                    | The unique identifier of the user.                                                                                 | No       | STRING   |
| Anonymous ID               | The unique identifier of the anonymous user.                                                                       | No       | STRING   |
| OS Name                    | The name of the mobile operating system or browser that the user is using.                                         | No       | STRING   |
| APP Version                | The version of the mobile operating system or browser the user is using.                                           | No       | STRING   |
| Library Version            | The version of the mobile operating system or browser the user is using.                                           | No       | STRING   |
| Timestamp                  | The timestamp of the event. If time is not sent with the event, it will be set to the time our servers receive it. | No       | DATETIME |
| Event Properties           | An object of key-value pairs that represent event properties to be sent along with the event.                      | No       | OBJECT   |
| Update Existing Users Only | If set to true, events from the Segment will only trigger updates for users who already exist in Moengage.         | No       | BOOLEAN  |

### Identify User

Set the user ID for a particular device ID or update user properties.

Identify User is a **Cloud** action. The default Trigger is `type = "identify"`

| Field                      | Description                                                                                                        | Required | Type     |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------ | -------- | -------- |
| Event type                 | The type of the event being performed.                                                                             | Yes      | STRING   |
| User ID                    | The unique user identifier set by you                                                                              | No       | STRING   |
| Update existing users only | Setting this to true will not create new users in MoEngage. Only existing users will be updated                    | No       | BOOLEAN  |
| Anonymous ID               | The generated anonymous ID for the user                                                                            | No       | STRING   |
| OS Name                    | The name of the mobile operating system or browser that the user is using.                                         | No       | STRING   |
| APP Version                | The version of the mobile operating system or browser the user is using.                                           | No       | STRING   |
| Library Version            | The version of the mobile operating system or browser the user is using.                                           | No       | STRING   |
| Timestamp                  | The timestamp of the event. If time is not sent with the event, it will be set to the time our servers receive it. | No       | DATETIME |
| User Properties            | Properties to set on the user profile                                                                              | No       | OBJECT   |

## Testing the integration

1. Navigate to **Connections > Destinations> MoEngage**.
2. Go to the **Event tester** tab.
3. Test your `track` and `identify` methods.

![Event Tester.](https://docs-resources.prod.twilio.com/d4ef55c9171e89bf4dd1d0f1e4f87943a65d77dec2ef5653711926aca05236af.png)

If successful, the data starts flowing into your MoEngage account in 3-5 minutes. You can log in to your MoEngage dashboard and go to Test & Debug > Recent events to verify.
