Prepare the data to be shown on Organization Chart

The prerequisite steps for the Organization Chart View is to get ready with the data that appears on the Org Chart.

In Canvas, the data to be displayed on the view is fetched from the database using the SQL Result Map and the Select Id or by creating a connection in Canvas Studio.

The Org Chart data table can have any number of columns, but among that one column must be primary id column and another column must be secondary ID. The secondary ID column must use the primary ID to define the hierarchy in the Organization Chart.

Example:


For above example, data in any of the two columns will be presented in the Org Chart. One column will be rendered as title and the remaining column will be rendered as detail of the title. The detail of the title column will be rendered along with the column name.


COLUMN TITLEDESCRIPTION
ITEM_IDThis is the primary ID. This ID must not be duplicated at any levels and it should be unique in the ITEM_ID column.
NAMEThe data to be presented in the Org Chart as the detail of the title. This column data will be presented along with column name.
DESIGNATIONThe data to be presented in the Org Chart. For the current example this column will be rendered as Org Chart title.
PARENT_ID

This is the secondary ID, it use the primary ID (ITEM_ID) to define the hierarchy of the Org Chart. The parent ID for the root data must be null, since that is the senior parent of the Org Chart.

Remaining data can have its parent's ITEM_ID in the PARENT_ID column. In the above example the parent data of Sanjay is Krishna, so ITEM_ID of Krishna is mentioned in PARENT_ID of Sanjay.