Sync products to facebook data feed
On this page
StoreConnect provides a Facebook Catalog Data Feed automatically via an automatically generated XML file. To make your feed active you only need to ensure your products meet the necessary prerequisites below.
The Facebook Catalog Data Feed is a list of all products to be uploaded and kept synchronized with a Facebook Commerce Manager account.
A Facebook Commerce Manager account is the management platform for the Facebook network including Facebook Marketplaces and Instagram.
StoreConnect also automatically generates a Google Merchant feed from the same products.
Prerequisites
To have a product show up in the merchant feed, the following must be true of each product:
- Active is checked and the product is not deleted.
- Available On is a date and time in the past.
- The product is in an active product category within the store’s taxonomy, or it is a variant of a master product that is. If the store has more than one taxonomy, the feed uses the one with the lowest Position.
- Include in Merchant Feed (
s_c__Sync_To_Google__c) is checked on the product. New products have it checked by default. - The price in the store’s price book is greater than
0, and Hide Price is unchecked on the price book entry. - The product has at least one image. A variant with no image of its own uses the master product’s first image.
- Meta Title is set. A variant with a blank Meta Title uses the master product’s value.
Discontinue On does not remove a product from the feed. To take a discontinued product out of the feed, uncheck Include in Merchant Feed. To show shipping in the feed, the product must also have shipping options defined.
Once all requirements have been met, the product shows up within 6 hours in the /merchant_feed/facebook.xml file on your store site.
What is the merchant_feed/facebook.xml file?
This is a file StoreConnect automatically rebuilds every 6 hours. The first rebuild runs 1 hour after the application is deployed, so the exact times vary. View it at https://store.example.com/merchant_feed/facebook.xml, substituting your store’s domain. When downloading, use your browser’s private mode to get the most current version. Otherwise, you could download an older version from your cache.
Each store has its own separate feed file. If stealth mode is enabled on the store, the feed URL returns a 404 Not Found and the feed is not rebuilt.
You cannot trigger a feed rebuild yourself. The Trigger reindex button in My StoreConnect refreshes the storefront search and category listings only, and does not rebuild the merchant feeds.
This file is used by Facebook to promote your StoreConnect products to the Facebook network via the Facebook Commerce Manager.
The feed generates a file that looks like this:
```xml
<?xml version=”1.0” encoding=”UTF-8”?>
```
The following table shows which attributes set each field.
| Facebook Field | StoreConnect Field |
|---|---|
| g:id | Shows the Product2 Id field |
| g:title | Shows the Product2 s_c__Display_Name__c or if blank, the Name field |
| g:google_product_category | Generated from the s_c__Google_Product_Category__c fields on the nested product categories of this product |
| g:product_type | Generated from the s_c__Display_Name__c or if blank, the Name fields on the nested product categories of this product |
| g:link | Created from your Store Domain name plus the products sub path and the Product2 s_c__slug__c field |
| g:image_link | The public link to the first Product2 Media item sorted by the Media.s_c__Position__c field |
| g:condition | Shows the Product2 s_c__Condition__c field |
| g:availability | Shows In Stock or Out of Stock depending on stock level. Always “In Stock” unless Product2 s_c__Track_Inventory__c is checked |
| g:price | Shows the Store Pricebook entry price for this product with the Store Currency |
| g:sale_price | Shows the Store Pricebook entry s_c__sale_price__c for this product with the Store Currency |
| g:brand | Shows the name of the associated Brand on the product (an Account object) if defined |
| g:mpn | Shows the Product2 s_c__Supplier_Code__c field |
| g:description | Shows the contents of the Product2.s_c__Search_Description_Markdown__c field if present, otherwise Product2.s_c__Summary_Markdown__c field. This field is first parsed through a liquid filter and then converted from Markdown to HTML (keeping any HTML in there). The field then has any tag that is not supported by Google Merchant feed listed at https://support.google.com/merchants/answer/6324468 removed and line breaks inserted as appropriate. If the Search Description and Summary fields on the product are blank, StoreConnect will attempt to put the brand, name and meta description into this field separated by hyphens. |
| g:shipping | Shows any shipping options available for this product, there can be more than one shipping option depending on your StoreConnect configuration and are shown in a string separated by commas |
| g:shipping_weight | Shows the s_c__shipping_weight__c field of the product with the s_c__Shipping_Weight_Unit__c |
| g:shipping_length | Shows the s_c__shipping_length__c field of the product with the Shipping_Dimensions_Unit__c |
| g:shipping_width | Shows the s_c__shipping_width__c field of the product with the Shipping_Dimensions_Unit__c |
| g:shipping_height | Shows the s_c__shipping_height__c field of the product with the Shipping_Dimensions_Unit__c |
Terms
Feed: A ‘feed’ is a file containing information necessary to provide up-to-date content as soon as it becomes available. As the information changes, the ‘feed’ will update accordingly. This ‘feed’ is used by social media and shopping platforms to maintain up-to-date content information.
Was this article helpful?
Thanks for your feedback! It helps us improve our docs.