Campaign Hierarchy
Campaign Hierarchy is the Salesforce feature that lets you stack related Campaign records into a parent-child tree up to five levels deep.
Definition
Campaign Hierarchy is the Salesforce feature that lets you stack related Campaign records into a parent-child tree up to five levels deep. Each child campaign rolls its Campaign Members, costs, and influenced revenue up to the parent, so marketing leadership can see the aggregate impact of a multi-touch program in one place instead of summing twenty individual campaigns by hand.
The hierarchy lives on the Parent Campaign lookup field on the Campaign object. Set Parent Campaign on a child record and the child is now part of the hierarchy; the parent's hierarchy fields aggregate from every descendant. The standard fields (Total Members in Hierarchy, Total Opportunities in Hierarchy, Total Won Opportunities in Hierarchy, Total Value Won Opportunities in Hierarchy, Total Value Opportunities in Hierarchy) calculate live without flow or formula work.
How Campaign Hierarchy turns scattered campaign reports into one rollup view
The five-level cap and why it matters
Salesforce hard-caps the hierarchy at five levels. Level one is the parent (the program), level two is the channel (Email, Webinar, Paid Search), level three is the campaign instance (Q2 Webinar Series), level four is the wave (April 12 webinar), level five is the segment (Tier 1 prospects). Go deeper and the API rejects the Parent Campaign update. Plan the levels before you start. Many orgs collapse to three levels (Program, Channel, Campaign) to leave headroom for restructures.
Standard rollup fields and what they actually count
The hierarchy fields aggregate from every descendant campaign, not just direct children. Total Members in Hierarchy counts unique Contact and Lead members across the tree (deduplicated by member, not by record). Total Value Won Opportunities in Hierarchy sums the Amount field on related Opportunities where the Opportunity is closed-won and linked via CampaignInfluence or the primary Campaign Source. The Total Value Opportunities (not just Won) field includes open pipeline as well, which is why it usually exceeds the Won number by a wide margin.
Primary Campaign Source vs Campaign Influence
An Opportunity has one Primary Campaign Source (the campaign that "owned" the lead at conversion) and any number of Campaign Influence records (every campaign the contact touched). Both feed into the hierarchy rollup, but Customizable Campaign Influence is what most modern orgs use because Primary Source attributes 100% of the deal to one campaign, which never matches reality. Influence records can split credit by weight, recency, or custom logic.
Reporting across the hierarchy
The Campaigns with Campaign Members report type respects hierarchy through the Campaign Hierarchy filter on the Campaign record itself. The View Hierarchy link on any campaign page header opens the tree view, where each level shows its own metrics and the aggregated parent metrics in the right rail. For Tableau or external BI tools, you have to flatten the hierarchy via a recursive query on Campaign.ParentId because Salesforce reports do not natively give you depth-aware grouping.
Costs and the Actual Cost field
Actual Cost in Campaign is a free-form currency field. Hierarchy sums it across all descendants into Total Actual Cost in Hierarchy. Build a custom Return-On-Marketing-Investment formula on the parent that divides Total Value Won Opportunities by Total Actual Cost in Hierarchy and the entire program's ROI is one number on one record. Avoid populating cost on both parent and child for the same spend; the rollup double-counts.
Restructuring the hierarchy mid-flight
Reparenting a child campaign reassigns its Members and Opportunity Influence to the new parent immediately. The old parent's hierarchy totals drop, the new parent's totals rise. This is fast but irreversible without a script; there is no undo on Parent Campaign updates. Run a CSV export of Campaign.Id and Campaign.ParentId before any bulk reparenting so you can revert via Data Loader.
How hierarchy interacts with sharing
Campaign records share via the standard Campaign sharing model (private, public read, public read/write). A user with access to a parent campaign does not automatically gain access to its children. You either share each level individually or rely on the org-wide default being public. This catches teams who assume that controlling parent access controls the whole program.
Building a Campaign Hierarchy and configuring the rollup behaviour
Campaign Hierarchy is on by default in every Salesforce org that has Campaigns enabled. The setup work is in planning levels, exposing the right rollup fields, and getting Customizable Campaign Influence turned on if you want fair attribution.
- Expose the hierarchy fields
Object Manager, Campaign, Page Layouts. Add Total Members in Hierarchy, Total Opportunities in Hierarchy, Total Value Won Opportunities in Hierarchy, and Total Actual Cost in Hierarchy to the Campaign Statistics section. Hide the non-hierarchy versions on parent campaigns to avoid confusion.
- Plan the level structure
Pick the meaning of each level before building. A common pattern is Program at level one, Channel at level two, Campaign at level three, leaving room to add Wave and Segment later. Document the structure in the campaign description field so future admins do not invent their own scheme.
- Parent the campaigns
On each child campaign record, set Parent Campaign to point at the right ancestor. The hierarchy rollup recalculates within minutes. Bulk via Data Loader: prepare a CSV with Id and ParentId, run Update, verify counts on the parent campaigns.
- Enable Customizable Campaign Influence
Setup, Feature Settings, Marketing, Campaign Influence Settings. Turn on Customizable Campaign Influence to capture multi-touch attribution. Without it, every Opportunity attributes 100% to the single Primary Campaign Source, which understates multi-channel programs.
- Add the View Hierarchy link
On the Campaign Lightning record page, drop the Campaign Hierarchy related list onto the Related tab. This lets marketing users navigate up and down the tree without leaving the record. The right rail also shows hierarchy metrics as a Quick Glance card.
The lookup field that creates the hierarchy. Self-referencing on the Campaign object. Up to five levels deep; deeper assignments are rejected.
Org-wide setting that switches Opportunity attribution from single-source to multi-touch. Once on, you define influence models (First Touch, Last Touch, Even, custom) and Influence records replace Primary Source as the primary credit.
Standard fields that aggregate counts and amounts across descendants. Cannot be customized; you cannot add a custom hierarchy rollup field without flow or scheduled Apex.
Org-wide default for Campaigns: Private, Public Read Only, or Public Read/Write. Hierarchy does not propagate access; share each level explicitly if you go Private.
- Five-level cap is a hard limit. Plan the level meaning before building or you run out of room as the program structure evolves.
- Total Members in Hierarchy deduplicates by member, so the same Contact across two child campaigns counts once. Reports that sum individual campaign member counts will exceed this number.
- Parent Campaign reassignment is fast and irreversible without backup. Export ParentId values before bulk restructures.
- Cost rollup double-counts if you populate Actual Cost on both parent and child for the same spend. Park cost on one level only.
- Access to a parent campaign does not grant access to children. Each level shares independently under the org-wide Campaign sharing model.
Trust & references
Cross-checked against the following references.
- Campaign Hierarchy OverviewSalesforce Help
- Customizable Campaign InfluenceSalesforce Help
Straight from the source - Salesforce's reference material on Campaign Hierarchy.
- Campaign Hierarchy FieldsSalesforce Help
- Define a Campaign HierarchySalesforce Help
About the Author
Dipojjal Chakrabarti is a B2C Solution Architect with 29 Salesforce certifications and over 13 years in the Salesforce ecosystem. He runs salesforcedictionary.com to help admins, developers, architects, and cert/interview candidates sharpen their fundamentals. More about Dipojjal.
Test your knowledge
Q1. What does Campaign Hierarchy enable?
Q2. What is the maximum depth of a Campaign Hierarchy?
Q3. What is a common use case for Campaign Hierarchy?
Discussion
Loading discussion…