Create an Alert Product Rule


Complex product bundles often need to be configured in specific ways, otherwise they just don’t work. Getting it wrong means you’ll have an unhappy customer on your hands. Thankfully, admins can use Salesforce CPQ to impose business logic in bundles that controls what sales reps can do during configuration. This logic is known as Product Rules.

Product Rules come in four flavors, depending on what you want to accomplish: Validation, Selection, Alert, and Filter. For this step, we use an Alert rule. Alert rules trigger warning messages when there’s a possible issue with the configuration. Sales reps can ignore the warning or return to configuration to fix what they forgot.

Create a Product Rule to Display a Warning Message

Your bundle includes an option for Window Sensors, and the option starts with a quantity of 1. You’ve discovered that sales reps often forget to change the quantity, selling only one window sensor when in reality customers usually need many. Your first Product Rule warns sales reps that they’ve left the quantity at 1.

  1. Click Product Rules from the navigation bar.
  2. Click New.
  3. In the Product Rule Name field, enter Window Sensor Warning.
  4. For the Type field, choose Alert.
  5. For the Scope field, choose Product.
    This tells CPQ to run the rule only when configuring a product, and not on the Quote Line Editor.
  6. For the Evaluation Event field, choose Save.
    The warning message appears only when the sales rep clicks Save (if there’s a problem).
  7. Check Active.
  8. For the Conditions Met field, choose All.
    This tells CPQ that it needs to meet all conditions—or tests—to trigger the warning. More about tests in a minute.
  9. In the Message field, enter This bundle only has one window sensor. Most customers need additional sensors for all ground-level windows.
  10. Click Save.

Your rule is part of the way complete, but we still have a few more things to do.

Create Error Conditions to Control When the Rule Fires

The warning message should only appear if the sales rep leaves the Window Sensor quantity as 1, otherwise they should be allowed to save in peace. To make your rule fire only under that condition we can create tests that CPQ checks for. One test is to see if the option is the Window Sensor product. The other is to see if the quantity is 1.

  1. In the Error Conditions related list, click New.
  2. For the Tested Object field, choose Product Option.
  3. For the Tested Field field, choose SBQQ__ProductCode__c.
    The Tested Object and Tested Field fields tell CPQ what data to look at. In this case we’re looking at the Product Code field from the CPQ managed package. Next we tell CPQ what value of the data should trigger the rule.
  4. For the Operator field, choose equals.
  5. For the Filter type field, choose Value.
  6. In the Filter Value field, enter WINDOWSENSOR.
    So, if SBQQ__ProductCode__c = WINDOWSENSOR, the condition is met.
  7. Now to save and create the second condition, click Save & New.
  8. For the Tested Object field, choose Product Option.
  9. For the Tested Field field, choose SBQQ__Quantity__c.
  10. For the Operator field, choose equals.
  11. For the Filter Type field, choose Value.
  12. In the Filter Value field, enter 1.
    Our test now formally describes if SBQQ__Quantity__c = 1.
  13. Click Save.

Great, we now have two tests that both must be true in order for the rule to fire. For example, if the sales rep changes the quantity to 2, then the second test will fail, and the rule won’t fire.

Just one more thing to set up for this rule.

Apply the Product Rule to the Home Security Console Bundle

As it stands, your nice Product Rule isn’t assigned to any bundles. You need to tell CPQ that your rule applies to 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.

Congratulations, you’ve finished your rule. To recap, you created a Product Rule that contained some basic properties. You then created two Error Conditions to test the configuration to see if the rule should fire. Lastly, you told CPQ to apply the rule to the Home Security Console bundle.

Test the Window Sensor Alert Rule

Your work in setting up the rule is done. Now let’s pretend to be a sales rep again to see what happens when you add the Home Security Console bundle with only 1 window.

  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-00010.
  5. Click Edit Lines.
  6. Click Add Products.
  7. Check the box next to the Home Security Console product.
  8. Click Select.
    The Window Sensor should already be checked, but if it’s not, check it.
  9. Click Save.
    Your rule should fire, showing a message in a popup.
    Configuration page with popup warning message.
  10. Click Cancel.
  11. Change the quantity of Window Sensor to 2.
  12. Click Save.
    You should not see warning message any more. Instead, Salesforce saves the bundle to the Quote Line Editor.

Fantastic, now your sales reps will remember to sell the right amount of Window Sensors, making sure their quote is right the first time.


  • 各自のキャリア目標に合わせてパーソナライズされたおすすめが表示される
  • ハンズオン Challenge やテストでスキルを練習できる
  • 進捗状況を追跡して上司と共有できる
  • メンターやキャリアチャンスと繋がることができる