How to import data to salesforce (+12 practical tips)

As a Salesforce administrator, you may often find yourself wondering how to import data to Salesforce from various sources. Having faced this challenge myself while importing opportunities, accounts, and contacts from other CRM software or from one Salesforce instance to another, I’m excited to share with you some practical tips and techniques that can help you easily manage this process. In this post, I’ll be sharing my experience and experimentation to help you confidently handle data imports in Salesforce.

Reminder of the scenarios that involve importing opportunities into Salesforce?

In a previous article, we discussed how to import opportunities into Salesforce. And; I listed the various scenarios that may require such imports. These scenarios are not limited to opportunities and can apply to importing other types of data as well. Here are some common scenarios that may require importing data into Salesforce:

  • Migrating from an in-house CRM to Salesforce, where importing all data (accounts, contacts, contracts, opportunities) was necessary to obtain accurate and thorough reports directly in Salesforce.
  • Acquiring a company that already uses Salesforce, where the objective was to import data from the acquired company to the parent company’s Salesforce instance.

12 Practical tips to import data to Salesforce efficiently

In this chapter I will share with you some practical tips and techniques that can help you easily manage the process of importing data into Salesforce:

  1. Create a data import plan, and outline all the necessary steps and transformations you will need to do when importing data in production instance. You should to roll out this plan in a test sandbox. This, to help you identify any issues and fix them before the actual import.
  2. Perform test imports of all your data in the test sandbox. This, will give you the opportunity to spot and resolve any problems beforehand. So; that you can import your data with confidence on the day. This approach allows you reduce the risk of data loss or corruption. Testing in a Sandbox is a best practice in Salesforce administration and helps ensure a smooth and successful data migration.
  3. Examine the source data and identify the corresponding objects and fields in Salesforce. In some cases, you’ll need to create new fields in Salesforce or simply add new values to existing picklists.
  4. Some fields in your data will require transformations before you can import them. For examples :
    • Use the correct dates format ‘m/d/yyyy’ (ie ‘3/24/2023’).
    • For picklist fields in Salesforce, you must replace values with API names instead of labels.
    • To import a field of type multiple picklist values, you must use a semicolon separator “;” between each value. For more information, check this article where I explain step by step how to import multiple picklist values into Salesforce.
    • Replace data owner names with their Salesforce ID.
  5. If you have validation rules in Salesforce, and your data does not respect these checks, you then have two choices:
    • Fill in dummies values to bypass mandatory field type checks for example.
    • Disable validation rules. Then, reactivate them after the import.
  6. When importing data to Salesforce, make sure to set your file encoding to UTF-8. This, to avoid errors with special characters. If you’re using the Salesforce Import Wizard, you can select this encoding during the import process. Alternatively, if you’re using the Salesforce Data Loader tool, UTF-8 encoding is typically the default. This simple step can save you a lot of headache and frustration during the import process.
  7. As previously mentioned, you will use semicolons to separate the values of a multi-select picklist. Before using the comma as a column separator in your CSV file, make sure to remove it first from your file. You can replace it with a space or another character that won’t interfere with your data.
  8. Create a field in Salesforce to reference the external ID of all the imported source data. This will facilitate future checks and updates of the imported data.
  9. When it’s time to import your data into the production instance of Salesforce, I recommend taking these steps to avoid potential issues:
    • Begin by importing only a few lines of data from your final file and check that they were imported successfully. Even if you’ve already tested the process in your sandbox environment, it’s always a good idea to double-check in production.
    • Instead of importing all your data at once, split it into several parts. This way, if you encounter errors during the import process, you can correct them in the remaining data not yet imported.
    • Be sure to save all error files generated during the data import process. These files not only contain the errors in the data or mapping, but also the lines of data not imported correctly. You can use these files to correct the source of the errors. Then re-import the corrected data.
  10. Instead of relying solely on the Salesforce wizard to import your data, I recommend using the Salesforce dataloader tool for all objects. Even those that can you can import through the wizard. One of the main advantages of the dataloader tool is that you can save the mapping during the test phase. And, then, reuse it when importing into the production instance. This saves time and minimizes the risk of manual mapping errors, making your import process more efficient.
  11. When importing data into Salesforce, it’s important to consider their dependencies and import them in the correct order. Start with the objects that have the highest level of hierarchy, and then import the next level and so on. For instance, if you need to import accounts, contacts, opportunities, and opportunity activities, you should start with accounts, then contacts, then opportunities, and finally, opportunity activities. This ensures that the relationships between objects are preserved and the data is imported correctly. Once you’ve imported the parent level, you can use the external ID recommended earlier to identify the new parent ID to be used in the next level. It’s worth noting that Salesforce IDs are case-sensitive, so be sure to match uppercase and lowercase characters exactly. To do the mapping, one option is to import the data into a MySQL database, as Excel’s VLOOKUP function is not case-sensitive.
  12. It’s important to not only test the imported data values individually but also to report and compare the total number of imported data with the source data. This ensures that all the data is accurately imported, and there are no missing or duplicated records. By doing so, you can have confidence in the completeness and accuracy of your imported data.

By following these tips, you can reduce the stress of data import day and ensure that the process goes smoothly :)!