Step-By-Step Guide To External Account Hierarchy in Salesforce

External Account Hierarchy

External Account Hierarchy (introduced in Salesforce Summer β€˜20 release) allows the customers to share records between the community users of one company to community users of another company. This can be an extremely useful feature if your customers and/or partners have parent-child companies, and you want to share the child company records with the parent companies.

For example, let’s say that you have a dealer called “United Gas”, headquartered in Singapore. This dealer has subsidiary companies in UK, India, Thailand, Philippines etc. and you want to share the records created by community users of United Enterprises UK (subsidiary) with the community users of United Enterprises Singapore (HQ). 

External Account Hierarchy is created by adding records to “External Account Hierarchy” object and defining the parent account for child accounts. It is only available to Partner and Customer users so relevant Community Cloud licenses are required to use this functionality. Note: Once this feature is enabled, it cannot be disabled.  

External Account Hierarchy Limitations

Some of the important limitations to note of this feature are:

  • Child account data is shared with the highest role only at each level (immediate parent account) within the hierarchy.
  • There can be a maximum of up to five levels in the hierarchy
  • Supported for only business accounts, does not work with person accounts
  • Accounts used in an external account hierarchy can’t be merged with another account
  • The hierarchy can consist of only one account type, either partner or customer, but not both
  • A customer or partner account can be a part of only one active external account hierarchy at a time

Since Salesforce has introduced a new way of sharing records, it sparked an instant curiosity to learn more about this feature, hence the guide. Within the next 15-20 minutes, you will learn how to set up the External Account Hierarchy and how external account data sharing works. After going through this guide, you will learn how to:

  • Enable External Account Hierarchy
  • Create External Account Hierarchy Record & Levels
  • Test Record Sharing in External Account Hierarchy


To get the PDF copy of the presentation above (link to download the PDF will be emailed to the email address specified below)

Check to subscribe and get notified for new guides



(You'll never be spammed on my watch and that's a promise)

References & Useful URLs:

12 thoughts on “Step-By-Step Guide To External Account Hierarchy in Salesforce”

  1. Hi Ashish,

    Getting this error : This account must have portal roles associated with it that match the hierarchy type.: Account ID

    The Account and Contact is partner enabled and i have created a partner user for that contact, not sure why i am getting this error, unable to debug this, if you have any workaround that you can share, that will be helpful, thanks.

    1. Hi Vijay, I recall seeing something like this. Can you check what is the value of the number of partner roles under Community Settings? Please also ensure that the Account owner of this account record has been assigned a role.

  2. Thank you Ashish for this detailed explanation. The help article is not super clear explaining some points and your presentation just answered all my questions.

  3. Hi Ashish
    that was really good explanation, I have a doubt whether the child account records will be shared with GrandParent or Higher if I have 3 Level or Higher in Account Hierarchy ?
    Or its just limited to immediate Parent only?

    1. Thanks Shantanu. The visibility will flow all the way up (if I am not wrong, I think external account hierarchy currently supports up to 7 levels of hierarchy). It is not just limited to immediate parent only.

  4. Hi there, when I tried to create a relationship where there was not a contact with access to the community on that particular child account, I would get the following error:

    ‘This account must have portal roles associated with it that match the hierarchy type.: Account ID’

    Any ideas why? Or do you need to have a contact on every account in the EAH?

    1. Ashish Agarwal

      Hi Marcus, based on the error message that you have mentioned, I think Salesforce is looking for the portal roles for the Accounts. Portal Roles for the Account is created automatically when you create a community user for that account. If the accounts on which you are creating external account hierarchy does not have any portal roles defined – this may be the reason you are getting this error. I haven’t tested this myself, so this is something that you will need to test yourself.

  5. Hi Ashish,

    if there are already many Partner Account created in the system, does this mean, it needs to be again manually created in the Object: External Account Hierarchies?
    Many thanks for any advise on this

    1. Ashish Agarwal

      Hi Daria, yes the hierarchy will need to be created in ‘External Account Hierarchy’, though you don’t need to do it manually. You can use dataloader, Flows or Apex to speed up the process as long as there is information and defined logic to associate the accounts in the hierarchical relationship

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top