CRM 2011 Data Import Wizard: Importing Related Accounts and Contacts

If you’re new to CRM 2011 you may have imported a sample set of your organization’s data, only to run into the following gray areas:

1. When importing Accounts, how do you map and populate the Primary Contact lookup?


2. When importing Contacts, how do you map and populate the Parent Customer lookup?


The Primary Contact (Account) and Parent Customer (Contact) fields establish relationships between Accounts and Contacts, but it can be tricky to set up your data import so that you don’t get failures.  Failures usually occur when you import one file at a time.  Think about it – if you import the Accounts and try to look up to a Primary Contact, but the contacts don’t exist yet, it won’t know what to look for.  Same thing goes when you import Customers and do a lookup to Parent Customer without already having those accounts in the system.  Or, you import both account and contact files at once, but are unable to establish the lookup connection because your data is not perfectly lined up.

Fortunately, it can be done but there are a few steps to mind to get it to work.  Here’s what to do:

1. Create a .csv file each for Accounts and Contacts.  This will not work if you try to run the same single file through the data import wizard twice.  When creating the two files, you may choose to download a data import template to make the data mapping easier later on.

Sample Accounts File (please excuse the unimaginative data set).


Sample Contacts File.  Since you might have more than one contact per one account, I’ve added an additional contact for Account A and Account D.


2.  When your data is cleaned up, zip these two files together.


3.  Start the Data Import Wizard and browse for the .zip file you just created.  Hit Next, and Next again.

image image

Choose the Default System Map and click Next.  Map up your Accounts and Contacts record types (aka entities).


Map Account fields until you get the green checkmark.  Note that Primary Contact is a lookup.  Do the same for Contacts.


OPTIONAL: Please note that you can if you click on the lookup icon image, you can change the field you are mapping to.  An example scenario of this might be if you wanted to do a lookup to the Account Number rather than the Account Name (which is the default lookup).  If you have multiple accounts with the same name, this will save you from data duplicate import failures when you run the import.


Review mapping and click next.  Review data settings, add a map name if you want to, and click submit.  Then finish the job.


4. Review your results by going to Workplace –> Imports and check on the status of both of your import files.


5.  If you have failures or partial failures (like I did when I tried this with a different set of data), you can check your import file to find details about why your files failed.  Just double-click the import file to open it, and look at Failures.  In this example, I already had a bunch of duplicate contacts as well as a duplicate lookup reference.  When that happens, it’s troubleshooting time and usually requires some more data cleanup.  Here’s a great help file that shows common ways to troubleshoot data import failures.


That’s it!  I’d recommend testing this with a very small subset of your data so you can understand how to clean up the larger set of data for the real import.



