Model your catalog
Most modeling questions in Attricat come down to four building blocks. Pick the right one early; changing it later means migrating data.
| Use | For | Example |
|---|---|---|
| A record blueprint | A thing with its own identity, name, or lifecycle | Product, category, brand, supplier |
| A scalar attribute | A fact about one record | SKU, title, weight, launch date |
| A relationship | A link between records | Product → categories, product → brand |
| A context | A scope in which values differ | Market, language, sales channel, store |
Classifications are records
Section titled “Classifications are records”Tags, labels, categories, colors, materials, and certifications should be records linked by relationships. Do not model them as strings or lists of strings.
A classification usually needs things a string cannot give it: a stable identity when it is renamed, a translated name, a parent in a hierarchy, a description, an owner. A record has all of these, and a relationship stores which classifications apply.
format_version: 1code: materialname: Materialkind: record
attributes: - code: name value_type: string
- code: code value_type: string context_editable: default
views: dropdown_option: type: dropdown_option fields: [name]attributes: # On product - code: materials value_type: relationship target_blueprint: materialSome guidelines:
- One blueprint per vocabulary. A color is not a category just because both appear on a product. Keep them apart unless they share both meaning and lifecycle.
- Name relationships for their meaning.
materialsandcertificationsread better than a catch-alltags. Keep a genericlabelsrelationship for annotations that cut across domains. - Keep a stable code attribute when integrations need one, and declare it as a unique key so it cannot be reused. Relationships themselves always use the record UUID.
- Use a scalar for values that are intrinsic and not shared: a SKU, a free-text note.
Single-select and exclusive links
Section titled “Single-select and exclusive links”cardinality: one makes a relationship single-select. Many products can still share one brand:
attributes: - code: brand value_type: relationship target_blueprint: brand cardinality: oneAdd target_cardinality: one only when each target may be claimed once, such as a product and its unique barcode record.
Links to several kinds of record
Section titled “Links to several kinds of record”A relationship can target any blueprint, one blueprint, or a list of them. Use a list when a link has a clear meaning but more than one kind of target, such as the subject of a compliance assessment:
attributes: - code: subject value_type: relationship target_blueprints: [product, product_revision, material, part]Links to other blueprints are rejected, the record picker lets editors choose which of the listed blueprints to search, and each listed blueprint can show the links with an incoming_relationship_list. Prefer one relationship per meaning over one unrestricted relationship.
Business keys
Section titled “Business keys”Part numbers, document numbers, and accession numbers identify a record to people and other systems. Declare them as unique keys; combine attributes when the identifier is only unique within something else, such as a revision label within its document or a part number within its manufacturer.
Hierarchies
Section titled “Hierarchies”Give the classification blueprint a relationship to itself:
attributes: # On category - code: parent value_type: relationship target_blueprint: category tree: true context_editable: defaulttree: true makes the relationship single-select and rejects any link that would make a category its own ancestor (409 relationship_cycle). Use acyclic: true instead for structures where a record may have several targets but must never loop back, such as dependencies or predecessor chains. Both require context_editable: default, so the hierarchy is the same in every context. Publishing either setting on existing data reports any cycles that already exist.
The Explorer detects self-referencing relationships and turns the facet for product.categories into a tree with roll-up counts. Selecting Shirts also matches products assigned to its children. See Explore records.
To show the path on a product page, use the attricat.relationship_hierarchy component. To flag a category that ends up as its own ancestor, add a rule with the acyclic predicate.
Constraints across relationships
Section titled “Constraints across relationships”Some constraints span two records: a certificate’s facilities must belong to the certificate’s supplier, or a nonconformance cannot close while a corrective action that refers to it is still open. Express them on the record that owns the constraint, with a linked or referenced_by check.
- One hop. A check reads the records the saved record links to, or the records that link to it, and stops there. If a constraint needs two hops, add a relationship or attribute that brings the value one hop closer.
- Bounded. A check reads at most 200 linked records per relationship and 1,000 referring records. Keep relationships that need checking small; checks on larger sets fail.
- Checked on the owner’s save. Changing the linked record is not rejected. Pair the check with an event-triggered rule so affected records are reported as findings.
- Per context. Linked records are read in the same context as the record being saved, so a relationship that differs by market is checked per market.
Contexts
Section titled “Contexts”A context tree describes where values differ. Plan it before you add many overrides, because inheritance follows the tree.
default├── PL (language: pl)│ ├── PL-web│ └── PL-marketplace└── DE (language: de) └── DE-webWith this tree, a product description written in PL is used by PL-web and PL-marketplace unless they set their own.
- Contexts are not automatically languages. If your tree represents locales, say so in the context
data(for example{"language": "pl"}) and in your team’s conventions. - Mix dimensions carefully. A single tree can combine market and channel, as above, but every combination you need must exist as a node.
- Decide per attribute.
context_fallback: nonestops inheritance for values that must never leak into a child, such as a channel-specific promotion.context_editable: defaultlocks values that are global, such as a SKU. - Translate classification names in place. A material’s
namecan have overrides in language contexts. Relationship pickers and table columns resolve the label in the selected context. - Relationships are contextual too. A product can have a different set of categories in one market.
Contexts also act as publication channels when you enable them for export.
Reuse attributes
Section titled “Reuse attributes”There are two ways to share attribute definitions.
Mixins share attributes between blueprints. A mixin is a blueprint with kind: mixin; other blueprints include one exact revision and select its attributes with from. Use it for groups of fields many blueprints need in the same shape, such as SEO or dimensions. See Author a blueprint.
Reusable attributes are a workspace registry of single attribute definitions, managed under Manage → Reusable attributes. Editors can attach a published reusable attribute, or a group of them, to an individual record. Use them for occasional fields that only some records need and that do not belong in the blueprint. A definition is YAML:
code: country_of_originname: Country of originvalue_type: stringsearchable: truecode, name, and value_type are required. The other keys are value_schema, default_value, tags, context_fallback, context_editable, readonly, the relationship keys target_blueprint_code, cardinality, and target_cardinality, and file_policy for files. Unlike in a blueprint, value_schema is a YAML mapping, not JSON in a string, and json is not an allowed type. There are also searchable, which includes its values in Explorer search and filters, and facetable, which together with searchable lists it under Add filter in the Explorer. Each change creates a new revision; publish a revision before it can be attached. The workspace supplies the namespace, so a reusable attribute’s full code is <namespace>:<code>. The editor offers examples, ready-made pieces, save checks as you type, and a preview of the field; see The web editor.
A group is a named set of reusable attributes, listed by full code. Applying a group attaches each attribute’s latest published revision at that moment, and a record already holding one of them refuses the whole group. Publishing a revision therefore reaches every later apply, without editing the group. Editing or deleting a group changes only what later applies do: records keep the attributes and revisions they already have. A group’s code cannot change.
Creating and publishing reusable attributes, and managing groups, needs blueprints.write. Attaching one to a record needs records.write on that record.
Assign responsibility
Section titled “Assign responsibility”Store who is responsible for a record, such as an assignee, owner, or reviewer, in a user or team attribute rather than free text. Free text cannot check that the person exists or still works in the workspace, and it is not reliable for filtering. A user or team attribute is a string attribute with an x-attricat-principal annotation that lists what it accepts:
attributes: - code: reviewer name: Reviewer value_type: string value_schema: |- { "type": "string", "x-attricat-principal": { "version": 1, "kinds": ["user", "team"] } }- The field offers a picker of active workspace members and teams, and the record shows the chosen name. Use
"kinds": ["user"]when the responsibility must belong to one person. - Saving checks that a new value is an active member or an existing team. A record assigned to someone who has since left keeps the assignment and shows it as no longer active until someone changes it.
- In the Explorer, filter the attribute by a person or team, or choose Assigned to me (or my teams). Saved searches with that filter work for whoever opens them.
- Teams are managed under Manage → Workspace management → Teams. An assignment stores the team, so changing who belongs to it never touches records.
- An assignment does not grant or restrict access. Status transition requirements check the person saving, not the assignee, and rule predicates can only check that a record is assigned or compare the value with a fixed user or team. “Only the assignee may close this” cannot be declared; use roles or separation of duties instead.
See User or team assignments for the exact rules.
System tags and metadata
Section titled “System tags and metadata”Every record also has system_tags (a set of strings) and system_metadata (a JSON object up to 64 KiB). They sit outside the blueprint, are not versioned, and are not shown in views. They exist for automation: marking a batch for processing, recording an import source, or flagging a record for review. Workflows can change them, and rules can check tags. Search can filter by system tags. People see them read-only on the record page and can filter the Explorer by tag; see Tags and metadata.
Tags that start with attricat. belong to Attricat, which adds and removes them itself. Workflows, extensions and API writes cannot add or remove them, but you can filter and sort by them. Attricat sets attricat.sample on sample data from a solution pack and attricat.needs_attention on records with at least one open rule finding. Extension tags take the form <extension-id>:<tag>; see the API reference.
Tag or attribute
Section titled “Tag or attribute”A system tag and an attribute can both mark a record, for example as needing review, discontinued, or ready to sync. Choose by who sets the mark and who reads it.
| System tag | Attribute | |
|---|---|---|
| Set by | Workflows, agents, extensions, and API clients | People in the record form, and automation |
| Shown | Read-only on the record page, and as an Explorer filter and column | In views and forms |
| Defined in | Nowhere; any tag can be added to any record | The blueprint, with a name, type, and value rules |
| Checked by | Rules (has_tag, missing_tag) |
The value schema, required attributes, status transition requirements, and rules |
| Varies by context | No | Yes, when the attribute allows it |
| Record revisions | Not versioned | Versioned with the record |
Use a system tag when automation both sets the mark and acts on it, the mark is temporary work state that is removed once handled (needs-review, sync-pending), or it records where a record came from (import-2026-10). A tag needs no blueprint change, so it works across blueprints.
Use an attribute when a person decides the value or must be able to change it, when it must appear in a view or form, when it needs validation, or when its history matters. A yes/no fact is a boolean attribute, and a stage in a lifecycle is a status. If the mark is one of a managed list of labels, such as certifications or collections, make the labels records and link them; see Classifications are records.
If someone who sees the mark would need to correct it, it should be an attribute.