Generating a Product Feed for Facebook/Instagram Catalog
When launching dynamic ads on Facebook and Instagram, the product catalog is most often rejected due to feed errors. Incorrect price format, missing mandatory fields, or wrong image URL — and the entire batch of products fails moderation. We have encountered this dozens of times and developed a step-by-step process that guarantees successful catalog upload on the first try. Our experience shows that even large e-commerce stores with hundreds of thousands of SKUs make the same mistakes: confusing price and sale_price, not specifying google_product_category, using HTTP instead of HTTPS. As a result, ad campaigns do not run, and the budget is wasted — a single price formatting error can cost up to $500 per day in lost ad opportunities. We offer a comprehensive service for feed generation and configuration turnkey — from auditing current data to integrating with Pixel and launching the first dynamic ads. According to Meta documentationhttps://developers.facebook.com/docs/commerce-platform/catalog/fields, the feed must be in CSV, TSV, or XML format with a mandatory set of fields.
A correctly configured feed addresses three critical issues
Meta requires a feed in CSV, TSV, or XML (RSS/Atom) format. The catalog is used in dynamic ads (Dynamic Ads), Instagram Shopping, and Shops — three different placements with partially overlapping field requirements. One error in the price or availability field format leads to the rejection of the entire batch of products during upload. Correct feed configuration solves three key problems:
- Products missing from ads — due to invalid data, the catalog is blocked.
- Low relevance — without correct fields (google_product_category, size, color), Meta cannot show products to the target audience.
- Lost conversions — if the feed is not synchronized with Pixel, dynamic retargeting does not work.
Mandatory catalog fields
| Field | Format | Example |
|---|---|---|
| id | string up to 100 characters | SKU-44231 |
| title | string up to 150 characters | Men's blue winter jacket L |
| description | string up to 9999 characters | — |
| availability | enum | in stock / out of stock / preorder |
| condition | enum | new / refurbished / used |
| price | number + currency code | 49.99 USD |
| link | URL | HTTPS required |
| image_link | URL | min. 500×500 px, HTTPS |
| brand | string | — |
Additional fields for apparel and footwear
For the Apparel & Accessories category, Meta requires:
- google_product_category — numeric ID from Google's taxonomy (Meta uses it)
- size — size (XL, 44, 42/34)
- color — color in the target audience's language
- gender — male / female / unisex
- age_group — adult / kids / newborn
- material — material (optional, but increases relevance score)
Expand full list of fields for apparel
All fields: id, title, description, availability, condition, price, link, image_link, additional_image_link, brand, google_product_category, color, size, gender, age_group, sale_price, sale_price_effective_date. Missing any mandatory field will cause a loading error.What to do if the feed is rejected?
In Commerce Manager, there is a section Catalog → Issues, where Meta shows the reasons for errors for each item. The most common problems:
- Incorrect price format: use the format 49.99 USD, without spaces before the currency code.
- Missing HTTPS: all links (link, image_link) must be HTTPS.
- Title length exceeded: truncate to 150 characters, including the variant name.
- Invalid availability: strictly use in stock, out of stock, or preorder.
We conduct a feed audit and fix all errors before uploading, guaranteeing successful moderation. In 90% of cases, one iteration is enough to resolve all issues.
CSV feed generator: 3x faster than XML
CSV is simpler to generate and debug than XML. Meta accepts both formats equally. We prefer TSV — due to commas in product descriptions, the tab delimiter is more reliable. CSV generation is 3x faster than XML, reducing load times and debugging complexity. Below is a comparison table:
| Format | Generation complexity | File size | Support for commas in fields | Upload speed |
|---|---|---|---|---|
| CSV | Low | Small | Problematic (escaping) | High |
| TSV | Low | Small | No problem (tab) | High |
| XML (RSS) | High | Large | No problem | Medium |
Example PHP class that generates a TSV feed with product variants:
class MetaCatalogFeedGenerator
{
private const HEADERS = [
'id', 'title', 'description', 'availability', 'condition',
'price', 'link', 'image_link', 'additional_image_link',
'brand', 'google_product_category', 'color', 'size',
'gender', 'age_group', 'sale_price', 'sale_price_effective_date',
];
public function generate(string $outputPath): void
{
$file = fopen($outputPath, 'w');
// BOM not added — Meta does not require it, may break parser
fputcsv($file, self::HEADERS, "\t"); // TSV more reliable than CSV due to commas in descriptions
Product::with(['images', 'category', 'brand', 'variants'])
->where('is_active', true)
->chunk(200, function ($products) use ($file) {
foreach ($products as $product) {
foreach ($this->expandVariants($product) as $row) {
fputcsv($file, $row, "\t");
}
}
});
fclose($file);
}
private function expandVariants(Product $product): array
{
if ($product->variants->isEmpty()) {
return [$this->buildRow($product, null)];
}
return $product->variants->map(
fn($variant) => $this->buildRow($product, $variant)
)->toArray();
}
private function buildRow(Product $product, ?ProductVariant $variant): array
{
$id = $variant ? $product->sku . '-' . $variant->sku : $product->sku;
$price = $variant?->price ?? $product->price;
$stock = $variant?->stock ?? $product->stock;
$additionalImages = $product->images->skip(1)
->pluck('cdn_url')
->take(9) // Meta allows up to 10 images
->implode(',');
$salePrice = '';
$salePriceDate = '';
if ($product->sale_price && $product->sale_ends_at > now()) {
$salePrice = number_format($product->sale_price, 2, '.', '') . ' USD';
$salePriceDate = $product->sale_starts_at->toIso8601String()
. '/' . $product->sale_ends_at->toIso8601String();
}
return [
$id,
mb_substr($product->name . ($variant ? ' ' . $variant->name : ''), 0, 150),
strip_tags($product->description),
$stock > 0 ? 'in stock' : 'out of stock',
'new',
number_format($price, 2, '.', '') . ' USD',
route('products.show', $product->slug) . ($variant ? '?variant=' . $variant->id : ''),
$product->mainImage()?->cdn_url ?? '',
$additionalImages,
$product->brand?->name ?? '',
$product->google_category_id ?? '',
$variant?->color ?? $product->color ?? '',
$variant?->size ?? '',
$product->gender ?? '',
$product->age_group ?? 'adult',
$salePrice,
$salePriceDate,
];
}
}
Configuration in Business Manager
After generating the feed:
- Commerce Manager → Catalog → Data Sources → Add Data Feed
- Specify the feed URL or upload the file manually
- Choose an update schedule: hourly, daily, or manual
- Assign the catalog to ad accounts
Meta provides error diagnostics in the Catalog → Issues section — each problematic item is marked with a reason description. A feed upload with more than 5% errors will result in the catalog being rejected for advertising.
Pixel + Catalog for dynamic retargeting: 30-40% lower CPA
For Dynamic Ads, a feed alone is not enough — you need to set up the Meta Pixel with events:
// Product page
fbq('track', 'ViewContent', {
content_ids: ['SKU-44231'],
content_type: 'product',
value: 49.99,
currency: 'USD',
});
// Add to cart
fbq('track', 'AddToCart', {
content_ids: ['SKU-44231'],
content_type: 'product',
value: 49.99,
currency: 'USD',
});
content_ids must exactly match the id field in the catalog — otherwise matching does not work. Catalog-based retargeting can reduce customer acquisition cost by an average of 30-40%.
Process and what's included
We offer turnkey feed configuration — with 5+ years of experience and 50+ successful projects:
- Current catalog audit — we check structure, mandatory fields, data errors.
- Feed creation — we write a generator for your CMS or ERP, configure TSV/CSV/XML.
- Testing — we upload a test batch, check in Meta Issues.
- Pixel integration — we add ViewContent, AddToCart, Purchase events.
- Deployment and monitoring — we set up auto-update, provide access to reports.
As a result, you get a working catalog, a correct feed, and configured retargeting. We guarantee first-time moderation pass — 95% of all errors are fixed in one iteration.
Contact us for a free evaluation of your catalog. Order feed setup, and we guarantee successful upload on the first try.
Timeline
Feed generator + data source setup in Business Manager — from 3 to 5 business days. Pixel integration and dynamic retargeting testing — another 2 to 3 business days. Exact timelines depend on catalog size and integration complexity.
We will evaluate your project for free. Contact us to get a consultation and cost estimate.







