Complete reference for all product feed generators.
All feed generators share these common options:
| Field | Type | Required | Description |
|---|---|---|---|
outputPath |
string | Yes | File path or URL for output |
format |
string | Yes | Output format (xml, csv, json, tsv) |
channelId |
string | No | Vendure channel to use |
Code: googleMerchant
Generate product feeds for Google Merchant Center / Google Shopping.
| Field | Type | Required | Description |
|---|---|---|---|
outputPath |
string | Yes | File path or URL |
format |
select | Yes | xml (RSS 2.0) or tsv |
targetCountry |
string | Yes | ISO country code (e.g., US) |
contentLanguage |
string | Yes | ISO language code (e.g., en) |
currency |
string | Yes | ISO currency code (e.g., USD) |
channelId |
string | No | Vendure channel to use |
includeOutOfStock |
boolean | No | Include out of stock items |
storeName |
string | No | Store name for feed |
storeUrl |
string | Yes | Base URL for product links |
shippingInfo |
json | No | Default shipping configuration |
.feed('google-feed', {
adapterCode: 'googleMerchant',
format: 'XML',
targetCountry: 'US',
contentLanguage: 'en',
currency: 'USD',
storeUrl: 'https://mystore.com',
storeName: 'My Store',
includeOutOfStock: false,
outputPath: '/feeds/google-shopping.xml',
})
The XML feed follows Google’s RSS 2.0 specification:
<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:g="http://base.google.com/ns/1.0" version="2.0">
<channel>
<title>My Store Products</title>
<link>https://mystore.com</link>
<description>Product Feed</description>
<item>
<g:id>SKU-001</g:id>
<g:title>Product Name</g:title>
<g:description>Product description</g:description>
<g:link>https://mystore.com/product/slug</g:link>
<g:image_link>https://mystore.com/assets/image.jpg</g:image_link>
<g:price>29.99 USD</g:price>
<g:availability>in_stock</g:availability>
<g:condition>new</g:condition>
</item>
</channel>
</rss>
id - Unique product identifier (SKU)title - Product namelink - URL to product pageprice - Price with currencyavailability - Stock statusCode: metaCatalog
Generate product catalogs for Meta Commerce (Facebook/Instagram).
| Field | Type | Required | Description |
|---|---|---|---|
outputPath |
string | Yes | File path or URL |
format |
select | Yes | csv or xml |
currency |
string | Yes | ISO currency code |
channelId |
string | No | Vendure channel to use |
brandField |
string | No | Field path for brand |
categoryField |
string | No | Field path for Google category |
includeVariants |
boolean | No | Include all variants |
.feed('meta-catalog', {
adapterCode: 'metaCatalog',
format: 'CSV',
currency: 'USD',
brandField: 'customFields.brand',
categoryField: 'customFields.googleCategory',
includeVariants: true,
outputPath: '/feeds/facebook-catalog.csv',
})
id,title,description,availability,condition,price,link,image_link,brand
SKU-001,Product Name,Description,in stock,new,29.99 USD,https://store.com/product,https://store.com/image.jpg,BrandName
id - Unique identifiertitle - Product titledescription - Product descriptionavailability - in stock / out of stockcondition - new / refurbished / usedprice - Price with currencylink - Product URLimage_link - Image URLCode: customFeed
Generate custom product feeds with flexible field mapping and templates.
| Field | Type | Required | Description |
|---|---|---|---|
outputPath |
string | Yes | File path or URL |
format |
select | Yes | xml, csv, json, or tsv |
template |
textarea | No | Handlebars template for rendering |
fieldMapping |
json | Yes | Map source to feed fields |
rootElement |
string | No | Root element name (XML) |
itemElement |
string | No | Item element name (XML) |
connectionCode |
string | No | Connection for file upload |
.feed('custom-json', {
adapterCode: 'customFeed',
format: 'JSON',
fieldMapping: {
id: 'sku',
name: 'name',
price: 'priceWithTax',
stock: 'stockOnHand',
image: 'featuredAsset.preview',
},
outputPath: '/feeds/products.json',
})
.feed('custom-xml', {
adapterCode: 'customFeed',
format: 'XML',
rootElement: 'catalog',
itemElement: 'product',
fieldMapping: {
sku: 'sku',
title: 'name',
price: 'priceWithTax',
},
outputPath: '/feeds/catalog.xml',
})
.feed('templated-feed', {
adapterCode: 'customFeed',
format: 'CSV',
template: ',,AvailableOut of Stock',
outputPath: '/feeds/custom.csv',
})
The fieldMapping object maps output field names to source field paths:
{
"outputField": "source.path.to.value",
"id": "sku",
"name": "name",
"price": "variants.0.priceWithTax",
"brand": "customFields.brand"
}
Supports dot notation for nested values.
Feeds can be written to local filesystem:
{
outputPath: '/var/www/feeds/products.xml',
}
Use a connection to upload feed files:
{
outputPath: 'products.xml',
connectionCode: 'sftp-server',
}
Feeds can be served through Data Hub’s feed endpoint:
GET /data-hub/feeds/{feed-code}
Schedule automatic feed generation using pipeline triggers:
createPipeline()
.name('daily-google-feed')
.trigger('schedule', {
type: 'SCHEDULE',
cron: '0 2 * * *', // Daily at 2 AM
})
.extract('query-products', {
adapterCode: 'vendureQuery',
entity: 'PRODUCT',
relations: 'variants,featuredAsset,translations',
languageCode: 'en',
batchSize: 500,
})
.transform('prepare-feed', {
operators: [
{ op: 'set', args: { path: 'availability', value: 'in_stock' } },
],
})
.feed('google-feed', {
adapterCode: 'googleMerchant',
format: 'XML',
targetCountry: 'US',
contentLanguage: 'en',
currency: 'USD',
storeUrl: 'https://mystore.com',
outputPath: '/feeds/google-shopping.xml',
})
Filter products included in feeds:
{
filters: {
enabled: true, // Only enabled products
inStock: true, // Only in-stock items
hasPrice: true, // Only priced items
minPrice: 10, // Minimum price
maxPrice: 1000, // Maximum price
}
}