Shopify Metafields Contract

Last updated: November 18, 2026

BetterReviews syncs review data to Shopify metafields under the betterreviews namespace. The storefront widget reads them in Liquid; headless storefronts (Hydrogen, custom React, etc.) can read them directly via the Storefront API. This page documents what's stable, what may change, and what to escape before rendering.

Per-product metafields (product.metafields.betterreviews.*)

summary — stable contract

This product's own review aggregates. Always per-product, never group-aggregated, even when the product is in a Review Group. Your headless renderer can rely on this metafield reflecting the product the page is about, full stop.

{
  "average_rating": 4.7,
  "total_count": 23,
  "rating_counts": {"1": 0, "2": 1, "3": 2, "4": 5, "5": 15},
  "with_media_count": 8,
  "total_media_count": 12,
  "verified_count": 18,
  "qa_count_visible": 7,
  "updated_at": "2026-05-08T10:00:00Z"
}

qa_count_visible is the number of approved questions that have at least one approved + published answer (the same predicate that controls visibility in the storefront Q&A list). The first-party widget shows the Questions tab badge only when qa_count_visible is above 0, so nil and 0 both show no badge. Your own code can still tell them apart: nil means not computed yet (products synced before the field rolled out), 0 means no qualifying Q&A.

top_reviews — stable shape, contents may change

Pre-rendered top reviews for SSR. Each row carries display_product_id — the bare numeric Shopify product ID this review was submitted for. When a product is in a Review Group and you render group-aggregated content, compare display_product_id to the current PDP's product id and add cross-product attribution ("Reviewed: Red Shirt") for non-matching rows. FTC compliance lives at this seam — see aggregation-disclosure.

display_group_id — may evolve

Pointer to a shop-level group aggregate. Present only when the product is an active member of a Review Group AND the store has the :review_groups entitlement (every plan includes it — Free, all three current paid plans (Good, Better, Studio), and every legacy plan). Absent otherwise.

{
  "group_id": 42,
  "store_id": 89712787790,
  "cache_version": 17
}

cache_version is a cache-buster you can ignore — its only purpose is to differentiate snapshots when invalidating CDN caches.

intelligence, media_gallery, widget_token, submission_token

See your in-app guide. widget_token and submission_token are HMAC-signed JWTs scoped to (store_id, product_id); treat them as opaque.

intelligence.ai_review_summary — may evolve

The product's AI review summary, when one is published (absent when the merchant switched summaries off, hid this one, or the product doesn't qualify). The same key sits inside a group's group_summary_* intelligence (for a product in a Review Group, read it there — the product's own intelligence has none) and inside the shop metafield all_reviews_summary for the store-wide summary.

{
  "text": "Shoppers love the warmth and the neat stitching; a few found it smaller than expected.",
  "topics": [{ "name": "Warmth", "mentions": 42, "positive_pct": 95, "line": "Most say it is very warm." }],
  "review_count": 128,
  "positive_pct": 94,
  "negative_pct": 3,
  "locale": "en-US",
  "generated_at": "2026-10-26T05:14:00Z"
}

Plain text, AI-written: escape text, name and line before rendering, and label it as AI-generated (our widget shows "Summarized by AI").

featured — may evolve

