Sugar-Coated Salesforce CPQ – Unravelling Price Rules in the Candy Store World!

Whatsapp Link for Salesforce CPQ Group

Salesforce CPQ Interview Questions Part 1

Salesforce CPQ Interview Questions Part 2

Imagine you’re building a Salesforce CPQ system for a candy store. Wow It will be so much fun. How would you use price rules to handle special promotions, such as a “Buy One, Get One Free” offer for a specific candy? In the candy store scenario, how would you create a price rule to apply a discount of 20% to all chocolates during Valentine’s Day?

So, let’s jump in and Explore Price Rules in the Sugar-Coated Salesforce CPQ Universe! Yay 😊

Price Rule in Salesforce CPQ?

Imagine you have a candy store with different types of candies like lollipops, gummy bears, and chocolate bars. Each candy has a different price. Now, let’s talk about the Price Rule:

The Price Rule is like a special rule you create for your candy store. It helps you decide how to set the prices or apply discounts to different candies based on certain conditions.

For example, let’s say you want to have a “Buy One, Get One Free” offer for gummy bears candy. You can create a Price Rule that says whenever someone buys one packet of gummy bears, they get another packet for free. It’s like a special deal just for gummy bear lovers!

Or maybe you want to have a discount on lollipops for a limited time. You can create a Price Rule called “Lollipop Sale” that reduces the price of lollipops by 20% for one week. This makes the lollipops more affordable and encourages more people to buy them.

The Price Rule allows you to set different pricing actions and conditions for each candy type. You can define discounts, special offers, or even adjust the prices based on specific conditions like the quantity purchased or the customer’s membership status.

By creating Price Rules, you can make your candy store more exciting and attract more customers. It helps you set prices and apply discounts in a way that makes people happy and encourages them to buy their favorite candies.

Image

What is the structure of the Price Rule?

The price rule included three related records:

  1. Price Rule
  2. Price Condition
  3. Price Action

The price Rule has a Master-Detail relationship with Price Condition and Price Action.

By connecting the Price Rule with the relevant child Price Conditions, the pricing system ensures that the appropriate rules are applied based on specific conditions. Price Action defines the actions that need to be taken when the associated Price Conditions are met. It specifies how the pricing or other field values should be modified based on the rule criteria

1. Price Rule: The price rule contains all the specific rules for pricing in the candy store. It tells the store how to handle different situations when setting candy prices.

2. Price Condition: There’s someone in the store who checks the type of candy you want to buy. They make sure it meets certain conditions, like being a “Gummy Bear” or having a specific flavor.

3. Price Action: Once the candy passes the inspection, there’s someone who adjusts the price based on the price rules. They might give a discount, change the quantity, or do something special to make the price more appealing.

Significance of Fields in Price Rule

Fields play a significant role in price rules within Salesforce CPQ. Price rules use fields to define conditions, actions, and criteria that determine how pricing calculations and discounts are applied. Therefore, we will understand each field in Price Rule object and its importance with help of Candy Store Example.

A screenshot of a computer Description automatically generated

Difference between Calculator and Configurator Evaluation Scope in price rule in Salesforce CPQ?

A white and blue rectangle with a blue line Description automatically generated

The Evaluation Scope field is like using that magical calculator. When you have price rules with the Calculator Evaluation Scope, they are used by the calculator to decide how much something should cost. It has two picklist values:

  • Calculator Evaluation Scope – Scope is about using special rules to calculate prices.
  • Configurator Evaluation Scope – Following rules when you’re picking different options.

Let’s explain the difference between Calculator and Configurator Evaluation Scopes in Salesforce CPQ with a real-time example:

Imagine you’re going to a candy store to buy some delicious candies. You have a budget of $10, and you want to buy different types of candies based on their flavors.

Let’s explore how Calculator and Configurator Evaluation Scopes come into play:

1. Calculator Evaluation Scope:

– Imagine there’s a special offer where if you buy more than 5 candies, you get a 20% discount on the total price.

