Skip to main content

Overview

Hierarchies let you organize records into a parent-child tree. You set a record’s parent; CXF keeps the order among siblings and the record’s path in the tree up to date automatically — no manual bookkeeping. For the mental model, see Core concepts. Hierarchies apply to Organizations and to Content Instances — including Taxonomies, which are content instances.

Where to find it

You manage hierarchies from the list view of any object that supports them — Organizations, Content Instances, Taxonomies. From there you arrange the tree, setting each record’s parent and its position among its siblings.

Properties

A record in a hierarchy carries these properties:
PropertyTypeRequiredDescription
parent_idreferenceNoThe parent record. Unset means a root item — for Content Instances, the Template acts as the root.
sequencenumberNo1-based position among its siblings. Auto-assigned to the end if you don’t provide one.
parent_object_typeenumNoThe object type of the parent.
hierarchystringRead-onlyComputed dot-notation path, for example 1.2.3.
hierarchy_sortarrayRead-onlyComputed array form of the path (for example [1, 2, 3]), used to sort the tree.
hierarchy and hierarchy_sort are computed and read-only — they’re maintained for you and can’t be submitted. You only ever set parent_id and (optionally) sequence.

Behaviour & rules

  • Order is auto-managed. Omit sequence and the record goes to the end of its siblings; an out-of-range value is clamped to a valid position.
  • Moving reorders automatically. Changing a record’s parent_id or sequence reorders its old and new siblings and recomputes the paths of all its descendants.
  • Deleting promotes children. When a record is deleted, its children move up to its parent (no orphaned subtrees) and siblings close the gap.
  • Computed fields are protected. Submitting hierarchy or hierarchy_sort is rejected.
  • Archived items are skipped when ordering siblings.

Removing from the hierarchy

You can detach a record from the tree, clearing its parent_id, sequence, and path. This is refused if the record still has children — move or delete them first.

Seeds

Hierarchy travels with the host record in a structural Seed: set the record’s own parent_id (and optionally sequence). Don’t include hierarchy / hierarchy_sort — they’re computed on import. See the Taxonomies seed example for the parent-child pattern.

Governance & permissions

  • Only a super admin or Master can build and reorder hierarchies (set a record’s parent, move it, or detach it from the tree).

API access

Set parent_id and sequence through the standard create and update operations; hierarchy and hierarchy_sort come back computed. A dedicated operation detaches a record from the tree (see Removing from the hierarchy). See the API reference.

Organizations

The main object organized into hierarchies.

Taxonomies

Classification that also uses parent-child hierarchies.