Loading
Salesforce now sends email only from verified domains. Read More
Salesforce B2B Commerce
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Example: Limit Product Visibility in a B2B Store Based on Qualification Rules

          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

          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. 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.

          1. Create an account category field for product and product category disqualification rules.
            1. At the top of the page, click Settings icon 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 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
            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
            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 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.
           
          Loading
          Salesforce Help | Article