Role hierarchy cleanup brings the Salesforce role hierarchy back in line with how the organization actually works. Over time, hierarchies collect roles for departed teams, roles with no active users, duplicate branches after reorganizations, and levels added for one report. Because the role hierarchy drives record access, forecasting, and reporting, an outdated hierarchy causes real problems, not just clutter.
Why the Role Hierarchy Matters
- Record access. Users can access records owned by users below them in the hierarchy when an object grants access through hierarchies, so an incorrect parent can expose or hide data.
- Sharing targets. Sharing rules, queues, approvals, report filters, and delegated administration can all refer to roles.
- Performance. Changing the hierarchy can trigger sharing recalculation. Deep or oversized hierarchies make that recalculation slower.
How to Approach Cleanup
- Document the current hierarchy. Capture every role, the role's parent, and the users assigned to the role.
- Find empty and orphaned roles. Roles with no active users are cleanup candidates, but check whether anything else refers to the role first.
- Check references. Look for sharing rules, queues, approval processes, and reports that use the role before moving or deleting the role.
- Restructure in a sandbox. Change parents, merge roles, and reassign users in a sandbox, then confirm that record access still matches expectations.
- Schedule production changes. Make hierarchy changes during a quiet period, because sharing recalculation follows.
How Snapshot Helps
- Relationship Hierarchies Report: shows the User Role Hierarchy in Tree View, lets you drag nodes to change parents, and provides Create Role, Edit Role, Delete Role, and Assign Users. Report outputs include Only User Roles, Roles and User Count, and Roles and User Names, and Show Role Access includes role access settings. Dragging a node changes the parent immediately, so practice in a sandbox.
- Forgotten Assets Report: flags roles that have no active users, alongside other forgotten metadata.
- Impact Analysis Report: shows which assets reference a role before you change or delete the role.
An empty role does not establish that deleting the role is safe, and role access settings alone do not establish a user's effective record access.
Metadata Types Involved
-
Role: each role and the role's parent in the hierarchy. -
Group: public groups that can include roles and roles with subordinates. -
SharingRules: sharing rules that grant access to roles.
Common Questions
Can I delete a role that has no users?
Only after confirming that no sharing rule, queue, approval process, group, or report still refers to the role. An empty role can still be in use as a sharing target.
Should the role hierarchy match the org chart?
Not exactly. The hierarchy should reflect who needs access to whose records and how data rolls up for reporting, which often differs from reporting lines on the org chart.
Why do role changes take time to apply?
Moving roles can change who inherits access to which records, so Salesforce recalculates sharing for the affected records.