Pendium
The Optimization PlaybookThe Recommendation Economy

Structuring Shopify compatibility metadata so AI agents recommend your parts

Claude

Claude

·6 min read
Structuring Shopify compatibility metadata so AI agents recommend your parts

When a buyer asks ChatGPT, "Which wiper blades fit a 2024 Subaru Outback?", the AI does not read your Shopify product descriptions—it reads your schema. To prevent your store from becoming invisible to conversational search engines, Pendium helps merchants identify and bridge the data gaps that cause AI platforms to overlook their products. The solution to this modern discoverability problem lies in extracting raw compatibility data from standard description blocks and mapping it into structured custom Shopify metafields that write directly to your JSON-LD Product schema. By structuring this technical data, you feed machines like ChatGPT, Claude, and Perplexity the precise, validated attributes they require to confidently recommend your inventory over competitor parts.

If you want to understand how AI agents construct these recommendations, you can learn more about how to format your Shopify catalog for AI shopping assistants at How to format your Shopify catalog for AI shopping assistants.

Stop putting model numbers in the description box

If you operate an auto parts, electronics, or home appliance Shopify store, you likely have thousands of compatibility combinations. Traditional search optimization taught merchants to dump these lists directly into product description paragraphs or bullet points inside the rich text editor. While a human shopper can scan a wall of text and infer that a product fits their machine, an AI agent treats unstructured prose as a fallback signal.

When search engines crawl your product pages, they prioritize structured data points that can be validated programmatically. Prose introduces ambiguity. If a product description says "This adapter fits most older Dell laptops but is not compatible with Inspiron models from 2023 or newer," a language model must perform semantic reasoning to decide if it fits an Inspiron 15. If the model is unsure, it will refuse to recommend the part to avoid generating a hallucinated recommendation.

To satisfy machine readers, you must isolate compatibility values from editorial copy. The following attributes should always live in dedicated, structured data fields instead of your main description box:

  • Exact model years (e.g., "2020", "2021", "2022")
  • Hardware and port requirements (e.g., "USB-C", "15W", "Thread Type M6")
  • Trim levels and sub-models (e.g., "AWD Premium", "6-Quart Capacity")
  • Regulatory and safety certifications (e.g., "UL Listed", "EPA Certified")

In our analysis of ecommerce databases, unstructured compatibility lists represent a massive leak in conversational commerce visibility. According to the Obsess AI analysis, the most common metafield mistake is adding values in the admin but failing to connect them to the theme's HTML and schema output. This means the data exists in your Shopify database, but the crawlers that power ChatGPT and Gemini never see it.

A cluttered storage room filled with stacks of rubber belts and industrial equipment.

Build the metafield architecture first

Before editing your theme files or writing code, you must design a clean database schema inside your Shopify admin. Treating metafields as an unorganized repository for random specifications ruins the data structure. You need a predictable format that applies across your entire collection.

Shopify separates custom data into standard category metafields and custom metafields. Category metafields map directly to standard taxonomies, which is helpful for merchant feeds. However, custom compatibility requirements demand custom metafield definitions.

The table below outlines how to translate physical compatibility requirements into database fields:

Data TypeBest Used ForSchema.org Mapping
Single-line text (List)Uniform lists of compatible models, years, or brandsmodel or targetProduct
Metaobject referenceComplex, nested vehicle or device hierarchiesCustom product attributes
Number (Integer)Year ranges, voltages, or hardware measurementsquantitativeValue
BooleanUniversal fit toggle (True/False)category filters

When to use single-line lists

If your products fit a flat list of items, use the single-line text (List) field type. This is perfect for accessories like phone cases or camera lenses.

For example, a camera lens might fit "Sony E-Mount" and "Leica L-Mount". You would define a custom metafield with the namespace and key custom.compatible_mounts. Inside the Shopify product editor, this field allows you to add multiple independent values. When compiled, Shopify stores these values as a clean array, which makes them highly parseable for crawlers.

Using metaobjects for complex vehicle/device hierarchies

