Table of Contents
As Admins, we will be required to Import data and Export data. Salesforce has tools for both – You can use an in-browser service accessible through the setup menu or a client application for this purpose. Let’s learn more about the Import and Export of data in Salesforce.
Data Import in Salesforce
Salesforce has two main tools for Data Import. Depending on your requirements you can use one of the following.
Note: Salesforce supports data in the comma delimited text form (.csv).
Data Import Wizard
This tool is accessible through the Setup Menu. Navigate to Setup 🡪 Type in Data Import Wizard in the Quick Find Box 🡪 Click Data Import Wizard to access the tool. Some important features of the tool include:
- You can import up to 50,000 records at a time
- You can import Standard Objects such as Contacts, Leads and Accounts, as well as data in Custom Objects.
- Provides a simple interface.
- Available on all Salesforce Editions at no additional cost.
- Cloud-based thus requires no installations.
- We cannot import Opportunities and Cases.
- We cannot Export Data using this tool.
- It provides an option to turn off workflow if required.
- The Record Owner field is not required ( if this field is left blank, the User doing the import is assigned as the default owner).
- Automation is not possible.
A more advanced tool enables you to insert, update, upsert(update and insert), delete or export records. It’s mainly used for the bulk import or export of data. Keep these points in mind before using this tool :
- Can import up to 5,000,000 records.
- Used when you want to import an Object not supported by Data Import Wizard or when your data has complex mappings.
- It is a client application that can be operated either through the UI or the command line.
- Only available in Enterprise, Performance, Unlimited, and Developer Editions.
- You need to install the application.
- We can import Opportunities and Cases.
- We can use this tool for data export.
- This tool has no option to turn off workflows (Turn any workflow off in Setup if required)
- The Record Owner ID field is required to avoid an error while importing data.
- You can automate the import process.
How to Import Data into Salesforce
Depending on the tool that checks all the boxes, you can use either of these tools to import data. Now, we’ll be showing you how to use the Data Import Wizard to import data.
1. Navigate to Setup, type Data Import Wizard in the Quick Find box, and then select Data Import Wizard.
2. Click Launch Wizard!
3. You’ll be asked to choose the data you want to import.
4. To import accounts, contacts, leads, solutions or campaign members, select Standard Object. To import custom objects, select Custom Objects.
5. Indicate whether you want to add new records, update existing records or add new and update existing records. You’ll be required to specify matching criteria and any other requirements here.
6. Now, choose the CSV file you want to import and specify any associated criteria from the picklist.
7. Click Next.
8. Map any Unmapped Fields manually.
- Click Map to the left of each unmapped field.
- Select the Salesforce Field you want to map your data field with.
- Click map.
- To make changes to any mapping that was done automatically, simply click Change next to the field.
- Once you’re done, click Next.
9. Review and Start Import.
- Review your import information. If there are any unmapped fields, click Previous and make changes.
- Click Start Import to start the data import.
You can check your import status from Setup, enter Bulk Data Load Jobs in the Quick Find box, and then select Bulk Data Load Jobs. The user who started the data import receives an email once the import is complete. Follow the steps given above to import data using Data Import Wizard. Quite simple, wasn’t it?!
How to integrate imported data into Salesforce
Follow these practices to ensure the successful integration of imported data into Salesforce.
Clean up the Data
Clean data can ensure your data’s accuracy, usability, and credibility, which can affect its adoption. Keep these points in mind to ensure clean data.
- Locate duplicates.
- Apply naming conventions
- Identify incomplete records and fill them in.
- Correct punctuations and spellings.
- Convert all formulas to values to avoid errors.
- Format cells as excel deletes leading zeroes.
- Concatenate area code with the phone number or address one and address two fields to a single address field.
- Separate first name and last name.
- Salesforce Record ID – Every record in Salesforce is assigned a unique ID. Use an 18-digit ID if you’re manipulating your data in Excel.
- Save as .csv ( Salesforce allows import of only .csv data).
Before the import, ensure Salesforce has all the fields required to accommodate the imported data. You can keep an eye on the following.
- Add custom fields if imported data has fields that aren’t already present in Salesforce.
- Add new picklist values if required.
- Create external lookup fields if external IDs are present.
Prepare your Import File
- Match column names in your import file to field names in Salesforce manually to ensure that all the required fields are present.
- Add a field for Record Owners. All records in Salesforce must have a record owner. It must be specified in your import file. If not, the user performing the import is assigned as the default owner.
- Add a field for Parent Records if required. (Example: In the case of Opportunity Objects)
Use Automation to Keep the Data Clean after Import
- Enforce Data Validation Rules to prevent users from entering data values outside a certain range.
- Incorporate Picklists, limiting the values Users can enter in a field and eliminating the risk of misspellings.
- Include Custom Lookup Fields to prevent users from creating duplicate records.
- Use Workflow field updates and Formula field updates to populate data automatically.
- Record types and page layouts can ensure that users see the fields and picklist values they need.
Best Practices for Importing Data
- Always back up your data.
- Import a test batch first.
- Use Mass Delete Records to undo a bad import.
- Turn off workflows that you don’t want to fire.
- Remember, Validation Rules are in effect during a data import.
- If you are importing sensitive data, check your data visibility settings and set up ownership correctly.
Data Export in Salesforce
Salesforce provides tools for the export of data as comma delimited text form (.csv) files. Data exports can be performed either manually or on an automatic schedule.
So, why do we need to Export Data? Here’s why:
- To keep a copy of your Salesforce data.
- For backup and recovery.
- To use the data in a different system.
There are two main methods for exporting data in Salesforce: Data Export Service and Data Loader. Let’s learn more about that now.
Data Export Service
Data Export Service is an in-browser tool available through the Setup Menu that allows both manual and scheduled export of your data on a weekly or monthly basis.
- Export Now (Manual Exports)– Can be done once every seven days or 29 days.
- Schedule Export (Automated Exports) – Weekly automated exports are available in Enterprise, Performance, and Unlimited Editions. In Professional and Developer Editions, you can create backup files only every 29 days ( monthly intervals).
Data Loader is a client application that has tools for both data import and export. It can be operated either through the UI or the command line. The command line can be used when you require automation, or you need to integrate with another system through APIs.
How to Export Data in Salesforce
Follow these steps to export data in Salesforce.
1. Type Data Export in the Quick Find Box and Select Data Export in Setup.
2. Select Export Now or Schedule Export. (I’ve selected Export Now here)
3. Select the desired encoding for your export data.
4. Select these checkboxes if you want to include images, documents, attachments and other data.
5. Selecting Replace carriage returns with spaces ensures that spaces replace all carriage returns.
6. Under Exported Data, you can either choose to Include all data or only what you want.
7. Click Start Export
You should receive an email after the export is done. You can either download the exported data through a link in the email or Data Export in Setup. The exported data is saved as .csv files.