---
updatedAt: 2025-09-25T18:14:44.000Z
agentTools:
  projectIndex: https://docs.constructor.com/llms.txt
---

# Configure hierarchical facets

Hierarchical facets are a type of facet that allows Constructor to format a facet response in a nested/hierarchical format.

[Create a facet](https://docs.constructor.com/reference/configuration-facets) and set it as type `hierarchical`.

Each [facet option](https://docs.constructor.com/reference/v1-facet-options-create-or-update-facet-options) needs to have a facet options configuration indicating its `parent_value` under its `data` field as JSON.

* Facet option syntax `[parent facet option][delimiter][facet option]`.
  * Valid delimiters `-`, `/`
  * Example: `mens/us/10`
* Root facet options will have  `"parent_value": null`.

```json Example
// root example
{ 
  "value": "mens",
  "data": { "parent_value": null }
}

// leaf example
{ 
  "value": "mens/us/10",
  "data": { "parent_value": "us" }
}
```

Applying these facets options to an item requires the item to have each individual facet value `facet:size`-> `mens|mens/us|mens/us/10|mens/us/11`.

# Example response

```json JSON
{
	"display_name": "Shoe Size",
	"name": "size",
	"type": "hierarchical",
	"options": [
		{
			"status": "",
			"count": 422,
			"display_name": "Mens",
			"value": "mens",
			"data": {
				"parent_value": null
			},
			"options": [
				{
					"status": "",
					"count": 422,
					"display_name": "US",
					"value": "mens/us",
					"data": {
						"parent_value": "mens"
					},
					"options": [
						{
							"status": "",
							"count": 416,
							"display_name": "10",
							"value": "mens/us/10",
							"data": {
								"parent_value": "mens/us"
							},
							"options": []
						},
						{
							"status": "",
							"count": 6,
							"display_name": "11",
							"value": "mens/us/11",
							"data": {
								"parent_value": "mens/us"
							},
							"options": []
						}
					]
				}
			]
		}
	],
	"hidden": false,
	"data": {}
}
```