– This offer is an example of a price rule with the Calculator Evaluation Scope. The rule calculates the discounted price based on the quantity of candies you’re buying.

– So, if you add 7 candies to your cart, the Calculator evaluates the price rule and applies the discount, reducing the total cost.

2. Configurator Evaluation Scope:

– Now, let’s consider the flavors of candies available in the store: strawberry, chocolate, and lemon.

– There’s a rule in place that says if you choose strawberry-flavored candies, you cannot select lemon-flavored candies because they don’t go well together.

– This rule is an example of a price rule with the Configurator Evaluation Scope. It controls the availability of certain options based on your previous choices.

– If you already have strawberry candies in your cart, the Configurator evaluates the rule and prevents you from selecting lemon candies, ensuring you don’t end up with an incompatible combination.

In this above example

The Calculator Evaluation Scope helps calculate the total price of your candies based on special offers, discounts, and quantity.

The Configurator Evaluation Scope ensures that you follow certain rules when selecting different options, such as flavors, to avoid incompatible choices.

Explain calculator evaluation event?

A screenshot of a computer Description automatically generated

Let’s explain the Calculator Evaluation Events of “On Initiate,” “On Calculate,” “Before Calculate,” and “After Calculate” with a real-time example using the candy store scenario:

In Brief:

“On Initiate” marks the beginning of the candy calculation process.

“On Calculate” performs the actual price calculation of the candies.

“Before Calculate” applies any final checks or rules just before the calculation.

“After Calculate” allows for additional actions or surprises after the prices have been determined.

Let’s understand in more detail:

1. On Initiate:

– Suppose you have a price rule that states if the customer is a loyal member, they get a 5% discount on all candy purchases.

– This price rule would have the evaluation event set to “On Initiate.”

– When the customer initiates the price calculation process, such as by starting a new quote, the system checks if they are a loyal member and applies the 5% discount to all the candies in their cart from the beginning.

2. On Calculate:

– Imagine you have a price rule that offers a bulk discount if the customer buys more than 10 candies of any flavor.

– This price rule would have the evaluation event set to “On Calculate.”

– As the customer adds candies to their cart, the system continuously calculates the total quantity of candies. When it reaches or exceeds 10, the price rule is triggered, and a bulk discount is applied to all the candies in the cart.

3. Before Calculate:

– Let’s say you have a price rule that states if the customer has selected candies with a total price over $30, they receive a complimentary candy bag.

– This price rule would have the evaluation event set to “Before Calculate.”

– Just before the final calculation is performed, the system checks if the total price of the candies exceeds $30. If it does, the price rule is triggered, and a complimentary candy bag is added to the cart.

4. After Calculate:

– Suppose you have a price rule that gives a special promotional offer of “Buy 2, Get 1 Free” for a specific candy flavor.

– This price rule would have the evaluation event set to “After Calculate.”

– After the final calculation is completed, the system reviews the customer’s selected candies and identifies if they qualify for the “Buy 2, Get 1 Free” offer. If they do, the price rule is triggered, and the system adds the free candy to the cart.

By using these different Calculator Evaluation Events, you can apply specific discounts, offers, or modifications at different stages of the calculation process in Salesforce CPQ.

What is the significance of the “Condition Met” field in a Price Rule?

A screenshot of a computer Description automatically generated

Let’s explain the concepts of “Condition Met – All” and “Condition Met – Any” in using our candy store example:

1. Condition Met – All:

– Imagine you have a candy store with a special promotion: If a customer buys at least 5 candies and the total price exceeds $10, they receive a free candy bag.

– This price rule would have the condition met set to “All.”

– When a customer adds 5 or more candies to their cart and the total price of those candies exceeds $10, all the conditions are met!

– As a result, the system recognizes that the customer qualifies for the promotion, and a free candy bag is automatically added to their order at checkout.

2. Condition Met – Any:

– Now, consider a different price rule: If a customer purchases any candy with a specific flavor (e.g., “Cherry”), or if they buy more than 10 candies in total, they receive a discount of 20%.

