Structuring Shopify apparel sizing for AI search visibility
Claude

Apparel brands often lose critical digital real estate because their product data fails to provide structured answers to fit-specific questions from modern shopping assistants. At Pendium, we observe that engines like ChatGPT, Claude, and Gemini frequently bypass product pages that fail to expose variant-level dimensions. To capture these high-intent queries on the Pendium AI visibility platform, Shopify merchants must deploy a three-layer data architecture combining ProductGroup JSON-LD, structured Shopify metafields, and conversational FAQ assets. This guide outlines how to configure your Shopify catalog so AI engines can verify and recommend your specific apparel sizes with complete confidence.
Swap flat product schema for the variant matrix
On the Pendium AI visibility platform, we constantly track how search crawlers navigate standard e-commerce stores. A major point of failure for fashion retailers is relying on default Shopify theme structured data that flattens a highly variable catalog into a single product definition.
If your Shopify store uses a generic Product schema without deep variant detail, AI search engines cannot verify whether a specific size is in stock. When a consumer asks an AI assistant for a "linen shirt that runs true to size in medium," the search engine must verify that the medium variant exists and is ready to ship. If it cannot find this information in your structured data, it will pass your store over to cite a competitor or a third-party aggregator.
Upgrading your product page templates to output a structured ProductGroup JSON-LD block is the most effective way to solve this. This change transforms a flat product page into a rich, queryable database of individual SKUs.
When to use ProductGroup
Use the standard Product schema only if you sell a single-SKU item that has no sizes, colors, or materials. For all other apparel listings, a ProductGroup is necessary because fashion-intent queries are highly size-conditioned.
According to Product Schema Example for Shopify Apparel, a ProductGroup allows you to cluster your separate variant SKUs under a single parent entity while retaining independent metadata for each size. This helps AI bots isolate specific inventory options.
Defining the variesBy matrix
To build a clean variant matrix, your JSON-LD must declare which properties distinguish the child variants from the parent group. This is achieved using the variesBy property.
For clothing with size options only, declare variesBy: "https://schema.org/size". If your garments contain both size and color variations, include both fields to define the exact Cartesian product of your inventory, as shown in the template below:
{
"@context": "https://schema.org",
"@type": "ProductGroup",
"name": "Relaxed Cotton Tee",
"description": "An organic cotton t-shirt built with a heavy drape and relaxed fit.",
"url": "https://yourstore.com/products/relaxed-cotton-tee",
"variesBy": [
"https://schema.org/size",
"https://schema.org/color"
],
"brand": {
"@type": "Brand",
"name": "Your Brand"
},
"hasVariant": [
{
"@type": "Product",
"sku": "RCT-WHT-MD",
"name": "Relaxed Cotton Tee - White / Medium",
"size": "Medium",
"color": "White",
"offers": {
"@type": "Offer",
"price": "45.00",
"priceCurrency": "USD",
"availability": "https://schema.org/InStock"
}
},
{
"@type": "Product",
"sku": "RCT-WHT-LG",
"name": "Relaxed Cotton Tee - White / Large",
"size": "Large",
"color": "White",
"offers": {
"@type": "Offer",
"price": "45.00",
"priceCurrency": "USD",
"availability": "https://schema.org/InStock"
}
}
]
}

Build the three-layer sizing architecture
At Pendium, our engine-monitoring analyses show that the best-performing retail brands do not rely on a single placement for their sizing details. They distribute information across three distinct database surfaces.
According to documentation on Apparel Sizing Schema on Shopify, sizing guides are one of the three category-specific fields Shopify's AI optimization guidelines name explicitly. Because fit is the most common friction point in online fashion, search engines route sizing questions to whichever store populates these parameters.
To capture these queries, structure your sizing data using this three-layer layout:
- The engine-readable layer: Structured JSON-LD schema containing explicit measurements mapped to each individual variant SKU.
- The merchant-editable layer: Shopify metafields that store clean size tables, keeping the values easily editable by your operations team.
- The conversational layer: Knowledge base FAQs that explain qualitative fit patterns in plain, conversational language.
Structuring your data across these surfaces ensures your catalog remains readable to different parsers, matching the standards detailed in our guide on Formatting Shopify data for Shop app AI recommendations.
The engine-readable schema layer
The engine-readable layer relies on the additionalProperty field inside your variant JSON-LD. This field holds structured, machine-readable specifications that search engines can ingest without reading your human-facing graphics.
By using PropertyValue blocks, you can define explicit values for chest width, sleeve length, waist size, and inseams. This structure allows search bots to verify that a garment matches a user's exact physical measurements.
The merchant-editable metafield layer
The merchant-editable layer provides a clean editing experience for your team while outputting the dimensions on your product detail page. Instead of copying and pasting raw HTML tables into product descriptions, use Shopify metafields.
This approach ensures the raw text remains embedded in the initial page source code. It also prevents your team from accidentally breaking layout styles during catalog updates.
The conversational FAQ layer
The conversational layer addresses qualitative sizing questions, such as whether an item runs small or has a boxy cut. These questions are common on platforms like Perplexity and Gemini.
Use the Shopify Knowledge Base app or custom page schemas to publish explicit sizing FAQs. Answering questions like "should I size up if I am between sizes" creates the semantic context AI engines need to make qualitative fit recommendations.
Configure a dynamic size chart metafield
Setting up a dynamic data layer is a core recommendation we make for brands auditing their indexing on the Pendium platform. Hardcoding sizing tables directly into your Liquid theme files makes catalog management difficult and bloats your page code.
Using Shopify metafields allows you to render custom size charts programmatically based on the product being viewed. It also keeps your code lightweight, clean, and highly visible to search bots.
When editing your theme files, remember to safeguard your site from third-party app scripts that can break your structural JSON-LD. You can read more about resolving these scripts in our guide on Fixing Shopify app conflicts that break your AI search schema.
Setting up the custom.size_chart namespace
To set up a dynamic size chart, log in to your Shopify admin and navigate to Settings, then Custom Data, and select Products. Add a new definition using the namespace and key custom.size_chart.
For the field type, select either Rich Text or Metaobject Reference. Once saved, a dedicated size chart field will appear at the bottom of every product edit page in your Shopify admin.
To display this chart on your product detail page, create a snippet called snippets/size-chart.liquid and place it near your variant picker using the following Liquid code:
{% if product.metafields.custom.size_chart != blank %}
<details class="size-chart-accordion">
<summary>Size Chart & Fit Guide</summary>
<div class="size-chart-content">
{{ product.metafields.custom.size_chart | metafield_tag }}
</div>
</details>
{% endif %}
This Liquid code performs a guarded read of the metafield, ensuring the accordion element only renders if sizing data is present. This approach keeps your code clean and prevents empty elements from loading.
Rich text vs metaobject references
Selecting the right metafield type depends on the variety of your catalog. Rich text fields are excellent for unique, one-off garments, while metaobjects are better suited for standardized collections.
| Feature | Rich text metafield | Metaobject reference |
|---|---|---|
| Setup Complexity | Low (configured in minutes) | Medium (requires schema design) |
| Maintenance | Individual updates per product | Centralized updates across many products |
| AI Ingestion | High (when rendered in raw HTML) | High (when parsed server-side) |
| Primary Use Case | Unique sizing per garment | Shared sizing (e.g., all t-shirts) |
For most scaling stores, starting with a rich text field is the fastest path. As your catalog grows, migrating to metaobjects will help prevent manual data entry errors.

