This guide provides a step-by-step approach to correctly fill the OrgStructureMaster table. This table stores information about the hierarchical organizational structure for a given client. It helps define different levels within an organization, and specifies whether a particular level is used for evaluation purposes.
The table is critical for structuring survey data and mapping responses to the correct organizational units.
For a complete description of the table structure and field explanations, please refer to the → OrgStructureMaster Table Structure
This is the primary key (auto-incremented) for the table.
Do not manually enter this value if inserting data directly via the database.
It is automatically generated.
This column captures the unique identifier of the client to which the organizational structure belongs.
Example: clientid = 1
The label represents the name or title of the organizational unit,
This label will be visible in reports and organizational hierarchies.
Example: label = “Cluster A”
The heirarchy column determines the parent-child relationship of the organizational structure. It references the id of the parent organization unit.
Example:
| label | heirarchy |
|---|---|
| Cluster A | 0 |
| Location 1 | 1 |
In this example, Location 1 is a child unit of Cluster A.
The heirarchylevel column defines the depth level of the organizational unit.
Example:
| label | heirarchylevel |
|---|---|
| Cluster A | 1 |
| Location 1 | 2 |
This column determines if the organizational unit is used for evaluation purposes in survey reports.
| Value | Meaning |
|---|---|
| 0 | Not used for evaluation |
| 1 | Used for evaluation |
If you want responses to be mapped to a specific organizational unit for evaluation, set the value to 1.
Example: usedforevaluation = 1
The createdby column captures the ID of the user who initially created this record.
Example: createdby = 996
The createdon column records the timestamp of when the organizational unit was created.
Example: createdon = 2022-05-26 07:27:17
The modifiedby column captures the ID of the user who last modified this record.
Example: modifiedby = 996
The modifiedon column records the timestamp of when the organizational unit was last modified.
Example: modifiedon = 2023-09-07 15:58:13
Always ensure the client ID is correct to avoid mismatched data. Top-level units should have heirarchy = 0 and heirarchylevel = 1.
Here’s an example of a complete record for an organizational structure:
| id | clientid | label | heirarchy | heirarchylevel | usedforevaluation | createdby | createdon | modifiedby | modifiedon |
| 1 | 1 | Cluster | 0 | 1 | 0 | 996 | 2022-05-26 07:27:17 | 0 | 0000-00-00 00:00:00 |
| 2 | 1 | Location | 1 | 2 | 0 | 996 | 2022-05-26 07:27:24 | 0 | 0000-00-00 00:00:00 |
This structure would represent a client with one cluster and one location under it.