How to create a XML feed for Facebook Catalog Manager

How to create channel feeds for your Facebook and Instagram marketing through the Facebook Catalog Manager

 

In this article, we are going to show you how to set up an XML feed for Facebook Catalog Manager using Plytix. This requires you to have a Plytix account with the Channel feature enabled.

Setting up an XML Channel

Attributes for Facebook Catalog

Choosing products

Customizing the feed for Facebook's specifications

Processing the feed

 

💡Due to the similarities in feeds, if you already have an XML feed for Google Merchant Center created in Plytix, you can clone it for Facebook and then tweak it from there to work faster.

Setting up a XML Channel

As all Channels in Plytix, your XML Channel is customizable and lets you choose the products and attributes you want to use to automatically populate your template. So to get started you first need to create a Channel:

  1. Go to the "Channels" area in the top navigation menu
  2. Click "Add Channel"
  3. Select the XML format option 

Once inside the Channel, you need to select the attributes you want to be included in your Facebook Catalog XML feed. 

💡Once your first Facebook Catalog feed is set up, you can clone the Channel to easily create new feeds.

Attributes for Facebook Catalog

The first tab in your XML Channel set up is called "Attributes". This is where you add all the content you want to appear in your XML feed.

ℹ️ In this article we will only use basic requirements to show the feed set up. 

Facebook Reference Material

Facebook's requirements could change at any time. Please refer to these documents provided by Facebook to have the most up to date information about setting up these feeds.

Choosing and Transforming Attributes

In the "Attributes" tab, you need to select the attributes you want to make up your feed.

  1. Click "Add Attributes"
  2. Select the attributes that have content (not necessarily the name) that matches the content you want to output in the feed (1).

    Example of how attributes are displayed in the PIM

💡All attributes can be configured to show a different output name and other handy output options. You can also create new attributes based on formulas by adding a Computed Attribute.


Now that you have selected your attributes, you may need to transform them. To make any transformations, click the "Options" icon next to the attribute or add a new Computed Attribute.

Common transformations Use
CONCAT formula in a Computed Attribute To set up new, competitive titles or descriptions based on other attributes 
ESCAPEHTML and ESCAPESTYLE operations To remove formatting to create plain text descriptions for Facebook
Image re-formatting from TIFF to JPEG or PNG To get an acceptable image format output
Image resizing To make sure all high-res images meet the file size requirements 
Math formulas To set the right price for Google Shopping
LOWER operation To set options to all lowercase

 

⚠️ Don't change the output labels in the "Attribute" tab. We will show you how to change the names directly in the XML feed later on in this article.

Choosing Products

Add a 'Product list' containing the products you want to include to your feed (1)

What your product view will look like when you start adding items to your feed

 

Customizing the feed to fit Facebook specifications

Next, navigate to the "Format" tab (1), to set up the feed so it conforms with the specifications set by Facebook. With the loaded attributes and product list, the feed is already generated to include the attribute data for each product (2). Below we we look at how to further define the XML feed.

Formatting the catalog manager feed

ℹ️ Learn more about working with the XML data format in Plytix by having a look here: Define Data Format For XML Channels

Example Feed

For this example, we will be using the following sample feed provided by Facebook:

Sample coding display when customizing a feed

Header

The first part <?xml version="1.0" encoding="UTF-8"?> is automatically applied by Plytix. 

RSS Node

Our first task is to add the RSS node. To do this:

  1. Click the "+ Add Node" button (1) on the top right of the "XML Configuration" area.
  2. A "Settings" panel will appear where you can customize the node (2).
Display of how to add RSS node

 

3. In the "Node Tag" input, write "rss" (1).

4. Then we add the 2 additional node attributes (2):

  • Attribute: xmlns:g value: http://base.google.com/ns/1.0
  • Attribute: Version value: 2.0

5. For each attribute to add, fill in the "Attribute" and "Value" fields, then click the "+ Add Attribute" button (2), then the attribute data will be added below.

6. Finally press "Save" at the top of the settings to add the node to the Feed builder (3).


Display of settings for a new node

Channel

We now add a 'channel' node as a sub node to the rss node. We do this by selecting the 'Add subnode' icon on the rss node (1). The new node will be automatically created with rss as its parent node (2). We change the 'Node Tag' to channel (3). and press 'Save' (4).

 

Next we will add <channel> as a sub node to the rss node. To do this:

  1. Select the "Add subnode" icon on the <rss> node (1). The new node will be automatically created with rss as its parent node (2).
  2. Change the "Node Tag" to "channel" (3)
  3.  Click "Save" (4).

Display of how to add a channel as a sub node to the RSS node

Leaf Nodes

We can now add title, link and description nodes. These three nodes must all share the <channel> node as parent and they must be created as Leaf nodes.

  1. On the "<channel>" node, click the "Add subnode" icon (1)
  2. Add the "Node tag" (2)
  3. Activate the "Leaf node" switch (3). This will give us a field where we can write in the values (4).
  4. Press "Save"
  5. Repeat these steps for the other nodes 

This will create the node as a direct subnode to <channel>. 

The 'LEAF' text in front of your node values simply indicate what type of node they are, this text will not be included in the feed.

adding title, link, and description as leaf nodes-1

 

Product Specifications

As you have maybe noticed in the examples above, the hierarchy for the 'products' and 'product' nodes do not yet conform to the specifications in the example feed.

To update this: 

  1. Go in to the settings of <products>, by clicking the settings icon (1)
  2. Change the "Parent node" to "channel"

This will move the product nodes under the channel node.

modifying your products  items-1

 

By default in Plytix, a product node is called <product>, so we need to change this to "item" in order to meet the Facebook specifications. To do this:

  1. Click the purple "PRODUCT" node's option icon (1).
  2. Then we change the "Node Tag" to "item" (2).
Item tag

 

Then we need to delete the green "Products" node that all our items currently live under. Facebook lists all their items one after the other and not under an "items" hierarchy level, which is why we do not need this green "Products" node.

To do this, click the red 'X' next to the Node (1).

Screenshot 2019-05-29 at 10.16.20-1


Our item node now got moved up a hierarchy level as the Products node got deleted, and we can now see that our feed content and hierarchy is starting to look a lot like what Facebook wants it to look like:

Comparison hierachy

Changing Attribute Names

Next we must change the attribute 'Node Tags' so they match Facebook's naming convention. Using the example we have been working with, we need to change the attribute names to the following: 

Name in Plytix Facebook Requirement
SKU g:id
Label g:title
Description g:description
product landing page g:link
Hero Image g:image_link
Brand g:brand
Availability g:availability
Condition g:condition
GTIN g:gtin


To change these names: 

  1. Click the "option" icon for an attribute node individually (1)
  2. Change their "Node Tags" (2), and a preview of the output name will display below the attribute names (3).
  3. Press "Save"
  4. Repeat for all attributes requiring a name change
changing the individual attributes-1

 

Processing the feed

Our feed is now completed. All our necessary data is there. Our hierarchy levels are in order, and naming conventions are adjusted for Facebook.

Here is a comparison from what Facebook needs, how it looks like in the feed builder, and how the output looks like in the preview for our feed:

 

completed feed-1

 

Processing

To finalize the feed, you need to process it. This will apply and update all your product information and generate a feed link and file that you can plug into Facebook Catalog Manager.

To process your feed: 

  1. Go to the top of the Channel area
  2. Click the "Process Now" button

Once the feed is completed processing, you will see a link to your feed appear (2). 

Processing your feed

This can be copied and pasted from Plytix into your Facebook Catalog Manager. Once your feed link is in Facebook, you can update and process your Channel to bring in new updates directly to Facebook Catalog without needing to replace the link. 

💡Schedule recurring processing in the "Settings" tab of your Channel to automate product content updates

 

What's Next

 

If you have any questions just click on the chat box in the bottom-right corner and we'll be happy to answer them...

 

and please let us know 👇