Up to 3 reviews for the featured reviews block on this product's page: the merchant's pins first, in the order the merchant set (a new pin goes first; pins imported from Judge.me after the merchant's), then the product's highest-quality reviews (by our review analysis, any star rating). Product-only, never pooled across a Review Group. Only published reviews with text — a pinned review that is later rejected, hidden or archived drops out at the next sync. Each row has the same shape as a top_reviews row (same media and marketing-ready filters).

{
  "v": 1,
  "reviews": [
    {
      "id": 789,
      "author": "Jane D.",
      "rating": 5,
      "title": "Amazing quality",
      "body": "I love this product, especially the fabric...",
      "body_truncated": false,
      "verified": true,
      "date": "March 27, 2026",
      "date_iso": "2026-03-27",
      "helpful_count": 3,
      "unhelpful_count": 0,
      "media": [ /* visible photos, same shape as top_reviews */ ],
      "tags": ["quality", "fabric"],
      "merchant_reply": null,
      "display_product_id": "7125386199075",
      "display_product_title": "Mighty Mug 16oz",
      "highlight": "especially the fabric",
      "highlight_big": true
      /* or "highlight_custom": true — never both */
      /* "provenance_label": "Imported from Judge.me" — only when the merchant set a label for an imported review */
    }
  ]
}

highlight is optional and appears only in featured and featured_store rows: one phrase from the review, verbatim, that occurs exactly once in the body you receive (12 to 160 characters, never the whole body), so you can split body on it and emphasise it. By default it is picked automatically from the review analysis; the merchant can choose their own phrase (whole words only; apostrophes and hyphens count as part of a word) or turn it off per review with PUT /api/v1/reviews/:id/featured-highlight. The key is absent when no phrase qualifies or the highlight is off. highlight_big is present and true only when the phrase may be shown on its own, in place of the review body (an automatic pick that is not a raised doubt and whose tone matches the star rating). When it is absent, always show the phrase inside the full body, never alone. highlight_custom is true when the phrase is the merchant's own choice and absent otherwise (information only; a custom phrase never carries highlight_big). It is plain text: escape it like body.

reviews is an empty list when the product has no published review with text. Branch on v: a new version means a changed shape.

topics (optional, absent when nothing is chosen) holds the reviews chosen for ad topics on this product (/api/v1/featured-topics, by the merchant or by an AI pick): one row per review, the same shape as a reviews row plus "t": [topic ids, ascending]. Only reviews that can still be shown are included; when an AI pick's review can no longer be shown, its first fallback that can takes its place. Show one first only when the current page's query string (decoded, + as a space, lowercased) contains one of that topic's link texts, read from the shop's featured_store.rules; otherwise show reviews unchanged. Reviews are matched by topic, whatever their star rating. Keep showing the product's real rating summary.

Shop-level metafields (shop.metafields.betterreviews.*)

group_summary_<store_id>_<group_id> — may evolve

The shop-level aggregate for a Review Group. Read this when a product carries a display_group_id pointer and you want to show group-aggregated stars + reviews on the PDP.

{
  "group_id": 42,
  "store_id": 89712787790,
  "display_name": "Summer Tee",
  "member_count": 8,
  "variant_count": 8,
  "summary": { /* same shape as per-product summary, group-aggregated */ },
  "top_reviews": { "reviews": [ /* up to 10 rows, newest first, at most 3 per member, each with display_product_id */ ] },
  "media_gallery": [ /* up to 12 photos across the group */ ],
  "intelligence": { /* group-aggregated value drivers + quotes */ },
  "cache_version": 17
}

featured_store — may evolve

The store-wide featured reviews, for pages with no product (home, collection, blog, custom pages). Up to 3 reviews, at most one per product, and only reviews of active (not archived, not deleted) products: pins first, then the store's highest-quality product reviews (by our review analysis, any star rating). Same visibility rules as featured; archived reviews never appear. Each row is a featured row plus product:

{
  "v": 1,
  "reviews": [
    {
      "id": 789,
      "author": "Jane D.",
      "rating": 5,
      /* …every other key of a featured row… */
      "display_product_id": "7125386199075",
      "display_product_title": "Mighty Mug 16oz",
      "product": { "title": "Mighty Mug 16oz", "handle": "mighty-mug-16oz" }
    }
  ]
}

Ad topics add two optional keys: topics, the store-wide choices (same shape as these rows plus "t": [topic ids], absent when none), and rules, the link text of ALL the store's topics as [["sensitive-skin", 12], ...] (most specific first: longest match, then topic id, then match order, so take the first rule that matches; absent when the store has no topics). Product pages read rules from here and the chosen reviews from their own featured.topics. Matches are stored lowercase, with + stored as a space.

product.handle is a validated Shopify handle (a-z, 0-9, -) or null — never a URL. Build the link yourself (/products/<handle>) and skip it when the handle is null. It carries no rating aggregates: read store_summary / all_reviews_summary for those. It is re-synced (debounced, about 30 seconds) after any product's reviews change, and deleted when the widget is switched off and when the shop's data is erased (shop/redact).

featured_settings — may evolve

The featured reviews block's style, written from the BetterReviews admin (Display → Featured reviews): optional colours, corner style, quote font, border width, label, and per-layout toggles (stars, title, verified badge, tags) and image source. No review or customer data. Our theme block reads it; a headless storefront can ignore it or use it to match the merchant's chosen look. Every key is optional and a cleared value is removed rather than stored empty.

Stability guarantees

  • Stable contract: we will not change the semantics or required keys of product.metafields.betterreviews.summary without a versioned migration path. Headless integrations against this metafield will keep working when Review Groups ships and onwards.
  • May evolve: we may add fields to group_summary_*, display_group_id, top_reviews, media_gallery, intelligence, featured, featured_store and featured_settings. New fields are additive — your renderer should ignore unknown keys, not throw.
  • Removed metafields: we will publish a deprecation notice in this doc at least 90 days before removing any metafield key, including a deletion-write to clear the value from Shopify.

Headless integrations: what to escape

The merchant-set display_name on group_summary_* is server-side validated to reject <, >, {{, }}, ${, and backticks, and capped at 100 characters. Always still HTML-escape it on render — defence-in-depth, and the same string flows through your view templates.

FTC disclosure when rendering grouped reviews

When you render group-aggregated counts on a product page, your storefront — not BetterReviews — is the entity making a representation to the consumer. The FTC's review and endorsement guidance requires you to surface that the displayed count covers more than just the current product. The shop-level group_summary payload includes member_count and an optional merchant-set display_name so you can render the disclosure "Based on 47 reviews across 8 products" or "Based on 47 reviews across the Summer Tee collection". See aggregation disclosure for full guidance.

JSON-LD aggregateRating

When emitting schema.org/Product markup on a PDP, aggregateRating must reflect the product's own reviews only, never group-aggregated counts. Google's product reviews policy explicitly prohibits cross-product aggregation in product schema. BetterReviews's first-party Liquid widget renders product-only schema even when the visible widget shows group data, and its Product entity also includes an Offer (price/availability) read live from the Shopify product — offers is built in Liquid from the product object, not stored in the summary metafield, so a headless renderer building schema from summary gets aggregateRating only and must source price/availability itself. If you render schema yourself, use summary, not group_summary.