TABLE OF CONTENTS
- How Product and Catalog Data Flows
- Catalog Structure and Navigation
- Loading a Product Details Page
- Brand Pages
- Caching and Publishing
- Example: Add Country of Origin to the Product Page
- Golden Rules
- Hand-Over Checklist
- Troubleshooting
Solution Architecture Guidance
- Treat the published catalog as the source for storefront category, product, brand, and configurable-product experiences. Changes made in Znode Admin are not visible on the storefront until published, so content freshness expectations should account for the publish process. Price and stock are not part of the catalog publish and follow their own refresh rules, described in the Pricing and Inventory Data Flow guide.
- Distinguish among category navigation, brand-based browsing, product details, and configurable variants when defining requirements. Brands organize products independently of the category tree, while a configurable product resolves selected attributes to a specific purchasable SKU with its own price, inventory, images, and attributes. If a shopper's selection does not match an existing variant, the storefront shows the parent product's images and content with a combination message and turns off Add to Cart, rather than showing an error page.
- Consider how many catalog experiences a requirement affects. A change limited to product details generally has fewer dependencies than one spanning category trees, brand pages, product listings, SEO URLs, configurable variants, breadcrumbs, and multiple storefront languages. As more experiences are included, implementation, testing, and ongoing support scope can increase.
- Prefer using product and catalog data already available in the standard storefront response before introducing additional data retrieval. Requirements that can be satisfied by exposing an existing product attribute generally have less solution impact than requirements that need a new data source or separate retrieval path. Product listing pages and the product details page are served by different responses, so an attribute available on the product details page is not automatically available on listings; showing it there may need a back-end configuration or indexing change. publish need for every changes
- Set client expectations that product and catalog data are designed primarily for shared storefront experiences rather than user-specific logic. For guests, this content is cached independently of an individual shopper session. For signed-in shoppers, the storefront already selects a different catalog per account and per pricing profile, and each signed-in shopper's catalog responses are cached separately. Requirements for user-specific, session-specific, or real-time product visibility may require additional processing outside the normal cached catalog flow and can have performance impacts, particularly when applied across product-listing experiences.
How Product and Catalog Data Flows
- Stack: Znode 10 Storefront
- Audience: Implementation partners and developers
- Covers: Category tree, product details, configurable variants, brand
- Not covered: Search ranking, price and inventory math
Categories, products, configurable variants and brands all come from one published catalog, reached through a small set of agents. This guide shows how the pieces relate, how a URL finds the right one, and how the result stays fast without going stale.
Catalog Structure and Navigation
Every storefront read is scoped to one published catalog, chosen for the current store, account and pricing profile by a single function. Categories form a tree; brand sits beside the tree as a second, independent way to group the same products.
The model has five entities:
| Entity | Description |
|---|---|
| Catalog | The published snapshot every storefront read comes from. |
| Category | A tree node; lists its own products and sub-categories. |
| Product | Belongs to 1..n categories and 0..1 brand. |
| Brand | Cross-cutting: lists products without using the category tree. |
| Variant | A configurable product's selected-attribute combination. |
The diagram below shows how these entities relate.

| Entity | Core type | Built by |
|---|---|---|
| Category tree / node | ICategory, IMegaMenuCategory | packages/agents/src/category/category.ts |
| Product list card | IProductCard | packages/agents/src/product/product.ts |
| Product detail | IProductDetails | packages/agents/src/product/product-details.ts |
| Configurable variant | IConfigurableProduct, IConfigurableAttribute | packages/agents/src/configurable-product/configurable-product.ts |
| Brand | IBrand, IWidgetBrand | packages/agents/src/brand/brand.ts |
| Breadcrumb trail | IBreadCrumb | packages/agents/src/breadcrumb/breadcrumb.ts |
From a URL to the Right Entity
A catalog page can be reached two ways: a fixed route where the publish ID is already in the folder name, or a merchandiser-defined SEO URL caught by the catch-all route. Both end up calling the same page data handler — only the path to get there differs.
| Route | Path | How it resolves |
|---|---|---|
| Fixed route | /category/[id], /product/[id], /brand/[id] | The folder's [id] is already the publish ID. No SEO lookup is needed; the page calls getSeoData only for the page's metadata. |
| SEO catch-all | /[...slug] | Calls validateAndGenerateSeoUrl(url), which resolves the merchandiser's URL to an entity type and ID, then rewrites to the fixed-route form internally. |
Do reuse getCatalogCode(portalData, user) for every new catalog-aware call, so account- and profile-level catalog overrides are respected.
Don't confuse the two getSeoData functions: one resolves a slug to an entity (@znode/agents/seo-url), the other builds page metadata from a known entity (@znode/agents/robot-tag).
Loading a Product Details Page
Whichever route reached it, the product page always ends at getProductInformation, which calls the product-details agent, the client, and the back end — and the whole chain is tagged for cache invalidation on the way back.

