---
title: Restrict groups by product
slug: configured-commerce/docs/restrict-groups-by-product
docTags: 
createdAt: 2026-08-13T10:46:32.000Z
---

Use restriction groups in Optimizely Configured Commerce to show or hide specific products from customers. Customers and products may belong to multiple restriction groups.

:::hint{type="info"}
**Note**

You must enable **Restrictions By Item** to use this feature. Go to **Administration > Settings > Restrictions By Item** and toggle on to **Yes**.
:::

**Examples:**

- Hero Heating and Cooling (HHC) sells HVAC products in the upper Midwest region of the United States and parts of Southern Canada. One of their vendors, Vendor A, signed a distribution contract with HHC on the contingency that Vendor A's products are sold only in Minnesota. HHC marks all of Vendor A's products with a default behavior of **Hide**, then creates a restriction group showing those products to customers with the Customer Ship To StateId of Minnesota.
  For [one-time ship-to addresses](docId\:dVysx3SKrQ0_kr9nIGpY7), the rules engine properly assesses whether location-based restrictions apply. This is also true when there are separate Bill-To and Ship-To addresses or when the Ship-To equals the Bill-To address.
- HHC carries various types of industrial coolant. Since these coolants are considered hazardous materials, HHC cannot ship them to their customers in Canada. HHC creates a restriction group hiding all products in the Industrial Coolant category from customers whose Country data field equals Canada.

## Restriction group behavior hierarchy

Both customers and products can belong to multiple restriction groups. Use this behavior hierarchy to determine which customer/product setting prevails.

- Hide restriction group > Show product setting
- Show restriction group > Hide product setting
- Hide restriction group > Show restriction group
- Show Only restriction group > All settings (if product is in multiple restriction groups)

This is how the hierarchy looks:

- With all restriction groups active, customers in show-only restriction groups see only the products in the groups (show-only wins, and every other product/group is hidden).
- With only show and hide groups active, customers in both restriction groups do not see products in the group (hide wins).
- With no groups active, the default product behavior determines if the product is available on the site.

:::hint{type="info"}
**Note**

If multiple show-only groups apply to the same customer, the products in all show-only groups display to users.
:::

## Product restrictions setting

The **Product Restrictions** setting determines if individual products appear on the website by default. Restriction groups can override these values. Products with **Hide** as the default value are hidden from the website unless overridden by **Show** or **Show Only** restriction groups. Products with **Show** as the default value are shown on the website unless overridden by **Hide** restriction groups.

:::hint{type="info"}
**Note**

All products are set to **Show** by default.
:::

You can modify the Product Restrictions setting:

1. Go to **Catalog** > **Products** in the Admin Console.
2. Select **Edit** beside a product.
3. Select **Product Restrictions**.
4. Select **Show** or **Hide** for Default Visibility. Restriction groups that affect the product override this setting based on the behavior hierarchy (see above).

## Mark products View only

The View only product option lets users see but not purchase a product. 

1. Go to **Catalog** > **Products** in the Admin Console.
2. Select **Edit** beside a product.
3. Select **Product Restrictions**.
4. Toggle **View only product** to **On**.

## Create a restriction group manually

1. Go to **Catalog** > **Restriction Groups.**
2. Click **Add Restriction Group**.
3. Enter the **Restriction Group Name** (required) and an optional description.
4. Click **Continue**.
5. Add **Rules** using the Rules Engine for which customers to affect, if desired. You can also click **Select Customers** under **Specific Customers**.

   ![RestrictionGroup_Step2.png](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/K_giJS6FP-OhgbGhl-uBT-20260720-144640.png)

   :::hint{type="info"}
   **Note**

   The **Customer Bill To Fields** rule type only applies to customers where the Bill To toggle = Yes. Similarly, the **Customer Ship To Fields** rule type only applies to customers where the Ship To toggle = Yes.
   :::

   - If using the rules engine to enter rules, select a **Rule Type**, then fill in the appropriate fields.
   - Alternately, choose not to use the rules engine, and click **Select Customers** under Specific Customers to pick customers affected by the restriction group. Select one or more customers, then click **Assign**. Click **Done** to save.
6. Click **Select Customers** under Exclude Customers to choose customers who fit the rules but are excluded from the restriction group. Select one or more customers to exclude, then click **Assign**. Click **Done** to save.

   :::hint{type="info"}
   **Note**

   You must enter rules or select specific customers to continue. Restriction groups cannot be created with excluded customers only.
   :::
