infrangible / m2-ai-product-feed
Brings the products of the shop into ChatGPT: a product feed in the format of OpenAI for ChatGPT shopping, with variants, prices, availability and images, kept up to date by the product feed export.
Package info
github.com/infrangible-dev/m2-ai-product-feed
Type:magento2-module
pkg:composer/infrangible/m2-ai-product-feed
Requires
- php: >=8.1
- fewedev/base: ~2.4.3
- infrangible/m2-backend-widget: ~4.0.7
- infrangible/m2-catalog-product-feed: ~2.1.0
- infrangible/m2-core: ~5.0.9
- infrangible/m2-foundation: ~3.0.3
- magento/framework: ~103.0.6
- magento/module-backend: ~102.0.6
- magento/module-catalog: ~104.0.6
- magento/module-config: ~101.2.6
- magento/module-eav: ~102.1.6
- magento/module-store: ~101.1.6
- psr/log: ~2.0.0||~3.0.0
Requires (Dev)
- infrangible/phpstan-magento: ~1.2.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-12-03 15:28:03 UTC
README
Brings the products of the shop into ChatGPT: writes a product feed in the format of OpenAI for ChatGPT shopping, with variants, prices, availability, images and reviews. The feed is an integration of Infrangible Catalog Product Feed, whose full export writes it on a schedule and whose delta export keeps the price and the stock of the changed products current.
The feed
Each enabled store view gets its feed as JSON Lines (one product per line) at
pub/media/ai_product_feed/openai/<store code>.jsonl, for example
https://shop.example/media/ai_product_feed/openai/default.jsonl. Stores > Configuration > Infrangible Solutions >
AI Product Feed shows the addresses. Enter the address as hosted URL in the merchant portal of OpenAI (ChatGPT
merchants); OpenAI decides which shops it accepts.
- One row per product that can be bought. Simple, virtual, downloadable, bundle and grouped products have one row.
Configurable products have no row of their own: each variant has a row with the SKU of the configurable product as
group_id,listing_has_variationsand the options of the variant invariant_dict(for example{"Color": "Black", "Size": "XS"}). Theurlof a variant selects its options on the product page. - Variants take the values of their configurable product that they have no value for (description, brand, image, category), but never its ID, price, sale price, availability, GTIN, MPN or weight.
- Products without a required value are left out and logged with the missing fields. Invalid optional values are left out of the row: a sale price that is not below the price, a GTIN with a wrong check digit, a weight of 0.
- The full export replaces the feed when it is complete, so OpenAI never fetches a part of it.
Fields
The feed attributes of Infrangible > AI Product Feed > OpenAI Feed Attributes fill these fields; the installation
adds them, and they can be changed, removed or completed (for example gtin and mpn from product attributes):
| Field | Source |
|---|---|
item_id |
SKU |
title |
name |
description |
description without HTML, paragraphs and list items as lines; the title if it has none |
url |
URL of the product |
brand |
manufacturer; without manufacturer the default brand of the settings |
image_url |
base image |
additional_image_urls |
up to 10 other images of the gallery, without hidden images |
price |
price with the base currency, for example 34.00 USD; the lowest price for bundle and grouped products |
sale_price |
final price of the price index, if it is below the price |
availability |
in_stock or out_of_stock from the stock status |
product_category |
the longest category path of the product, for example Men > Tops > Hoodies & Sweatshirts |
weight |
weight, with the weight unit of the store as item_weight_unit |
The custom fields openai_availability, openai_additional_image_urls and openai_product_category are available for
feed attributes. Feed attributes with "Delta-Index" are updated by the delta export; the others keep their value until
the next full export.
The settings and the reviews add these fields to every row:
| Field | Source |
|---|---|
seller_name, seller_url |
seller name of the settings, base URL of the store view |
target_countries, store_country |
settings |
accepts_returns, return_deadline_in_days, return_policy |
settings |
review_count, star_rating |
approved reviews of the product (of the configurable product for variants) |
The feed contains no checkout fields: buying in ChatGPT needs an integration of the Agentic Commerce Protocol, which is not part of this module.
Configuration
Stores > Configuration > Infrangible Solutions > AI Product Feed > OpenAI (ChatGPT Shopping):
| Setting | Default | Scope | Effect |
|---|---|---|---|
| Enable | No | store view | writes the feed of the store view |
| Feed Address | store view | the address of the feed, to enter in the merchant portal | |
| Schedule of the Full Export | 0 */6 * * * |
global | cron expression of the full export (every six hours) |
| Update changed Products | Yes | store view | the delta export updates the changed products every minute |
| Seller Name | store name | store view | the store name of the store information, else the store view name |
| Default Brand | seller name | store view | brand of products without manufacturer |
| Target Countries | United States | store view | countries the products are offered in |
| Store Country | United States | store view | country of the store |
| Accepts Returns | Yes | store view | whether products can be returned |
| Return Deadline in Days | 30 | store view | days for returns |
| Return Policy | store view | page of the return policy, absolute or relative to the store |
OpenAI currently processes feeds for the United States; other countries only after OpenAI confirmed them for the merchant. Prices are exported in the base currency of the store, as entered in the catalog (US stores usually without tax).
The cron job task_catalog_product_feed_full of Catalog Product Feed checks the schedule every 15 minutes; the cron
job task_catalog_product_feed_delta runs the delta export every minute. The first feed of a store view needs a full
export; the delta export skips store views without feed. Run it on the console without waiting for the schedule:
bin/magento task:catalog_product_feed_full --force --integration=openai
Requirements
- Magento Open Source or Adobe Commerce 2.4.6 or newer
- PHP 8.1 or newer
- Infrangible Catalog Product Feed 2.1 or newer
Installation
composer require infrangible/m2-ai-product-feed bin/magento module:enable Infrangible_AiProductFeed bin/magento setup:upgrade
In production mode, also run bin/magento setup:di:compile.
License
Infrangible AI Product Feed is licensed under the MIT License - see the LICENSE file for details.