Use the Organizations API to retrieve information about your company and to view the hierarchy of the company and it's suborganizations. A suborganization can represent a branch office or job function within a parent organization.
Organizations and Hierarchy in Encompass
A company’s organization hierarchy is logically maintained in a tree structure within Encompass. As such, there is a single top-most (or root) organization which then contains zero or more suborganizations. Each suborganization can, in turn, contain additional suborganizations so that an
arbitrarily deep tree can be created.
Using the Organizations API
To navigate the organization hierarchy structure, the first step is to obtain a reference to the top-most node in the tree. The Get Root Organization Detail API returns this information.
From the root organization, the tree can be traversed by recursively invoking
Get Children of Organization. The method returns a list of the immediate children of the current organization node.
The organizationsInfo object provides other means of retrieving one or more organizations from the organization hierarchy directly without having to navigate to the desired node through the tree structure. Get Organization Detail provides direct access when the organization’s unique ID (orgId) is known. Finally, Get All Organizations returns a flattened list of all nodes in the hierarchy.