7. Click **Continue**.
8. Next, choose restriction options.

   ![RestrictionGroup_Step3.png](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/2Ho8oWD0h1I9pF5LuoJGB-20260720-144640.png)

   - **Hide selected products** – Overrides products with a default setting of **Show**. If products are in multiple restriction groups, Hide overrides Show.
   - **Show selected products** – Overrides products with a default setting of **Hide**.
   - **Show only selected products** – Overrides all other groups and product default settings. You can use this to display a limited catalog.
9. Choose which websites the restriction group applies to. If the restriction group should not apply to all websites, choose **Select websites** > **Assign Websites**.
10. Click **Continue.**
11. Select the products affected by the restriction group. Enter rules using the rules engine, or select specific products.

    ![RestrictionGroup_Step4.png](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/qQaG3LfRK3icTQ9sUpqYF-20260720-144640.png)

    - If using the rules engine to enter rules, select a **Rule Type**, then fill in the appropriate fields.
    - Alternately, choose not to use the rules engine, and click **Select Products** under **Specific Products** to pick products affected by the restriction group. Select one or more products, then click **Assign**. Click **Done** to save.

      :::hint{type="info"}
      **Note**

      Select **Product in Category** to choose only products in that category. Select **Product in Category Branch** (only available for definition of products in restriction groups) to choose products in the category and its child categories at any depth.
      :::
12. Click **Select Products** under the Exclude Products header to choose products that fit the rules but are excluded from the restriction group. Select one or more customers to exclude, then click **Assign**. Click **Done** to save.
13. Click **Continue.**
14. Toggle **Active** to **On** to activate the restriction group. You must rebuild the product index. Click **Save and Rebuild Product Index** or wait for the nightly job to run.

    ![RestrictionGroup_Step5.png](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/1Xm6sLFaKUy3TciHzVX3T-20260720-144640.png)
15. Click **Save**.

## Import/export restriction groups

You can import and export restriction groups by specifying the child collection through the CustomerAdditions, CustomerExceptions, ProductAdditions, and ProductExceptions fields. You can find these options under **Catalog** > **Restriction Groups**. You can also bulk unassign products and customers from restriction groups via import.

### Import restriction groups

1. Click the **Upload** icon.
2. Select **Restriction Groups**.
3. Choose your file.
4. Change any **Import Options**, if desired.
   - **Validate file before importing** – Set to **No** by default. The process imports each record individually, records any potential errors, and then removes the record. Any errors display in a downloadable file.
   - **Ignore blank cells** – Set to **Yes** by default. This prevents the system from importing blank cells and overwriting existing data with null values.
   - **Update existing records** – Set to **Yes** by default. If yes, any imported records that match existing records update the existing records. If no, the system records an error for any record already existing in the database. This setting is intended to allow importation of new records only.
   - **Ignore modified date** – Set to **No** by default. Exported records include the ID and modified timestamp. If you re-import these records with changes, the system checks if the record was changed subsequent to the export and, if it was, records an error unless this setting is set to yes. If the modified date is not in the spreadsheet, this setting has no impact.
5.  Click **Import**.

### Export restriction groups

1. Click the **Download** icon.
2. Set **Restriction Groups** as what you would like to export.
3. Select the columns to export.
4. Click **Export.**

### Unassign customers and products via import

You can unassign both customers and products from restriction groups using an import. Add an **Unassign** column to your file, and use **True** or **Yes** to mark which items to unassing. If there is an existing relationships that matches the one in the file, the import clears the relationship. If the import does not find the relationship, it ignores the row.

Follow the [import steps above](docId\:wyob3tDYusP32wBpcAPMG).

## Cart validation

Because restriction groups are based on customer Bill To/Ship To fields, the user's cart must be re-validated every time a change is made to the user's selected Bill To/Ship To. The user's cart is re-validated if the user adds an item to their cart, then changes their Bill To/Ship To. The cart also is re-validated if the user adds an item to their cart, then changes their Bill To/Ship To so the warehouse changes and backorders are not allowed.

## Validation tool

Use the Validation Tool to confirm if a product is or is not visible to a customer. To determine the visibility of a specific product for a specific customer:

1. Go to **Catalog** > **Validation Tool**.
2. Select a Website from the drop-down.
3. Type a Customer Number or Company Name in the **Customer** search box to select a customer.
4. Type a Product Number or Product Title in the **Product** search box to select a product.
5. Click **Validate**.

The screen displays the ultimate result for the product ("Shown" or "Hidden") at the top of the screen. A list of all applicable restriction groups displays below, demonstrating how the system arrived at the ultimate result.
