---
schema_version: "1"
id: b83cf5608540d0ac489c7ea1e1c6c6ededb0de6186f6fb782cd21996b7f33b78
title: "Example: Limit Product Visibility in a B2B Store Based on Qualification Rules"
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/commerce/264-0-0/comm_example_qualificationrules.md
canonical_url: https://help.salesforce.com/s/articleView?id=commerce.comm_example_qualificationrules.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 999595db08de8cc83f534fb95331724124d8e2386dfed7ed77d7016016ab7ec2
description: Alpine Coffee sells to retailers across the United States. Two of the distributors for Alpine Coffee are Alpine Distributor and Go Coffee Distributor. This example uses disqualification rules to specify that buyers for Alpine Coffee see products and product categories that are specific to Alpine Coffee, and buyers for Go Coffee see products and product categories that are specific to Go Coffee.
products:
  - Commerce
  - B2B Commerce
release: "264"
---
# Example: Limit Product Visibility in a B2B Store Based on Qualification Rules

Alpine Coffee sells to retailers across the United States. Two of the distributors for Alpine Coffee are Alpine Distributor and Go Coffee Distributor. This example uses disqualification rules to specify that buyers for Alpine Coffee see products and product categories that are specific to Alpine Coffee, and buyers for Go Coffee see products and product categories that are specific to Go Coffee.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition"><colgroup><col></colgroup><tbody><tr class=""><td class="slds-cell-wrap" style="vertical-align:top;"><a href="https://help.salesforce.com/s/articleView?id=commerce.comm_editions.htm&amp;language=en_US" target="_blank">View supported editions</a>.</td></tr></tbody></table>

To enable this scenario, we’ve created a custom field, AccountCategory, on the Account object to differentiate between distributors in our store. See [Create a Custom Field](https://help.salesforce.com/s/articleView?id=platform.adding_fields.htm&language=en_US). For Alpine Distributor, the value of AccountCategory is AlpineSupply, and for Go Coffee Distributor, the value is GoSupply. The goal is for buyers for Alpine Distributor to see products from only the category AlpineSupply, and buyers for Go Coffee Distributor to see products from only the categories GoBar, GoBrew, and GoGoo. Category disqualification rules can specify the appropriate visibility for the two distributors.

These are steps to implement this example.These steps assume that qualification rules are enabled in the store. See [Enable Qualification Rules in Your B2B Commerce Store](https://help.salesforce.com/s/articleView?id=commerce.comm_enablequalificationrules.htm&language=en_US).

1. Create an account category field for product and product category disqualification rules.
    1. At the top of the page, click ![Settings icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-commerce-comm-264-0-0-production-enus/d863e308-482a-4dfa-8d20-2a94737d394a/comm/images/comm_setup_icon_no_border.png) and select **Setup**.
    2. Select Object Manager, and in the Quick Find box, enter and select **Product Category Disqualification**.
    3. Click **Fields & Relationships**.
    4. Create the field AccountCategory of the type Picklist, and save your changes.
2. Create the product category disqualification rule.
    1. In the App Launcher, find and select **Product Category Disqualification**.
    2. Click **New**.
    3. Select the product, and the effective from and effective to dates for the disqualification rule.
    4. Save your changes.
3. Extend the context definition and map the AccountCategory attribute.
    1. At the top of the page, click ![Settings icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-commerce-comm-264-0-0-production-enus/d863e308-482a-4dfa-8d20-2a94737d394a/comm/images/comm_setup_icon_no_border.png) and select **Setup**.
    2. In Quick Find, find and select **Context Definitions** under Context Service.
    3. Select **Extend** from the quick actions menu for **CommerceProductDiscoveryContext**.
    4. Enter **ExtendCommerceProductDiscoveryContext** as the name of the extended context definition, and save your changes.
        
        The extended context definition is listed in the Custom Definitions tab under Context Definitions. Add the
        
        **AccountCategory** attribute to the extended context definition. Changes made to the context are visible within the Structure tab of the extended context definition.
    5. Click **Map Data**.
    6. Select **Edit SObject Mapping** from the quick actions menu for CommerceProductQrMapping.
    7. Select the account node, and map the AccountCategory attribute.
        
        ![Screenshot of CommerceProductQRMapping with AccountCategory field](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-commerce-comm-264-0-0-production-enus/d863e308-482a-4dfa-8d20-2a94737d394a/comm/images/b2b_comm_qualificationrules_qrmapping.png)
    8. Save your changes, and activate the extended context definition.
4. Update decision tables to look up the qualification rules.
    1. In the App Launcher, find and select **Lookup Tables**.
    2. Select **Commerce Category Disqualification Decision Table**.
    3. Deactivate the decision table. You cannot edit an active decision table.
    4. Click **Edit**.
    5. Add a lookup field corresponding to the AccountCategory attribute you created earlier.
        
        ![Screenshot showing AccountCategory added as a field in the decision table](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-commerce-comm-264-0-0-production-enus/d863e308-482a-4dfa-8d20-2a94737d394a/comm/images/b2b_comm_qualificationrules_decisiontable.png)
    6. Save your changes.
        
        You can view the updated table from the Table tab of the decision table.
    7. Activate the updated decision table.
5. Associate the extended context definition with a qualification procedure.
    1. In the App Launcher, find and select **Qualification Procedures**.
    2. Select **Commerce Default Qualification Rule Procedure**.
    3. Click **Edit**.
    4. Select the context definition you created earlier, to associate it with the qualification procedure.
    5. Save your changes.
6. Add the custom attribute to the qualification procedure.
    1. Click Commerce Default Qualification Rule Procedure under Qualification Procedure Versions.
    2. Add the AccountCategory attribute to the Category Disqualification element.
    3. Save your changes and activate the qualification procedure.
7. Update the procedure plan.
    1. At the top of the page, click ![Settings icon](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-commerce-comm-264-0-0-production-enus/d863e308-482a-4dfa-8d20-2a94737d394a/comm/images/comm_setup_icon_no_border.png) and select **Setup**.
    2. In Quick Find, find and select **Procedure Plan Definitions**.
    3. Select **Default PQ Procedure Plan Definition**.
    4. Deactivate the procedure plan.
    5. Select the updated context definition and qualification procedure.
    6. Save your changes and activate the procedure plan.

#### See Also

- [Manage Qualification Rules for Products in Revenue Cloud](https://help.salesforce.com/s/articleView?id=ind.product_catalog_qualification_rules.htm&language=en_US)
- [Manage Qualification Rules for Products in Revenue Cloud](https://help.salesforce.com/s/articleView?id=commerce.comm_qualificationrules.htm&language=en_US)