---
title: Integrate Microsoft Dynamics CRM
slug: data-platform/docs/integrate-microsoft-dynamics-crm
docTags: 
createdAt: 2026-08-10T12:05:20.000Z
---

:::hint{type="info"}
**Note**

The terms *audiences* and *segments* are interchangeable. Optimizely has updated all *segments* to *audiences* on the **Audiences** page and is updating the UI on other pages. See  [Understand audiences](docId\:v-gHiL9jfINBey-4QNtFM) to get information on audiences.
:::

Integrate Microsoft Dynamics 365 (Dataverse) CRM to import your data into Optimizely Data Platform (ODP). This integration maps your Microsoft contacts and leads to ODP customer profiles, and accounts and opportunities to ODP custom objects. After import, ODP combines CRM records with your other customer data, letting you use them for analytics, machine learning, segmentation, and activation across marketing channels.  

The data syncs when you complete the configuration and continues to sync hourly afterward.

## Prerequisites

- A Microsoft Dynamics 365 (Dataverse) environment and its **Environment URL**.
- Permission to grant app permissions when Dynamics requests access to your ODP data.
- Access to ODP with the Microsoft Dynamics CRM app available in the **App Directory**.

## Update API app consent setting

Complete the instructions in this section if your app consent setting for the API channel is set to **Opted Out**. This setting must be set to **Opted In** for this app to send data.

1. Go to **Settings > App Consent Settings** in ODP.
2. Set the **Api** app's **Default Consent** to **Opted In**.

::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/lgm8j6oL0WYDtyHza3n-2_app-consent-settings-app-consent-settings-table.png" size="90" isUploading="false" width="800" height="522" darkWidth="800" darkHeight="522" showCaption="false"}

3. Click **Update Consent** in the confirmation prompt.

## Configure the integration

1. Go to **Data Setup >** **App Directory** in ODP.
2. Select the **Microsoft Dynamics CRM** app.

::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/ZtHa_Q7DpAP8B1R2TmyWr_app-directory-microsoft-dynamics-crm-search-result.png" size="90" isUploading="false" width="800" height="256" darkWidth="800" darkHeight="256" showCaption="false"}

3. Click **Install App**.
4. Click the **Settings** tab.
5. Expand the **Connection** section and enter the **Environment URL** of your Microsoft Dynamics CRM instance. Click **Connect to Dynamics 365**.

::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/vSVM8BHsEYedXZTsX4rnu_settings-connect-to-dynamics-365-button.png" size="90" isUploading="false" width="800" height="236" darkWidth="800" darkHeight="236" showCaption="false"}

6. Click **Allow** on the **App Permissions** prompt to let Dynamics access your ODP data. 

::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/oZsVHVSYQomi8loeLJusg_app-permissions-app-permissions-allow-dialog.png" size="30" isUploading="false" width="630" height="891" darkWidth="630" darkHeight="891" showCaption="false"}

7. Expand and click **Test Connection** to retrieve a sample account from your Dynamics environment and verify the connection. The account name displays as a notification.

## Sync data

The **Data Sync** settings control which Dynamics record types are imported into ODP. Each record type is turned off by default. When a type is off, both its hourly scheduled sync and its **Manual Sync** action stop, and the app does not import that type until you turn it back on.

When you toggle on a record type, the app adds a matching field map section for it. For example, **Sync Contacts** adds a **Contact Field Map** section, and **Sync Leads** adds a **Lead Field Map** section. See [Create additional field mappings](docId\:OvWuqImfu09nyrO7QPcbl) for how to map the Dynamics fields to the corresponding ODP fields. 

To choose which record types to import:

1. Go to the **Settings** tab.
2. Expand **Data Sync**.
3. Turn on the toggle for each record type you want to import.
   - **Sync Contacts** – Import Dynamics Contacts into ODP customer profiles.
   - **Sync Leads** – Import Dynamics Leads into ODP customer profiles.
   - **Sync Accounts** – Import Dynamics Accounts into ODP custom objects.
   - **Sync Opportunities** – Import Dynamics Opportunities into ODP custom objects.
4. Click **Save**.

::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/rJHcZtHZqPojmae3P4SO5_data-sync-data-sync-toggle-options.png" size="90" isUploading="false" width="800" height="320" darkWidth="800" darkHeight="320" showCaption="false"}

### Create additional field mappings

The **Contacts**, **Accounts**, **Opportunities**, and **Leads** sections each include a table that lists the Microsoft Dynamics CRM fields that sync to ODP by default. Create field mappings to sync additional fields not listed in the tables.

1. Expand the section where you want to create field mappings: **Contacts**, **Accounts**, **Opportunities**, or **Leads**.
2. Select the Microsoft Dynamics CRM field from the first drop-down list.
3. Select the ODP field you want to map the Microsoft Dynamics CRM field to from the second drop-down list.
4. Click **Save Field Map**.

::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/7AnyyG5egq2RCMfNqjoY1_contact-field-map-contact-field-map-table.png" size="90" isUploading="false" width="800" height="527" darkWidth="800" darkHeight="527" showCaption="false"}

