Global Product Restriction

Global Product Restriction

Considering the different needs and availability of products across the global market, ESW allows retailers to restrict products from being sold in specific countries using a custom product-level attribute.

By configuring this ESW attribute, you can prevent selected products from being purchased in specific countries while still keeping them visible on the storefront.


Restricting Products

To restrict a product in selected countries, follow these steps:

  1. Navigate to Merchant Tools → Products and Catalogs → Products
  2. Enter the Product ID to locate the product
  3. Open and lock the listed product
  4. Locate List of countries where product is restricted under ESW Configurations
  5. Enter the ISO country code for each country where the product should be restricted
    • To add multiple countries, click Add another value
  6. Click Apply

Shopper Experience

Once a product is restricted:

  • The message below is displayed to the shopper:
    This product is not available in your country
    
  • Product price information is hidden
  • The Add to Cart button is disabled

This behaviour applies across SFRA storefronts.


Cart Behaviour on Country Change

If a shopper adds a product to the cart and then changes the selected country to one where the product is restricted, the following message is displayed:

The cart consists of items that are not salable in your country

This behaviour is consistent in SFRA.


Important Notes & Limitations

  • Product restriction applies to all product types, including:
    • Standard Products
    • Variation Products
    • Variation Masters
    • Product Sets
    • Product Bundles
  • If a restricted product is part of a product set, the product set must be manually restricted as well.
  • Restricted products:
    • Remain visible on the storefront
    • Are not purchasable in restricted countries

SEO & Architecture Considerations

  • Hiding products entirely from the storefront may negatively impact SEO.
  • Restricting products at the search-result level requires post-processing of Product Search Results.
  • Post-processing can introduce issues such as:
    • Pagination errors
    • Caching inconsistencies
    • Ajax load verification problems
    • Direct URL access issues

SFCC does not recommend post-processing Product Search Results.
Alternative approaches like Search Refinements are also incompatible with the current ESW plugin architecture.


Bulk Products Restriction Management

You can update, delete, or modify restricted country values for multiple products using either of the following methods:

  • Bulk update via Attributes in Business Manager
  • Bulk update via XML Import

Bulk Update via Attributes in Business Manager

  1. Navigate to Business Manager → Merchant Tools → Products and Catalogs → Products
  2. In the Product Search section, click the By ID tab
  3. Locate List of IDs, enter the product IDs, and click Find
  4. Click Select all, then choose Edit all / Edit Selected
  5. Select Update/Delete Product Attributes, then click Next
  6. Click Select attributes and select:
    eswProductRestrictedCountries
    
  7. Enter the ISO country codes
  8. Click Finish or Go to Batch Process to complete the update

Bulk Update via XML Import

  1. Create an XML file containing:
    • catalog-id
    • product-id
    • Country ISO codes under a custom-attribute
  2. Navigate to Merchant Tools → Products and Catalogs → Import & Export
  3. Upload the XML file under Import & Export files
  4. Open the Import & Export module
  5. Click Imports under Catalogs
  6. Select the uploaded XML file and click Next
  7. Choose Merge or Replace
  8. Click Finish

Sample XML File

<?xml version="1.0" encoding="UTF-8"?>
<catalog xmlns="http://www.demandware.com/xml/impex/catalog/2006-10-31">
  <product product-id="701642853695">
    <custom-attributes>
      <custom-attribute attribute-id="eswProductRestrictedCountries">
        <value>FR</value>
        <value>GB</value>
      </custom-attribute>
    </custom-attributes>
  </product>

  <product product-id="701642853718">
    <custom-attributes>
      <custom-attribute attribute-id="eswProductRestrictedCountries">
        <value>FR</value>
        <value>DE</value>
        <value>SE</value>
      </custom-attribute>
    </custom-attributes>
  </product>
</catalog>