Context
During implementation, defining the metadata structure for a field like Region (populated with a list of all countries) presents a critical decision in Content Hub. Content Hub offers two options for such drop-downs: Taxonomy and Option List. Selecting the right format for Region is essential, as it directly impacts the application’s performance and the overall domain model. However, the dilemma persists: should Region be modeled as a taxonomy or an option list?
Before deep diving in the use case, make sure to get familiar with the key differences between Taxonomies and Option Lists.
Execution
One of the main solutions is to effectively structure the Region in the domain model by analyzing it as follows:
- Hierarchical Structure for Regions - Organize Region as a hierarchical taxonomy to represent global business areas:
- Level 1: Global
- Level 2: Super-Regions (e.g., EMEA, APAC, NA, LATAM)
- Level 3: Regions within Super-Regions (e.g., Europe, Middle East)
- Level 4: Sub-Regions or Country Groups (e.g., Western Europe, GCC)
- Level 5: Countries (e.g., France, Germany, UAE)
- Level 6 (optional): States/Provinces or Cities
- Handling Large Value Lists - With a vast number of countries, a taxonomy efficiently organizes data compared to a flat option list, improving scalability and maintainability.
- Security Policies and User Group Management - A taxonomy allows granular control over assets by defining access policies and user groups tied to specific regions. Thus, Region basically defines the type of users in the system
- Enhancing Search Filters - A taxonomy enables the Region field to serve as a facet in search, enhancing asset discovery and user experience.
- Metadata of Metadata - If additional attributes like Region Code, Currency, or Time Zones are associated with Region, a taxonomy supports these relationships better than an option list.
- Support for Business Needs - The hierarchical structure accommodates varying levels of granularity, enabling flexibility for organizational or geographical reporting.
By defining Region as a taxonomy, you ensure scalability, clarity, and optimal functionality in your domain model while meeting business requirements effectively.
Insights
There’s no one-size-fits-all answer—it varies based on the requirements and the field's role within the domain model. When choosing between taxonomies and option lists in Sitecore's Content Hub, the decision depends on factors like the number of values, need for hierarchy, security settings, and display requirements. For managing large sets, intricate structures, and scenarios needing protection or inheritance, taxonomies are the best choice. Conversely, option lists are effective for straightforward lists with fewer than fifty entries and no extra attributes.
When deciding on the appropriate data type for your metadata, consider the following -
- Number of data items possible for metadata: For lists with fewer than 50 items, an option list is suitable. For larger lists, a taxonomy is recommended.
- User Group Definition: If you need to define user groups based on the metadata field, configure it as a taxonomy.
- Search Facets: To use the field as a search facet in various search pages, it is advisable to set it up as a taxonomy.
- Metadata Storage: To store additional details about the metadata field, such as type, name, and origin, configure it as a taxonomy. Option lists are limited to serving as data sources and do not support extended metadata.
- Hierarchy Levels: An option list can support up to five hierarchical levels, whereas a taxonomy has no restriction on the number of hierarchical levels it can contain.