Skip to main content

Create a Selection Product Rule

Follow Along with Trail Together

Want to follow along with an expert as you work through this step? Take a look at this video, part of the Trail Together series. 

(This clip starts at the 24:30 minute mark, in case you want to rewind and watch the beginning of the step again.)

Introduction

Product Rules can do more than just trigger warning messages like our Alert rule. They can also change how sales reps are allowed to interact with options. You can use Product Rules to set an option as preselected or required under certain circumstances, or automatically hide an option from view under other conditions. These types of rules are called Selection rules.

Create a Selection Rule to Hide an Irrelevant Option

AW Computing sometimes coordinates with a partner to install the Home Security Console bundle. In those circumstances the partner works directly with the customer to agree on installation fees, so AW Computing doesn’t need to sell the Home Security Installation product. Let’s create a rule that hides the installation product from the bundle when the Quote has a defined partner.

Two versions of a Feature, one that has no Home Security Installation

This rule both simplifies the configuration process for the sales reps and prevents them from accidentally adding a product that doesn’t belong.

  1. Click Product Rules from the navigation bar.
  2. Click New.
  3. In the Product Rule Name field, enter Hide Installation.
  4. For the Type field, choose Selection.
  5. For the Scope field, choose Product.
  6. For the Evaluation Event field, choose Load.
    This tells Salesforce to run the rule when the configuration page loads.
  7. Check Active.
  8. For the Conditions Met field, choose All.
  9. Click Save.

Create an Error Condition to Control When the Rule Fires

For this example, we just want to check that the Partner field on the quote has been populated. In other words, that the Partner field is not blank.

  1. On the Error Conditions related list, click New.
  2. For the Tested Object field, choose Quote.
  3. For the Tested Field field, choose SBQQ__Partner__c.
  4. For the Operator field, choose not equals.
  5. For the Filter Type field, choose Value.
    Leave the Filter Value field blank, as that’s what we’re looking for. In other words, if SBQQ__Partner__c is not blank, a partner exists and Salesforce fires the rule.
  6. Click Save.

Hide and Remove the Home Security Installation Option

This new rule is different than the Alert rule because it does more than just show a message. Selection Product Rules must have an Action, which describes what to do to one or more options. There are a number of things you can do with Actions, like automatically check or uncheck an option, disable an option, or hide the option entirely. Hiding is what we’re going to do.

  1. On the Actions related list, click New.
  2. For the Type field, choose Hide & Remove.
    If the sales rep previously checked the installation option, CPQ unchecks it before hiding, thus the Remove portion of Hide & Remove.
  3. In the Product field, search for and select Home Security Installation.
  4. Click Save.

Apply the Product Rule to the Home Security Console Bundle

You’re almost done. The last step is to add a Configuration Rule so that CPQ knows the rule should run when configuring the Home Security Console bundle.

  1. In the Configuration Rules related list, click New.
  2. Check Active.
  3. In the Product field, search for and select Home Security Console.
  4. Click Save.

Test the Home Security Installation Selection Rule

Your new rule is ready to test. You should try both a positive and a negative test to make sure all is well. First, you add the Home Security Console bundle to a quote that doesn’t have a partner associated with it and check that installation appears. Second, you add the Home Security Console bundle to a quote that has a partner and check that installation is hidden. Here’s how. 

  1. Click Accounts in the navigation bar.
  2. Click The Fernando Estate.
  3. Click the Related tab.
  4. From the Quotes related list, click Q-00011.
  5. Click Edit Lines.
  6. Click Add Products.
  7. Check the box next to the Home Security Console product.
  8. Click Select.
    You should still be able to see Home Security Installation as an option. There’s no need to go any further in saving the quote.
  9. Click Cancel, Cancel, and Cancel again.
  10. Click Edit.
  11. In the Partner field, search for and select Pyramid Construction Inc.
  12. Click Save.
  13. Click Edit Lines.
  14. Click Add Products.
  15. Check the box next to the Home Security Console product.
  16. Click Select.
    The Home Security Installation option should be gone. There’s no need to go any further in saving the quote.
  17. Click Cancel, Cancel, and Cancel again.

Great work, you now have a bundle that responds dynamically to outside factors. You can create Product Rules that use any Quote field to drive behavior, even formula fields.

Resources

Partagez vos commentaires sur Trailhead dans l'aide Salesforce.

Nous aimerions connaître votre expérience avec Trailhead. Vous pouvez désormais accéder au nouveau formulaire de commentaires à tout moment depuis le site d'aide Salesforce.

En savoir plus Continuer à partager vos commentaires