Print this page

How to create an import template file?

Knowledge Article Number 000005602
Description I am having trouble updating the object field names in my .csv import file, to match the Salesforce object field names, for correct mapping while using Data Import Wizard?
Resolution To create an import template file which will create all the header definitions as defined by salesforce, follow the steps below.

1. Click on the Reports tab.

2. Click on the "New Report" button.

3. Select the object you want to import into (For example Accounts) and click "Create".

4. Make sure that on preview it is set to "Tabular Format".

5. Select the columns from the left panel you would like in the import template and just drag and drop them on the Preview space. 
Note: If your organization uses multiple currencies be sure to add the currency field to your report.

6. Click on Add "Field Filter" and choose the field with ID in it (Account ID) and set this equal to blank.

7. Choose your column order and click "Next".

8. Under Advanced Filters select the field with ID in it (Account ID) set this equal to blank.

9. Click "Run Report". The generated report should contain no data.

10. Click on "Export Details".

11. Change the export file format to CSV.

12. Click "Export" and save the file to your computer.

13. Open it with Excel, delete the Salesforce signature information.

You now have a CSV file where the column headers are an exact match for existing Salesforce fields and ready for import.

_____________________________

For those that do not want to use reporting or exporting to create an import template you can use the Import Wizard to manually update your .csv column headers to match Salesforce fields.

1. Start by navigating to Setup and typing, Data Import Wizard into the setup Quick Find and click Data Import Wizard and then click the Launch Wizard button on the corresponding page.

2 .Select, "What kind of data are you importing". (As an example here, we'll choose Accounts and Contacts)

3. Select "What do you want to do" and choose Add new records and select any matching criteria you'd like. Since we're not actually importing the data the selections here shouldn't matter.

4. Select "Where your data is located" (.csv)

5.  Hit NEXT button and on
 the corresponding "Edit Field Mapping: Accounts and Contacts" page Salesforce will attempt to match column headers found in the file you selected in 4. to similarly named and available Salesforce fields. Any .csv column header that doesn't match a similarly named object's field in Salesforce will have the word "Unmapped" in red.

6. Click on "Map" for an unmapped field.

7. Select the appropriate SF field name you'd like to map the column to (green check mark will then appear at the right) and click the Map button, and you will be returned to the "Edit Field Mapping:" page

8. Now that the field name is Mapped, highlight the entry in the "Mapped Salesforce Object" column for the corresponding CSV Header, right click on it and "copy". Go to your .csv, highlight the related column header cell and paste the copied field name from Salesforce into your .csv to replace the existing column header and save the file.

9.  While on "Edit Field Mapping:" page select "Map" for each additional Unmapped field or related field in your import template and repeat steps 6-8 until you have completed creating or updating all of the column names in your .csv to match available Salesforce field names.

10. Restart Data Import Wizard, and your import .csv will now automatically map to the corresponding fields in Salesforce to proceed with your Import.

Notes:

If your organization uses multiple currencies you will need to include a Currency column in your file and map it when importing. If Currency is not included or mapped on import the Import Wizard will return an error, "Account Currency is not mapped and is required in a multi-currency organization" and the import will not proceed.

To check whether it's enabled in Setup, enter Company Information in the Quick Find box, then select Company Information. If the "Allow Support to Activate Multiple Currencies" preference is selected then you will need to include Currency in your import file. See Enable Multiple Currencies for more details as well as Manage Multiple Currencies​ to see your organization's active currencies and Supported Currencies for a list of currency codes to include in your import file.

If your file contains multiple individual address lines you will need to combine each them into one individual cell or column in order properly map to the single address field available in the Data Import Wizard. You may do so by manipulating the data in Excel via the following steps.
 
Note
NoteSalesforce does not provide support for Microsoft Excel features or functionality and it's against policy to perform data management or manipulation (de-duping, merging, cleansing) tasks including formulas. The following details are provided to serve as general guidelines for customers to prepare their data and can't be performed by Support on their behalf.

1. Create a new column in your file titled, Combined Address

2. Click into the newly create column and use the following formula to combine the individual address lines together for each row in your Excel:

=(A2&"
"&B2&"
"&C2)

Where A2 is the cell in your file that contains the row's Address Line 1
B2 is the cell that contains Address Line 2
C2 is the cell that contains Address Line 3

Note: You'll need to enter carriage returns in the above Excel formula between the individual cells you're merging by holding the Alt key and pressing Enter on your keyboard.

3. Now highlight the cell where you've created the formula click the little box on the bottom right corner of the cell to drag and populate the new column with the combined address formula for each row in your import file. See Excel's documentation, Fill formulas into adjacent cells for more details.

4. Once all rows are populated using your formula highlight the Combined Address column's header right click | Copy | Right click again Paste Special... | Select Values and OK to populate the results of the formula.

If done properly, your file's Combined Address column should contain all three address lines for import and mapping to the single address field available in the Unified Data Import Wizard.




promote demote