# How do parent-child case hierarchies assist support teams in managing major system outages?

**Topic:** Service Cloud · **Difficulty:** Medium · **Tags:** Service Cloud, Case Hierarchies, Incident Management

Read it on the site: https://www.forcechallenges.com/interview-questions/how-do-parent-child-case-hierarchies-assist-support-teams-in-managing-major-system-outages

## Answer

**Basics:** During an outage, hundreds of customers raise cases about the same failure. A parent case represents the underlying incident (or problem); each customer case points to it through the standard `ParentId` lookup. Engineers work the parent, and support communicates to all linked cases.

**How it works:** Set Parent Case on each child (manually, via a Flow that matches on a keyword or product, or by an agent). The Case page shows a Parent Case lookup and the related Child Cases list; the Case Hierarchy view (View Hierarchy) displays the tree with configurable columns. When the parent resolves, automation can post an update or close the children. Use a dedicated record type for incidents with its own support process and queue.

**Advanced / deep dive:** `ParentId` is a lookup, so you cannot have roll-up summary fields; compute child counts with Flow, Apex or a declarative rollup tool. Because each child keeps its own entitlement and milestones, SLAs stay accurate per customer, unlike merging. Propagate updates with a record-triggered Flow or a trigger handler that finds children by `ParentId IN :ids`. Be careful with recursion and DML volume: closing 5,000 children in one transaction hits DML row limits (10,000 rows) and may need Queueable or Batch Apex. Salesforce also offers Incident Management objects (Incident, Problem, Change Request) in newer releases for ITSM-style processes; verify availability in your edition. Swarming (collaboration through Slack) and Omni-Channel routing to a specialist queue complement hierarchies.

**Code / config example:**
```apex
// Called from the Case trigger handler (after update) when parents move to a closed status
public static void closeChildren(Map<Id, Case> oldMap, List<Case> newCases, String closedStatus) {
  Set<Id> parentIds = new Set<Id>();
  for (Case c : newCases) {
    if (c.Status == closedStatus && oldMap.get(c.Id).Status != closedStatus) parentIds.add(c.Id);
  }
  if (parentIds.isEmpty()) return;
  List<Case> children = [SELECT Id FROM Case WHERE ParentId IN :parentIds AND IsClosed = false];
  for (Case ch : children) ch.Status = closedStatus;
  if (!children.isEmpty()) update children; // use Queueable if volumes can exceed DML limits
}
```

**Hidden gotchas & must-remember points:**
- No roll-up summary is possible on ParentId, since it is a lookup.
- A single transaction can update at most 10,000 DML rows; mass child closure may need async.
- Child cases do not inherit the parent's status unless you automate it.
- The hierarchy view has configurable column and depth settings; verify limits.
- Closing the child must use a status valid for its record type's support process.
- Customers see only their own case, so send updates through emails or comments on each child.

**Best practice:** Use a parent incident case for the root cause, automate child updates in Flow or async Apex, and keep every customer's case and SLA intact.

---
Source: ForceChallenges · last updated 2026-11-02
