what is the best way to do parent-child company hierarchy mapping with Clay? Before I import new companies to Salesforce, I want to make sure that if they are tied to an existing hierarchy that they are added but linked to the correct accounts, and if they are potential duplicates to exclude.
Hi there, thanks so much for sharing this! We’ll be passing your feedback along to our product team, and any additional context you can provide will help us prioritize with your needs in mind as we shape the roadmap.
Want to chat with someone on the team? Feel free to hit the button below!
Hi Benedikt,
Thanks for reaching out to support. Great question. Here is the recommended way to map parent-child hierarchies in Clay so new companies land in Salesforce linked to the right Accounts and true duplicates are excluded.
Overview
Build the hierarchy first, then deduplicate.
Use Clay to enrich and verify parent, ultimate parent, and subsidiaries.
Look up Salesforce to attach to existing Accounts or create new ones with the correct ParentId.
Only insert what is new. Update what already exists.
Step-by-step
Phase 1: Enrich hierarchy in Clay
Pull company records into Clay.
Enrich for: immediate parent, ultimate parent, list of subsidiaries, employee counts, domains, LinkedIn URL.
You can use your preferred data providers and Clay AI to validate relationships.
Phase 2: Check Salesforce and map
For each company, run a Salesforce lookup from Clay.
Match on a stable identifier such as domain, Salesforce Account Id, LinkedIn URL, or exact name + country.
If the parent exists in Salesforce, capture its Account Id and any existing subsidiaries.
Set the child’s ParentId to the parent’s Account Id.
If the company already exists in Salesforce, update fields instead of creating a new record.
Phase 3: Process subsidiaries
Send subsidiaries to a separate Clay table for performance.
For each subsidiary: Salesforce lookup → create if missing → set ParentId to the correct parent.
If you are creating the parent and then its children, add a short delay before the child lookups so Salesforce can finalize the new parent record.
Phase 4: Prevent duplicates
In Clay, add checks that block inserts when:
The Account already exists in Salesforce.
The subsidiary is already listed under the parent.
Keep a single source of truth for matching keys such as domain and Salesforce Account Id.
Best practices
Always return the parent’s current subsidiaries in your Salesforce lookups so you do not add duplicates.
Process parents before subsidiaries.
Use update-in-place (upsert) for existing Accounts, create only when needed.
Add null checks so empty domains or names do not trigger broad matches.
If you need rollups, create the custom fields first, then configure your DLRS.
thank you Nicole
