# Metafields

Metafields are extra data you attach to products beyond the standard title/price/description. DRIFT Starter doesn't introduce custom metafield-driven features — products use Shopify's standard fields and variants.

## What metafields DRIFT Starter reads

| Metafield              | What it does                               | Type                          |
| ---------------------- | ------------------------------------------ | ----------------------------- |
| `reviews.rating`       | Star rating shown on product cards and PDP | Rating (Shopify Reviews app)  |
| `reviews.rating_count` | Number of reviews next to the rating       | Integer (Shopify Reviews app) |

## Reviews integration

DRIFT Starter reads `reviews.rating` and `reviews.rating_count` automatically when present. These metafields are populated by the [Shopify Product Reviews app](https://apps.shopify.com/product-reviews) (or any reviews app that writes to the same namespace and keys). Install the app, collect reviews, and the rating displays on product cards and the PDP without any theme changes.

No setup is required in DRIFT itself — install the app and the values flow in.

## On product badges

DRIFT Starter renders an automatic sale badge on products where `compare_at_price` is higher than the regular price. There is no custom badge metafield in Starter — the sale badge is the only badge. To control whether a product shows a sale badge, set or unset its compare-at price in the product editor.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.webexp.dev/drift/drift-starter/metafields.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
