Creating Custom Data Map For Import

We have different options to enter customer related data into a CRM. We can insert it manually, or can have some automation. Dynamics CRM also has an out of the box data import utility that we can use for feeding the data into Dynamics CRM, using different formats, like –xml, csv, txt, xlsx and zip. To feed the data into CRM, we need a Data Import Template in which we can input the required data. We can design our own data template or can download Data Import Template from the Data Management section. While using the Data Import Template, we don’t need to do any field mapping, because CRM does the mapping, automatically. We can also design custom data import template and can use the exact display name of the field for automatic mapping of the columns, during the import process.

But, sometimes, while designing custom templates, we may not use the exact display name of target entity fields. In that case, we need to define custom map to complete the data import. In this article, we are going to demonstrate how to design custom data maps.

We can import a single entity or multi entity record using data templates. So, we can create single entity data maps or multi entity data maps. While designing data maps, we can define it under EntitiesPerFile, like the following:

<EntitiesPerFile>Single</EntitiesPerFile> or <EntitiesPerFile>Multiple</EntitiesPerFile>

Let’s take an example. We have a custom entity event and we want to import the data to the following different data type fields:

We can use the following attribute map for text, currency, number, two options, and date time fields.


To map lookup fields, we need to use the following attribute map:

And, to map option set field, we need to provide all possible maps, like the following.


If our import file has some option which is not available in CRM, it will be added to that option set as a new value during the import by CRM. Finally, we can include all attribute maps using the following schema and can import to CRM by selecting import options under data map:
CRM will validate the data map during import and will display if there is any mismatch in entity or field name. Similarly, we can create multiple entity data maps, using the following schema: