FactFieldSpec
Defined in: fragments.ts:124
A field filled with one stated fact of one product, read from the
workspace’s records (fetchFacts). Never generated. A landed fact is
source: "static" (it is not adapted copy) with stated: true, and the
renderers stamp it data-content-source="stated". product is the
product’s id or handle.
price is the amount formatted with its currency for the call’s
language; amount is the raw decimal string; availability shows
the page’s own words for the stated state, from labels. When the
workspace has not stated the fact, the fallback stays.
Fact fields never enter the schema hash or the mint request.
Properties
Section titled “Properties”fact:
"amount"|"name"|"price"|"currency"|"availability"|"sku"|"description"
Defined in: fragments.ts:127
fallback
Section titled “fallback”fallback:
string
Defined in: fragments.ts:128
kind:
"fact"
Defined in: fragments.ts:125
labels?
Section titled “labels?”
optionallabels?:Partial<Record<"in_stock"|"out_of_stock",string>>
Defined in: fragments.ts:137
With fact: "availability": the words to show for each state, for
example { in_stock: "In stock", out_of_stock: "Sold out" }. The field
lands the label for the stated state. With no label for that state, no
labels, or an unknown state, the fallback stays. Each label must fit the
fallback’s space like any other value, so make the fallback the longest
label. Ignored for other facts.
product
Section titled “product”product:
string
Defined in: fragments.ts:126
optionalswap?:FragmentSwapPolicy
Defined in: fragments.ts:139
Accepted and ignored, as on generated fields: every field behaves as "never".