Troubleshoot Your Feed

Once you've completed setting up your feed, use these solutions and guidelines for any feed issues you might encounter:


Feed Rules

Fix and prevent ongoing feed upload errors with rules. You can provide rules that Facebook applies to each feed upload. Specify your rules by the attribute (column) they should apply to, by the type of rule, and by parameters. You currently cannot use rules with the Batch API. You can provide these types of rules:

  • Mapping Rule - Maps attributes (column names) in a feed file to attributes we can recognize.
  • Value Mapping Rule - Maps fields (column values) in a feed file to fields we can recognize.
  • Letter Case Rule - Change case of words in a field. For example, change all uppercase descriptions to lower case.

For example, you can fix these issues with Mapping and Value Mapping Rules:

  • Attribute typos from gavailability to availability
  • Fix unrecognized enums InStock to in stock
  • Price format from 45$ to 45.00 USD
  • Translate Condition: Neu under Condition: New

You can use Letter Case Rules to address these types of issues:

  • Change descriptions in all caps BRAND NEW WITH LEATHER DETAIL... to Brand new with leather detail...
  • Fix titles in all caps FACEBOOK T-SHIRT to Facebook T-shirt

Suggested Rules

You can get suggested rules from Facebook to fix errors in your feed. To see suggested rules for your upload session, follow these steps:

Step 1: Retrieve upload sessions:

https://graph.facebook.com/{API_VERSION}/{PRODUCT_FEED_ID}/uploads

Step 2: Retrieve errors for upload session:

https://graph.facebook.com/{API_VERSION}/{UPLOAD_SESSION_ID}/errors

Step 3: Retrieve suggested rules for upload error:

curl -i -X GET 
 "https://graph.facebook.com/{API_VERSION}/{UPLOAD_ERROR_ID}/suggested_rules?access_token={ACCESS_TOKEN}

Sample Reponse

"data": [
  
    "attribute": "description",
    "type": "letter_case_rule",
    "params": [
      
        "key": "type",
        "value": "capitalize_first"
      
    ]
  
]

For details, see Suggested Rules API, Reference.


Apply Rules to Feeds

To apply rules to a feed, you need to associate the rule to the feed.

Make an HTTP POST call to:

https://graph.facebook.com/{API_VERSION}/{PRODUCT_FEED_ID}/rules?attribute={ATTRIBUTE}&rule_type={RULE_TYPE}&params={PARAMS}

Example

curl -i -X POST 
  -d "attribute=google_product_category" 
  -d "rule_type=mapping_rule" 
  -d "params=%7B'map_from'%3A%20'gcategory'%7D" 
  -d "access_token={ACCESS_TOKEN}" 
  "https://graph.facebook.com/<API_VERSION>/{PRODUCT_FEED_ID}/rules" 

Sample Response

"id": "{RULE_ID}"

You should format params as follows:

Rule Type Format Example Notes

Mapping Rule

"map_from": <string>

"map_from": "gavailability"

Value Mapping Rule

<string> : <string>

"InStock": "in stock"

For value mapping rule, the number of mappings is limited to 10 and length of strings to 20.

Letter Case Rule

"type": one of : "capitalize_first", "capitalize_all", "to_upper", "to_lower"

"type": "capitalize_first"

For details, see Product Feed Rules API, Reference.


Get Current Rules

To list all rules associated with a feed, make a HTTP GET call to:

https://graph.facebook.com/{API_VERSION}/{PRODUCT_FEED_ID}/rules

For details, see Product Feed Rules API, Reference.


Update and Delete Rules

To change a rule associated with a feed, make an HTTP POST call to update any parameters and HTTP DELETE to delete it. You can only update parameters. If you want to change attribute or rule_type, you must delete and re-create the rule.

https://graph.facebook.com/{API_VERSION}/{PRODUCT_FEED_RULE_ID}?params={PARAMS}

For details, See Product Feed Rule API, Reference.


Troubleshoot Missing Items in a Catalog

If Catalog Manager reports that some items in your catalog are missing or can't be found, you may need to check that your Facebook pixel or app have been set up properly. You may encounter this error when:

  • The content_id included in your pixel or app event doesn't match the ID in the catalog's data feed.
  • The pixel or app isn't associated to the catalog.
  • The item doesn't exist in the catalog.

Learn more here.


Feed Upload Error Report

You can use the Feed Upload Error Report API to request a full error report for any feed upload session. Once we receive the request, we run a background job to prepare these errors and store them in a CSV file.

The report contains information about:

  • Retailer ID of the item that had an error
  • Error message
  • Error severity (FATAL if the error caused item to be rejected, WARNING if item was uploaded but with an error)
  • Field names on which this error was thrown
  • Capabilities that are being affected by this error; for example, errors affecting dynamic ads that contain 'da' within this column
  • If the error blocks capability (true/false); for example, if the error prevents the item from being shown on this surface

Request a Full Error Report

To request a full error report, use POST /{upload_session_id}/error_report.

Example

curl -i -X POST \
  -F 'access_token=ACCESS_TOKEN' \
  https://graph.intern.facebook.com/<API_VERSION>/<upload session ID>/error_report

Response The response indicates if the request was successful or not:

{
  "success": bool,
}

Get the Error Report Status

Once a report has been requested, use GET /{upload_session_id}?fields=error_report to get the status of the error report.

Example

curl -i -X GET \
 https://graph.intern.facebook.com/<API_VERSION>/<upload session ID>?fields=error_report&access_token=ACCESS_TOKEN

Response

{
  "error_report": {
    "report_status": string,
    "file_handle": string, // if available
  }
  "id": "332552650711532 (https://developers.intern.facebook.com/tools/explorer/690422434302374?method=GET&path=332552650711532%3Ffields%3Derror_report&version=v3.2#)"
}

Possible Values - Returned Status

ValueDescription

NOT_REQUESTED

The error report for this feed upload has not been requested.

REQUESTED

The request was received and is being processed.

CREATED

The report creation was successful and is waiting to be written to a CSV file.

WRITE_FINISHED

The report file has been prepared and is ready to be downloaded.

SESSION_DATA_NOT_FOUND

There was no data found for this feed upload session, it is likely that there were no items processed for this feed upload.

ERROR_REPORT_OUTDATED

The error report is older than 30 days and is no longer available.

FATAL_ERROR

Something went wrong on our end while trying to prepare this error report. You can request for an error report to retry.

Note: A CDN URL using this error report can be downloaded and will be returned as “file_handle” when the status of the error_report is WRITE_FINISHED.