Skip to main content

Replace List Price Using a Simple Price Rule

Learning Objectives

After completing this unit, you’ll be able to:

  • Describe the benefit of using a price rule over multiple price books.
  • Create a price rule involving price conditions and price actions.
  • Describe how to evaluate data on the quote and related records.
  • Test price rules to ensure they operate as expected.

The Case for List Price Adjustment

Salesforce CPQ is designed to help sales organizations operate at peak efficiency. A big part of that is to make the quoting experience streamlined so sales reps can make quotes quickly and accurately. But let’s not forget the role of the admin, we want your job to be easier too!

Let’s consider the following scenario. Currently, AW Computing sells a netbook for $500. However, it would like to offer schools a reduced price of $400. It’s the only product out of hundreds that gets a unique price, so how should the company handle this situation?

One option is to create a new price book with the one unique entry (and hundreds of duplicate entries). Then maintain the extra price book when any product is added. Then train sales reps to choose the right price book. Then make sure they don’t choose it when inappropriate. That sounds like a lot of work with lots of potential points of failure.

Or, you could create a simple price rule that automatically changes the price of the netbook whenever sales reps quote for an education customer. This solution helps both admins and sales reps, so it’s what you’re going to do for your first price rule.

Construct the Container

Every price rule starts with a price rule record. Seems obvious, but it’s just the first of three steps. The price rule record acts as a container of sorts for the price condition and price action records. It also has a few critical properties that can affect how the rule operates, but for this first price rule we skip over them so we can focus on the structure. You start by navigating to the Price Rules tab.

  1. Click the App Launcher (App Launcher icon), and click the Salesforce CPQ tile.
  2. In the navigation bar, click Price Rules.
  3. Click New.
  4. For Price Rule Name, enter Educational Netbook List Price.
  5. For Evaluation Scope, choose Calculator.
    Most price rules have a scope of Calculator. This badge focuses only on Calculator price rules, so you always choose that option.
  6. Check Active.
    The rule simply won’t run without Active checked. If you need to troubleshoot price rules, it can be useful to deactivate some rules to simplify all that occurs when CPQ calculates quote values.
  7. Click Save.

Great, you now have the start of a price rule. Next, you need to create some price conditions to determine if the rule should even run.

The Chemistry of Conditions

This price rule should only take effect some of the time. Specifically, only when AW Computing sells a netbook to educational customers. As a human that makes sense, but CPQ needs something more formal. That’s where price conditions come in, which are kind of like litmus tests. Remember back in chemistry class when you learned that a strip of blue litmus paper turns red when it touches an acidic solution? In the same way, a price condition represents whether something is true or false.

Price conditions compare two pieces of information. For this example, you need to compare the customer’s industry with the value “Education” to see if they match. If they do, the litmus paper turns red, so to speak.

The account object has a field named Industry, but in this example you need the information to exist on the quote object. For that reason, Team Trailhead has prepared a formula field on the quote named Account Industry. It returns a text version of what’s found on the account. With that in mind, let’s make a price condition.

  1. While on the price rule record, in the Price Conditions related list click New.
    You start by telling CPQ which piece of data you want to evaluate. In this case you want to look at the Account Industry field on the quote record.
  2. For Object, choose Quote.
  3. For Field, choose AccountIndustry__c.
    AccountIndustry__c is the API name of the Account Industry field. Team Trailhead added the API name to the Field picklist to make it easier to complete this exercise, but in real life, you have to add any fields you want to evaluate. When you do, always use the API name, since it’s unlikely it’ll ever change even if the Field Label does.
  4. For Operator, choose equals.
    There are a lot of ways to compare values, but for this example you want to check if industry is the exact value of Education.
  5. For Filter Type, choose Value.
    In this case, you have a specific, static value to use in your comparison: Education. In later units you investigate when to use other filter types.
  6. For Filter Value, enter Education.
  7. Click Save.

Excellent, your first litmus test/price condition, is complete. Now the rule will only ever run when the account industry is Education. But wait, there’s more testing to be done. You don’t want every single quote line to get a price of $400, only Netbook quote lines. So, you must create a second price condition that checks if the Product Code is NETBOOK.

  1. In the Price Conditions related list, click New.
  2. For Object, choose Quote Line.
    This time you’re evaluating information that exists on the quote line, so it’s critical to point CPQ to that object. Otherwise, it won’t find the field, and the condition cannot possibly be met.
  3. For Field, choose Product Code.
    For the record, Product Code is an out-of-the-box value, which is why it isn’t an API name.
  4. For Operator, choose equals.
  5. For Filter Type, choose Value.
  6. For Filter Value, enter NETBOOK.
  7. Click Save.

OK, you have a second test ready to go, nice job! In this example you want the rule to run only if the first test AND the second test are true. By default, price rules require all conditions to be met in order to run.

Now that both conditions are set up, it’s time to work on the last part of a price rule, the price action.

The Expected Result

The whole point of a price rule is to make some kind of change to a field on the quote, quote line, or quote line group. So as an admin, you must identify which field you want to change (the target), and how to change it (the source). In this example you want to update List Price on the quote line object, changing its value to $400. All of this is defined on the price action record, which you make right now.

  1. In the Price Actions related list, click New.
  2. For Target Object, choose Quote Line.
  3. For Target Field, choose SBQQ__ListPrice__c.
    This funky selection is the API name of the standard list price field that’s part of every CPQ installation. Like before, Team Trailhead put the API name into the picklist to simplify this exercise. If you want to target a different field, you have to add it to the picklist yourself.
  4. For Value, enter 400.
    This tells CPQ to use a simple static value as the source of the change. There are four other sources to choose from, which you’ll see in other price rules.
  5. Click Save.

Congratulations, your price rule is complete. To summarize:

  • IF Industry = Education and Product Code = NETBOOK
  • THEN Set List Price to 400

The only thing left to do is to check if the rule actually works. Let’s add a netbook to a premade quote prepared for Kevco, an account in the education industry.

  1. In the navigation bar, click Quotes, then choose the All list view.
  2. Click Q-00048.
    Notice that the Account Industry field has a value of Education.
  3. Click Edit Lines.
    The first time the page loads, it can take a few minutes. Subsequent page loads are faster.
  4. Click Add Products.
  5. Check Netbook.
    Note that in the Product Selection page, the netbook has a price of $500. That’s to be expected since that’s the price book price.
  6. Click Select.
    Now you should see the result of your hard work. CPQ knows to run price rules whenever a new product is added to the quote, so you already see a new list unit price of $400.
  7. Click Cancel.

Great, you’ve verified that the netbook gets a new list price under the right conditions. As a good admin, you should also test other conditions when the price shouldn’t be set to $400. For example, add other products to make sure their prices aren’t altered. Also, add the netbook to a quote for a noneducation customer. This is called negative testing, and you should always negative test.

One last thing to remember about testing. If you have the Quote Line Editor open in a separate tab from your price rule, and you make a change to the price rule, you must refresh the Quote Line Editor page. The changes to your price rule aren’t “loaded” into the page until a refresh.

Now that you’ve seen the if/then structure of a price rule, the next unit investigates how to create rules that evaluate sophisticated formulas in conditions and actions.

Resources

在 Salesforce 帮助中分享 Trailhead 反馈

我们很想听听您使用 Trailhead 的经验——您现在可以随时从 Salesforce 帮助网站访问新的反馈表单。

了解更多 继续分享反馈