bw_create_hierarchy
Create and activate a characteristic hierarchy from nested text and value nodes. The characteristic must have hierarchies enabled.
Instructions
Create a hierarchy for a characteristic and activate it. The tree is passed nested: a text node { "text_node": "NAME", "text": "...", "children": [...] } groups other nodes; a value node { "value": "..." } is a value of the characteristic (it may have children too). Each node appears once. The characteristic must have hierarchies switched on. Not time-dependent and not version-dependent hierarchies only.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nodes | Yes | Top-level nodes of the tree, each { text_node, text?, children? } or { value, children? }. | |
| activate | No | Activate after saving (default true); false keeps it as revised version. | |
| description | Yes | Description of the hierarchy (up to 60 characters). | |
| characteristic | Yes | Characteristic with hierarchies switched on (e.g. "CHARACTERISTIC"). | |
| hierarchy_name | Yes | Name of the new hierarchy (e.g. "HIERARCHY_NAME"). |