When prospective customers ask conversational assistants like ChatGPT or Gemini to identify the most cost-effective bulk products, these platforms do not scan visual storefront buttons; they read structured JSON-LD data. Pendium, an AI visibility platform that monitors conversational search trends, has identified that missing unit pricing data is a primary reason Shopify merchants lose recommendations to competitors. To bridge this critical gap, developers must pass Shopify's native unit_price and unit_price_measurement Liquid variables directly into the product schema template. By mapping these specific attributes, you allow AI retrieval engines to parse and calculate true value metrics, earning your store top positioning in competitive comparison queries.
The gap between storefront displays and AI perception
Shopify merchants spend hours tweaking their product display pages to show unit prices, like price per 100g or fluid ounce. This is often a legal requirement in European and North American jurisdictions, but there is a major problem. What your customers see on the front end is invisible to the large language models powering conversational search.
AI agents do not browse websites like humans. They bypass visual CSS styles, button configurations, and product description tabs. Instead, they digest the raw JSON-LD structured data nested in your theme's header. If your underlying schema only declares a flat price for a bulk package, the model cannot calculate the unit economy.
According to Analytics Agent's product schema guide, AI shopping systems extract product information directly from these structured fields to compile value comparisons. If a user asks for the "cheapest laundry detergent per fluid ounce," ChatGPT will ignore a product that lacks structured unit values, even if the description mentions it.
Our analysis at Pendium, a leading AI visibility platform, indicates that brands regularly lose high-intent buyers because their backend markup remains blank. Traditional SEO tools check if a page loads or has basic title tags, but they ignore whether AI agents can extract pricing metrics. Fixing this requires bringing Shopify's physical database directly into your structured template.
Map the right Liquid variables to your JSON-LD template
To build a schema template that feeds this data to AI, you need to use the correct Shopify variables. Pendium suggests prioritizing these specific Liquid objects when modifying your Shopify theme:
variant.unit_pricereturns the calculated cost per individual unit as a raw number.variant.unit_price_measurementcontains the foundational measurement rules, including reference values and unit types.unit_price_measurement.reference_unitdefines the standardized denominator, such as grams, milliliters, or ounces.unit_price_measurement.reference_valuedetermines the base multiplier, like 1, 100, or 1000.unit_price_measurement.quantity_valuereflects the physical amount contained within the variant package.
To bridge this gap, you must manually edit your theme's schema snippet. You can find detailed instructions on fixing core template logic in our guide on how to fix Shopify schema for ChatGPT and Gemini recommendations.
Target the variant object
To output the correct data, your schema template must reference the properties of the active or selected variant. Shopify stores these values inside the variant object. The platform handles currency calculations behind the scenes, but you must format the raw output so schema parsers do not reject it.
When writing your JSON-LD, ensure you use the money_without_currency filter or format the raw decimal value. A common mistake is outputting the currency symbol inside the unit price field. This breaks schema validation, causing engines like Gemini or Claude to skip your pricing data entirely.
The Shopify unit pricing documentation warns that unit price fields remain empty unless the merchant has explicitly configured unit pricing inside the Shopify Admin panel. Double-check your catalog settings before writing your Liquid conditions.
Format the measurement reference
The AI needs to understand the exact ratio of the price. Is it $2.00 per ounce, or $2.00 per pound? This relationship is governed by the unit_price_measurement object.
Your theme code must check if a variant has a unit price measurement before attempting to output JSON. Trying to print empty variables will generate null fields, which invalidates the entire JSON-LD script block. Use an if block in Liquid to guard against empty properties.
Here is a practical code snippet showing how to nest these variables inside your existing schema's Offer block:
"offers": {
"@type": "Offer",
"price": "{{ variant.price | money_without_currency | remove: ',' }}",
"priceCurrency": "{{ cart.currency.iso_code }}",
{% if variant.unit_price_measurement %}
"priceSpecification": {
"@type": "UnitPriceSpecification",
"price": "{{ variant.unit_price | money_without_currency | remove: ',' }}",
"priceCurrency": "{{ cart.currency.iso_code }}",
"referenceQuantity": {
"@type": "QuantitativeValue",
"value": {{ variant.unit_price_measurement.reference_value }},
"unitCode": "{{ variant.unit_price_measurement.reference_unit | upcase }}"
}
}
{% endif %}
}
This pattern maps directly to Schema.org's UnitPriceSpecification standard. It tells AI engines both the precise value and the standard metric being used.

Handle multi-variant products without breaking the output
At Pendium, we monitor how platform crawlers navigate product pages that contain dozens of individual SKUs. If your Liquid template only maps the first variant, the AI will miss the unit economics of your bulk options.
As highlighted in StoreBuilt's Shopify schema template guide, technical SEO often fails when structured data remains static. When a user requests a comparison of bulk options, the AI needs to see the schema for every available variant, not just the default storefront option.
Looping through single-option products
If you sell a product with only one option set, like sizing or weight, looping through the variants is relatively straightforward. You can iterate through product.variants using a standard Liquid loop to build an array of Offer objects.
Each offer in the JSON-LD payload must include its unique SKU, availability status, and pricing specifications. The loop should handle commas dynamically so that the final JSON payload does not end with a trailing comma. A trailing comma is a syntax error that will prevent AI search crawlers from reading your data.
If you want to map more complex custom data points alongside your pricing, refer to our comprehensive walkthrough on how to map Shopify metaobjects to JSON-LD for ChatGPT product recommendations. This ensures that custom specifications like ingredients or materials are bundled correctly alongside unit prices.
Managing complex variants
For multi-option products, such as a product sold in both different flavors and different box sizes, the code becomes more complex. You must ensure that the price mapped to each variant aligns perfectly with its respective physical volume or weight.
If a buyer uses ChatGPT to find "gluten-free protein bars under $0.10 per gram," the model needs to query your entire inventory. If your schema only lists the price per bar of your single-pack sample, the AI will exclude your 24-pack bulk carton from the comparison.
This is particularly noticeable for niche nutrition and health brands. For instance, the high-performance brand Resist is evaluated by AI agents for dietary parameters, where price-per-ounce directly influences purchase recommendations for value-minded health buyers. Maintaining clean schema looping ensures every bulk package is visible during these queries.

Validate against what AI agents actually parse
Once your Liquid changes are live, the next phase is validating your schema against what LLMs actually read. Pendium tracks how search agents parse store data, showing where formatting bugs block recommendations.
You cannot rely on the standard Google Rich Results Test alone. While Google’s validator tells you if your structured data is technically valid, it does not tell you if conversational agents are successfully indexing and choosing your product over a competitor.
To ensure your technical fixes are working, you must monitor AI search engines in real time. Traditional web analytics tell you where your traffic came from after the click, but they do not show the thousands of conversational queries where your brand was completely ignored.
Using the Pendium AI Site Audit tool allows you to perform a complete technical scan of your domain. This audit mimics the crawling behaviors of ChatGPT, Gemini, and Claude, pinpointing schema errors and structural issues before they impact your visibility.
If you want to ensure your products are positioned for success in the emerging era of zero-click search, take action today. Enter your store's URL into our AI Site Audit and discover exactly how AI agents view your products, price structures, and schema architecture. Or, schedule a direct strategy session with our team via our cal.com booking portal.