– This price rule would have the condition met set to “Any.”

– When a customer either selects a candy with the “Cherry” flavor or adds more than 10 candies to their cart, any one of the conditions is met!

– As a result, the system applies the 20% discount to the qualifying candies, regardless of which condition triggered the discount.

In both scenarios, the “Condition Met – All” requires all specified conditions to be satisfied, while the “Condition Met – Any” only requires at least one condition to be met. These different approaches allow you to create customized pricing strategies based on specific combinations or individual criteria.

Can you explain Lookup Object field in a Price Rule with help of scenario?

A black rectangle with blue border Description automatically generated

In your candy store, you have different types of candies with unique features. The Lookup Object field in the Price Rule object is like a special connection that helps you apply specific rules to certain types of candies.

Imagine you have a candy called “Rainbow Lollipop,” and you want to create a special price rule for it. Here’s how it works:

1. Lookup Object Relationship:

– The Lookup Object field is like a bridge that connects the Price Rule to the “Rainbow Lollipop” candy.

– It helps you establish a special relationship between the Price Rule and this specific candy type.

2. Accessing Candy Information:

– Once the lookup relationship is established, you can access information about the “Rainbow Lollipop” candy within the Price Rule.

– You can find out details about the candy, such as its flavor, color

3. Applying Special Rules:

– By using the Lookup Object field, you can create special rules that only apply to the “Rainbow Lollipop” candy.

– For example, you can create a rule that offers a discount of 20% for every “Rainbow Lollipop” purchased.

By having this special connection between the Price Rule and the “Rainbow Lollipop” candy through the Lookup Object field, you can create unique and customized rules just for that candy type. It allows you to apply special offers, discounts, or other actions specific to the “Rainbow Lollipop” that make it stand out among other candies in your store.

Let understand in more in-depth:

The Lookup Object field in the Price Rule object is a feature that allows you to establish a relationship between the Price Rule and another object in your Salesforce org.

1. Establishing the Lookup Relationship:

– When creating a Price Rule, you can select a related object in the Lookup Object field.

– This establishes a lookup relationship between the Price Rule and the chosen object.

– The related object can be a standard Salesforce object (like Product or Account) or a custom object specific to your business needs.

2. Accessing Related Data:

– Once the lookup relationship is established, you can access the related data from the chosen object within the Price Rule.

– This means you can retrieve information from specific fields on the related object and use it in your price rule logic.

– For example, if the lookup object is set to “Product,” you can access the fields on the Product object, such as Product Name, Price, or any custom fields related to the product.

3. Utilizing Lookup Object in Price Rule Logic:

– With the Lookup Object field, you can leverage the related data from the chosen object to drive the conditions and actions of the price rule.

– For instance, you might create a price rule that applies a discount based on the value of a field on the related object.

– By referencing the fields on the related object, you can define conditions and actions that are dynamic and adaptable based on the values stored in the related object.

In summary, the Lookup Object field in the Price Rule allows you to establish a relationship with another object, retrieve data from that object, and use it in your price rule logic.

If we don’t put any object name in the lookup object field, then does it mean it won’t fetch data from that object and we cannot set condition based on a particular record?

That’s correct. If you don’t specify an object name in the Lookup Object field of the Price Rule, it means that the price rule won’t fetch data from any specific object. Without a lookup object specified, you won’t be able to set conditions or perform actions based on a particular record or data from another object.

The Lookup Object field is crucial for establishing a relationship between the Price Rule and a specific object. It enables you to access and leverage data from that object in your price rule logic. If you leave the Lookup Object field blank, the price rule will not have a connection to any object, limiting its ability to reference data from other records or apply conditions based on specific values.

What is the significance of Active checkbox in Price Rule?

A screenshot of a computer Description automatically generated

When the “Active” checkbox is checked, it indicates that the Price Rule is active and only then it will be evaluated during the pricing calculation process. Inactive price rules are not evaluated, and their conditions and actions are ignored.

How does the Evaluation Order field impact the application of Price Rules?

