Warning: A non-numeric value encountered in /home/adfixonl/public_html/squarefeed.io/wp-content/themes/Divi/functions.php on line 5467

How to add inventory levels to your Facebook feed

If you’re planning on using the feed to power your Facebook Shop, then you might be required to add an additional column in your feed for inventory.

This column should send the actual quantity that you have on each product.

From our experience we noticed that some Squarespace merchants set some or all of their products to have ‘unlimited’ quantity. This can cause issue as Facebook only accepts numerical values on this column. Depending on your store set up, this is how you add the inventory field in your feed:

A. If you don’t have any SKUs with ‘unlimited’ quantity (this is the most common scenario)

  1. From your Squarefeed account, go to Field Mapping & Export
  2. Scroll to the bottom of the page and under Custom fields click on the Add field button
  3. Name the field inventory
  4. From the dropdown, select variants.0.stock.quantity
  5. Click Upload to Facebook Catalog

B. If you have any SKUs with ‘unlimited’ quantity

In this case we need an additional step: to define a rule that outputs a number for the items with unlimited quantity:

  1. Go to the Dynamic attributes section
  2. Click Add conditional rule
  3. Give the rule a name, such as inventory_normalized
  4. Select If condition: variants.0.stock.unlimited is true (note that the value is case sensitive)
  5. Fill in the number that should be set for this type of products (we recommend 100)
  6. Under Default value select variants.0.stock.quantity

Next, you have to map this newly created attribute to the Inventory column:

  1. From your Squarefeed account, go to Field Mapping & Export
  2. Scroll to the bottom of the page and under Custom fields click on the Add field button
  3. Name the field inventory
  4. From the dropdown, select the new attribute you just created inventory_normalized
  5. Click Upload to Facebook Catalog