Configuring the Account Hierarchy Policy in Salesforce

Configuring of the Account Hierarchy Policy in Salesforce will require a flow, some fields, and a couple of updates to the custom metadata

Field Creation

The fields that are required for implementation will depend on the data provider and exceptions required. For example, D&B provides 3 levels of parents; Parent, Domestic Parent, and Ultimate Parent. Zoominfo only provides the Parent and Ultimate Parent.

Parent Override

A checkbox field. When this field is checked, the policy will not change the current parent. This includes scenarios where the parent field is to remain null

Primary Parent Key

This should be a formula field which considers exception scenarios and the override checkbox. Most often it will point to the 3rd party data provider's parent Id (Parent DUNS) unless the override checkbox is set to true. In that case this field should provide the current parent's 3rd party data provider Id (DUNS). If the parent is null, the field should display something like "Do not parent". Which makes it so that a primary parent key and primary child key never match

Primary Child Key

Points to the 3rd party data provider's company Id. In D&B this would be the DUNS number

Secondary Parent Key

The same logic in the primary parent key should be used here. The only difference being that it points to the 3rd part data provider's domestic parent Id. In D&B this would be the Domestic Parent DUNS number.

Secondary Child Key

Points to the 3rd party data provider's company Id. In D&B this would be the DUNS number

Tertiary Parent Key

The same logic in the primary parent key should be used here. The only difference being that it points to the 3rd part data provider's ultimate parent Id. In D&B this would be the Ultimate Parent DUNS number.

Tertiary Child Key

Points to the 3rd party data provider's company Id. In D&B this would be the DUNS number

Secondary and Tertiary keys are not required as they are backup to not finding a parent with the primary keys. For example, if the 3rd party data provider is ZoomInfo, then only primary and secondary keys will be used as they do not have a domestic parent Id.

Flow

The Salesforce Flow is used to detect a change to data on the account and then call into the Account Hierarchy Policy. The flow should be record triggered and looking for changes on the account object. If the 3rd party data provider has the parent information on the account, those fields should be added to the entry conditions so that the policy can update the corporate family when data is updated by the provider. Additionally, the custom domain key should be added.

Calling into the flow requires that an Apex Action is added to the flow. When adding the Action, search for Policy Handler.

After adding the action, it should be configured as below. InputVal1, 2, and 3 should be the prior values of the child keys. This allows the policy to find all the relevant corporate family members and rebuild the hierarchy from scratch.

Configuring Custom Metadata

The Account Hierarchy Policy will also stamp a value (1, 2, or 3) in a field of choice. This field identifies which link was used. For example, if the parent was used, then a 1 would be stamped into the field. If the Ultimate parent was found, then a 3 would be stamped. Below are the instructions for configuring the field.

  1. Go to Setup in Salesforce and search for Custom Metadata in the quick find.
  2. Find the Custom Metadata record called Fullcast Policy Setting and select Manage Records
  3. Find the field Account Hierarchy Link Field Name and select edit
  4. In the Field Value box enter the API name of the field where the link number will be stamped when the hierarchy policy runs.

Sample Field Examples

Field Name Description Configuration
Parent Override If this field is checked, then it signals to the keys to look at the current parent's Child Key Checkbox
Primary Parent Key The primary domain key is the first criteria used to find a parent for the account in question. IF(Parent Override = True, Parent.DUNS, Parent DUNS)
Primary Child Key This is a key used by the primary matching process to find the children associated with this account and is used by child accounts when finding a parent.In this example, If the Private Equity or Holding Company flag is checked, the keys are adjusted in such a way that no child will be attached to this account. : IF (PE_or_HC__c, IF(DandbCompany.DunsNumber <>"",(DandbCompany.DunsNumber & "_HC" ),""), DUNS)
Secondary Parent Key This is the secondary search criteria used if the primary search criteria do not find a parent. Here we will be looking for the Global Ultimate parent. IF(Parent Override = True, Parent.DUNS, Domestic Parent DUNS)
Secondary Child Key This is a secondary key used by the secondary matching process to find the children associated with this account and is used by child accounts when finding a parent. In this example, If the Private Equity or Holding Company flag is checked, the keys are adjusted in such a way that no child will be attached to this account.  IF(PE_or_HC__c, IF(DandbCompany.DunsNumber <>"",(DandbCompany.DunsNumber & "_HC" ),""), DandbCompany.DunsNumber)
Tertiary Parent Key This is the third criteria that are used in the tertiary matching process to find a parent.In this example we are using domain name to do this. The fullcast package provides a fio_domain_c field which is a cleaned domain field that can be used for this purpose. IF(Parent Override = True, Parent.DUNS, Global Ultimate Parent DUNS)
Tertiary Child Key This is the tertiary child key used as part of the tertiary pair of keys to link parents and children. IF(PE_or_HC__c, IF(DandbCompany.DunsNumber <>"",(DandbCompany.DunsNumber & "_HC" ),""), DandbCompany.DunsNumber)

Configuring the Account Family Policy

Place the appropriate keys in order of priority in each of the dropdowns. If a simulation needs to be ran, select the simulation checkbox and select the fields in which the policy is to stamp the parent and ultimate parent.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us