The Microsoft Dynamics CRM Blog
News and views from the Microsoft Dynamics CRM Team

Owner Mapping/User creation in Import Data Wizard for Microsoft Dynamics CRM Online

Owner Mapping/User creation in Import Data Wizard for Microsoft Dynamics CRM Online

  • Comments 1

Microsoft Dynamics CRM online Nov 2009 Service Update has several exciting features. One of that is the Import Data Wizard that allows rapid Import of data from within the Webapp or Outlook client. This blog covers how record ownership is resolved and how the users are created as part of data import.

Introduction

To whom the records are assigned gets affected by mainly three factors:

  1. Ownership information in the data files, there is a column in data file which contains information about the owner to whom the records should be assigned.
  2. Information provided during mapping of fields in the attribute map page of the Import Wizard and owner mapping information in the map.
  3. User selected in “Review Settings and Import Data “page of the wizard

*When the user specified on the Review Settings and Import Data page does not have sufficient privileges then the imported records get assigned to the user running the wizard. Refer to section “How Privileges Affect owner mapping” at the end of the blog for more details.

Let’s look at this in more details. The following examples illustrate different scenarios.

Scenario 1

If you want to assign all records being imported in different files to a single Microsoft Dynamics CRM user.

Description:

Let us assume you are importing the following data file.

                              clip_image002

  • For this scenario, you do not have to map any source file to User record type.
  • Also, no mapping is required for Owner field of the record type. (here account.csv).

clip_image004

All records in this case would be assigned to the user selected in the “Review Settings and Import Data” page of the wizard. As per screenshot above all records will be assigned to “User 1”.

Scenario 2

If you want to assign different records to different existing Users in Microsoft Dynamics CRM. For this scenario, your data file should contain ownership information in form of Full Name of users already existing in CRM.

                              clip_image006

clip_image008

Map the owner field of account.csv to Owner field of the Entity in which you are importing data (e.g. Account)

In this case the value in the Owner field is checked against the Full Name of the existing users in Microsoft Dynamics CRM and if there is a match then the record is owned by that user. e.g. if there is a user with Full Name “User 1“ in Microsoft Dynamics CRM then Account 1 will be assigned to User 1.

In case if there are two matches or there is no match with existing Microsoft Dynamics CRM users then the record gets assigned to user selected in “Review Settings and Import Data” page of Import Wizard.

If none of the above two scenario fit according to your requirement keep reading ahead. Scenarios covered below details out ways in which you can both resolve as well as create new users.

Scenario 3

The data file (Account.csv) has a field which contains the Id of the user to whom the record should be assigned and the User.csv has details about that owner.

Example: Owner field in Account.csv has ids of users for each account, Account 1 should be assigned to 1111. Further 1111 record in user.csv has other information about the First Name , Last Name and Email of the user .

image

There are two things that can happen for above data

  • Resolve users in the data file with existing users in Microsoft Dynamics CRM.
  • Create new users

Let us go first go through about how users are resolved with existing users based on information in the map.

Import Wizard uses 3 nodes in the data map to resolve ownership information of the existing user. Here is an example of the nodes in data map for owner resolution.

<?xml version="1.0" encoding="utf-8"?>

<Map Name="Example Map" Source="Example Map">

<Description />

<UserIdentifier>

<SourceUserIdentifierForSourceDataSourceUserLink>UserId</SourceUserIdentifierForSourceDataSourceUserLink>

<SourceUserIdentifierForSourceCRMUserLink>Email</SourceUserIdentifierForSourceCRMUserLink>

<TargetUserIdentifierForSourceCRMUserLink>internalemailaddress</TargetUserIdentifierForSourceCRMUserLink>

</UserIdentifier>

<EntityMaps>

----------

        Data map nodes

     Used For

<SourceUserIdentifierForSourceDataSourceUserLink>

The value (field) specified in this node is the field in the User.csv file that is used to map the ownership IDs stored in the data files (account.csv)

<SourceUserIdentifierForSourceCRMUserLink >

The value (field) specified in this node is the field in the User.csv file that is checked against the value for the field in the “TargetUserIdentifierForSourceCRMUserLink” node of the map.

<TargetUserIdentifierForSourceCRMUserLink >

This node specifies the field in CRM whose value is mapped against the value in the field specified in <SourceUserIdentifierForSourceCRMUserLink >

Let’s see how information in the data map is used to resolve ownership information with existing users. In the above example of source data file and data map, Owner value in source data file Account.csv is mapped to value of “UserId” in the User.csv and further the value of email in user.csv file is matched against the internalemailaddress field of User record type in CRM and since it matches with User 1 , Account1 is assigned to “User 1”. Similarly Account2 will be assigned to User 2 and Account 3 to User 3.

