Organization Hierarchy
  • 30 Jul 2024
  • 1 Minute to read
  • Contributors
  • Dark
    Light

Organization Hierarchy

  • Dark
    Light

Article summary

Purpose

The Organization Hierarchy CDP contains current and historical information on all managerial chains within the organization, starting from the CEO and extending down through all levels of management. This CDP is especially useful for answering detailed questions about how employees are structured within divisions and managers, and it should be used in conjunction with the device and software application CDPs to provide a holistic view of group-level analytics.

Understanding the Table

In this CDP, Level 1 will always represent the CEO for every row, with all managers listed above the row’s user_id. This hierarchical structure clearly illustrates the number of managerial levels between the CEO and any given employee.

Whenever there is a change in the managerial chain, a new row is created for all affected users. This means that if a high-level manager's position changes, all employees below that manager in the hierarchy will have a new row added to the table. This approach ensures that the historical context of managerial changes is preserved, allowing for accurate tracking of the organization's evolving structure over time.

Joining to CDPs and OCSF

The row’s user_id should be used for all CDP and OCSF joins.

To identify and retrieve all current manager chains, one should use the active column in conjunction with checking if the end_time column is not null. By doing so, you can effectively filter out inactive records and focus on the relevant, up-to-date management structures.

Schema

Example Queries

Find the latest record for a given id

SELECT * FROM organization_hierarchy WHERE id={id} and active=TRUE

Find all active entities and their latest row

SELECT * FROM organization_hierarchy WHERE active=TRUE 

Find all direct reports for a manager

SELECT * FROM user where manager_id ={id} 


Was this article helpful?

What's Next
Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.
ESC

Eddy AI, facilitating knowledge discovery through conversational intelligence