1. Home
  2. Knowledge Base
  3. General Feed Tips
  4. Why ISO 4217 is Used for Google, Facebook, and Bing in XML Feeds

Why ISO 4217 is Used for Google, Facebook, and Bing in XML Feeds

Introduction

When generating XML feeds for Google, Facebook, and Bing, it is essential to format currency values correctly to ensure they are processed accurately. These platforms adhere to the ISO 4217 standard, which specifies how currencies should be represented, including their decimal and thousand separators.

Facebook: https://www.facebook.com/business/help/120325381656392?id=725943027795860

Google: https://support.google.com/merchants/answer/7052112?hl=en

Bing: https://learn.microsoft.com/en-us/advertising/transaction-message/reference

Understanding ISO 4217

ISO 4217 is the international standard for currency codes and formatting. It ensures consistency in financial data across different platforms and countries. One of its key elements is the formatting of numerical values, which includes:

  • Decimal separators: The standard mandates that decimals be represented with a period (.).
  • Thousand separators: The standard typically avoids using thousand separators to prevent parsing errors.
  • Currency codes: ISO 4217 uses three-letter currency codes (e.g., USD, EUR, JPY) instead of symbols.

Why Google, Facebook, and Bing Require ISO 4217

When submitting product feeds to Google Merchant Center, Facebook Catalog, or Microsoft Bing Shopping, currency values must comply with ISO 4217 rules to avoid feed errors. These platforms enforce a uniform standard for currency formatting because:

  1. Prevents Data Misinterpretation: Some countries use commas (,) as decimal separators and periods (.) for thousands (e.g., 1.000,50 instead of 1,000.50). If not standardized, this can lead to incorrect price parsing.
  2. Ensures Consistency: By using the same decimal (.) format, platforms can accurately interpret price values regardless of regional differences.
  3. Mandatory Feed Compliance: Google, Facebook, and Bing reject feeds that do not adhere to their required formatting.

How Our Plugin Handles ISO 4217 Formatting

  • Prices are always formatted using a period (.) as the decimal separator.
  • No thousand separators are included to prevent parsing issues.
  • The correct three-letter currency code (e.g., USD, GBP, EUR) is appended to the price values.

For example:

Incorrect Format (Regional)Correct ISO 4217 Format
1.234,56 EUR1234.56 EUR
10,500.99 USD10500.99 USD
5.000,75 GBP5000.75 GBP

Common Issues and Fixes

If your feed is rejected due to currency formatting errors, check for:

  • Incorrect decimal separators (use . instead of ,)
  • Use of thousand separators (remove them entirely)
  • Missing currency codes (ensure prices include the proper three-letter code)

What If I Want To Use Regional Separators

Caution: If you use this snippet please note that we aren’t able to provide support if you face issues.

First, ensure that your currency options are set to your preference. In most cases the thousand separator is a dot(.) and the the decimal separator is a comma(,)

image

Now, add the relevant snippet to your functions.php or through the WPCode plugin:

First is to add this snippet so all your feed/templates will following the your preferred decimal and thousands separator

// Force localization for all feeds
add_filter('adt_product_feed_localize_price_args', function($args) {
    $args['decimal_separator'] = '.';
    $args['thousand_separator'] = ',';
    return $args;
});

Then add one or all of the following to remove the ISO4217 Format for Facebook, Google & Bing

//Google Feeds
add_filter('adt_pfp_localize_price_iso4217_feeds', function($feeds) {
    // Remove all Google feeds from ISO4217 formatting
    return array_filter($feeds, function($feed) {
        return strpos($feed, 'google_') !== 0;
    });
});

//Facebook Feeds
add_filter('adt_pfp_localize_price_iso4217_feeds', function($feeds) {
    // Remove all Facebook feeds from ISO4217 formatting
    return array_filter($feeds, function($feed) {
        return strpos($feed, 'facebook_') !== 0;
    });
});

//Bing Feeds
add_filter('adt_pfp_localize_price_iso4217_feeds', function($feeds) {
    // Remove all Bing feeds from ISO4217 formatting
    return array_filter($feeds, function($feed) {
        return strpos($feed, 'bing_') !== 0;
    });
});

A full code of say wanting to remove ISO 4217 Format for Google is

// Force localization for all feeds
add_filter('adt_product_feed_localize_price_args', function($args) {
    $args['decimal_separator'] = '.';
    $args['thousand_separator'] = ',';
    return $args;
});

add_filter('adt_pfp_localize_price_iso4217_feeds', function($feeds) {
    // Remove all Google feeds from ISO4217 formatting
    return array_filter($feeds, function($feed) {
        return strpos($feed, 'google_') !== 0;
    });
});

Refresh the feeds once you’ve added the snippets. It’ll result to something like this:

image
Was this article helpful?

Related Articles

Complete Your Purchase
AdTribes WooCommerce Product Feed

The best WooCommerce product feed plugin

  • AdTribes Pty Ltd
    ABN: 40 675 636 816