Map standard size groups and enumerations
During automated catalog scans on the Pendium system, we often see search bots struggle to classify who a garment is for when the page only lists generic sizes. Defining a size as "M" or "6" does not provide enough context unless you declare the target audience and sizing standard.
To solve this, use schema.org's structured vocabulary. This framework uses standardized types to classify garment size systems, target demographics, and specific body shapes.
According to the official SizeGroupEnumeration - Schema.org specifications, adding these standardized classifications helps search bots match your apparel with specific user search filters.
Integrating SizeGroupEnumeration and SizeSpecification
To declare your sizing standards clearly, replace generic text strings in your JSON-LD with a structured SizeSpecification object. This object should contain three core parameters:
- sizeGroup: Defines the target market segment, such as
WearableSizeGroupEnumeration#Regular,Mens,Petite, orMaternity. - sizeSystem: Identifies the regional sizing standard, such as
SizeSystemUS,SizeSystemUK, orSizeSystemMetric. - suggestedMeasurement: Contains the physical body dimensions the garment is designed to fit.
Integrating these properties into your code gives search engines the structured data they need to match your products with complex user queries. Below is an example of a complete schema object for a men's winter jacket:
{
"@context": "https://schema.org",
"@type": "Product",
"sku": "M-JKT-GRN-3XL",
"name": "Green Wool Trail Jacket",
"brand": {
"@type": "Brand",
"name": "Trailside Apparel"
},
"color": "Green",
"size": {
"@type": "SizeSpecification",
"sizeCode": "3XL",
"sizeSystem": "https://schema.org/SizeSystemUS",
"sizeGroup": [
"https://schema.org/WearableSizeGroupEnumeration#Mens",
"https://schema.org/WearableSizeGroupEnumeration#BigAndTall"
],
"suggestedMeasurement": [
{
"@type": "QuantitativeValue",
"name": "Chest Circumference",
"minValue": "51",
"maxValue": "54",
"unitCode": "INH"
},
{
"@type": "QuantitativeValue",
"name": "User Height",
"minValue": "72",
"maxValue": "75",
"unitCode": "INH"
}
]
}
}
Avoid the option-name mismatch gap
This is a frequent point of friction we identify for Shopify stores using the Pendium visibility platform. Merchants often assume that because they have configured "Size" as an option in their Shopify admin, their sizing data is fully optimized for AI search.
However, listing sizes as simple text values like "S", "M", or "L" without supporting metadata creates an incomplete data signal. While the search bot can see that these sizes are available, it cannot determine what they actually measure.
If a customer asks an AI assistant to find a sweater with a 42-inch chest, the assistant cannot recommend your medium sweater if your product data does not define its measurements. The engine will skip your store in favor of a competitor that publishes complete chest measurements in its structured schema.
Furthermore, hiding your size charts behind interactive, JavaScript-only accordion tabs can block search crawlers. Many e-commerce themes use JavaScript to render tabs only when a user clicks them.
Because AI web crawlers typically fetch the initial server-rendered HTML without executing complex page scripts, content hidden behind JavaScript tabs remains invisible to them. You can test your pages by viewing their raw source code; if your sizing charts do not appear in the initial HTML, search bots cannot read them.
Verify your storefront indexing in real time
To confirm that your structural JSON-LD updates are being correctly indexed by search crawlers, you must test your store pages directly. Relying on visual validation alone is not enough, as search bots read the underlying data structure rather than the rendered page.
You can view examples of optimized digital catalogs on our AI Brand Index — How ChatGPT, Claude & Gemini See Every Brand | Pendium.ai page, which highlights how top-performing fashion brands structure their data.
Run your domain through the free AI Visibility Scan on the Pendium homepage. In just two minutes, this tool analyzes how your Shopify catalog, variant structures, and sizing data are parsed across ChatGPT, Claude, Gemini, Grok, Perplexity, DeepSeek, and Google AI Overviews. This analysis helps you identify and resolve critical data gaps before they impact your brand visibility.

