Welcome to MSDN Blogs Sign in | Join | Help

Importing Data in CRM 4.0 Made Easier

Let me guess, either you are looking to learn ‘how to import data’ or you are stuck with some issues while importing data. If one of these is the case, then you are at the right place. Importing data into CRM was never this easier. It would be good if I walk you through some scenarios so that you can utilize this blog effectively.

1) You want to import data file to create records in bulk

     a. Your have full control over the what column names you can have in the data file.

     b. You do not have control over what column names can be there in data file

2) You want to use import to update records in bulk. For this pls look at http://blogs.msdn.com/crm/archive/2008/01/25/data-manipulation-tool.aspx.

Scenario 1

Wow, if you have control over column names in the data file, your job has just become very easy. You just need to put column names in the data file same as display names of attributes, and rest will be taken care by system. Let’s go through one example, and everything will be clear.

My example CSV file contains Contacts. File content looks like -

First Name, Last Name, Parent Customer

Manbhawan, Prasad, Microsoft CRM

Arun, Kumar, Microsoft GP

Note that column headings match exactly with the attribute display names of Contacts.

One other very important point is there to note that Parent Customer is reference type of  field in CRM. In CRM, this contains GUID of either another account or contact. In this file, I am giving values as “Microsoft CRM” and “Microsoft GP”. Here system is going to do the hard job of finding right account or contact for this reference. You just need to have value of either primary attribute of target column or GUID. In this example, I already have accounts with name as “Microsoft CRM” and “Microsoft GP” to which I want these contacts to be attached.

When system sees a reference field, it picks up the value and searches for target entity record which has this value either as GUID or Primary Attribute. In this case, it will search for Accounts with GUID or Account Name as “Microsoft CRM”. It will also search for contacts with GUID or Last Name as “Microsoft CRM”. If it is able to find single record, then it will link or else will fail the row.

Launch MSCRM and On the Tools menu, click Import Data.

clip_image001

Choose the data file and delimiters if they are different from default. In this example, I do not need to change the delimiter as my field delimiter is ‘,’ and I do not have data delimiter as none of my data contains field delimiter inside the data. So I go with the default. Click on next.

Choose the record type as contact.

clip_image003

In the data map field, Automatic will be displayed. Here system has mapped all the columns for you automatically, because your column names were same as attributes display names.

Click on next and you are presented with the screen below. Here you can do two things –

1) By default all the records will get assigned to you. But here you can choose to assign these to some other CRM user.

2) You can also choose not to create duplicate records. Duplicate records are identified based upon the published duplicate rules in the CRM System. For more details about how duplicate detection works, you can refer to http://blogs.msdn.com/crm/archive/2008/01/21/duplicate-detection-while-creating-updating-records-in-titan.aspx.

After performing these steps, click next.

clip_image005

On the last screen, you can choose to change the name of the import, which will be surfaced in the grid. Or you can live with default name given by the system. You can also choose to receive an email when Import gets completed.

You can see the status of the Import by going to workplace->Imports. Below is the screen shot. This import will go through Parsing, Transforming, Importing and then it will be completed. You can click on this import entity to see more details about successful creation and also failures.

clip_image007

Scenario 2

If you get a data file which has column names not matching with attribute names. In this case, you will have first map these columns to the CRM attributes, and then proceed with the Import.

Let’s take an example file with content as –

FirstName, LastName

Manbhawan, Prasad

Arun, Kumar

Here are the steps to import it

1) Prepare a Data Map. Data map contains information about which column maps to which attribute in CRM.

2) Import the data using that map

We will start with preparing data map. Go to settings->Data Management-> Data Maps

clip_image009

Click on new and screen below appears. Enter a name of the map. Choose the entity name for which map is being prepared. In this case, it should be contact.

clip_image011

Click on Attributes and screen changes as below. Load the sample data which contains all the column names and unique values if you have picklist columns also. In this example I am loading the data file we started with. Loading sample data file populates the column headings grid and you can map each of these with target attributes of contacts. If you map some column to picklist type attribute, then list values will be enabled and will allow to map different picklist values. In this case we do not have any picklist values.

clip_image013

After mapping all columns, save and exit.

Now start the import as we did in the first scenario, choose the record type and choose the map which we made just now (shown below). Complete the wizard, and you are done.

clip_image015

What can go wrong

1) MSCRM Asynchronous service might not be running on server.

2) Mandatory columns for the entity might be missing in the data file (This will be shown as the error, warning on the “Select Record Type and Map” screen.

3) Reference column might contain values which does not correspond to any target entity records OR corresponds to more than one target entity records. Pls note that reference resolution happens either on GUID or Primary attribute of the target entity.

4) Reference resolution works only with automatic mapping and not when you are providing data map. If you are using your own data map, then your data file should have GUID to have it resolved properly.

