Category Attributes
Category attributes define which facts Youzu extracts for products in a category and how each value is represented. Configure them in the dashboard, either in a reusable category template or directly in a catalogue. The catalogue needs aiProcessing enabled.
Choose a value type
Each attribute has a stable key, a readable name, a value type, and an optional description of what to look for. Include units in the description when a number needs them, for example, "Weight of one shoe in kilograms."
| Dashboard type | Definition | Example value |
|---|---|---|
| Text | string |
"mesh" |
| Number | number |
0.25 |
| Whole number | integer |
0 |
| Yes/No | boolean |
false |
| Choice | string with enum |
"GLOSSY" |
Choice attributes select one value from a configured list. Add at least one choice; every choice must be nonempty and unique after surrounding whitespace is removed. Spelling and case are preserved: "GLOSSY" remains "GLOSSY". A choice returns one string.
For example, these definitions describe five different attributes:
{
"material": {"type": "string", "description": "Primary upper material"},
"weight_kg": {"type": "number", "description": "Weight of one shoe in kilograms"},
"spike_count": {"type": "integer"},
"waterproof": {"type": "boolean"},
"finish": {"type": "string", "enum": ["matte", "GLOSSY"]}
}
Add customer slugs
You can add an optional Customer slug when creating or editing a category, and an optional Key slug for each attribute. These are customer identifiers returned with API results. Each slug allows up to 100 Unicode characters after trimming surrounding whitespace. Case and spelling are preserved, and different records may use the same slug. The category's existing Identifier remains separate.
Value slugs depend on the attribute type:
| Type | Optional value slugs |
|---|---|
| Text | None; generated text has no fixed set of values |
| Choice | One slug per configured choice |
| Number / Whole number | Slugs for exact numeric values you enter, including 0 |
| Yes/No | Separate slugs for true and false |
Numeric mappings do not restrict which values Youzu can return. An unmapped value is returned normally without a value slug. Each exact value can have one mapping; 0, false, and "0" are distinct. A key slug is available for every attribute type, including Text.
Set or edit these fields in a draft template or the catalogue's category editor. Clear a field and save to remove its slug. Renaming a choice retains its paired slug; removing the choice removes its mapping. Changing an attribute's value type clears its value mappings. Published templates must be cloned before editing.
Slugs inherit with the complete attribute set. Applying a template copies its slugs and clears live slugs absent from the template. Edits that change only slugs become visible on subsequent API responses without reprocessing products or regenerating suggestions.
For live configuration writes, attributeSlugs is a companion map:
{
"mode": "override",
"attributes": {
"finish": {"type": "string", "enum": ["matte", "GLOSSY"]},
"spike_count": {"type": "integer"},
"material": {"type": "string"}
},
"attributeSlugs": {
"finish": {"keySlug": "FINISH", "valueSlugs": [{"value": "GLOSSY", "slug": "GLOSS"}]},
"spike_count": {"valueSlugs": [{"value": 0, "slug": "ZERO"}]},
"material": {"keySlug": "MATERIAL"}
}
}
Omit attributeSlugs to preserve the stored mapping, or send {} to clear it. A supplied map replaces the existing map. Category writes use customSlug; null clears it and omission preserves it. Template categories use custom_slug, and each template attribute stores keySlug and valueSlugs in its configuration object.
See Product Management and Merchant API for response examples.
Handle missing values and languages
Youzu leaves an attribute unset when the product information does not support a value. A template's Required setting does not cause Youzu to invent missing facts. Known 0 and false values are retained; do not treat them as missing in your integration.
Attribute names can have translations for display. Free text can be translated into catalogue languages during product enrichment. Numbers, whole numbers, booleans, and choice values retain their types and canonical values. Choice values are never translated or recased.
Use stable attribute keys when reading or applying values. A translated label is for display and does not change the key or its allowed choices.
Edit a reusable template
- Open Categories & Attributes in the dashboard and create a draft template, or select an existing draft. Clone a published template to create an editable draft.
- Select a category or the general defaults. Add an attribute with a key, name, and value type. For Choice, enter its allowed values.
- Add extraction instructions under What should Youzu look for? and save the attribute. Set Required and sort order when needed for the template.
- Review and publish the template. Publishing validates attribute types and choice lists. Published templates are read-only.
A template stores Choice as value_type: "enum" with its list in configuration.enum. Applying it creates a live type: "string" definition with the same enum. Extraction instructions come from configuration.description, falling back to the attribute name.
Apply a template to a catalogue
Select the published category template when creating a catalogue, or use Replace with a saved setup in the catalogue's category editor to apply it to an existing catalogue. For API creation, send its ID as categoryTemplateId; see Catalogue Overview.
Applying a template copies its configuration into the catalogue. Publishing a different template does not automatically change the catalogue's copy. Review the changes before applying a replacement configuration.
Edit catalogue attributes and inheritance
In the catalogue's category editor, select a category to see the attributes it collects. Use Collect different attributes here to create a local override, edit its types and choices, and save. Edit the general defaults to configure the fallback used by categories without an override.
Inheritance selects one complete attribute set, starting at the selected category, then its nearest ancestor with an override, then the general defaults. Attributes from different levels are not combined. An explicitly empty set stops inheritance and collects no attributes for that branch. Restoring inheritance uses the ancestor or general defaults again.
Changes to a type, extraction description, or choice membership affect extraction and queue affected products for reprocessing. Display-label changes and reordering the same choices do not change extraction rules.
Use attributes with Merchant API
Merchant API infers the product category and suggests values that match its live attribute definitions. Each suggestion has a key, display label, and scalar value. Unknown values are omitted, and there is at most one suggestion per key.
Apply suggestions with the category returned in the same response. Merchant API calls are advisory and do not save or publish products.