Use restriction groups in Optimizely Configured Commerce to show or hide specific products from customers. Customers and products may belong to multiple restriction groups.
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, 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.
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.
All products are set to Show by default.
You can modify the Product Restrictions setting:
- Go to Catalog > Products in the Admin Console.
- Select Edit beside a product.
- Select Product Restrictions.
- 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.
- Go to Catalog > Products in the Admin Console.
- Select Edit beside a product.
- Select Product Restrictions.
- Toggle View only product to On.
Create a restriction group manually
- Go to Catalog > Restriction Groups.
- Click Add Restriction Group.
- Enter the Restriction Group Name (required) and an optional description.
- Click Continue.
- Add Rules using the Rules Engine for which customers to affect, if desired. You can also click Select Customers under Specific Customers.
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.
- 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.
You must enter rules or select specific customers to continue. Restriction groups cannot be created with excluded customers only.
- Click Continue.
- Next, choose restriction options.
- 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.
- Choose which websites the restriction group applies to. If the restriction group should not apply to all websites, choose Select websites > Assign Websites.
- Click Continue.
- Select the products affected by the restriction group. Enter rules using the rules engine, or select specific products.
- 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.
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.
- 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.
- Click Continue.
- 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.
- 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
- Click the Upload icon.
- Select Restriction Groups.
- Choose your file.
- 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.
- Click Import.
Export restriction groups
- Click the Download icon.
- Set Restriction Groups as what you would like to export.
- Select the columns to export.
- 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.
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:
- Go to Catalog > Validation Tool.
- Select a Website from the drop-down.
- Type a Customer Number or Company Name in the Customer search box to select a customer.
- Type a Product Number or Product Title in the Product search box to select a product.
- 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.
Please sign in to leave a comment.