5) Data delimiter and field delimiter might not be correct in the data file.

6) If duplicates are getting created, then you might not have the published duplicate rules for this entity.

Manbhawan Prasad

Published Friday, March 07, 2008 1:24 PM by crmblog

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# re: Importing Data in CRM 4.0 Made Easier

One correction: Section - 'what can go wrong'

bullet point-4 - "Reference resolution does not work with manual maps even if you provide GUIDs."

Friday, March 07, 2008 4:36 PM by Manbhawan Prasad

# re: Importing Data in CRM 4.0 Made Easier

and now there is also scheduling tool from Castor for scheduling the imports made by the MS CRM 4.0 import tool: http://www.castorsoft.com/Products/ImportScheduler/ImportScheduler4.aspx

Saturday, March 08, 2008 9:17 PM by castor

# re: Importing Data in CRM 4.0 Made Easier

when i load file, i am getting error "the number of field differ from column heaing"

Wednesday, March 12, 2008 6:27 PM by ze-hussain

# re: Importing Data in CRM 4.0 Made Easier

You might want to check the following -

1) Number of columns in data rows are same as header row.

2) Further to this, you might open your file in notepad and check if for blank values also, it has field separator (,)

Thursday, March 13, 2008 12:28 PM by Manbhawan

# re: Importing Data in CRM 4.0 Made Easier

I've put my csv file in the proper format, eliminated all extraneous characters, and have the sme number of columns in data rows as in the header row, but I still get the error "the number of fields differ from column heading" error.  Please advise.

Glenn Kimball - 972-353-3800 x747

Monday, March 17, 2008 2:28 PM by glennkimball

# re: Importing Data in CRM 4.0 Made Easier

Hi Glenn,

This error comes only when there is a mismatch in number of header and data column or your filed delimiter is also part of your data.

e.g

In the following example the data in First Name field is "abc ,d" contains comma in it and comma (,) is also used as field delimiter.

First Name, Last Name

abc,d ,xyz

Import wizard will flag above error in such case. For succesfully importing such data you'll have to use data delimiter as follows.

"First Name", "Last Name"

"abc,d" ,"xyz"

Can you please check if your csv has this kind of data?

You can do this by going to the failure tab of submitted Import and look at the contents of source row colum.

Hope this helps.

Thanks

Huma

Thursday, March 20, 2008 2:29 AM by Huma

# re: Importing Data in CRM 4.0 Made Easier

Does anyone know the correct format to put .csv file when using DMM - for CRM Live uploade to associate a Contact Entity to the Parent Customer?

I've tried the following:

First Name, Last Name, <Parent Customer Name>

First Name, Last Name, <Parent Customer GUID>

First Name, Last Name, <Name, {GUID}>

None of these work as well as they don't work in the manual instance to upload - can't seem to find the correct format documented anywhere.

Tuesday, March 25, 2008 1:11 AM by aneal@nealabc.com

# re: Importing Data in CRM 4.0 Made Easier

Aneal,

The csv data required to associate a contact entity to its Parent Customer through DMM could be in any format. To migrate such data, you will need to create a lookup mapping. A demo of how to migrate such references/relationships/associations is available@ http://blogs.msdn.com/crm/archive/2008/01/04/microsoft-dynamics-crm-4-0-data-migration-manager-with-john-o-donnell.aspx

You can also find these details in the help that comes with DMM. Search for the page: 'Define Relationship - Wizard Page' in the help file.

Wednesday, March 26, 2008 12:55 AM by Raju Kulkarni

# re: Importing Data in CRM 4.0 Made Easier

I am also haveing import issues like Glenn. I have double and triple checked the CSV format, and tried quoted non-quoted text etc. Keeps saying that the header fields and columns do not match up!.

Any other ideas?

Monday, March 31, 2008 10:27 AM by revs

# re: Importing Data in CRM 4.0 Made Easier

Hi Revs,

Can you share the contents of your csv (header row and data row) for which this this error is coming.

Thanks,

Huma

Tuesday, April 01, 2008 5:56 AM by Huma

# re: Importing Data in CRM 4.0 Made Easier

Thanks for the offer of help Huma. I have managed to find the issue however.

There were invisible characters in the file causing issues - they did not show up in Notepad, but after close inspection in another application I was able to find and remove them.

revs

Thursday, April 03, 2008 6:16 AM by revs

# re: Importing Data in CRM 4.0 Made Easier

I have the same csv issue.

Strange enough if you use any Microsoft product to export a csv file. For instance contacts from outlook to crm or from access.

Also strange that I do not see any synchronisation from outlook to crm where contacts are involved. It is a more likely scenario first having an email system and then choosing a CRM system then the other way around or am I crazy?

