ShelfGrader All posts
6 min read

How to add Product schema so AI shopping agents recommend your store

Product JSON-LD is the single biggest signal an AI shopping agent reads. Here is exactly what to add, with a copy-paste example.

When a shopper asks ChatGPT, Perplexity or Google's AI mode to find them a product, software reads your store instead of a person. That software does not look at your design. It reads your HTML, and the first thing it looks for is Product structured data, also called Product schema or JSON-LD.

If it is not there, the agent has to guess what you sell and for how much. It usually guesses wrong, or just picks a competitor whose page it can read cleanly. This is the number one reason a store gets skipped.

What Product schema actually is

It is a small block of JSON in your page's HTML that states the facts of a product in a format machines trust: the name, the price, whether it is in stock, and its rating. You do not show it to the shopper. You put it in the page for the agents and search engines that read it.

Here is a minimal, valid example for a single product:

<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Product",
  "name": "Merino Crew Sweater",
  "image": "https://yourstore.com/img/merino-crew.jpg",
  "description": "Midweight merino crew, machine washable.",
  "brand": { "@type": "Brand", "name": "Your Store" },
  "offers": {
    "@type": "Offer",
    "price": "129.00",
    "priceCurrency": "USD",
    "availability": "https://schema.org/InStock"
  },
  "aggregateRating": {
    "@type": "AggregateRating",
    "ratingValue": "4.7",
    "reviewCount": "212"
  }
}
</script>

The fields that matter most

You do not need every field. In order of impact:

  • price and priceCurrency inside offers. Without a machine-readable price, an agent cannot put you in a comparison at all.
  • availability. Agents filter out anything they cannot confirm is buyable.
  • name and description. These let the agent confirm the product matches what the shopper asked for.
  • aggregateRating. When two products are otherwise equal, the one with structured ratings wins.

A common mistake is having the price only inside an image or styled text with no schema. The shopper can read it. The agent cannot.

How to add it on Shopify

Most themes let you edit the product template. Add the script block to the product page template and populate it from your product fields with Liquid, so it stays in sync as prices change. If you would rather not touch theme code, an app or a developer can drop it in once and it keeps working.

After you add it, test it with Google's Rich Results Test and the Schema Markup Validator. Both will tell you if a required field is missing.

The catch with doing it by hand

The example above is one product. A real store is the work. You need the schema on every product template, populated from your live fields so it stays correct when prices and stock change. You need the price in the HTML, not just styled text. You need to handle variants, sale prices and out-of-stock states, or you feed agents wrong data and get filtered out anyway. Then you have to validate it and confirm an agent actually reads it.

None of that is hard once. It is tedious at catalog scale, and easy to half-do in a way that still gets you skipped. That is the part most owners do not want to own.

How to check where you stand

The fastest way to see what an agent sees is to grade your store. ShelfGrader reads your live page the way an AI agent does, tells you whether your Product schema is present and complete, and ranks the fixes by impact. It is free and takes about a minute.

If you would rather not touch theme code, that is the $20 fix: we generate the schema for your whole catalog, make your pricing machine-readable, add an llms.txt, and re-scan to prove the jump. You paste one thing in. On the managed plan we keep it correct every month as your prices and products change, which is the part that quietly breaks when you do it once and forget it.

See what an AI agent sees on your store

Free grade in about a minute. Your score, the ranked fixes, and who an agent picks instead.

Grade my store