# Metafield types reference (22 supported types)

METAFIELD TYPES REFERENCE (22 SUPPORTED TYPES)

LaunchMyStore supports 22 metafield types — everything from a plain text label
to a typed money object to a list of product references. Picking the right type
means automatic validation, type-aware Aqua rendering, and predictable behavior
across the admin, API and storefront.


HOW TYPES WORK

Each metafield has a type string (e.g. number_integer, list.product_reference).
When you upsert a value, the backend validator coerces it to the expected JS
shape, applies type-specific structural checks, then enforces any validation
rules from the definition (min, max, regex, choices, etc.).

At render time, the MetafieldValueDrop in your theme prints the type-correct
string when you use {{ ... }}, but you can also access .value and .type
explicitly.


TYPE CATALOG

TypeStored asAqua outputCommon validations single_line_text_fieldString (no
newlines)Stringmin, max, regex, choices multi_line_text_fieldStringStringmin,
max, regex rich_text_fieldHTML / JSONRaw HTML— number_integerIntegerIntegermin,
max number_decimalFloatFloatmin, max, max_precision booleanBooltrue / false—
colorHex #RRGGBBHex string— dateISO YYYY-MM-DDISO stringmin, max date_timeISO
date-timeISO stringmin, max weight{unit, value}1.5 KILOGRAMSmin, max
dimension{unit, value}10 CENTIMETERSmin, max volume{unit, value}500
MILLILITERSmin, max money{amount, currency_code}Object (pipe through | money)ISO
4217 currency rating{value, scale_min, scale_max}Objectscale bounds urlString
(URL)Stringallowed_schemes jsonJSON stringStringified JSON—
product_referenceProduct IDResolved product dropexists check
variant_referenceVariant IDResolved variant dropexists check
collection_referenceCollection IDResolved collection dropexists check
customer_referenceCustomer IDResolved customer dropexists check
page_referencePage IDResolved page dropexists check file_referenceFile IDURL
stringexists check


LIST VARIANTS

Almost every scalar type has a list variant, written as list.<innerType>, e.g.
list.product_reference, list.single_line_text_field, list.number_integer. Lists
are stored as a JSON-encoded array and accept two extra validations:

 * list_min – minimum number of items.
 * list_max – maximum number of items.

Inner-type validations (e.g. min, max, regex) are applied to each item.


UNITS RECOGNISED BY MEASUREMENT TYPES

 * Weight: KILOGRAMS, GRAMS, POUNDS, OUNCES.
 * Dimension: METERS, CENTIMETERS, MILLIMETERS, INCHES, FEET, YARDS.
 * Volume: MILLILITERS, CENTILITERS, LITERS, CUBIC_METERS, FLUID_OUNCES, PINTS,
   QUARTS, GALLONS, plus the IMPERIAL_* variants.


PICKING THE RIGHT TYPE

 * Use single_line_text_field for short labels (badges, SKUs);
   multi_line_text_field for blocks of plain text; rich_text_field when you need
   formatting.
 * Use money instead of number_decimal for prices — you get currency-aware
   rendering via the | money filter.
 * Use references (instead of free text) when linking to another resource — the
   storefront resolves the linked drop automatically.
 * Use json as a last resort. It bypasses validation and shifts complexity into
   your theme.


FAQ


CAN I CHANGE A METAFIELD’S TYPE AFTER I CREATE IT?

No. Type is part of the validator contract. If you need a different type, create
a new definition with a different key and migrate values.


HOW IS RICH_TEXT_FIELD OUTPUT ESCAPED IN MY THEME?

It isn’t — rich_text_field is intentionally output as raw HTML so you can render
formatted content. Only allow trusted staff to edit rich text values.


WHAT HAPPENS WHEN A REFERENCE TARGET IS DELETED?

The reference value still exists in the database, but resolving it in the
storefront returns an empty drop. Guard your theme with {% if
product.metafields.custom.related_product %} before using the reference.


WHY DOES MY MONEY METAFIELD PRINT AS AN OBJECT?

money values are objects ({amount, currency_code}), so they render as JSON when
used bare. Pipe them through the money filter for currency-formatted output: {{
product.metafields.custom.deposit | money }}.


CAN A LIST HAVE MIXED TYPES?

No. A list metafield holds items of one inner type. Use json if you genuinely
need heterogeneous data.


IS THERE A LENGTH LIMIT ON TEXT FIELDS?

The value column accepts arbitrary length, but you should always set min / max
validations on text definitions to keep payloads predictable. The admin enforces
them at save time.