For auto parts or specialized hardware, flat lists are insufficient. A single brake pad might fit a "Ford F-150" but only for the "2018 to 2021" model years, and only if the vehicle has "four-wheel drive."

In this scenario, flat text lists break down. You must build a metaobject to define these complex relational dependencies. As noted in the Capconvert guide on Shopify metafields, metaobjects act as custom tables within Shopify. You can create a metaobject called "Compatible Vehicle" with fields for Make, Model, Year, and Drivetrain.

You then add a metaobject reference field to your products. This architecture ensures that every compatible vehicle is stored as a distinct, structured entity. AI engines can query these relationships directly without guessing which year matches which model.

Close-up view of red office binders neatly organized on a shelf.

Map the data to your JSON-LD output

Defining the data in your Shopify admin is only the first step. The data only helps your AI visibility if it is written directly into the HTML source of your product page. AI agents do not query your Shopify API during their discovery phase; they read the static JSON-LD schema block embedded in your pages.

Your goal is to pass the compatibility array into standard properties defined by Schema.org. This allows both traditional Google search bots and modern LLM crawlers to ingest the data simultaneously.

Locating the schema block in your theme files

Most modern Shopify themes contain a liquid file that handles structured data.

  1. From your Shopify admin, go to Online Store > Themes.
  2. Click the three dots next to your active theme and select Edit code.
  3. Search for files named main-product.liquid, product.jsonld.liquid, or metadata-schema.liquid.
  4. Locate the script block that starts with <script type="application/ld+json">.

Writing the Liquid assignment

Once you find the JSON-LD script, you must inject your metafield values into the schema. For single-line lists of compatible models, use this Liquid code snippet inside your product schema object:

{%- if product.metafields.custom.compatibility_list.value != blank -%}
"model": [
  {%- for model_name in product.metafields.custom.compatibility_list.value -%}
    {
      "@type": "ProductModel",
      "name": "{{ model_name | escape }}"
    }{%- unless forloop.last -%},{%- endunless -%}
  {%- endfor -%}
],
{%- endif -%}

If you are using a metaobject reference to handle complex relations, you can loop through the referenced metaobjects to output detailed structural relationships:

{%- if product.metafields.custom.vehicle_compatibility.value != blank -%}
"additionalProperty": [
  {%- for vehicle in product.metafields.custom.vehicle_compatibility.value -%}
    {
      "@type": "PropertyValue",
      "name": "Compatible Vehicle",
      "value": "{{ vehicle.make }} {{ vehicle.model }} {{ vehicle.year }}"
    }{%- unless forloop.last -%},{%- endunless -%}
  {%- endfor -%}
],
{%- endif -%}

Adding this markup ensures your Shopify catalog communicates directly with machine readers. It prevents conversational engines from having to parse your paragraphs to extract basic compatibility details.

The trap here is assuming your theme handles this automatically

The single biggest mistake Shopify merchants make is assuming their theme handles technical SEO out of the box. Many premium theme developers claim their templates are fully optimized for search engines. However, these themes are built to be general. They cannot predict the custom data structure your specific inventory requires.

According to the Lumio guide on Shopify product schema, standard Shopify themes like Dawn or Sense typically only ship four basic Schema.org properties: name, price, availability, and image. The gap between these four standard properties and the deep attributes that conversational AI search engines require is where visibility is lost.

If your theme is not updated to output your custom metafield data, that data remains locked in your admin database. To verify if your store has this gap, you can run a complete analysis of your structured data using our AI Site Audit. Our audit evaluates your JSON-LD, Open Graph, and Schema.org markup to ensure AI platforms can parse your specifications.

By cleaning up your metadata, you ensure that machine readers see a single source of truth. Your product pages, merchant feeds, and AI-optimized schema will all state the exact same facts. This high-fidelity approach prevents conversational search platforms from hallucinating or misclassifying your products when prospective buyers ask for recommendations.

If you want to verify how ChatGPT, Claude, and Gemini currently perceive your products, run a free analysis at Scan Your AI Visibility to see exactly where your store is losing recommendations to competitors.

how-toshopifygenerative-engine-optimization

Get the latest from The Citation Report delivered to your inbox each week