> ## 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.

# Setup MoEngage App on Salesforce

## Introduction

<Info>
  This integration is part of the Salesforce CRM paid add-on. Contact your dedicated MoEngage Customer Success Manager (CSM) to enable it for your account.
</Info>

| Integration step       | Use case                                                                                                   |
| ---------------------- | ---------------------------------------------------------------------------------------------------------- |
| Install MoEngage app   | Required for both Salesforce-to-MoEngage and MoEngage-to-Salesforce integrations.                          |
| Create a connected app | Required only for MoEngage-to-Salesforce integration. **Not needed** for Salesforce-to-MoEngage data flow. |

## Install MoEngage app

<Steps>
  <Step title="Access Salesforce AppExchange">
    Open your web browser and go to the Salesforce AppExchange website.
  </Step>

  <Step title="Log in">
    If you haven't already logged in, click **Log In** and enter your Salesforce credentials.
  </Step>

  <Step title="Search for MoEngage">
    In the search bar, type *MoEngage* and press Enter. Click the MoEngage app to open its details page.
  </Step>

  <Step title="Initiate the installation">
    Click **Get It Now** on the MoEngage app page.
  </Step>

  <Step title="Select Salesforce organization">
    Choose the appropriate Salesforce org (for example, Production). Then click **Install in Production** to proceed.
  </Step>

  <Step title="Confirm installation details">
    * Review the installation details provided.
    * Agree to the terms and conditions by selecting the appropriate checkbox.
  </Step>

  <Step title="Complete the installation">
    Click **Confirm and Install** to begin the installation process.
  </Step>

  <Step title="Install in your organization">
    Select whether to install MoEngage for **Admins only**, **All Users**, or **Specific Profiles**. Depending on your option, you may need to grant your users the relevant [MoEngage app permissions](#permission-sets-required-for-the-moengage-app). Click **Install**.

    After clicking **Install**, approve remote site settings by selecting the checkboxes for the four API endpoints corresponding to the MoEngage data centers.
  </Step>
</Steps>

<Note>
  If you do not see MoEngage in the listed apps, contact your dedicated Customer Success Manager. They will share the app build separately.
</Note>

### Permission sets required for the MoEngage app

The MoEngage app comes with the following permission sets.

| Permission set                | Permissions                                                                                                                                                                                                                                                                                                                                                     |
| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **MoEngage Admin Permission** | Assign to users who will create and manage the syncs. No additional permissions are required for admin users. <br />This permission provides access to: <ul><li>Manage MoEngage Connections within Salesforce</li><li>Manage syncs and mappings</li><li>Access the Sync Queue and Use Manual Retry</li><li>Manage the Delete Processed Sync Scheduler</li></ul> |
| **MoEngage User Permission**  | Assign to users who will interact with the synced objects (for example, Leads, Contacts) by creating or updating them. <br />This permission provides access to: <ul><li>Package custom objects and fields</li><li>Custom settings and metadata</li><li>Apex class access</li></ul>                                                                             |

Depending on the type of installation:

#### Installing for admin users only

* Assign the **MoEngage User Permission** permission set to all non-admin users who create or update mapped object records.
* Admin users do not require additional permission sets for basic use.

#### Installing for all users

* **Custom profile users**: No need to assign any permission set.
* **Standard profile users**: Assign the **MoEngage User Permission** permission set to users who create or update mapped object records.
* **Admin users**: No permissions are needed for general access. Assign the **MoEngage Admin Permission** set to specific admins who require access to configuration settings.

<Accordion title="Managing user permissions with custom views">
  We recommend creating a list view to manage permissions easily. From your Salesforce dashboard:

  <Steps>
    <Step title="Open Setup">
      Click the **gear icon** in the top right corner and select **Setup**.
    </Step>

    <Step title="Find Users">
      In the **Quick Find** box, type *Users* and select **Users**.
    </Step>

    <Step title="Create a new view (optional)">
      Click **Create New View** only if no relevant list view exists; otherwise, use an existing view.
    </Step>

    <Step title="Configure the view">
      * Enter a **Label** for the new list view.
      * (Optional) Adjust the **Filter Criteria** to target specific users.
      * Select the **Available Fields** to display in the list view.
      * Choose your preferred **Validity** option, then click **Save** to create the list view.
    </Step>
  </Steps>

  Next, to assign MoEngage app permissions:

  <Steps>
    <Step title="Open Setup">
      Click the **gear icon** in the top right corner and select **Setup**.
    </Step>

    <Step title="Open Permission Sets">
      In the **Quick Find** box, type *Permission Sets* and select **Permission Sets**.
    </Step>

    <Step title="Choose the permission set">
      Click **MoEngage Admin Permission** or **MoEngage User Permission**.
    </Step>

    <Step title="Manage assignments">
      Click **Manage Assignments**, then **Add Assignments**.
    </Step>

    <Step title="Choose the list view">
      Choose the list view you created earlier to display relevant users.
    </Step>

    <Step title="Assign permissions">
      Select the checkbox at the start of each row for users to assign the permission set, then click **Next**. Review your selection and click **Assign** to complete the process.
    </Step>
  </Steps>
</Accordion>

### Important notes

After installation, the package automatically:

1. Creates (or verifies) the required configuration custom-setting records.
2. Schedules the **Delete Processed Syncs** job.

<Note>
  If created during install, the job is owned by the package installer. Reschedule it under an admin user (with the *MoEngage Admin Permission* set assigned) by going to **Setup** > **Scheduled Jobs** > **Delete Processed Syncs** > **Manage** > **Reschedule Job**.
</Note>

If a job with the same name already exists, the system does not duplicate it.

## Creating sandboxes with the MoEngage app enabled

By following these steps, you can control whether the sync remains active or inactive in the sandbox environment, depending on your requirements.

### Full and partial copy sandboxes

* When a full or partial copy sandbox is created from a production environment with an active MoEngage sync, the MoEngage package is automatically installed and the sync is enabled by default.
* To prevent syncing in the sandbox environment, deactivate all connections associated with the MoEngage package.
* If a sandbox template is used and MoEngage package objects are deselected for sync during creation:
  * The package connections are not copied to the sandbox.
  * In this case, no deactivation step is required.

### Developer and Developer Pro sandboxes

* In Developer and Developer Pro sandboxes, no data of standard or custom objects is copied over, so no sync data is copied to the sandbox.
* Only custom settings data (connections and authentication information) is copied. You will see connections in these sandboxes, but no mapping records are present.
* These sandbox types do not require deactivation. We still recommend deactivating connections before creating them.

## Configuring custom settings

When the app is installed, a public configuration custom setting is created with the following default values. Administrators can adjust these values at any time.

To access the custom settings:

<Steps>
  <Step title="Open Setup">
    Go to **Setup** and, in the **Quick Find** search bar, type *Custom Settings*.
  </Step>

  <Step title="Open Custom Settings">
    Click **Custom Settings** from the results.
  </Step>

  <Step title="Open Configuration">
    Click **Configuration**. You will see a list/detail view with six rows representing the settings.

    <Frame>
      <img src="https://mintcdn.com/moengage/PFNGfsshc8y816er/images/partner_41649939572628.png?fit=max&auto=format&n=PFNGfsshc8y816er&q=85&s=bb6b8444b7c8e9840101268f785a1f35" alt="Custom settings configuration page in Salesforce showing six MoEngage app configuration values" width="2404" height="968" data-path="images/partner_41649939572628.png" />
    </Frame>
  </Step>
</Steps>

| Setting name                           | Default | Purpose                                                                                           | Valid values                                                     |
| -------------------------------------- | ------- | ------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
| Flex Queue Limit                       | `50`    | New sync batches are submitted only when the org's Flex Queue has fewer than this number of jobs. | Positive whole number less than `100`. No negatives or decimals. |
| Historic Sync Scheduler Time (minutes) | `5`     | If the Flex Queue is full, Historical Sync jobs are rescheduled after this delay.                 | Positive whole numbers. No negatives or decimals.                |
| Record Deletion Batch Size             | `2000`  | Batch size used by the cleanup job.                                                               | Positive whole numbers. No negatives or decimals.                |
| Record Deletion Interval (days)        | `7`     | How long to keep successful Sync Queue records (and related Exceptions) before cleanup.           | Positive whole numbers. No negatives or decimals.                |
| Sync Queue Batch Size                  | `20`    | Default batch size for real-time processing.                                                      | Positive whole numbers. No negatives or decimals.                |
| Sync Queue Scheduler Time (minutes)    | `5`     | If the Flex Queue is full, real-time processing jobs are rescheduled after this delay.            | Positive whole numbers. No negatives or decimals.                |

These values are created automatically by post-install scripts. Admins can review and adjust them at any time to align with org-specific requirements.

## Create a connected app

<Note>
  Skip these steps if you only want to send data from Salesforce to MoEngage. They are required only for the bi-directional integration — that is, sending event data from MoEngage back to Salesforce.
</Note>

### Step 1: Fetch your domain URL

<Steps>
  <Step title="Open Setup">
    Click the **gear icon** in the top right corner and select **Setup**.

    <Frame>
      <img src="https://mintcdn.com/moengage/cJSG0nHne5L3-Q_X/images/partner_30688827310612.png?fit=max&auto=format&n=cJSG0nHne5L3-Q_X&q=85&s=f200145399c0c62fd1538650591d057f" alt="Salesforce gear icon menu with Setup highlighted" width="2066" height="946" data-path="images/partner_30688827310612.png" />
    </Frame>
  </Step>

  <Step title="Open My Domain">
    In the **Quick Find** box, type *My Domain* and select **My Domain**.

    <Frame>
      <img src="https://mintcdn.com/moengage/cJSG0nHne5L3-Q_X/images/partner_30688853320724.png?fit=max&auto=format&n=cJSG0nHne5L3-Q_X&q=85&s=f52c5927aa5d661b8793e9c86cea04af" alt="Salesforce Setup search showing My Domain in the results" width="1340" height="718" data-path="images/partner_30688853320724.png" />
    </Frame>
  </Step>

  <Step title="Save the domain URL">
    Save the domain URL. You will need it when setting up the data flow from MoEngage to Salesforce.

    <Frame>
      <img src="https://mintcdn.com/moengage/cJSG0nHne5L3-Q_X/images/partner_30688853321620.png?fit=max&auto=format&n=cJSG0nHne5L3-Q_X&q=85&s=7f9d339c0b559eb80f44cfebb0d1ced8" alt="Salesforce My Domain settings page showing the current domain URL" width="2370" height="348" data-path="images/partner_30688853321620.png" />
    </Frame>
  </Step>
</Steps>

### Step 2: Create a new connected app

<Steps>
  <Step title="Open Setup">
    Click the **gear icon** in the top right corner and select **Setup**.

    <Frame>
      <img src="https://mintcdn.com/moengage/cJSG0nHne5L3-Q_X/images/partner_30688827310612.png?fit=max&auto=format&n=cJSG0nHne5L3-Q_X&q=85&s=f200145399c0c62fd1538650591d057f" alt="Salesforce gear icon menu with Setup highlighted" width="2066" height="946" data-path="images/partner_30688827310612.png" />
    </Frame>
  </Step>

  <Step title="Open App Manager">
    In the **Quick Find** box, type *App Manager* and select **App Manager**.

    <Frame>
      <img src="https://mintcdn.com/moengage/cJSG0nHne5L3-Q_X/images/partner_30688853322388.png?fit=max&auto=format&n=cJSG0nHne5L3-Q_X&q=85&s=6f50e9fe19dc1469b16ab9897a06d120" alt="Salesforce Setup search showing App Manager in the results" width="504" height="502" data-path="images/partner_30688853322388.png" />
    </Frame>
  </Step>

  <Step title="Create a new connected app">
    Click **New Connected App**.

    <Frame>
      <img src="https://mintcdn.com/moengage/cJSG0nHne5L3-Q_X/images/partner_30688827316628.png?fit=max&auto=format&n=cJSG0nHne5L3-Q_X&q=85&s=f2424a77d30dabe16b8860b8c5220aeb" alt="Salesforce App Manager with the New Connected App button highlighted" width="1392" height="398" data-path="images/partner_30688827316628.png" />
    </Frame>
  </Step>

  <Step title="Enter app details">
    Enter a name and other details for your connected app.

    <Frame>
      <img src="https://mintcdn.com/moengage/cJSG0nHne5L3-Q_X/images/partner_30688853322900.png?fit=max&auto=format&n=cJSG0nHne5L3-Q_X&q=85&s=12a577eb98ec9b61f15a8bfb2a1436b3" alt="Salesforce New Connected App form with basic information fields" width="1790" height="834" data-path="images/partner_30688853322900.png" />
    </Frame>
  </Step>

  <Step title="Enable OAuth settings">
    Scroll down to the **API (Enable OAuth Settings)** section and select **Enable OAuth Settings**.
  </Step>

  <Step title="Set the callback URL">
    In the **Callback URL** field, enter `https://api-0X.moengage.com` (replace `0X` with your data center identifier).
  </Step>

  <Step title="Configure OAuth scopes">
    Move the **Manage user data via APIs (api)** scope from **Available OAuth Scopes** to **Selected OAuth Scopes**.

    <Frame>
      <img src="https://mintcdn.com/moengage/cJSG0nHne5L3-Q_X/images/partner_30688853323540.png?fit=max&auto=format&n=cJSG0nHne5L3-Q_X&q=85&s=fca173e185d0734a250bb6739f6b572b" alt="Salesforce Connected App OAuth scopes configuration with the api scope selected" width="1890" height="1090" data-path="images/partner_30688853323540.png" />
    </Frame>
  </Step>

  <Step title="Enable PKCE and Client Credentials">
    Select both **Require PKCE** and **Enable Client Credentials Flow**.
  </Step>

  <Step title="Save">
    Click **Save** at the bottom of the page.
  </Step>
</Steps>

<Info>
  After saving, you will see a confirmation page. The app may take around 10 minutes to process. To manage your app, return to the App Manager.
</Info>

### Step 3: Fetch the consumer key and consumer secret

Once the app is created, you can access the **Consumer Key** and **Consumer Secret** in the **API (Enable OAuth Settings)** section. These are essential for setting up the data flow from MoEngage to Salesforce.

<Steps>
  <Step title="Return to App Manager">
    Open the **App Manager**.
  </Step>

  <Step title="View your app">
    Click the dropdown arrow next to your app and select **View**.

    <Frame>
      <img src="https://mintcdn.com/moengage/cJSG0nHne5L3-Q_X/images/partner_30688853324948.png?fit=max&auto=format&n=cJSG0nHne5L3-Q_X&q=85&s=0e67beaaec44be60262a809bf43daa9c" alt="Salesforce App Manager dropdown menu with the View option for the connected app" width="1566" height="730" data-path="images/partner_30688853324948.png" />
    </Frame>
  </Step>

  <Step title="Open Manage Consumer Details">
    Scroll down to the **API (Enable OAuth Settings)** section and click **Manage Consumer Details**.

    <Frame>
      <img src="https://mintcdn.com/moengage/cJSG0nHne5L3-Q_X/images/partner_30688827319188.png?fit=max&auto=format&n=cJSG0nHne5L3-Q_X&q=85&s=bc48255b0b037861f29204c845561b00" alt="Manage Consumer Details button in the OAuth settings section of a Salesforce connected app" width="600" height="274" data-path="images/partner_30688827319188.png" />
    </Frame>
  </Step>

  <Step title="Copy the credentials">
    Click **Copy** below the **Consumer Key** and **Consumer Secret** fields to copy each value.

    <Frame>
      <img src="https://mintcdn.com/moengage/cJSG0nHne5L3-Q_X/images/partner_30688827319572.png?fit=max&auto=format&n=cJSG0nHne5L3-Q_X&q=85&s=135614c656ceec1a18abf02d8c27265e" alt="Salesforce consumer details page with Copy buttons for Consumer Key and Consumer Secret" width="1432" height="260" data-path="images/partner_30688827319572.png" />
    </Frame>
  </Step>
</Steps>

### Step 4: Add the MoEngage Sync Configuration permission set

<Steps>
  <Step title="Open Setup">
    Click the **gear icon** in the top right corner and select **Setup**.

    <Frame>
      <img src="https://mintcdn.com/moengage/cJSG0nHne5L3-Q_X/images/partner_30688827310612.png?fit=max&auto=format&n=cJSG0nHne5L3-Q_X&q=85&s=f200145399c0c62fd1538650591d057f" alt="Salesforce gear icon menu with Setup highlighted" width="2066" height="946" data-path="images/partner_30688827310612.png" />
    </Frame>
  </Step>

  <Step title="Find Users">
    In the **Quick Find** box, type *Users* and select **Users**.

    <Frame>
      <img src="https://mintcdn.com/moengage/cJSG0nHne5L3-Q_X/images/partner_30688853329684.png?fit=max&auto=format&n=cJSG0nHne5L3-Q_X&q=85&s=4939ae161c7c1696e43fe9e9db40c6ad" alt="Salesforce Setup search showing Users in the results" width="300" height="554" data-path="images/partner_30688853329684.png" />
    </Frame>
  </Step>

  <Step title="Select a user">
    Select the username of the user you want to assign permissions to.

    <Frame>
      <img src="https://mintcdn.com/moengage/cJSG0nHne5L3-Q_X/images/partner_30688853330196.png?fit=max&auto=format&n=cJSG0nHne5L3-Q_X&q=85&s=aa6e1ebe9b09059e5502f7a89e390c10" alt="Salesforce user list with a user selected for permission assignment" width="1550" height="720" data-path="images/partner_30688853330196.png" />
    </Frame>
  </Step>

  <Step title="Open Permission Set Assignments">
    Click **Permission Set Assignments**.

    <Frame>
      <img src="https://mintcdn.com/moengage/cJSG0nHne5L3-Q_X/images/partner_30688853330964.png?fit=max&auto=format&n=cJSG0nHne5L3-Q_X&q=85&s=4e7f1440948727d3f1f33b5bd029a67c" alt="User detail page in Salesforce with Permission Set Assignments link visible" width="1542" height="554" data-path="images/partner_30688853330964.png" />
    </Frame>
  </Step>

  <Step title="Edit assignments">
    The page automatically scrolls down to **Permission Set Assignments**. Click **Edit Assignments**.

    <Frame>
      <img src="https://mintcdn.com/moengage/cJSG0nHne5L3-Q_X/images/partner_30688853331220.png?fit=max&auto=format&n=cJSG0nHne5L3-Q_X&q=85&s=823202aabac5b22386f83506cea63cfb" alt="Permission Set Assignments section with Edit Assignments button highlighted" width="1004" height="382" data-path="images/partner_30688853331220.png" />
    </Frame>
  </Step>

  <Step title="Assign the permission set">
    Select **MoEngage Sync Configuration Permission** in the **Available Permission Sets** column and click **Add**. The permission set then appears in the **Enabled Permission Sets** column.

    <Frame>
      <img src="https://mintcdn.com/moengage/cJSG0nHne5L3-Q_X/images/partner_30688853331988.png?fit=max&auto=format&n=cJSG0nHne5L3-Q_X&q=85&s=90fe885a172053565088f774a1f6b587" alt="Permission set picker with MoEngage Sync Configuration Permission added to enabled permissions" width="1652" height="1176" data-path="images/partner_30688853331988.png" />
    </Frame>
  </Step>

  <Step title="Save">
    Click **Save**.

    <Warning>
      If the correct permission set is not assigned, you will receive an error message similar to the following.

      <Frame>
        <img src="https://mintcdn.com/moengage/cJSG0nHne5L3-Q_X/images/partner_30688827324180.png?fit=max&auto=format&n=cJSG0nHne5L3-Q_X&q=85&s=8539869b524e71ca4eaaca2e6a6a2fdc" alt="Salesforce error message indicating a missing MoEngage permission set assignment" width="1546" height="374" data-path="images/partner_30688827324180.png" />
      </Frame>
    </Warning>
  </Step>
</Steps>

## Next steps

Now configure the data syncs:

<CardGroup cols={2}>
  <Card title="Sync Salesforce objects to MoEngage" icon="arrow-right-to-bracket" href="/partner-guide/message-orchestration/crm/salesforce-crm-native/sync-salesforce-objects-to-moengage">
    Sync any Salesforce object to MoEngage as users or events. Newly created or updated records sync in real time.
  </Card>

  <Card title="Sync data from MoEngage to Salesforce" icon="arrow-right-from-bracket" href="/partner-guide/message-orchestration/crm/salesforce-crm-native/sync-data-from-moengage-to-salesforce">
    Forward MoEngage events to Salesforce as Activities or any standard or custom Salesforce object through MoEngage Streams.
  </Card>
</CardGroup>
