#Lesson 3 - Enumerations
This section covers creating the enumerations the product variant components depend on.
An enumeration defines a fixed set of allowed values at the schema level. The enumerations configured here, Clothes size, Shoes size, Wearable items color, and Decor items color, power the size and color dropdowns in the content editor in later lessons. They need to exist in the schema before the components that use them can be built.
#How enumerations work
An enumeration defines a fixed set of allowed values for a field. When a field is typed to an enumeration, the API enforces the allowed values at the schema level. A product entry cannot be published with a color value of "navy" if the enumeration only contains Red, Green, Blue, Black, and White.
This is different from a free-text field, where any value is accepted, and different from a reference, where values are editor-managed content entries. Use an enumeration when the set of valid values is fixed, controlled by the schema owner, and unlikely to be extended by editors. Learn more about enumerations.
Use a reference when the list of values needs to be managed as content entries by editors. Use a taxonomy when the values are hierarchical. Enumerations are for flat, schema-controlled value sets that change infrequently.
#Lessons in this section
| Lesson | What you will do |
|---|---|
| 3.1 Configure enumerations | Create enumerations for product size and color values that the product variant components will use |
#What's next
Lesson 3.1 - Configure enumerationsOr, go to the Tutorial overview for the full lesson list.