Dynamics 365 Marketing List Data Migration


I recently worked on a Dynamics 365 for Sales project where we needed to migrate Marketing List data. If you have ever tried to do this using the out of box import data tool you will find it’s not possible. The Marketing List can be imported however the linkage to accounts / contacts or leads cannot.

The Solution

In summary the solution is fairly straight forward and involves a new entity and a plug-in. Once these two are in place you can import the list members into the new entity and the plugin will take care of setting up the Marketing List relationship.

I’ve outlined the steps to do this below:

  1. Create a new entity called List Member with the following attributes:

Schema Name: new_listmember

Many to One Relationships (N:1):

  • Contact:
    • Relationship Name: new_listcontact
    • Lookup Field Name: new_contactid
  • Account:
    • Relationship Name: new_listaccount
    • Lookup Field Name: new_accountid
  • Lead:
    • Relationship Name: new_listlead
    • Lookup Field Name: new_leadid
  • Marketing List:
    • Relationship Name: new_marketinglist
    • Lookup Field Name: new_marketinglistid
  1. Publish the entity
  2. Create a new plugin to create the marketing list association as the a new List Member record is created.

Register the plugin and add a step with the following attributes:

Message: Create

Primary Entity: new_listmember

Execution Stage: PostOperation

The plugin code is outlined below:

  1. Import the data using the List Member entity.

Note:  If importing a mixture of marketing list types (i.e. contacts and accounts and /or leads) ensure each List Member record contains only one reference. I.e. split out contacts and accounts into separate list member records.

Good luck with the import! Any questions, please comment below.

Leave a Reply

Your email address will not be published. Required fields are marked *

Recent Posts