Repeat these steps for each field mapping you want to add in each field type section.

:::hint{type="info"}
**Note**
If a Microsoft Dynamics CRM field does not have a corresponding field in ODP, first [create that custom field in ODP](docId\:xSe13VUhsS-w2QE-GUxIZ). Then, map the custom field to your desired Microsoft Dynamics CRM field using these instructions.
:::

### Delete field mappings

:::hint{type="info"}
**Note**
If you have a field mapping between ODP and Microsoft Dynamics CRM and delete that field in Microsoft Dynamics CRM, you must delete that field mapping from the integration settings.
:::

1. Expand the section where the field mapping you want to delete is defined: **Contacts**, **Accounts**, **Opportunities**, or **Leads**.
2. Select that mapping from the **Field Map** drop-down list.
3. Click **Delete Field Map**.

::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/ZtN4q3OUFbAcfbv7MST9u_contact-field-map-field-map-entry-delete-section.png" size="100" isUploading="false" width="800" height="212" darkWidth="800" darkHeight="212" showCaption="false" indent="1"}

Repeat these steps for each field mapping you want to delete in each field type section.

### Run a manual sync

After mapping your fields, you can run a manual sync for each data type to back-fill data after an error or to test the integration without waiting for the next scheduled run. To run a manual sync, complete the following steps:

1. Expand **Manual Sync**.
2. Set an optional date range to limit which records the sync imports. Enter each date in `YYYY-MM-DD` format, for example `2026-01-31`.
   - **Sync From** – Import only records modified on or after this UTC date, inclusive.
   - **Sync To** – Import only records modified on or before this UTC date, inclusive.
   - Leave both fields blank to resume from where the last run finished.
3. Click a record type, such as **Sync Contacts**, to sync that type only. Click **Run all syncs** to sync every enabled record type.

:::hint{type="info"}
**Note**
A dated run re-imports every record modified within the range but does not change the normal incremental sync position.
:::

### Check sync progress

The **Current progress** list shows the status of each job:

- **Synced up to** – The modified-on date of the newest record imported into ODP. Back-fill runs for earlier dates do not change this value.
- **Last run** – The date and time the job last completed, and the number of records it imported.

## Use Microsoft Dynamics CRM data in ODP

As your Microsoft Dynamics CRM data syncs to ODP, it creates corresponding customer profiles. You can then create audiences to pull those customer profiles based on Microsoft Dynamics CRM data. For example, create audiences to differentiate customers as Microsoft Dynamics CRM leads or contacts, or to pull customers based on a Microsoft Dynamics CRM account stage or opportunity they are associated with.

### Create an audience for Microsoft Dynamics CRM Leads

1. Go to **Customers > New Audience > Standard Audience**.
2. Enter a name (for example, *Microsoft Dynamics CRM Leads*) and click **Create**. Select the following:
   - **Who?** – Select **Customers with certain attributes**.
   - **With attribute** – Select **Last Seen Microsoft Dynamics CRM Lead ID**.
   - **Last Seen Microsoft CRM Lead ID** – Select **Is**, then the lead ID from the list.
3. Click **Save**.

::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/Y58bthSKD2G9yiGXXoUb5_microsoft-dynamics-crm-leads-segment-builder-leads.png" size="100" isUploading="false" width="800" height="119" darkWidth="800" darkHeight="119" showCaption="false" indent="1"}

### Create an audience for Microsoft Dynamics CRM Contacts

1. Go to **Customers > New Audience > Standard Audience**.
2. Enter a name (for example, *Microsoft Dynamics CRM Contacts*) and click **Create**. Select the following:
   1. **Who?** – Select **Customers with certain attributes**.
   2. **With attribute** – Select **Last Seen Microsoft Dynamics CRM Contact ID**.
   3. **Last Seen Microsoft CRM Contact ID** – Select **Is**, then the contact ID from the list. 
3. Click **Save**.

::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/VQWwExRQ9o1UZ9BZ00ssG_microsoft-dynamics-crm-contacts-segment-builder-contacts.png" size="100" isUploading="false" width="800" height="113" darkWidth="800" darkHeight="113" showCaption="false" indent="1"}

### Create an audience for a Microsoft Dynamics CRM account stage

1. Go to **Customers > New Audience > Standard Audience**.
2. Enter a name (like *All Active Microsoft Dynamics CRM Customers*) and select the following:
   - **Who?** – Select **Customers with certain attributes**.
   - **With attribute** – Select **Microsoft Dynamics CRM Account Name**.
   - **Microsoft Dynamics CRM Account Name** – Select **Is**, then the account name from the list. 
   1. Click **Done**.
3. Click **Save**.

::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/0PJlWl8-vFM5DK7cViIMr_all-active-microsoft-dynamics-crm-segment-builder-account-members.png" size="100" isUploading="false" width="800" height="115" darkWidth="800" darkHeight="115" showCaption="false" indent="1"}

## Sync data from ODP to Microsoft Dynamics CRM