Thursday, April 10, 2008 6:01 AM by Ben Hiep

# re: Importing Data in CRM 4.0 Made Easier

Does anyone know the correct format to put .csv file for BULKIMPORT

I've tried the following:

First Name, Last Name, <Parent Customer Name>

First Name, Last Name, <Parent Customer GUID>

But none of these works.Can some one pls help regarding this as crucial for us.

Friday, April 11, 2008 9:53 AM by Shashank

# re: Importing Data in CRM 4.0 Made Easier

Has anyone else run into this problem?

I can import contacts and products but when I try to import account it fails.

I have created a very simple test csv file with 1 data row in notepad and I am using auto-map.  It is failing at the "Transform Parse Data" stage.

Friday, April 11, 2008 5:31 PM by Bob

# re: Importing Data in CRM 4.0 Made Easier

Hi,

I am trying to import data from CSV file but so far I am unable to do that. I have followed the process and at the end clicked "IMPORT" button but nothing has happened thereafter.

Under Workflow/Imports - state says "SUBMITTED"

Under Settings/System Jobs - State says "WAITING"

jobs are in waiting state for last two days.

Can you please help me ?

Tuesday, April 15, 2008 3:34 AM by Manish

# re: Importing Data in CRM 4.0 Made Easier

Hi Manish,

It seems that Microsoft CRM Asynchronous process service is not running on your CRM installation.

if it is not running kindly start it.Import should work fine after this.

Thanks,

Huma

Wednesday, April 16, 2008 2:11 AM by Huma

# re: Importing Data in CRM 4.0 Made Easier

Hi Bob,

What error are you seeing in Failure tab of import form for the data row?

Any error in Tranformation phase usually means either data in lookup/picklist columns are not specified correctly.

For Lookup type of column:

In the column that you use to create the lookup, such as the Parent Customer column in the Contact record type, use the exact value that is in Microsoft Dynamics CRM. For example, if you already have an account named "A Bike Store", the following contacts.csv file could be used to import two contacts with this account as a parent customer:

First Name,Last Name,Parent Customer

Alan,Brewer,A Bike Store

Ann,Beebe,A Bike Store

Important The value used to create the lookup must be unique. For example, if there are two accounts with the name "A Bike Store", the records will not be imported.

For PickList type of column:

Make sure the values used in your source file have consistent capitalization. For example, do not include values for the Rating attribute in Leads as "Warm" and "warm". If the source file values differ just by case, importing records with either variant might fail.

Hope this helps.

Thanks,

Huma

Wednesday, April 16, 2008 2:21 AM by Huma

# re: Importing Data in CRM 4.0 Made Easier

Hi Shashank,

The lookup columns in like "Parent Customer" can only be imported using bulk import if you are using AutoMap.

Kindly see my reply to Bob for the expected data format for lookup type of columns if you are specifying name.Giving a guid also works.

If it doesn't help kindly share the data in row and error you are getting.

Thanks,

Huma

Wednesday, April 16, 2008 2:41 AM by Huma

# Bulk Record Deletion in Microsoft CRM Online

This blog post will cover custom filter-based mass record deletion for a given entity System. Note: If

Thursday, April 24, 2008 11:16 AM by Microsoft Dynamics CRM Team Blog

# Bulk Record Deletion in Microsoft CRM Online

This blog post will cover custom filter-based mass record deletion for a given entity System. In this

Thursday, April 24, 2008 11:59 AM by Microsoft CRM Live Team

# Bulk Record Deletion in Microsoft CRM Online

This blog post will cover custom filter-based mass record deletion for a given entity System. In this

Thursday, April 24, 2008 12:14 PM by Microsoft Dynamics CRM Team Blog

# Duplicate Detection Security Model

Security model of duplicate detection is in accordance with the security flow of MSCRM v4 which is very

Tuesday, April 29, 2008 11:36 AM by Microsoft Dynamics CRM Team Blog

# Duplicate Detection Security Model

Security model of duplicate detection is in accordance with the security flow of MSCRM v4 which is very

Tuesday, April 29, 2008 12:10 PM by Microsoft CRM Live Team

# Duplicate Detection Security Model

Security model of duplicate detection is in accordance with the security flow of MSCRM v4 which is very

Tuesday, April 29, 2008 12:32 PM by Microsoft Dynamics CRM Team Blog

# Duplicate Detection Security Model

Security model of duplicate detection is in accordance with the security flow of MSCRM v4 which is very

Wednesday, May 07, 2008 5:01 PM by Microsoft Dynamics CRM Team Blog

# re: Importing Data in CRM 4.0 Made Easier

This is realy helpful to import data in CRM.

Tuesday, May 13, 2008 5:54 AM by Priyanka Tiwari

Leave a Comment

(required) 
required 
(required) 
 
Page view tracker