A white rectangle with black lines Description automatically generated

The “Evaluation Order” in a Price Rule is essential for defining the sequence in which the rules are evaluated during the pricing calculation process. It helps establish the priority and hierarchy of rules when multiple rules are applicable. Rules with lower Evaluation Order values are evaluated first.

Example of Evaluation Order:

Rule 1: Discount for Chocolate Bars

Evaluation Order: 1

Condition: Candy Type equals “Chocolate Bar”

Action: Apply a 10% discount on the price of the chocolate bar.

Rule 2: Buy One, Get One Free

Evaluation Order: 2

Condition: Quantity is greater than or equal to 2

Action: Provide a free candy for every two candies purchased.

In this example, Rule 1 has an Evaluation Order of 1, while Rule 2 has an Evaluation Order of 2.

Rule 1 will be evaluated first, followed by Rule 2.

Now, let’s see how the Evaluation Order impacts the pricing calculation:

Suppose a customer adds two chocolate bars to their cart. The Evaluation Order dictates the sequence of rule execution. Rule 1, with a lower Evaluation Order of 1, will be evaluated first.

Rule 1 (Evaluation Order 1):

Since the candy type is a “Chocolate Bar” (condition met), a 10% discount is applied to the price of each chocolate bar.

Rule 2 (Evaluation Order 2):

The quantity is 2 (condition met), but Rule 2 will not be evaluated because Rule 1 has already been applied.

As a result, the customer receives a 10% discount on each chocolate bar, and there are no changes due to Rule 2.

Note: Rule 1 is evaluated first, and Rule 2 is skipped because Rule 1 has already been applied. Only the first rule will be applied. This is because the Evaluation Order determines the sequence in which the rules are evaluated, and once a rule is applied, subsequent rules with higher Evaluation Order values are skipped.

What if we want both the price rules to get applied and none to get skipped based on Evaluation Order?

If you want both rules to apply without skipping any of them, you will need to ensure that both rules have the same Evaluation Order value. By assigning the same Evaluation Order to both rules, you indicate that they have equal priority, and both will be evaluated and applied if their respective conditions are met.

Let’s modify the example to illustrate this:

1. Rule 1: Discount for Chocolate Bars

– Evaluation Order: 1

– Condition: Candy Type equals “Chocolate Bar”

– Action: Apply a 10% discount on the price of the chocolate bar.

2. Rule 2: Buy One, Get One Free

– Evaluation Order: 1

– Condition: Quantity is greater than or equal to 2

– Action: Provide a free candy for every two candies purchased.

With this modification, both rules have an Evaluation Order of 1, indicating they have the same priority.

Suppose a customer adds two chocolate bars to their cart: Rule 1 and Rule 2, both with Evaluation Order 1, will be evaluated in the order they appear.

– Rule 1 (Evaluation Order 1):

– Since the candy type is a “Chocolate Bar” (condition met), a 10% discount is applied to the price of each chocolate bar.

– Rule 2 (Evaluation Order 1):

– The quantity is 2 (condition met), and as both rules have the same Evaluation Order, Rule 2 is also evaluated.

– The action of Rule 2 is executed, providing a free candy for every two candies purchased.

In this scenario, since both rules have the same Evaluation Order, they are evaluated in the order they appear, and both rules are applied if their conditions are met. The customer receives a 10% discount on each chocolate bar and receives a free candy due to Rule 2.

How can you define complex conditions using the Advanced Condition feature in a Price Rule?

A screenshot of a computer Description automatically generated

Let’s explain the Advanced Condition in a Price Rule using a candy example:

Rule Scenario:

– You want to create a price rule for candies that are of type “Gummy Bear,” have a flavor of “Strawberry,” or fall within a price range of $1 to $5.

Creating the Advanced Condition:

– With the Advanced Condition feature, you can define a complex condition that involves multiple fields and comparison values.

– In this case, you would set up Price Condition associated with price rule with the following components:

– Condition 1: Candy Type equals “Gummy Bear”