Configurable Products
A configurable product is a parent record plus a set of configurable attributes, each with selectable values. Picking one value per attribute resolves to a single purchasable child product — a different SKU, price and stock level.
| Query parameter | Meaning |
|---|---|
| parentProductId | The configurable parent's publish product ID |
| parentProductSKU | The parent's SKU |
| codes | Comma-separated attribute codes picked so far, e.g. Color,Size |
| values | Pipe-separated values in the same order, e.g. Red|Large |
Do expect an unresolved combination to be a normal case: the agent returns a combinationErrorMessage and falls back to the parent's own images and SEO data rather than an empty page.
Don't read a per-variant attribute (for example a variant-specific origin or weight) from the parent product's attributes array — read it from the resolved variant's own response.
Brand Pages
Brand is modeled independently of the category tree. A brand detail page loads the brand record, then loads that brand's products through the same shared product-list machinery a category page uses — just scoped by brand code instead of category ID. If the brand lookup fails, the page still gets a usable (empty) product list, so it can show a "not found" state instead of crashing.
Caching and Publishing
Every catalog read is tagged with the entity's kind and ID. A tag only clears when Znode's publish event for that same kind of entity fires — so the tag you choose has to match the pattern an existing catalog agent already uses.
| Data | Tag pattern | Goes stale when |
|---|---|---|
| Category (by ID), breadcrumbs | Catalog_<code>, Category_<id> | That category or its catalog is republished |
| Category tree / navigation | Portal_<storeCode>, Catalog_<code> | The portal or catalog is republished |
| Product details, recently viewed | Product_<id>, Catalog_<code> | That product is republished |
| Configurable variant list | Product_<parentId>, Catalog_<code> | The parent product or its catalog is republished |
| Brand list | Portal_<storeCode> | The portal is republished |
| Brand detail | BrandCode_<code> | That brand is republished |
Published vs. draft: the storefront only ever reads the published catalog. A change made in Znode Admin is invisible until an operator publishes it — publishing both writes the change to the published catalog and fires the event that clears matching cache tags. An unpublished entity behaves exactly like one that doesn't exist: the page returns 404.
Example: Add Country of Origin to the Product Page
Goal: show a Country of Origin value on the product page. The attribute already exists on the product, so no new back-end call is needed — only mapping.
STEP 1 - Confirm it's already on the response
IProductDetails.attributes already carries every attribute Znode returns for the product. Nothing new needs to be fetched.
STEP 2 - Map it to a named field
packages/agents/src/product/mapper.ts · packages/types/src/product-details.ts mapper.ts (excerpt) // CUSTOM: expose Country of Origin as a named field for the product page productBasicDetails.countryOfOrigin = productBasicDetails.attributes?.find((attribute) => attribute.attributeCode === "CountryOfOrigin")?.attributeValues ?? "";
STEP 3 - Display it
Read product.countryOfOrigin in your product-page customization component, the same way any other mapped field is read. Translate the label in every locale file.
STEP 4 - Nothing new to cache
The field travels inside the response already tagged Product_<id>, Catalog_<code>. It goes stale exactly when the product does.
Do mark every changed line with // CUSTOM: <reason> and add new fields as optional.
Don't read a configurable product's per-variant value from the parent's attributes — read it from the resolved variant.
Golden Rules
| Rule | Detail |
|---|---|
| Always resolve the catalog code | Use getCatalogCode(portalData, user), never portalData.catalogCode directly. |
| The storefront only reads published data | Draft changes in Admin are invisible until they are published. |
| Tag catalog reads, not user reads | Reuse an existing entity's tag pattern; never tag a call whose result depends on the current user. |
| Breadcrumbs are pre-rendered HTML | The breadcrumb agent returns an HTML string, not structured data. |
| Brand and category are independent axes | A product's brand doesn't live inside the category tree. |
| A failed variant combination still renders | Fall back to the parent product rather than an empty page. |
Hand-Over Checklist
Before the pull request:
- New catalog calls use getCatalogCode(portalData, user)
- New fields on IProductDetails / ICategory / IBrand are optional and marked // CUSTOM:
- Shared catalog calls are tagged, reusing an existing tag pattern for that entity
- Configurable-product changes are tested against both a resolvable and an unresolvable combination
- New brand- or category-scoped product lists reuse the shared product-list agent
- The change was verified on both the fixed route and the [...slug] catch-all
- Unit tests cover the mapping and the safe-default error path
Troubleshooting
| You see | What it usually means |
|---|---|
| A category or product page 404s even though it exists in Admin | The entity hasn't been published yet, or was unpublished |
| A published change doesn't appear on the storefront | The response is cached with a tag that doesn't match the publish event; reuse an existing tag pattern for that entity |
| A configurable attribute value won't select | The combination doesn't resolve to a real child product; this surfaces as combinationErrorMessage, not an error |
| Breadcrumbs render as literal <a> text | The breadcrumb value is already HTML; don't re-escape or re-wrap it |
| A brand page shows no products but the brand exists | The brand lookup likely failed; check getBrandDetailsAndProducts's error path, not the product-list call |