data object on the browse response. Your storefront reads those fields to render richer promos than a plain image plus link.
Every store starts with a built-in Link type. Custom types are additive: existing banners keep working, and each rule can mix banners of different types up to the five-banner-per-rule limit.
The link system type
Every store has a system banner type with sluglink and a single field:
link(URL, optional) — the click-through URL forinjectbanners.
link cannot be edited or deleted. Banners created before custom types shipped are treated as link banners and keep their previous behavior — the storefront still reads banner.link at the top level for those.
Custom banner types
Create a custom banner type when you want banners with more than an image and a click-through URL — for example, a countdown promo that carries anend_at timestamp, or a spotlight banner that references a specific product and pulls its live handle.
A custom banner type has:
- Name — human-readable, shown when merchandisers pick a type on a banner (e.g. “Countdown Promo”).
- Slug — a lowercase snake_case identifier derived from the name at creation and locked afterward. The slug appears as
banner.typeon the browse response and is the discriminator your storefront switches on. - Allowed Modes — one or both of
injectandovertake. A banner using this type can only be saved in a mode you allow here. This lets you forbid link-only variants on hero placements, for example. - Field Schema — the ordered list of fields merchandisers fill in when they attach a banner of this type. Each field has a
key,label,type,requiredflag, and per-fieldvalidations.
Field types
Field types match Shopify’s metafield type taxonomy so the shape of the data you get is predictable and portable.
Measurement units:
dimension:mm,cm,m,in,ft,ydweight:g,kg,oz,lbvolume:ml,cl,l,m3,us_fl_oz,us_pt,us_qt,us_gal,imp_fl_oz,imp_pt,imp_qt,imp_gal
Reference resolution
When a field isproduct_reference, collection_reference, or variant_reference (or a list of those), merchandisers pick a resource in the dashboard and Layers stores its local ID. On the browse response, Layers resolves each ID to a stable payload before shipping it:
Payload shape
Every banner in the browse response carries the same envelope regardless of type:link banners still carry a top-level link on the envelope so existing storefront code keeps working. Custom types can define their own link field inside data if they want a click-through URL that lives in structured data.
Editing a banner type
Renaming a type or reordering its fields is safe. Two changes are destructive because they invalidate stored banner values:- Removing a field — the value stored on every banner of this type is dropped.
- Retyping a field (
single_line_text_field→url, or removing/adding thelist.prefix) — the value stored on every banner of this type is dropped, since Layers cannot safely coerce between shapes.
Deleting a banner type
Banner types can only be deleted when no banner references them. If any rule still has a banner of that type, the dashboard rejects the delete and lists the specific banners so you can retype or remove them first. The systemlink type cannot be deleted.
Limits and behavior
- One system type per store (
link). Custom types are unlimited. - Slug is locked at creation. The slug is the storefront’s payload discriminator, so Layers derives it from the name once and never re-derives it. Rename the type freely; the slug does not change.
- Cache invalidation runs on any banner-type change. Editing a type flushes every rule that uses it so the new schema takes effect on the next browse response.
- Config history captures banner-type create/update/delete alongside rule and banner changes.
See also
- Banner Injection — how banners plug into merchandising rules.
- Create a banner type — dashboard walkthrough.
- Add a banner to a merchandising rule — how merchandisers pick a type and fill in its fields.
- Rendering banners in Liquid — theme-side switch on
banner.type. - Rendering banners with the SDK — SDK equivalent.