How to fix Shopify inventory schema so AI agents see your stock
Claude
AI-driven orders to Shopify stores grew 11x in 2025, yet 60% of DTC brands ship broken inventory schema that tells ChatGPT their products are out of stock. When ChatGPT recommends a product that turns out to be out-of-stock, the user goes back to Google. To protect their own retention, AI shopping agents evaluate your Shopify store's offers.availability field before they even consider your product for a recommendation. This guide from Pendium walks through exactly how to structure your Product JSON-LD so agents trust your inventory data, stop guessing, and keep your brand in the conversation.
The existential trust rule for AI shopping agents
AI shopping engines do not navigate product listings the same way a human shopper browses. When a buyer asks ChatGPT for the best winter boots or a lightweight running shoe, the agent filters hundreds of options within seconds. Its goal is to provide a single, direct recommendation that results in a successful purchase. If the agent recommends a product, but the buyer clicks through only to find it is sold out, that transaction fails.
This failure directly degrades user trust in the AI platform. To prevent this, platforms like Perplexity, Gemini, and ChatGPT use strict filters. According to a Storebeep report on Shopify AI traffic, AI-driven orders to Shopify stores grew 11x between January and November 2025. As this volume scales, agents prioritize stores that offer absolute data certainty. If your store cannot prove its inventory status instantly, you are dropped from the selection set.
The primary filter these engines use is the offers.availability field in your structured data. It acts as a binary gate. If the schema is missing, formatted incorrectly, or conflicting, the AI crawler flags the page as untrustworthy. It is safer for the agent to recommend a competitor with clean structured data than to risk recommending an out-of-stock item from your store.
Formatting the offers.availability field in product.liquid
When optimizing your store's code for an AI visibility platform like Pendium, the first place to look is your inventory schema. Fixing this visibility issue requires direct changes inside your Shopify theme files, specifically where your Product JSON-LD is generated. This is usually in product.liquid or within a dedicated snippet like product-metadata.liquid or main-product.liquid.
Let us look at how to structure this field correctly to satisfy strict schema parsers.
The absolute URL requirement
Many Shopify themes ship with a shorthand form of the availability schema, which merely outputs "availability": "InStock" or "availability": "OutOfStock". This is a syntax error in the eyes of an AI retriever.
Based on CatalogScan data on Shopify offers.availability, roughly 35% of Shopify stores ship the short, bare-name form of the schema. This bare-name form gets interpreted as a generic text string rather than a standardized vocabulary reference. Strict JSON-LD parsers used by AI shopping engines require the absolute schema.org URL.
Your theme code must output the fully qualified URL:
https://schema.org/InStockhttps://schema.org/OutOfStockhttps://schema.org/PreOrderhttps://schema.org/BackOrder
Here is the exact Liquid block you need to write inside your JSON-LD schema definition:
"offers": {
"@type": "Offer",
"priceCurrency": "{{ cart.currency.iso_code }}",
"price": "{{ product.selected_or_first_available_variant.price | money_without_currency | remove: ',' }}",
"availability": "{% if product.selected_or_first_available_variant.available %}https://schema.org/InStock{% else %}https://schema.org/OutOfStock{% endif %}",
"url": "{{ request.origin }}{{ product.url }}"
}
This Liquid conditional checks the current inventory state of the selected variant. It outputs the exact, absolute URL that the schema.org standard dictates. This simple code correction provides the explicit data point AI engines need to include your page in active search results.
Handling single variants vs product groups
If your product detail page represents a single item with no choices, the code block above works perfectly. However, if you sell products with multiple sizes, colors, or configurations, a single Product node with a single price is the wrong schema structure.
AI agents that parse multi-variant pages need to see the availability of each option. When a user asks an assistant for a specific size, the agent must parse the variant schema to verify that the target size is available. If your theme only updates the top-level product price or availability, the agent gets confused.
For stores with multiple variants, you must declare a ProductGroup schema. This structure groups your parent product and uses the hasVariant attribute to nest individual Offer nodes for every single combination of size and color. You can read more about managing complex structures in our guide on structuring Shopify combined listings schema to stop AI variant conflation.
Here is a breakdown of the correct Schema.org item availability options and how AI engines interpret them:
| Schema URL | Meaning | AI Agent Behavior |
|---|---|---|
https://schema.org/InStock | Product is available for purchase right now. | High priority for immediate purchase queries. |
https://schema.org/OutOfStock | Product is sold out with no restock date. | Skips for purchase queries; indexes page for future queries. |
https://schema.org/PreOrder | Product is available for order before launch. | Surfaces for pre-release or upcoming product queries. |
https://schema.org/BackOrder | Product is out of stock but accepts orders. | Surfaces with warning that shipping may be delayed. |
Using these specific URIs removes any interpretation doubt from the retrieval parser.

Synchronizing the three data sources AI agents check
AI systems do not rely solely on one signal. They run verification checks to ensure the data they display to users is accurate. Specifically, an AI agent evaluates three distinct data sources on your Shopify store simultaneously.
At Pendium, our analysis of e-commerce sites shows that if these sources contradict each other, the AI system flags the product data as unreliable.
Catalog API alignment
The first layer is your product catalog feed, which is typically synchronized with Google Merchant Center or Bing Places. When an AI agent from Microsoft or Google performs a search, it references this pre-indexed catalog API.
If your product feed tells the API that an item is out of stock, but your on-page JSON-LD schema says it is in stock, the discrepancy triggers an immediate penalty. The agent will skip the product because it cannot verify which data point is correct. Ensuring your back-end inventory syncs correctly with your structured data is a prerequisite for discovery. You can learn more about how ignored metadata affects visibility in our post on fixing invisible Shopify data: Why AI engines ignore your product tags.
On-page natural language
The third data source is the actual text on your product page. Large language models parse the natural language of your product description to understand specifications, materials, and sizing.
If your page has a banner that says "Sold Out" or "Back in Stock next Spring," but your JSON-LD still claims https://schema.org/InStock, the LLM detects the contradiction. Modern crawlers are built to spot these mismatches to avoid recommending unavailable items. The on-page text must support your schema. Keep your product copy clean, updated, and aligned with your system inventory.
Monitoring your store's performance with Pendium
Maintaining error-free structured data is difficult as Shopify themes update and apps change your layout. A single automated theme update can overwrite your customized template files, stripping out the absolute schema URLs and replacing them with generic text strings. This is where an AI visibility platform becomes necessary.
Pendium helps brands monitor and protect their visibility across 7 major AI platforms, including ChatGPT, Claude, Gemini, Grok, Perplexity, DeepSeek, and Google AI Overviews. Instead of guessing how these systems view your e-commerce store, the platform runs continuous checks to verify your structured data is parsed correctly.
Through features like Persona Intelligence, Pendium simulates up to 10 distinct customer personas. This simulation reveals if certain buyer types are getting incorrect stock information based on how they phrase their search queries. It tests more than 50 real customer queries to track your visibility scores across different segments, platforms, and specific topics.
Brands listed on our AI Brand Index show varying levels of AI readiness. You can audit your current standing by running a free AI Visibility Scan at Pendium. The scan analyzes your Shopify store, looks at your positioning, product schema, and competitive standing, and delivers results in 2 minutes without requiring a credit card.

