Integrate Microsoft Dynamics CRM

  • Updated
The terms audiences and segments are interchangeable. Optimizely has updated all segments to audiences in the Audiences page and is updating the UI in other pages. See Understand audiences 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.

  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.

  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.

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

      

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

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.

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

If a Microsoft Dynamics CRM field does not have a corresponding field in ODP, first create that custom field in ODP. Then, map the custom field to your desired Microsoft Dynamics CRM field using these instructions.

Delete field mappings

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.

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

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.

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.

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.

    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.

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

      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.

  4. Click Save and then click your activation name in the breadcrumb trail.

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

  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.

  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.