How to map Shopify warranties to JSON-LD for AI product comparisons
Claude

When a buyer asks ChatGPT Shopping or Gemini to find the most durable option in an e-commerce category, those models bypass visual badges and crawl for verifiable specifications. Pendium helps brands structure their technical data so conversational models cite their products instead of cheaper alternatives. The most direct way to win durability comparisons is by mapping your Shopify warranty terms to Schema.org's WarrantyPromise type inside your store's JSON-LD graph. Providing exact warranty durations and scopes gives AI crawlers the structured evidence required to verify product longevity and recommend your store.
Why marketing copy fails the AI durability test
According to a study on Shopify trust signals for AI shopping agents, 91% of Shopify stores with a dedicated warranty page have zero structured warranty data attached to their products. Human shoppers respond to gold graphic badges and bold claims like "Built for Life." AI shopping bots do not parse decorative graphics, and they treat marketing copy with skepticism.
Visual Storefront Machine-Readable Layer
┌──────────────────────────────┐ ┌────────────────────────────────────┐
│ [ Gold Lifetime Badge ] │ vs │ "@type": "WarrantyPromise" │
│ "Built for Life Guarantee" │ │ "durationOfWarranty": "ANN" │
└──────────────────────────────┘ └────────────────────────────────────┘
Ignored by LLMs Parsed by AI Agents
When an engine like Perplexity or ChatGPT scans a product detail page, it extracts typed attributes to verify whether a product meets the shopper's criteria. If your guarantee lives only inside an image asset or a generic marketing paragraph, the crawler categorizes the warranty status as missing. The model then defaults to competitors who provide explicit, machine-readable terms.
Durability claims represent a liability for conversational recommendation engines. If an AI agent recommends an item as "the most reliable option" and the customer discovers that the manufacturer offers no documented post-purchase protection, the recommendation fails. Verified data reduces that risk. Leading direct-to-consumer equipment brands like Peak Design rely on structured metadata to maintain their authority across AI platforms.
Unstructured product copy also leaves room for synthesis errors. When an AI crawler encounters ambiguous text, it often hallucinates coverage terms or omits the product from filtered results entirely. Explicit schema prevents the agent from guessing.
The exact properties your warranty schema needs
Adding a warranty statement to your structured data requires Schema.org's WarrantyPromise entity. This structured value attaches to an offer or product and uses two primary properties to define coverage:
durationOfWarranty: A quantitative value defining the coverage timeframe using standard international unit codes.warrantyScope: A standardized URI or enumeration defining what parts, labor, or logistics the guarantee covers.@type: The declaration identifying the data block as aWarrantyPromiseobject.
The WarrantyPromise specification on XooCode defines the exact syntax required for search crawlers and AI shopping assistants to parse this data cleanly.
Defining the duration
The durationOfWarranty property requires a nested QuantitativeValue object. You cannot simply input a text string like "two years" or "lifetime." Doing so invalidates the property for schema parsers.
Instead, define the numerical span with value and standard UN/CEFACT Common Codes with unitCode. For warranty terms, the three standard unit codes are:
ANNfor yearsMONfor monthsDAYfor days
If your brand provides a lifetime guarantee, map the duration to a reasonable operational horizon (such as 100 ANN) or provide an explicit duration value that reflects your formal legal terms.
"durationOfWarranty": {
"@type": "QuantitativeValue",
"value": 10,
"unitCode": "ANN"
}
This clean numerical structure allows an AI engine to answer queries like "find travel backpacks with at least a 5-year guarantee" without running natural language inference across subjective text blocks.
Setting the warranty scope
The second property is warrantyScope. This property defines what the brand covers if the product fails. Schema.org uses the GoodRelations vocabulary to standardize coverage scopes.
Rather than writing arbitrary sentences, reference the standard GoodRelations URIs:
| Scope Term | URI / Value | Coverage Meaning |
|---|---|---|
| Labor-BringIn | https://purl.org/goodrelations/v1#Labor-BringIn | Labor covered; customer drops off or ships item |
| PartsAndLabor-BringIn | https://purl.org/goodrelations/v1#PartsAndLabor-BringIn | Parts and labor covered; customer ships item |
| PartsAndLabor-PickUp | https://purl.org/goodrelations/v1#PartsAndLabor-PickUp | Parts and labor covered; company collects item |
Using these exact URIs tells an AI agent whether replacement parts and repair work are included. When comparing two identical items, conversational agents give preference to offers that specify complete parts-and-labor protection.

