Print this page

How do I import Account Hierarchies?

Knowledge Article Number 000003654
Description Instructions on how to set account hierarchies on import.

Salesforce allows you to specify account hierarchies or Parent/Child relationships for Account records on import. The account hierarchy shows you the accounts that are associated through the "Parent Account" field, giving you a global view of a company and its subsidiaries. In the hierarchy, accounts are indented to show that they are subsidiaries of the parent account above them.

See Deciding on A Method for Importing and Exporting Data for details on selecting a tool that's appropriate for your import operation. Add a column to your import file with the header "Parent Account" to populate with either the corresponding parent account's name or it's Id or external Id depending on the import tool as outlined below.


Prepare your import file by populating the Parent Account column:

Depending on your import method you will need to ensure all Parent Account values specified in your import file's Parent Account column either, exist in Salesforce as account records already, or are also included in your import file.

A) Using the unified Data Import Wizard or an API tool such as the Data Loader:

Requires the corresponding parent account record to already exist in Salesforce and the Parent Account column to be populated with the parent account's Salesforce record Id or an external Id.

To identify whether a specified parent account may already exist in Salesforce you may Build a Report and Export a Report by selecting the "Comma Delimited .csv" option for Export File Format selection or alternatively, use the Data Loader to Export Data. Select and include the Account Name and Salesforce Id or external Id fields at minimum and you may include additional fields or other data in your report or export file that may help in identifying existing matching parent account records against parent accounts specified in your import file.

Once you have your report or export file of existing Account records from Salesforce open it and your import file at the same time to use Excel's VLOOKUP function to populate each Parent Account's corresponding record or external Id into the Parent Account column. See How do I add existing record's Salesforce Ids in my import file? and How do I use an External ID to import related records? for more details.

If no matching Id or external Id is found or populated into your Parent Account column it would indicate that the parent account in your import file does not exist as an account record in Salesforce yet. If this is the scenario, manually search for the parent account record in Salesforce to locate a match, import missing parent accounts, or manually create new parent accounts and then populate the new parent account record or external Ids into your import file.

B) Using the Legacy Data Import Wizard:

Requires you to populate the related Parent Account's name in the import file. The legacy import wizard will automatically and simultaneously import and associate accounts and their related accounts based on their name as long as you ensure that the Parent Account's name value either matches an existing account record or is included as its own row or an account in the import file.

Note: The legacy import tool is being retired and replaced by the Unified Data Import Wizard. See Legacy Data Import Wizards Feature Retirement​ for more details.

promote demote