Product Feeds
Module: Magenx_ProductFeed · admin only, no storefront part
Define product feeds in the admin, choose products with the standard condition editor, and publish XML, CSV, TSV or JSONL on a schedule. Deliver them by public URL, FTP/SFTP, the Google Merchant API, a direct push to a Meta catalog, or the OpenAI Agentic Commerce product feed. You can list on Google Shopping, Meta, TikTok, Pinterest, Bing and comparison sites without a third-party extension.

How it works
Section titled “How it works”- Generation runs in batches within a time budget per cron run, and resumes on the next run. A large catalog never blocks cron.
- A finished file replaces the old one in one step, so a consumer never fetches half a feed.
- After each run, rows are checked against the feed’s validation rules and the findings are recorded.
Formats
Section titled “Formats”| Format | Built from | Can push to a catalog API |
|---|---|---|
| XML | A template | No |
| CSV, TSV, JSONL | A field map (column, value template, type) | Yes |
Templates are data, never code: they use a small, safe template language with filters, not PHP. JSONL writes real JSON types (booleans, numbers, objects, lists). gzip compression publishes <file name>.gz.
Purchasable Products Only keeps only products a cart accepts by SKU alone: simple, virtual and downloadable. Configurable, bundle and grouped parents drop out; their children stay.
Delivery
Section titled “Delivery”| Destination | What it does |
|---|---|
| File | Publishes at the feed’s public URL. |
| SFTP | Uploads with a password or SSH private key. |
| FTP | Uploads unencrypted. Prefer SFTP. Needs PHP ftp. |
| Google Merchant API | Registers the feed as a data source in Merchant Center and triggers a fetch. Uses Merchant API v1. |
| Meta catalog | Pushes records straight into a Meta catalog during the export. Needs a field-mapped feed. |
| OpenAI ACP Products API | Pushes products, grouped with their variants, to OpenAI. |
Destinations are set up with bin/magento magenx:feed:delivery. Secret settings are encrypted. Test checks the connection without writing anything anywhere.
Google Merchant Center
Section titled “Google Merchant Center”- Enable the Merchant API in a Google Cloud project.
- Create a service account and download its JSON key.
- Upload the key to
var/magenx_feed/gmc/on the server. Never put it inpub/media, which is public. - Add the service account’s email as a user in Merchant Center (Settings > Users), Standard access or higher.
- Register the Cloud project in Merchant Center (Settings > Developer registration). It takes a few minutes.
- Set the Merchant ID and key file name in configuration, and make the feed URL publicly fetchable.
Needs a system user token (user tokens expire) with catalog_management, and a role on the catalog.
OpenAI agentic shopping
Section titled “OpenAI agentic shopping”-
In Stores > Configuration > Magenx > Product Feeds > Agentic Commerce, per store view: seller name, the storefront URL with its locale (for example
https://shop.example.com/en), privacy, terms and return policy URLs, and return terms. Turn on Offer Checkout in ChatGPT only once OpenAI has enabled checkout and the storefront’s ACP API is live. -
Create a feed with Target Channel AI / agentic shopping, and leave the template and field map empty. Saving fills in the OpenAI columns, validation rules, JSONL with gzip, and purchasable-only.
-
Deliver by SFTP (a daily full file), the ACP Products API (updates during the day), or both:
Terminal window bin/magento magenx:feed:delivery --code=openai --type=sftp \--set host=<host from OpenAI> --set username=<user> --set path=/ \--set remote_filename=products.jsonl.gz \--key-file=/secure/openai_sftp_key --enable --test
Each item’s ID is the SKU of the purchasable product, so the storefront’s agent checkout can add it to a cart. Product URLs point at the storefront product page. Add your own GTIN, MPN, colour or material attributes to the field map; a GTIN check-digit rule is already in place.
Serving feed files
Section titled “Serving feed files”Files are published at pub/media/magenx_feed/<store>/<random>/<file>. The random part keeps a full catalog dump, which may include costs if you map them, from being guessed.
Command line
Section titled “Command line”bin/magento magenx:feed:listbin/magento magenx:feed:generate --code=google_shoppingbin/magento magenx:feed:generate --all [--slice]bin/magento magenx:feed:deliver --code=google_shopping--slice runs one cron-sized step. magenx:feed:deliver re-sends the last file without regenerating. Pass secrets to magenx:feed:delivery with --key-file or --secret-env, never --set, which lands in shell history.
Validation rules
Section titled “Validation rules”Each feed has its own rules, for example required, max_length, gtin, url, money (79.99 USD), unique, or variant_group (variants of one group share option names and differ in combination). Findings appear in the feed’s history; errors never stop the file from being written.
Not included
Section titled “Not included”A template picker for channels, mapping to marketplace category taxonomies, click and revenue tracking, and Amazon (a marketplace integration, not a feed).
User flows
Section titled “User flows”Define a feed
- The manager creates a feed: name, code, store view, format, file name, product filter, template or column map, compression, schedule, validation rules.
- Saving checks the template and refuses errors with line information.
Scheduled generation
- On each tick, a feed is due when its latest slot (store time) has passed and it has not run since; slots missed by less than 6 hours are caught up.
- A run takes a lock, writes the header once, then products in batches until the tick's budget, saving its position.
- Later ticks continue. At the end the footer is written, the file compressed if set, and published in one step.
- History records count, duration and status; validation findings are stored.
Delivery
- After a complete run, each active destination is delivered.
- Failures are recorded, retried by a scheduled job and optionally emailed.
- An operator can re-send without regenerating.
AI-shopping feed
- The merchant fills seller settings (seller name, storefront address including locale, policy links, returns, checkout availability).
- They create a feed for the AI-shopping channel without template; saving fills the required column map, rules, JSON Lines, compression, "omit empty" and "purchasable only".
- Delivery by file transfer of a full snapshot, or through the channel's product API, grouped into products with variants and sent when the run is complete.
Public address
- A public-address destination publishes under a path containing a secret part; channels fetch it.
These always hold:
- A consumer only ever sees a complete file: the previous one or the new one.
- Nothing is delivered from an incomplete run.
- No template can execute code.
- Credentials are never stored in clear or in a public folder.
- An API push never sends a product with only some of its variants.
- AI-shopping item id = SKU of the purchasable product; link = storefront product page (the parent's for a variant); brand = product brand, else parent's, else the fallback.
- API money = amount × 10^(currency minor digits), integer.
- GTIN valid = 8, 12, 13 or 14 digits with a correct GS1 check digit.
- Queries per batch are fixed regardless of batch size.
- Scheduled and manual runs produce the same addresses and prices.
Edge cases
Section titled “Edge cases”| Situation | What happens |
|---|---|
| Catalog needs 5 ticks. | One file: header, every product once, footer. |
| Product deleted between ticks. | No duplicates, no skipped neighbours. |
| Scheduler down 02:00–05:00, slot 03:00. | Feed runs at 05:00. |
| Scheduler down 20 hours. | Waits for the next slot. |
| Clock change on a scheduled day. | Runs once at the local slot time. |
| Template uses an unknown attribute. | Run stops with a clear error. |
| Two schedulers start the same feed. | One runs. |
| Delivery fails. | Recorded, retried, optionally emailed; published file unchanged. |
| Text contains an XML section terminator. | Escaped safely. |
| Spool from an older run. | Discarded. |
Who it applies to
Section titled “Who it applies to”- Any store view; products matching the filter and sold on the store's website.
Out of scope
Section titled “Out of scope”- A storefront feature (channels read feeds, the storefront does not).
- A gallery of channel templates.
- Mapping categories to channel taxonomies.
- Click tracking or revenue reporting.
- Full marketplace integrations (orders, inventory sync).
- Columnar file formats, multi-file splitting.
Install
Section titled “Install”composer require magenxcommerce/module-product-feedbin/magento module:enable Magenx_ProductFeedbin/magento setup:upgradebin/magento setup:di:compile # production mode onlybin/magento cache:flush- PHP
~8.4.0||~8.5.0, Magento 2.4.8. - Optional:
ext-ftp- Required only for plain FTP delivery. - Optional:
ext-zlib- Required only for feeds set to gzip compression, which the OpenAI (agentic commerce) file upload expects.
Configuration
Section titled “Configuration”Stores > Configuration > Magenx > Product Feeds
General
| Setting | Default | Scope | Notes |
|---|---|---|---|
Enabledmagenx_product_feed/ | No | Store view | Yes/No. Off by default. While this is No the cron jobs return immediately and no feed is generated or delivered, whatever the individual feeds say. |
Generation
| Setting | Default | Scope | Notes |
|---|---|---|---|
Products per Batchmagenx_product_feed/ | 200 | Global | Text. Shown when magenx_product_feed/general/enabled = Yes. Products loaded, rendered and written per batch. Each batch costs a fixed number of queries no matter what this is set to, so raising it trades memory for fewer round trips. Lower it if generation exhausts PHP memory on a catalog with large descriptions. |
Time Budget per Run (seconds)magenx_product_feed/ | 50 | Global | Text. Shown when magenx_product_feed/general/enabled = Yes. Wall-clock budget for one cron tick. When it is used up the run saves its position and continues on the next tick, so a catalog larger than a single cron window still finishes. Keep it comfortably below the PHP max_execution_time of your cron process. |
Validate After Generationmagenx_product_feed/ | Yes | Global | Yes/No. Shown when magenx_product_feed/general/enabled = Yes. Check the generated feed against its own validation rules and record the findings. This is what turns a feed a marketplace silently rejects into one you can see is wrong. |
Keep Run History (days)magenx_product_feed/ | 30 | Global | Text. Shown when magenx_product_feed/general/enabled = Yes. Older rows are pruned by the dispatcher cron. |
Google Merchant Center
Needed only for feeds delivered through the Google Merchant API. Downloading a feed or sending it by FTP uses none of this. Google's Content API for Shopping v2.1 shuts down on 18 August 2026 and its endpoints then return 410 Gone; this module targets the replacement Merchant API, so no migration is required.
| Setting | Default | Scope | Notes |
|---|---|---|---|
Merchant IDmagenx_product_feed/ | empty | Store view | Text. The numeric Merchant Center account ID that owns the data sources. Settable per website or store view, so different store views can submit to different Merchant Center accounts. |
Service Account Key Filemagenx_product_feed/ | empty | Store view | Text. File name of the Google service-account JSON key, resolved inside var/magenx_feed/gmc/. Upload it there by SSH or deployment, not into pub/media — that directory is web-served and the key grants programmatic access to your Merchant Center account. Treat it exactly like a password. |
Agentic Commerce (OpenAI / ACP)
Seller facts the OpenAI product feed repeats on every row. Templates read them as {{ context.store.name }}, {{ context.store.url }}, {{ context.store.privacy_policy }}, {{ context.store.terms }}, {{ context.store.return_policy }}, {{ context.store.accepts_returns }}, {{ context.store.return_days }}, {{ context.store.checkout }}, {{ context.store.brand }} and {{ context.store.weight_unit }}. Set them per store view: each store view is its own feed.
| Setting | Default | Scope | Notes |
|---|---|---|---|
Seller Namemagenx_product_feed/ | empty | Store view | Text. Shown to shoppers as who sells the item. Empty uses General → Store Information → Store Name, then the store view name. Never a placeholder: the feed rejects them. |
Fallback Brandmagenx_product_feed/ | empty | Store view | Text. Used for products with no manufacturer value. Fill it only if you sell your own brand; leave it empty if you resell, so a missing brand is reported by validation instead of being filled with the wrong one. |
Headless Storefront URLmagenx_product_feed/ | empty | Store view | Text. Base URL of the storefront shoppers actually use, including the locale segment, e.g. https://shop.example.com/en. The ACP mapping builds product links as <this>/product/<url_key>, the MagenX Commerce product route. Empty uses Magento's own product URL - wrong for a headless store, where Magento does not serve product pages. |
Privacy Policy URLmagenx_product_feed/ | empty | Store view | Text. Required for checkout eligibility. |
Terms of Service URLmagenx_product_feed/ | empty | Store view | Text. Required for checkout eligibility. |
Return Policy URLmagenx_product_feed/ | empty | Store view | Text. |
Accepts Returnsmagenx_product_feed/ | empty | Store view | Dropdown. |
Return Window (days)magenx_product_feed/ | empty | Store view | Text. Shown when Accepts Returns = yes. Exported only when returns are accepted. |
Offer Checkout in ChatGPTmagenx_product_feed/ | No | Store view | Yes/No. Sets is_eligible_checkout. Turn on only once OpenAI has enabled checkout for your integration and the storefront's /api/acp checkout is live (ACP_ENABLE=1 with Stripe configured). The flag alone does not enable checkout. |
Email Notifications
| Setting | Default | Scope | Notes |
|---|---|---|---|
Notify on Failuremagenx_product_feed/ | No | Store view | Yes/No. |
Recipient Emailmagenx_product_feed/ | empty | Store view | Text. Shown when Notify on Failure = Yes. Leave empty to use the General Contact address. |
Failure Email Templatemagenx_product_feed/ | Module's default template | Store view | Dropdown. Shown when Notify on Failure = Yes. Sent through Magento's own Mail Sending Settings — this module configures no transport of its own. |
Cron
These jobs run in Magento's default cron group on purpose. A dedicated group is never picked up on hosts that run cron:run --group= with an explicit list, which makes feeds silently stop generating while the CLI command still works perfectly by hand.
| Setting | Default | Scope | Notes |
|---|---|---|---|
Generation Dispatcher Schedulemagenx_product_feed/ | */5 * * * * | Global | Text. Shown when magenx_product_feed/general/enabled = Yes. Cron expression. This is not the schedule a feed generates on — each feed carries its own days and times, and this dispatcher only ticks and decides which are due. It must therefore run at least as often as your finest per-feed time granularity. |
Delivery Retry Schedulemagenx_product_feed/ | */15 * * * * | Global | Text. Shown when magenx_product_feed/general/enabled = Yes. Cron expression for retrying deliveries that failed. |
Admin pages and permissions
Section titled “Admin pages and permissions”- Catalog > Product Feeds > Feeds
Grant these under System > Permissions > User Roles > Role Resources:
| Resource | Under | ID |
|---|---|---|
| Product Feeds | Catalog | Magenx_ProductFeed::feeds |
| Feeds | Catalog > Product Feeds | Magenx_ProductFeed::feed |
| Generate Feeds | Catalog > Product Feeds | Magenx_ProductFeed::generate |
| Product Feed Settings | Stores > Settings > Configuration | Magenx_ProductFeed::config |
| Job | Group | Default schedule | Change it at |
|---|---|---|---|
magenx_product_feed_dispatch | default | */5 * * * * | magenx_product_feed/cron/dispatch_schedule |
magenx_product_feed_deliver | default | */15 * * * * | magenx_product_feed/cron/deliver_schedule |
Glossary
Section titled “Glossary”| Term | Meaning |
|---|---|
| Feed | Definition: store view, filter, format, template or column map, schedule, destinations. |
| Run | One generation of a feed, possibly over several scheduled ticks. |
| Tick | One scheduler invocation with a time budget. |
| Template | Text with values, filters, conditions and loops; the product loop is the per-product part. |
| Column map | List of columns, each with a value template and a type. |
| Record | One product's rendered row or object. |
| Purchasable | A product a cart accepts by SKU alone (no options to choose). |
| Destination | Where and how a finished feed goes. |
| Validation rule | Field, rule type, severity, message and parameters. |
| Secret path part | Random part of the public address that makes it unguessable. |
| Spool | Records kept across ticks for an API push that must be sent whole. |