In this article
A hierarchy definition is an Excel™ file containing a table that defines the hierarchy layout. The column headers are predefined in the system, and if the headers are used then they must be as shown in the table below.
When uploading to hierarchy management, the Excel™ file can contain hierarchy definition and contacts data (for example for employees), or just the hierarchy definition. And for the hierarchy definition, it is possible to upload with the relations between nodes on different levels specified in two different ways: Either in “parent-child” format, where a node id and node label is provided along with the id of the parent node (or empty if the node is at the root level), or in “full path” format, where the node’s position in the hierarchy is provided by listing the full path from the top of the hierarchy through the different levels to the specific node. For the “full path” format, it is possible to upload a file either with or without node id columns. So in total, six types of uploads are supported:
- Upload of “full path” hierarchy definition with external node ids and labels.
- Upload of “full path” hierarchy definition without external node ids.
- Upload of “full path” hierarchy definition with external node ids and with contacts assigned to the hierarchy - . Note that this requires that a contact database is set up in SmartHub and linked to the hierarchy. If the contact database includes employee data then the resulting definition could be as below:
- Upload of “full path” hierarchy definition without external node ids and with contacts assigned to the hierarchy. In this case node ids will be generated automatically, and a contact database must be set up and linked to the hierarchy.
- Upload of “parent-child” hierarchy definition. In a “parent-child” hierarchy definition the Excel file to upload must have one column for the node id, one for the node label and one for the parent id - . Column headers should be “Node id”, “Node label” and “Parent id”, or, for backwards compatibility with Database Designer, they can also be labeled “id”, “__l9”, “parent”.
Upload of “parent-child” hierarchy definition with contacts assigned to the hierarchy. For this, a contact database must be set up and linked to the hierarchy - .
The file includes columns for node labels - . If these columns contain data then the data will be included in the appropriate levels in the hierarchy automatically. The table below shows the definition for a very simple 2-level hierarchy. In this case the top level (L1:) is the “company” Mega Sales, and this company has two departments in the second level (L2:); Finance and Marketing.
Figure 1 - Example of a simple hierarchy definition with Node IDs and labels
The company hierarchy based on this definition will be as shown belowhere:
Figure 2 - A simple company hierarchy with node IDs and labels
This type of definition has the advantage that it is easily updated. Note that each level in the company requires its own “L” column (in addition to the Node ID and Node Label columns), so a company with four levels in the hierarchy will require columns L1, L2, L3 and L4.
If node IDs are not provided in the hierarchy definition then on upload the system will automatically generate node IDs for each node. These will merely be numbered sequentially starting from 1.
Figure 3 - Example of a hierarchy definition with contacts
Each employee in the company will require his/her own row in the table. In this case two people are assigned to the top Mega Sales node, three are assigned to the second-level Finance node, and four are assigned to the second-level Marketing node. You can view which employees are assigned to each hierarchy node, and you can add and delete employees and move them between nodes as required due to for example promotions, hirings and resignations (go to About Editing the Hierarchy for more information). Note that the contactids must be unique for the hierarchy.
Figure 4 - Example of the parent-child upload
Figure 5 - Example of a parent-child upload with contacts
Note: The hierarchy management module supports uploading of up to 15 levels in the hierarchy. This means that you can have in total 15 level columns in a “full path” import, with L1:, L2:, …, L15: as the column headers.