I’ve been going through the painful way of understanding how NOT to use the data import file. We had created a huge mess at the time and it took weeks to fix the whole thing. 🤯 Only because of one field we got wrong. Trust me, you don’t want this to happen to you.
Therefore, in this article, I want to discuss how you can ensure your data imports run smoothly. 🤓 We’ll look at the types of data import tools available to you and what steps you need to follow in order to prepare your import file in the right way.
Which Salesforce Data Import Tool Should You Use
First of all, it’s important to understand which tool you should choose for what type of data import, data update, or even data deletion. While we will focus on data import in this article, I’ll give you a breakdown of the main data management tools every Salesforce Administrator should be familiar with.
These tools are Data Import Wizard and Data Loader:
Data Import Wizard
The Data Import Wizard comes right out of the box and is accessed through the Salesforce Setup interface. As the name reveals, the Data Import Wizard can only do imports/updates. It’s limited to the Standard Objects Accounts, Contacts, Leads, Solutions, and Campaign Members, but unlimited Custom Objects. You can choose to verify duplicates and choose whether or not you want to trigger workflow rules or processes.
Data Loader App / Dataloader.io
Then we have the Data Loader. It comes in two versions:
Version 1: The Data Loader App. This one is also available through the Setup, however needs to be downloaded and installed on your computer before you can use it. It looks a bit like a dinosaur but is still loved by so many Salesforce Admins because it’s the most versatile of the data management tools.
Version 2: The Dataloader.io website is the modern cloud-based alternative. It can be launched from the Setup menu too. It is a paid service, however can be used for free to manage up to 10,000 records of up to 10MB per file.
Both Data Loader versions support imports, updates, exports, and mass deletes for pretty much all of your Standard and Custom Objects. Using the command line you can even automate imports and exports, for example for regular data migrations from/with other systems. Both Data Loader versions also support saving field mappings which are super handy for those regular data imports. They do not support duplicate checks though and can’t turn off workflow rules/processes.
Here’s an overview of their main differences and when to use which data management tool and what else you need to consider:
As mentioned earlier, in this article we will further focus on data imports because they require the most careful preparation.
Differences Between Salesforce Data Import and Data Update
When you do an import, you need to differentiate between data import and data update. You can choose between the two or even combine the two actions in one upload.
Each Salesforce record is being associated with a unique record ID. This means, if you are doing a data import to create entirely new records, Salesforce will automatically generate a unique record ID for each new record.
However, if you are doing a data import to update existing records, you need to tell Salesforce which records need to be updated. Hence, you must reference the existing record IDs.
And this is the tricky part. If you don’t include the record ID in your data upload, Salesforce will create new records instead and you’ll end up with duplicates.
Now, where do you find the record IDs of the records you want to update? You’ve got three options:
- In the URL of the record.
- By including the ID field into the corresponding report.
- By including the ID field in the data export when using the Data Loader.
Each of these options will give you a different number of digits, either 15 or 18. How does this matter? This is relevant for things like V-lookups in an Excel spreadsheet. Excel does not care about upper or lower cases, hence some of the record IDs will appear as duplicates. Therefore, in case you need to use the data for V-lookup purposes, it’s safer to use the 18 digits.
By the way: The number of digits does not matter for the data upload process. It will work with either number.
What Does a Salesforce Data Import File Look Like
The data import file needs to match the structure of the Salesforce Object which contains the type of records you want to upload. The structure of any Salesforce Object is the structure of a table, like an Excel or CSV. Depending on the type of Object, you need to include the relevant rows and columns.
Data uploads must be done from a CSV file. In case you’ve got an Excel in front of you, make sure to convert it to CSV first.
Here’s an example of an import file related to the Account Object:
Apart from the record IDs we discussed earlier, there are a few other items you should be verifying before you run the import.
Don’t Miss These Steps When Preparing Your Salesforce Data Import File
Therefore, here’s a checklist for you of the most important items you need to verify before you start the import.
- Verify whether there are any mandatory fields that may be missing, or other data validation rules you may have in place. Also, do all fields you want to import exist in Salesforce or do you need to create custom fields.
- Clean up potential duplicates. Yes, the Data Import Wizard has duplicate options available however they may not necessarily work in 100% of the records. Therefore it’s always better to check upfront if feasible.
- Verify picklist values. If a value in your CSV file does not match existing picklist values, it will still import but not actually add the value to the picklist. Picklist values can be enforced. This means, records containing mismatching values will not be imported.
- To keep your Salesforce data clean and tidy, it’s good practice to run a spell check, verify naming conventions and data formats like country codes and so on.
- If you are importing currency fields, make sure the currency exists and is included in the file, not just the amount. They are essentially two different fields.
- And remember the field mapping. It’s best to rename the column headings to match the Salesforce field label. You can still rename during the import but that may take longer. Remember that the Data Import Wizard does not store your mappings. However the Data Loader can, and this may be handy for regular uploads.
- Determine the Record Owner. If you don’t include it in your import file, YOU will become the owner.
- One last item that can get really interesting is date and time formats. Make sure the date and time fields are formatted correctly, otherwise they will most likely not get imported correctly. Here is what Salesforce accepts:
The actual data import process is not very hard, however, the type of data you import is what matters and what can truly mess things up.
Data Management is part of our Salesforce Administrator Certification Course. You will not only learn how to import and export data in Salesforce but also learn WHY this is relevant. There are a lot of factors to consider in regards to data setup, data security, data clean-up, data backup, data migration, and more. Therefore, we believe it’s essential to understand the bigger picture. 🤓
Let me know in the comments if you found this article helpful. If you had any data import mess-ups let me know too, we can all only learn from our mistakes and by sharing them with others.
We make learning Salesforce simple with our range of well-structured Salesforce Video Tutorials, downloadable Study Workbooks, and realistic Practice Exams. Available for Salesforce Administrator, Advanced Administrator, Platform App Builder, and more.
All materials are in line with the official Salesforce Certification Exam Outline including regular release updates.