– Condition 2: Flavor equals “Strawberry”

– Condition 3: Price is between $1 and $5

(Candy_Type__c = ‘Gummy Bear’ && Flavor__c = ‘Strawberry’) || (Price__c >= 1 && Price__c <= 5)

As it Is (1 AND 2) OR 3 so we will implement this logic by using advance condition

What is the Product field in Price Rule?

A white rectangle with black lines Description automatically generated

Let’s explain the “Product” field in a Price Rule using a candy example in a simple and easy-to-understand way:

Imagine you have a candy store with a variety of candies, such as lollipops, chocolate bars, and gummy bears. Each candy has its own price. Now, let’s talk about the “Product” field in a Price Rule:

1. Selecting a Candy Product:

– The “Product” field in a Price Rule allows you to choose a specific candy from your store’s inventory.

– For example, you can select the “Gummy Bears” candy as the target product for the price rule.

2. Applying Pricing Actions to the Selected Candy:

– Once you have selected the “Gummy Bears” candy in the “Product” field, you can define pricing actions that will be applied specifically to that candy.

– Pricing actions can include things like discounts or special offers.

– For instance, you can create a price rule that provides a 10% discount on the price of the “Gummy Bears” candy.

3.Creating Fun Conditions (Optional):

You can also set fun conditions based on the characteristics of the selected candy.

For example, you can create a condition that applies the price rule only if the “Gummy Bears” candy is red in color.

We can add the product in the lookup object field instead of product field in salesforce so what is the difference?

You’re correct! In addition to selecting the product directly in the “Product” field of a Price Rule, you also have the option to reference the product through a lookup relationship field using a lookup object. Let’s explore the difference between the two approaches:

1. Product Field:

– When you select the product directly in the “Product” field of the Price Rule, you are associating the price rule directly with a specific product.

– This approach is useful when you want to define pricing actions or conditions that apply to a particular product or group of products.

– It is a straightforward way to target specific products within your catalog and define rules exclusively for those products.

2. Lookup Object:

– Using a lookup object, you can establish a relationship between the Price Rule and another object in Salesforce, such as a custom object or a standard object like an Account or Opportunity.

– This allows you to reference the product indirectly through the related object.

– By using a lookup relationship, you can define pricing actions or conditions based on data from both the related object and the associated product.

– This approach provides more flexibility in creating rules that depend on information from other objects in addition to the product itself.

The choice between using the direct “Product” field or a lookup object depends on your specific use case and requirements. If you only need to target and define rules for specific products, using the “Product” field is typically sufficient. However, if your pricing logic involves data from related objects or requires more complex relationships, utilizing a lookup object can be beneficial.

How do you specify the product groups to which the Price Rule applies?

Let’s explain the implementation of product groups in Price Rules using a candy example:

1. Define Product Groups:

-Create a custom “Product Group” field on the product object. Set the value of field with

  • Gummy Candies
  • Chocolate Candies

2. Assign Product Attributes:

– Set the “Product Group” field in product object to “Gummy Candies” for gummy bear and gummy worm products.

– Set the “Product Group” field in product object to “Chocolate Candies” for chocolate bar and chocolate-covered nuts products.

3. Create or Edit a Price Rule:

– Create a new Price Rule or edit an existing one by clicking on the “New” button or selecting the desired Price Rule.

4. Associate with the Product Object:

– In the Price Rule record, locate the lookup field or product field that allows you to associate the Price Rule with the object containing the “Product Group” field (in this case, the Product object).

5. Define Conditions:

– Within the Price Rule, define the price conditions that specify the product groups.

– Choose the field that represents the product group, such as the “Product Group” field on the associated object (Product object).

– Set the appropriate operator (e.g., “Equals”) and the desired value for the product group (e.g., “Gummy Candies”).

Example: Condition 1

– Field: Product: Product Group

– Operator: Equals

– Value: “Gummy Candies”

Example: Condition 2

– Field: Product: Product Group

– Operator: Equals

– Value: “Chocolate Candies”

