Summary
The Planhat Salesforce integration supports Company/Account group structures (parent/child hierarchies)
You sync these by mapping a field in Salesforce (typically "Parent Account ID") with the "Parent Org" Planhat field, as a line of custom field mapping
The field needs to contain the Salesforce ID (source ID) of the parent
Who is this article for?
Planhat builders (e.g. CS Ops) setting up the Salesforce integration in Planhat
Series
We have a series of articles on the Salesforce integration:
Syncing Company/Account group structures (parent/child) via the Salesforce integration โฌ ๏ธ You are here
Article contents
Introduction
It's fairly common to have a group structure (parent/child hierarchy) when it comes to Companies (Planhat terminology) or Accounts (Salesforce terminology).
For example, you might have a parent "Coca-Cola Global" Company, with child Companies being "Coca-Cola France", "Coca-Cola Spain" and "Coca-Cola Germany" etc.
You can set up group structure in Planhat and in Salesforce, and the great news is that the Planhat Salesforce integration supports syncing this. It's easy to set up, via custom field mapping.
How to sync group structures in the Salesforce integration
To sync Company/Account group structures (parent/child), within the Salesforce integration, set up custom field mapping between:
the Planhat field called "Parent Org" (a default/system field - "Attribute") and
the Salesforce field called "Parent Account ID" (a default/system field), or otherwise a custom field containing the ID of the parent Account
This can potentially be either a string or an Account lookup field.
Although the examples above show the typical sync from Salesforce to Planhat ("Receive"), it's also possible to sync group structures in both directions.
๐ Important to note
If you add this field mapping after setting up the integration, press the green "Save" button and resync the Company/Account data by clicking "Fetch Data from SFDC".
Technical details
This is specifically for records of the Account object in Salesforce (Company model in Planhat)
The mapped field needs to contain the Salesforce ID (which in Planhat we call the "source ID") of the Account record's parent Account (not the ID of a child Account)
This means the field is populated on child Accounts but is not populated on the parent Account at the top of the structure
The Salesforce field must be a lookup field or a string/text field, as mentioned above
Generally a lookup field is recommended, as it's easier to use and avoids the potential issue of an incorrect ID being manually typed/pasted into a text field