# MoEngage

Easily synchronize user segments from MoEngage to Apxor

### Prerequisites: <a href="#id-6ce55d5a-a1e9-456d-8172-153c8d629f23" id="id-6ce55d5a-a1e9-456d-8172-153c8d629f23"></a>

* MoEngage Account
* Segments that you want to send to Apxor

## 1. Create a Custom Destination

### **Step 1:** Open the Moengage dashboard and hover on the left panel

* Click on <mark style="color:red;">`App Marketplace`</mark>

<figure><img src="/files/4MUP4KK15wgdgQsgeSsT" alt=""><figcaption></figcaption></figure>

### Step 2: Scroll down and click on <mark style="color:red;">`Custom destinations`</mark>

<figure><img src="/files/fYxex6hNpTHM2r4oU7kG" alt=""><figcaption></figcaption></figure>

### Step 3: Click on <mark style="color:red;">`Add Custom Destination`</mark>

<figure><img src="/files/9DLD8UzXbix2KLZQ9Pch" alt=""><figcaption></figcaption></figure>

### Step 4: Give a name to the destination and click on <mark style="color:red;">`Add`</mark>

<figure><img src="/files/nkOrbsA9Gdr2pXUfCq0R" alt=""><figcaption></figcaption></figure>

## 2. Create an Integration

### **Step 1:** Click on Integrate and then select <mark style="color:red;">`+ Add Integration`</mark>

<figure><img src="/files/61M3LZzmWS3TxwvtsUQ4" alt=""><figcaption></figcaption></figure>

### Step 2: Enter a name to identify the integration

* Select the POST method
* Now, enter the URL as “\*\*<https://server.apxor.com/v1/cohorts/moe/sync/:appId**”>, where <mark style="color:red;">`appId`</mark> is the customer's unique identifier in the Apxor dashboard.

<figure><img src="/files/S7HVqqarag7xrnvJY3Lv" alt=""><figcaption></figcaption></figure>

### Step 3: Authentication

Under Authentication, select <mark style="color:red;">`Basic Auth`</mark> and enter **ApxCohortSync** in the *username* field and <mark style="color:red;">**`auth token`**</mark> given by the Apxor team in the *password* field.

<figure><img src="/files/5NXI97UG1l68ugdEfsVX" alt=""><figcaption></figcaption></figure>

### Step 4: Configure

* In **Map user identities**, set <mark style="color:red;">`Destination identifier`</mark> as **custom\_user\_id**
* In the **Request body,** change `add_users` to <mark style="color:orange;">`add_members`</mark> and `remove_users` to <mark style="color:orange;">`remove_members`</mark>
* Set the **Throttle** to **5000** users at a time

<figure><img src="/files/zIcUJVOvmAtKZ00mYR1w" alt=""><figcaption></figcaption></figure>

* The request preview should match the highlights in the snapshot below
* Click on Next

<figure><img src="/files/zC6CWCHNm4AGFYQ7SPd6" alt=""><figcaption></figcaption></figure>

### Step 5: Test

* In the test page enter a example custom\_user\_id in the **User value** and click on **test**
* The response should be **Success** with response code **200**

<figure><img src="/files/nC96sRhK05G7MTuPZItI" alt=""><figcaption></figcaption></figure>

* Click on Add integration
* Integration has been created successfully!

## 3. Segment Sync

### Step 1: Navigate to **All Segments** tab in the left panel

Navigate to **All Segments** tab in the left panel and click on the options button for the segment you want to sync and select **Sync Segment**

<figure><img src="/files/Qv7tR7YggdfAXmYJdHPG" alt=""><figcaption></figcaption></figure>

### Step 2: Click on the destination dropdown

* Now click on the **Destination** drop-down and select the integration that you wish to sync with.
* You can also add a Destination and create an Integration from the **Add Destination** option in the drop-down menu. Follow the above procedures.

<figure><img src="/files/cqQAu8Fxr0RjlM1qQzIe" alt=""><figcaption></figcaption></figure>

* Select the sync frequency **(one-time or recurring)**, configure notification settings, and click on **Save Sync**

<figure><img src="/files/79aiALvpgcwWXvE4I22X" alt=""><figcaption></figcaption></figure>

* The segment sync status and history can be seen on the **Segment Sync Info** page

<figure><img src="/files/dFSMOKFaBwYWNqfDcCsU" alt=""><figcaption></figcaption></figure>

* The same segment will be visible on the **Apxor** dashboard in the "**Cohorts**" tab, with the source set as "MOENGAGE". It might take up to 20 minutes for the segment to sync with Apxor on the cohorts page.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://guides.apxor.com/partner-integrations/moengage.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
