How to Ensure Data Quality for Salesforce CSV Import

How to Ensure Data Quality for Salesforce CSV Import

As with every online application, Salesforce implements its own rules and standards for data management. It mightn’t be too obvious if you’re working directly in Salesforce, but it could become a challenge in Salesforce CSV import and other data migration tasks. That’s why the information needs to be checked before being uploaded into Salesforce.

This article reveals the best practices for data preparation in a CSV file before uploading it into Salesforce. Also, it discusses other supplementary things, such as correct data formatting. The article also explains how to upload CSV files into Salesforce safely.

Understanding the Salesforce Data Model

Having a clear idea of the Salesforce data model is crucial for administrators, developers, analysts, and even regular users. This knowledge greatly helps to use Salesforce effectively at its full potential and with error minimization.

So, here are the fundamentals of the Salesforce data models.

  • Objects. There are predefined data objects (Account, Contact, Lead, etc.) and user-defined custom ones.
  • Fields. There are predefined fields (Name, Phone, Company, etc.) and user-defined custom ones.
  • Record types. Stands for different picklist values, page layouts, and business processes that can be applied to different user groups.
  • Permissions. A set of permissions for different user roles to properly control the access to Salesforce objects.
  • Schema builder. A visual tool that allows administrators to view and modify the data model graphically by creating objects, fields, and relationships.

Best Practices for Data Preparation and Cleansing in CSV

To avoid errors that result in multiple inconveniences on data import, it’s essential to prepare your CSV file beforehand. This includes the proper formatting, data cleansing, and other practices discussed further in this chapter.

First Row Check

The header row in a CSV file must contain the names of objects that correspond to those in Salesforce. Otherwise, the system won’t be able to identify the object names and will fail to load data for those fields. Every subsequent row, starting from the second, corresponds to a record.

When creating or updating a CSV file, make sure that all the fields are present in each record. Otherwise, the records without all the necessary fields will be ignored during the update of Salesforce data.

Delimiters

Each record contains a series of fields, and each of them needs to be delimited by a comma. Before uploading a CSV file into Salesforce, make sure that commas are used as delimiters. This is necessary because, in some cases, other delimiters are automatically assigned by certain spreadsheet programs. You can check this by opening your CSV file with the Notepad standard tool.

CSV File Formatting

Make sure that the CSV file uses the UTF-8 Unicode character encoding method. This is essential as some files may come with UTF-16, UTF-32, or other methods that aren’t compatible with Salesforce.

Check for Duplicates

Make sure that your file doesn’t contain any residual information and duplicate records. Even though different import tools handle duplicate issues on upload, it’s better to prepare everything in advance.

Ways to Import CSV Files into Salesforce

There are at least five different methods for importing CSV files into Salesforce. Some of the most popular and convenient methods are provided here.

Data Import Wizard

This is a native Salesforce tool for uploading data from CSV files into a CRM. It’s rather convenient to use because it’s already built into Salesforce and provides step-by-step guidelines that help users perform data seamlessly. However, it also has some limitations, such as the maximum number of 50,000 for upload or update.

To import data from CSV file to Salesforce with Data Import Wizard, proceed as follows:

  1. Log into your Salesforce account.
  2. Click on the gear icon in the upper-left corner of select Setup.
  3. Navigate to the Data Import Wizard located in the Data Management tab.
  4. Click Launch Wizard.
  5. Select the import operation and the type of data to load. Click Next.
  6. Click Choose File to select the needed CSV file from your computer.
  7. Map the CSV file fields to those in Salesforce.
  8. Select the import options and click Next.
  9. Review the import summary and click Start Import.

This method is suitable for occasional data loads or updates in Salesforce.

Salesforce Data Loader

Another Salesforce-native tool for uploading CSV files is called a Salesforce Data Loader. It’s more adapted for larger datasets, commonly used in sales and marketing operations. This tool can be downloaded from the official Salesforce resources.

  1. Install Salesforce Data Loader according to the step-by-step instructions in the wizard.
  2. Open Salesforce Data Loader and click Insert.
  3. Select the Show all Salesforce objects box.
  4. Click ContentDocumentLink and select your CSV file from the computer.
  5. Click Create or Edit a Map and select the Auto-Match fields to columns option.
  6. Click OK.
  7. Click Next.
  8. Click Finish.

Compared to the built-in Salesforce solution for uploading data from CSV files, a Data Loader provides a more sophisticated and broader functionality. It offers scheduled imports, large datasets support, error and log handling, and so on.

Skyvia

The drawbacks of the previous two methods could be overcome with the Skyvia data integration tool. It allows you to load as many records as you need and make the necessary updates and deletions of Salesforce data. Also, you may not worry about whether your CSV file was properly prepared, as Skyvia offers advanced mapping settings.

  1. Log into your Skyvia account or create a new one.
  2. Go to Create New -> Import.
  3. Specify CSV file as the source and Salesforce as the target.
  4. Click Add new to create the import task. Select your CSV file and check whether the delimiter and Unicode format is set correctly. Click Next step.
  5. For the target side, select the object to where the data needs to be imported and select the DML operation.
  6. Start configuring the mapping settings. Target columns marked as Required must be mapped in order for the task to be valid.
  7. Click Save to complete the task creation.
  8. Create other tasks for other objects in a similar way.
  9. Click Create to save the import integration scenario.

Skyvia can also be used for importing CSV files stored on cloud services such as Google Drive, Amazon S3, etc.