Comments (21)

  1. David Swift says:

    Excellent – Although could of done with finding this post a few months ago ! Would of saved me hours of time using Scribes services . . .

  2. Blaine Hague says:

    Fantastic post – you are a lifesaver!!

  3. Nick Maxwell says:

    Hi Laura – great post – really helped us. One thing though, when we click on the link for the great help file – we get :

    HTTP Error 404 – Not Found

    any chance you can re-check the link and re-post?

  4. Biswajit says:


    I am geting a peculiar kind of error with this data impirt now.Could you please sugegst something in this regards???


    1>Downloaded the uSer.xml from the Download data import template link.

    2> uploaded atleast 10 users using import data link(We have some PlugIns running on create and update of systemuser which absolutely works fine with this tool too)

    3> In the import SourceFile form  we can see the numbers for success:9 and partial failure:1

    4> After Investigation we can see for one user some lookup fields has not been set.(where as for all other Successful Users in the User.xml has absolutely same configuration as this Partial Failure User)

    We did this test for 10/20/30/50/100 users in different slots,and each time this is happening intermittently.

    And this is wrong as per our Business requirement Conditions.

    Kindly please suggest upon this.Is there any configuration check needed?…/253f9360-4da7-4157-b24e-b645a59e3b12

  5. Mike says:

    What contact is set at the primary contact?  In your example you have multiple to contacts related to an account.  How do I set which contact is the primary contact?

  6. Mike V says:

    Every time I try this process, i get a message that the lookup reference can't be found. I don't understand how it can relate the two entities together.  It tries to create the account first but the contact doesn't exists so it failes. Am I missing something here?  This doesn't seem to be a valid solution to this issue.

  7. heguangm says:

    That is a just a stupid/not working feature!

    It requires too much cleanup work. With that, how about just typing in all manually?

    The programmer can not consider a simple and more common case: if could not find the account of a contact, just create one! if could not find a primary contact, just leave it open.

  8. Steve says:

    I get the same issue as Mike V. import errors because it can't find the contact. Some of the records go through but then the parent customer is not linked. Has this been broken from a recent update as it appears it worked for some people before?

  9. Donal Murphy says:

    Thank you for this help, you have made a complex issue a bit more easy for me. To me, there is too much complexity around the import, other packages make things a lot simpler.

    Thanks again though, really appreciated

  10. Peter Wang says:

    Do you have the performance info about this method? I have 3m to 14m of contacts for this new implementation. Thanks in advance.

  11. Edwin says:

    Thanks for this. Other methods are pron to failure, this one is a breeze.

  12. Scott says:

    Good Stuff – well done.

  13. David XRMer says:

    Still sees a little painful, ended up using Simego's Data Sync Solution.

  14. Users, Security Roles and Teams says:

    Is there anyway to successfully import users using the wizard and mapping the existing Security roles teams and Business unit at the same time?

  15. Sheenam says:

    I tried to create a relationship of 1: N between two tables using native import but lookup referenece for field is not enabled in my case.

  16. john says:

    What i really think is that its not the so deep story about the crm….i have searched in google about the crm site and found that Is the most effect i have ever found for CRM./…  Everyone Must Try

  17. john says:

    please check the link below if you are really interested to know about crm

  18. Youcef says:

    Hi Laura,

    Very nice post by what if we had to import data from a relational database with its own ids ?

  19. April says:

    Thank you for sharing your thought with us. I really appreciate it and a very useful.

  20. Dean says:

    Thanks that was clear and simple to follow, It was just what I was looking for.

  21. @np_lima says:


    I know this thread is old, but hopefully someone can find it like I did!

    I'm trying to do the same kind of data import but with the Quote and Quote Product as my target entities.

    The scenario is: a company has a technical configurator application which will provide the right quantities and SKUs of the products. Behind the scenes there is a lot of calculations and floorplans that are produced with the technical configuration, therefore using CRM for that task would not be practical.

    I would therefore like to get the "bill of materials" from the configurator (XLS, CSV) and import it to the quote AND to the Quote Product. So far, I've stripped down my import file to hold only the mandatory fields, and while the Quote is created in CRM, the Quote Product is not. The Data import wizard (CRM 2015 Online, version picks up both Excel files from my ZIP archive but when it is done with the import, it gives me a generic "Unexpected error" with code 0x80040216.

    In my last attempt, I tried using Write-in for importing the product into the Quote Product, even though it's not really what I'd like to do for a corrects solution.

    My import file for Quote Product contains:

    (Do Not Modify) Quote Product,(Do Not Modify) Row Checksum,(Do Not Modify) Modified On,Select Product,Existing Product,Write-In Product,Unit,Price Overridden,Price Per Unit,Quantity,Manual Discount,Tax,Requested Delivery Date,Salesperson,Ship To,Ship To Name,Ship To Street 1,Ship To Street 2,Ship To Street 3,Ship To City,Ship To State/Province,Ship To ZIP/Postal Code,Ship To Country/Region,Ship To Phone,Ship To Fax,Freight Terms,Ship To Contact Name

    ,,,Write In,,200 m of Ethernet cable,Primary Unit,,1.00,200.00,,,,,,,,,,,,,,,,,

    If there's nothing but the mandatory fields and the automatic mapping is actually right, I can't see why this would not work. Any ideas?

    Thanks in advance.