Become a Dynamics 365 expert with Syvantis Learn
Provide additional details about the offer you're running.
This store requires javascript to be enabled for some features to work correctly.
Provide additional details about the offer you're running.
Import data into Dynamics 365 Sales, Part 2
Dynamics 365 Sales
This Fast Class continues the Dynamics 365 Sales import series by focusing on CSV files. It explains how CSV files are structured, how to import new records and map their fields to Dynamics 365, and how administrators can configure alternate keys so CSV imports can also update existing CRM records using a unique, recognizable identifier.
Importing Data into Dynamics 365 Sales with CSV Files
Importing data can save significant time when you need to create new records, move information into CRM from another application, update many existing records, or add data from another source to records already in Dynamics 365. In this lesson, we'll focus specifically on importing with CSV files and how they can be used both to create new records and update existing ones.
Who Can Import Data?
Many out-of-the-box Dynamics 365 security roles allow users to import data, including roles such as Salesperson and Sales Manager. If you don't have the option to import data, the necessary permission may need to be added to your security role.
Where Can You Import Data?
Dynamics 365 provides two primary places for importing data:
The in-app import tool is designed for simpler imports and supports formats such as Excel, CSV, and XML. The Data Import Wizard provides additional functionality, including support for text and ZIP files. ZIP files can be particularly useful when you want to upload multiple related files at the same time. For this lesson, we'll use the import tool available directly in the Dynamics 365 user interface.
Why Use a CSV File?
CSV files are useful when data from another application is already available in that format. They can also be useful when you want to update CRM records by matching them to a recognizable unique identifier, such as an Account Number. CSV stands for comma-separated values. A CSV is a text file with a structure that applications can use to distinguish separate pieces of data. Two important properties to understand are:
Understanding the structure of your CSV file can help ensure Dynamics 365 interprets the data correctly during the import.
Importing New Records with a CSV File
One use for CSV imports is creating new CRM records in bulk. For example, you can create a CSV containing multiple Accounts and then upload the file using the import tool. The CSV should contain a header row identifying the information in each column, followed by the records you want to import. During the import, Dynamics 365 maps those columns to CRM fields. If a column header in your CSV matches the name of a field in CRM, Dynamics 365 can automatically map that column. If the names don't match, you'll need to manually map the CSV column to the appropriate field. If you plan to use the same type of CSV file repeatedly, you can save your mappings so you don't have to repeat the mapping process each time.
Remember Your Required Fields
Make sure your CSV contains the information required to create the target record. For example, if Account Name is required when creating an Account, your CSV needs to provide the appropriate Account Name for every new record. After submitting the import, you can track its progress through the import log and confirm that the new records were successfully created.
Updating Existing Records with a CSV File
CSV files can also update existing Dynamics 365 records, but the process is different from updating records with an Excel template. To update records through a CSV import, you need a way for Dynamics 365 to uniquely identify the existing record that each row should update. This is where an alternate key becomes useful.
What Is an Alternate Key?
An alternate key makes a field, or combination of fields, uniquely identify a record in Dynamics 365. Alternate keys are commonly useful in integrations because external applications may not store the internal Dynamics 365 record identifier. Instead, another unique identifier can be used to reliably locate the correct CRM record. For CSV imports, that gives you a practical way to target records for updates using data that's easier to recognize. Two useful examples include:
Instead of relying on an internal record identifier, the CSV can use one of these business identifiers to determine which record should be updated.
Creating an Alternate Key
Setting up an alternate key requires CRM administrator access. To create one, open Power Apps and locate the appropriate table in your solution. From the table's alternate key area, create a new key and select the field that should uniquely identify your records. For example, you could configure Account Number as an alternate key for the Account table. After creating the key, its status will initially show as pending. Dynamics 365 runs a system job in the background to index the column and confirm that the existing data is unique. If duplicate values already exist, the process can fail and you'll need to correct those records. Once the alternate key becomes active, it's ready to use.
Alternate Keys Enforce Uniqueness
Creating an alternate key doesn't only affect imports. It also enforces uniqueness within Dynamics 365. If Account Number is configured as an alternate key, Dynamics 365 won't allow another Account record to be saved with the same Account Number. This uniqueness is what allows Dynamics 365 to reliably use that value to identify the correct record during an import or integration.
Updating Records Using the Alternate Key
Once the alternate key is active, you can prepare a CSV containing the unique identifier and the fields you want to change. For example, your file could contain:
When you begin the import, Dynamics 365 provides an option to use the alternate key. Select the appropriate key, such as Account Number, so the system knows how to match each row in the CSV to an existing record. Because you're updating existing records rather than creating new ones, some required-field warnings may not apply if that information already exists on the records you're updating. After submitting the import, you can monitor its progress through the import log and verify that the intended records were successfully updated.
Choosing CSV Imports for Dynamics 365 Data
CSV imports provide a flexible option for bringing data from other applications into Dynamics 365. You can use them to:
The key distinction is that creating records and updating records have different requirements. Creating records requires the appropriate required fields, while updating records through CSV requires an alternate key that Dynamics 365 can use to uniquely identify the records being changed. With the right CSV structure, field mappings, and alternate keys in place, you can use Dynamics 365 imports to maintain large amounts of CRM data without manually updating records one at a time.
* This transcript summary has been generated from the Fast Class video by Microsoft Copilot. The Fast Class itself was prepared and taught by Syvantis expert consultants.
TUNE INTO THE LIVE CLASS
Ask your questions and get real-time responses from your trusted Syvantis consultants.
What's on the schedule?
Dynamics 365 Business Central
Dynamics 365 Sales (CRM)
Dynamics 365 Customer Insights
Power Platform
Keep learning...
Business Process Designers. Technical Experts. Dedicated Partners.