First, create an activation to sync your ODP audiences and data to Microsoft Dynamics CRM on a one-time or recurring basis. Then, within that campaign, add a touchpoint with Microsoft Dynamics CRM Sync as the channel. Configure that touchpoint to sync to a Microsoft Dynamics CRM contact or lead.

### Create an activation

1. Go to **Activations > Overview**.
2. Click **Create New Campaign**.
3. Click **One-Time** to sync your audiences and data once. To set up an automated, recurring sync, click **Behavioral**.
4. Click **Create From Scratch**.
5. In the **Enrollment** section, enter a name for your activation representing the data you are syncing to Microsoft Dynamics CRM (for example, *2H 2026 Opps*).
6. Select your desired audience and click **Apply**. Alternatively, click **Create New Segment**, select your desired audience conditions, and click **Save**. 
7. Expand **Enrollment Rules** and toggle the **must not have matched this campaign in the last 7 days** setting off.

:::hint{type="info"}
**Note**
This should not affect a one-time campaign, but turning this setting off ensures you will not have any issues if you rerun this campaign.
:::

![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/Thopa52ClffkP85XFAPUx_campaigns-2h-2026-opps-enrollment-rules-section.png)

### Add a touchpoint

1. Expand **Touchpoints** within your activation.
2. Click to edit **Touchpoint 1** and select **Microsoft Dynamics CRM Sync**.
3. Expand **Configure** and complete the following fields:
   - **Create/Update Object** – Select **Contact** or **Lead**. This determines whether the activation syncs a Microsoft Dynamics CRM Contact or a Microsoft Dynamics CRM Lead.
   - **How to sync records** – Choose from the following:
     - **Create or update** – Send email addresses to Microsoft Dynamics CRM, which creates new records in Microsoft Dynamics CRM if they do not exist. 
     - **Only update existing records** – Send only the Microsoft Dynamics CRM contact or lead ID, which only updates existing records in Microsoft Dynamics CRM.
     - **Always create new records** – Always create new records in Microsoft Dynamics CRM, even if they exist.  
   - **Dynamics Contact ID** – ODP automatically populates these fields for you. They are not editable.
   - **Number of Additional Fields** – (Optional) Select the number of additional Microsoft Dynamics CRM data fields you want to sync (up to 20).

     :::hint{type="info"}
     **Note**
     A drop-down list and input field display for the number of additional fields you selected. In each **Field #** drop-down list, select the Microsoft Dynamics CRM field you want to populate. In each corresponding **Field # Value**, enter the ODP customer attribute you want to send into the selected Microsoft Dynamics CRM field. For example, if you selected **First Name \[String]** from the **Field #** drop-down list, enter `{{customer.first_name}}` for the corresponding **Field # Value**.
     :::

     ![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/52vMMLcTmrAspQiLgyMar_configure-configure-dynamics-sync-fields.png)
4. Click **Save** and then click your activation name in the breadcrumb trail.

::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/x-o_UpCRsAZWryIYETTqa_campaigns-2h-2026-opps-touchpoint-1-touchpoint-breadcrumb-header.png" size="100" isUploading="false" width="800" height="23" darkWidth="800" darkHeight="23" showCaption="false" indent="1"}

5. Click **Select start time and schedule** in the Touchpoints section.

::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/zBg_JCvcFrq2p-IyUZHIj_touchpoints-select-start-time-and-schedule.png" size="100" isUploading="false" width="800" height="124" darkWidth="800" darkHeight="124" showCaption="false" indent="1"}

6. For a one-time sync (one-time campaign), complete the following settings, then click **Apply**:

   1. **Send Date** – Enter the date you want to send the data to Microsoft Dynamics CRM.
   2. **Send Time** – Enter the time you want to send the data to Microsoft Dynamics CRM.
   3. **Time Zone** – Select the time zone in which you want to send this data.
   4. Click **Apply**.

   ::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/cE0PbNU2WHmD-MmuRfd0L_send-date-send-date-time-time-zone-form.png" size="40" isUploading="false" width="555" height="539" darkWidth="555" darkHeight="539" showCaption="false"}
7. For a recurring sync (behavioral campaign), complete the following settings, then click **Apply**:
   - **Recurring or Continuous** – Select **Recurring**.
   - **Start Date** – Enter the date you want to send the data to Microsoft Dynamics CRM.
   - **End** – Defaults to **Never**. If you want to end the Microsoft Dynamics CRM data sync on a specific date, set that here.
   - **Repeats** – Set to **Daily**.
   - **Repeat Every** – Set to **1 day**.
   - **Timing** – Enter the time you want to send the data to Microsoft Dynamics CRM.
   - **Time Zone** – Select the time zone in which you want to send this data.
8. Click **Save** and then click **Go Live**. Your sync starts at your designated start date/time.

::Image[]{src="https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/GxXt1QP2JqKU7OJIx-CBs_campaigns-2h-2026-opps-save-and-go-live-buttons.png" size="100" isUploading="false" width="800" height="33" darkWidth="800" darkHeight="33" showCaption="false" indent="1"}