Create Users

Besides Resolving users if you want to create users you need to map the fields of the user.csv to the User entity. e.g. In above scenario if you map the First Name , Last Name and Email with the corresponding fields i.e. First Name , Last Name and Email of User record type in CRM , then users would be created in disabled state with that info and records will be assigned to newly created users.

Newly created users are assigned Salesperson Role. Users are created only if the user limit has not exceeded.

Example: In above scenario User4 does not exist in CRM, So User 4 will be created in disabled state and Account 4 will be assigned to User4.

Mapping is displayed in screenshot below also.

clip_image018

While creating users only information for following fields is imported

  • First Name
  • Last Name
  • Primary Email
  • E-mail2
  • Mobile Alert E-mail

It is recommended to map First Name, Last Name and Primary Email attributes. These attributes are mandatory if you create users from the new Users Form in CRM.

In the above scenario the information about how to resolve owners against existing users in CRM is provided in the map itself. There is a way by which you can skip specifying this information and Import wizard will infer the owner information with the mappings that you provide for user.csv. Next Scenario covers that aspect.

Scenario 4

When there is a file named user.csv in the Zip File and no owner mapping information is provided in data map in the form of above mentioned nodes.

In this scenario also, wizard first tries to resolve owners in data file against existing users in Microsoft Dynamics CRM depending on how you have mapped user.csv. If users could not be resolved against existing users, then wizard tries to create new users with the information given in user.csv.

Let us take an Example,

image

   image

In the above example you need to map the Owner Field in Account.csv to Owner Field of Account entity.

Map The UserId of User.csv to Primary key.

Map First Name, Last Name, Primary E-mail, Email 2 and Mobile Alert E-mail to corresponding fields of User Record Type in CRM.

Mapping for user Entity is depicted below.

clip_image030

The field mapped to User (Primary key) {UserId in User.csv} helps to resolve ownership information in data file (account.csv) with the user.csv file. The same information was captured in SourceUserIdentifierForSourceDataSourceUserLink node in above scenario.

Then the information in user.csv is used to resolve users with existing users.

First import Wizard tries to match the values for following fields against CRM fields:

Primary E-mail

or

E-mail2

or

Mobile Alert E-mail

If we get a unique match with some existing user then the entity record gets assigned to the user with whom wizard found a match.

If there is no unique match then the value of fields mapped to First Name and Last Name (both) is checked against value of First Name and Last Name fields of Users in CRM. If there is a match then corresponding records is assigned to that user.

Examples of How User Resolution happens for above data files

  • Account1 is assigned to 1111, corresponding to 1111 the value of Primary E-mail matches Primary Email Address of User 1 therefore Account1 will be assigned to that user.
  • Account2 is assigned to 2222, corresponding to 2222 the value of Primary E-mail is not matching but there is a match with Email2, therefore Account2 gets assigned to User2.
  • Account3 is assigned to 3333, corresponding to 3333 neither Primary E-mail address nor Email2 is matching but Mobile Alert E-mail matches, therefore Account3 gets assigned to User3.
  • Account4 is assigned to 4444 , corresponding to 4444 none of the values in Primary Email , E-mail2 ,Mobile Alert E-mail field matches with values in CRM for any user , then the values of First Name and Last Name are compared and it matches therefore Account4 gets assigned to User4.

If there are more than two matches or no match for the same entry in user.csv then records gets assigned to the user selected in “Review Settings and Import Data” page of the Wizard.

Example of User creation

None of fields of User 5 matches with existing users in CRM so this User gets created in disabled state and Account5 gets assigned to this user.

How Privileges Affect Owner mapping

Owner resolution: If the User who is running the wizard does not have sufficient level of create privilege to create records of an entity with a user who should own the record as per the resolution during import, then records would be created and assigned to user running the Wizard.

Example: Let us assume Nancy is running the Wizard and as per the information provided in user.csv and account.csv, Account1 should have been assigned to Kevin but Nancy does not have sufficient create privilege on account record type to create accounts setting Kevin as the owner, then account1 will be assigned to Nancy.

User creation: User must have privileges to create users for him to be able to create users through import data wizard.

Cheers,

Dinesh Kumar Garg



  • Good afternoon,

    I'm trying to import a .csv file, all the columns columns are mapped correctly. I begin the import wizard and when I get to assign import records to, it will not allow me to choose another user. My security role is system administrator. I'm at a loss. Any suggestions?

    Thanks!

    Sheryl

Page 1 of 1 (1 items)
Leave a Comment
  • Please add 7 and 6 and type the answer here:
  • Post