Vue Storefront is now Alokai! Learn More
Reference

Reference

Quick-reference tables for all configuration options, API parameters, normalizers, and expected index fields.

Unified extension config

Options passed to createUnifiedExtension({ config: ... }). Controls normalization behavior.

PropertyTypeDefaultDescription
defaultCurrencystring'USD'Fallback currency when the vsf-currency cookie is not set
facetConfigFacetConfigRule[]Declarative rules mapping facet names to storefront types
facetFieldsstring[]Facet field names to request. Omit to request all available
excludeFacetsstring[]Facet names to exclude from the response
facetFilterOperator'AND' | 'OR''OR'How multiple values within one facet are combined
filterFacets(facet) => booleanDynamic filter callback for facets
getFacetConfig(facet) => FacetConfigRuleFallback when no facetConfig rule matches
categoryRootstringRoot category ID for hierarchical category facets
transformImageUrl(url) => stringTransform product image URLs (e.g. prepend a CDN host)

Facet config rule

PropertyTypeDefaultDescription
namesstring[](required)Facet field names this rule applies to
typestring'MULTI_SELECT'Storefront facet type: 'COLOR', 'SIZE', 'CATEGORY', 'PRICE', or custom
rangebooleanfalseSet true for range facets (e.g. price)
multiSelectbooleantrueWhether the facet supports multiple selections

Search API config

Options under configuration.discoveryApi.search in the middleware config.

PropertyTypeDefaultDescription
currenciesstring[]Indexed currencies. Adds price_<currency>, sale_price_<currency> fields to each request
efqstringStatic filter query applied to every search (e.g. 'availability:"In Stock"')
facetVersionstringSet to '3.0' for structured facet responses from Bloomreach
productFieldsstring[]Additional product fields to request beyond the defaults
statsFieldstringField for statistics aggregation

Dynamic Resolvers

Placed inside the unified extension config. Run on every request.

ResolverSignatureDescription
resolveDomainKey(context) => string | undefinedOverride domain_key per request. For locale-specific catalogs
resolveViewId(context) => string | undefinedMap locale + currency to a Bloomreach view
resolveTrackingParams(context) => { url?, refUrl?, brUid2? }Override tracking parameters extracted from cookies/headers

Resolver context provides:

  • context.config.normalizerContext.locale — from vsf-locale cookie
  • context.config.normalizerContext.currency — from vsf-currency cookie
  • context.req — raw HTTP request

searchProducts Parameters

ParameterTypeDefaultDescription
searchstring'*'Search query. Use '*' for all products
categorystringCategory path filter
facetsRecord<string, string[]>Facet filters by field name
sortBystringSort expression (e.g. 'price asc', 'title desc')
pageSizenumber20Results per page
currentPagenumber1Page number (1-indexed)
efqstringPer-request filter query (overrides static efq)
userIdstringCustomer ID for Bloomreach personalization

Response Types

EndpointResponse
searchProducts{ products: SfProductCatalogItem[], facets: SfFacet[], pagination: SfPagination }
getProductDetails{ product: SfProduct, categoryHierarchy: SfCategory[] }

Available Normalizers

NormalizerInputOutputPurpose
normalizeProductCatalogItemBloomreach product docSfProductCatalogItemProduct card data
normalizeFacetFacet with valuesSfFacetFacet display and filtering
normalizePaginationnumFound, rows, startSfPaginationPage navigation
normalizeMoneynumberSfMoneyPrice formatting
normalizeDiscountablePriceprice, salePriceSfDiscountablePriceRegular + sale price
normalizeImageURL stringSfImageProduct images
normalizeRatingBloomreach product docSfProduct['rating']Product ratings

Product Fields

Core fields requested in every search and product detail call.

FieldTypeRequiredDescription
pidstringYesUnique product identifier (also used as SKU and slug)
titlestringYesProduct display name
pricenumberYesBase product price
sale_pricenumberYesDiscounted price (set equal to price when no discount)
thumb_imagestringYesPrimary product image URL
urlstringNoProduct page URL
descriptionstringNoProduct description (HTML allowed)
brandstringNoProduct brand name

Per-Currency Price Fields

CurrencyPrice fieldSale price field
EURprice_eursale_price_eur
USDprice_usdsale_price_usd
GBPprice_gbpsale_price_gbp

Convention: price_<lowercase_currency_code>

Category Fields

FieldTypeRequiredDescription
cat_idstringNoCategory identifier (falls back to cat_name)
cat_namestringYesCategory display name
parentstringNoParent category ID (absent for top-level)
countnumberNoNumber of products in this category

Variant Fields

Read from the variants array on the product document.

FieldTypeRequiredDescription
skuidstringNoSKU identifier
sku_color_groupstringNoColor/variant group name (displayed as "Color" attribute)
sku_thumb_imagesstring[]NoVariant image URLs (merged into product gallery)