Where to attach the code in your Shopify architecture
Schema structure determines whether an AI crawler can read your data. In the Schema.org hierarchy, WarrantyPromise should not float as an isolated root object on the page. It belongs inside the commercial offer.
Targeting the Offer property
Attach the WarrantyPromise block to the warranty property within each Offer node inside your product schema. This links the guarantee directly to the price, currency, and availability terms of the specific variant.
You can also combine this with unit pricing rules to give models a complete breakdown of product value. For stores managing complex pricing models alongside product guarantees, our guide on how to configure Shopify unit price schema to win AI shopping recommendations walks through the neighboring fields inside the Offer block.
To implement this dynamically across your catalog in Shopify, store your warranty specifications in product metafields. You can create two definition fields in your Shopify admin under custom.warranty_years (integer) and custom.warranty_scope (single-line text).
Once populated, open your theme's JSON-LD snippet (often located in snippets/product-schema.liquid or sections/main-product.liquid) and locate the offers array. Insert the warranty property using Liquid:
{%- if product.metafields.custom.warranty_years != blank -%}
"warranty": {
"@type": "WarrantyPromise",
"durationOfWarranty": {
"@type": "QuantitativeValue",
"value": {{ product.metafields.custom.warranty_years.value | default: 1 }},
"unitCode": "ANN"
},
"warrantyScope": "https://purl.org/goodrelations/v1#{{ product.metafields.custom.warranty_scope.value | default: 'PartsAndLabor-BringIn' }}"
}
{%- endif -%}
If your store sells products with uniform terms across the entire catalog, you can skip the metafields and hardcode the WarrantyPromise object directly into your theme's primary offer block:
{
"@context": "https://schema.org",
"@type": "Product",
"name": "{{ product.title | escape }}",
"brand": {
"@type": "Brand",
"name": "{{ product.vendor | escape }}"
},
"offers": {
"@type": "Offer",
"price": "{{ product.selected_or_first_available_variant.price | money_without_currency | remove: ',' }}",
"priceCurrency": "{{ cart.currency.iso_code }}",
"availability": "https://schema.org/{% if product.available %}InStock{% else %}OutOfStock{% endif %}",
"url": "{{ shop.url }}{{ product.url }}",
"warranty": {
"@type": "WarrantyPromise",
"durationOfWarranty": {
"@type": "QuantitativeValue",
"value": 5,
"unitCode": "ANN"
},
"warrantyScope": "https://purl.org/goodrelations/v1#PartsAndLabor-BringIn"
}
}
}
This implementation keeps the warranty tied directly to the commercial transaction, creating a clean record for search engines and recommendation platforms.

Validating the markup before the next agent crawl
A broken script block will cause AI crawlers to drop your structured data entirely. Before deploying theme changes, run a complete verification check.
A common issue in theme modifications is comma placement in Liquid logic. If an item lacks a warranty metafield and leaves an empty line followed by a trailing comma, the JSON parser breaks. Always test your rendered templates using a tool that checks raw DOM output.
Check your storefront for conflicting product nodes. As outlined in the ShopAudit checklist, third-party Shopify apps frequently inject duplicate, outdated Product scripts into theme headers. When one app injects basic schema and your theme outputs advanced schema, crawlers cannot confirm which data source is authoritative.
Before pushing your changes live:
- View the live page source and search for
"@type": "WarrantyPromise". - Copy the entire raw JSON-LD block into a JSON linter to check for trailing commas or syntax errors.
- Test the rendered URL in Google's Rich Results Test to confirm the parent
ProductandOfferentities parse cleanly without warnings. - Run our automated AI Site Audit to check whether AI models can extract your newly published warranty terms alongside your catalog data.
Removing duplicate scripts and cleaning up formatting errors keeps your data clear for agent scrapers.
Verifying your storefront's AI visibility
Adding WarrantyPromise schema gives AI models the direct data points they need to verify your product's durability. In an ecosystem where conversational platforms answer user prompts with one clear recommendation instead of a list of blue links, missing schema leaves your products out of the conversation.
Once your theme publishes valid structured data, track how major conversational platforms represent your catalog. You can look up your current industry baseline using the AI Brand Index to see how platforms score leading direct-to-consumer brands across core sectors.
To evaluate your store, run a free scan at Pendium.ai. Pendium analyzes your live storefront across ChatGPT, Claude, Gemini, and Perplexity, revealing your visibility scores and highlighting the metadata gaps that determine whether AI recommends your store or your competitors.