6. Specify Pricing Actions:

– Once the conditions are met, define the pricing actions you want to apply to the products in the targeted product groups.

– Configure the pricing actions based on your requirements, such as setting discounts, adjusting prices, or applying any other desired pricing logic.

Example: Pricing Action 1

– If Condition 1 is met (Product Group equals “Gummy Candies”), set a 10% discount on the affected products.

Example: Pricing Action 2

– If Condition 2 is met (Product Group equals “Chocolate Candies”), set a special price on the affected products.

What are some best practices for designing and configuring Price Rules in Salesforce CPQ?

1. Define Clear Pricing Requirements:

– Clearly define your pricing requirements and understand the desired pricing behavior.

– Identify the pricing strategies, discounting rules, and custom calculations needed.

2. Plan Price Rules Structure:

– Plan the structure of your Price Rules in a logical and organized manner.

– Break down complex pricing scenarios into smaller, manageable Price Rules.

– This improves maintainability and makes troubleshooting and modifications easier.

3. Use Descriptive Rule Names:

– Give meaningful and descriptive names to your Price Rules.

– This helps identify and understand the purpose of each rule, especially when dealing with many Price Rules.

4. Set Logical Evaluation Order:

– Set the Evaluation Order field on the Price Rule object appropriately.

– Control the sequence in which Price Rules are evaluated and applied.

– Ensure the evaluation order aligns with your intended pricing logic and requirements.

5. Test and Validate Price Rules:

– Thoroughly test and validate your Price Rules with various test scenarios.

– Verify that the pricing results align with the expected outcomes.

– Test different combinations of conditions, product configurations, and pricing scenarios.

6. Leverage Advanced Conditions:

– Utilize the Advanced Conditions feature to implement complex rule criteria.

– Combine multiple conditions using logical operators (AND, OR) and functions.

– This allows for more intricate rule logic and fine-grained control.

7. Regularly Review and Update Rules:

– Regularly review your Price Rules to ensure they remain aligned with evolving pricing strategies and business requirements.

– Update rules as needed to reflect changes in products, pricing models, or discounting strategies.

8. Document Price Rule Logic:

– Document the logic and reasoning behind your Price Rules.

– This serves as a reference for future modifications and helps with knowledge transfer within the team.

Can Price Rules be used to update field values on a record? Explain.

No, Price Rules in Salesforce CPQ are primarily used for pricing calculations and adjustments rather than directly updating field values on a record.

While Price Rules can affect the pricing outcomes and results, they are not designed to directly update field values on a record outside of the pricing context.

What is the difference between a Price Rule and a Discount Schedule?

Price Rules is used to define dynamic and conditional pricing logic, allowing for complex calculations and actions based on specific conditions. On the other hand, Discount Schedules provide a standardized approach to apply predefined discounts uniformly across multiple products or pricing scenarios. Price Rules offers more flexibility and customization options, while Discount Schedules offer a consistent and streamlined way to manage discounts.

Let’s explain the difference between a Price Rule and a Discount Schedule using a candy example:

Price Rule:

– A Price Rule allows you to define specific pricing actions or adjustments based on certain conditions for individual candies or groups of candies.

– For example, you can create a Price Rule that applies a 10% discount to all gummy bear candies during a promotional period.

– Price Rules provide flexibility to apply different pricing logic, discounts, or adjustments based on various conditions for specific candies or groups of candies.

Discount Schedule:

– In the same candy store scenario, a Discount Schedule would be used to manage standardized discounts that apply across multiple candies.

– A Discount Schedule provides a consistent approach to apply predefined discounts uniformly.

– For example, you can create a Discount Schedule called “10% Off” that offers a 10% discount on all candies storewide.

– Discount Schedules help maintain consistent pricing across different candies or pricing tiers, ensuring that the same discount is applied to multiple products without needing individual Price Rules.

Did you enjoy this article?
Signup today and receive free updates straight in your inbox.
I agree to have my personal information transfered to MailChimp ( more information )
50% LikesVS
50% Dislikes