Skip to main content

Durée estimée

Use Product Configurator with Business Rules Engine

Learning Objectives

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

  • Define configuration rules.
  • Explore different types of rule engines.
  • Create a rule-based configuration.

Configuration Rules and Constraints Overview

In Salesforce, configuration rules and constraints work together to define how products and attributes behave in Product Configurator.

  • Rules drive the configuration process by performing specific actions when certain conditions are met. They automatically include required items, exclude incompatible ones, filter options, or display alerts, making the configuration process smarter and faster.
  • Constraints define the logical restrictions within your product model. They enforce rules and conditions on product types, variables, and relationships to allow only valid configurations. Constraints help maintain consistency and prevent invalid or conflicting choices during product selection.

Together, configuration rules and constraints are the logic that ensure valid and streamlined product configurations.

Without these rules and constraints, sales reps might accidentally select incompatible components or miss required ones, leading to quote errors, fulfillment delays, and even order fallout. That’s exactly the challenge SmartBytes is facing. Errors not only delay order fulfillment, they erode customer trust and‌ lose business. Configuration rules and constraints ensure that only complete, accurate product configurations are submitted to configure deals.

Salesforce supports multiple rules engines to handle configuration logic, each offering different levels of flexibility and complexity. The two rules engines used in Product Configurator are:

  • Configurator with Business Rules Engine
  • Configurator with Constraint Rules Engine

Each rules engine supports configuration logic for different use cases and modeling needs. First, let’s explore Configurator with Business Rules Engine.

Configurator with Business Rules Engine

The Configurator with Business Rules Engine is a great fit for products with varying complexity. Product rules designers like Joey can quickly configure rules using a point-and-click UI for products or product bundles.

You can apply configuration rules at three different levels, depending on how broadly you want the logic to apply.

Scope

Description

Transaction

Apply rules across all line items in a quote or order. For example, limit the total number of accessories selected in a single transaction.

Bundle

Apply rules across child products within a bundle. This helps control how components interact, such as preventing incompatible accessories from being selected together.

Product

Apply rules directly to the attributes of a single product. Use this level to enforce valid attribute combinations, for instance, restricting a laptop with 8 GB RAM from being paired with a high-end graphics card.

Rule Types

The configurator supports three core rule types.

  • Validation Rules prevent invalid product selections. For example, if a sales rep tries to select both a wired and wireless keyboard for a laptop bundle, the configurator displays an error message and blocks the combination.
  • Exclusion Rules keep the user from selecting mutually exclusive products. For example, if a sales rep chooses an extended warranty, the standard warranty option is automatically unavailable.
  • Requirement Rules add necessary products or attributes based on other selections. For example, when you select a Laptop Pro bundle, a software license is automatically added to the quote.

At SmartBytes, the Laptop Pro Bundle includes a mouse by default. To align with the high-end positioning of the bundle, Joey wants to automatically set the mouse type to wireless during configuration, while still allowing the sales rep to change it if needed. Follow along with Joey to set it up.

Create a Rule-Based Configuration

Creating a configuration rule involves multiple steps.

Activate the Rule Library

Before creating configuration rules, activate the Rule Library to run the underlying product logic. Follow the steps in your Developer Edition org.

  1. From the App Launcher (“”), find and select Rule Libraries.
  2. From the list view dropdown, select All Rule Libraries.
  3. Click Configuration Rules, and in Rule Library Versions, click Product_Configuration_Rules_v2. It can take a few seconds for the page to load.
  4. From the quick-action menu, select Activate.
  5. Click Continue, and refresh the page to make sure the Rule Library is active.

Rule Library Version record with Details tab shown.

With the Rule Library now active, you’re ready to define how products interact using rules such as require, exclude, and validate.

Enable Configuration Rules

To start using configuration logic, you first enable it in your org.

  1. From Setup, in the Quick Find box, search for and select Revenue Settings.
  2. Enable Set Up Basic Configuration Rules.
    Set Up Basic Configuration Rules setting enabled.

You can now start creating configuration rules to guide product selections and ensure valid combinations during quoting.

Create a Configuration Rule

Time to create your first configuration rule.

  1. From the App Launcher (“”), find and select Product Configuration Rules.
  2. Click New and add these details:
  • Name: Validate wireless mouse
  • Description: Verify wireless mouse is selected
  • Start Date and Time: Today’s date
  • Status: Active
  • Sequence: 10
  1. Click Next.
  2. In the Scope Details, add:
  • Rule Scope: Bundle
  • Product Bundle: Laptop Pro Bundle
  1. In the Condition section, add:
  • Field: Product
  • Operator: Equals
  • Value: Laptop Pro Bundle
  1. In the Actions section, add:
  • Action: Set Default Attribute Value
  • Product: Mouse
  1. Click + Add Attribute, add:
  • Attribute: Wireless
  • Operator: Equals
  • Value: True
  • Message Type: Informational
  • Message: We recommend you to purchase a Wireless Mouse.
  1. Save your changes.

Edit Configuration Rule screen with conditions and actions defined for the rule.

The new rule is now active for use.

Validate the Configuration Rule

Next, Joey makes sure the rule is working as expected.

  1. From the App Launcher (“”), find and select Product Configuration Rules.
  2. From the list view, select All Product Configuration Rules and click Validate wireless mouse.
  3. Click the Validate button. You should see the message, “Product Configuration rule was validated”.

Product Configuration Rule record showing a successful rule validation message.

  1. Close the message.

Awesome! Joey is all set to test the rule.

Test the Configuration Rule

Once Joey creates and assigns the rule, he verifies how it behaves at runtime.

  1. From the App Launcher (“”), find and select Quotes.
  2. From the list view, select All Quotes, and click Office Supplies. Next, you add and configure the quote line items.
    Office Supplies quote page with the Browse Catalogs button highlighted.
  3. From the Office Supplies quote page, click Browse Catalogs.
  4. If the Choose Price Book window is displayed, make sure Standard Price Book is selected, and click Save.
  5. In the All Catalogs list, select Hardware Catalog, and click Next. The Hardware Catalog model window opens, which is the Product Discovery page.
  6. Under Categories, click Laptops. If you don’t see any products listed, close the Product Discovery window, refresh the quote, and repeat steps 2–5 again.
  7. From the displayed products list, select Laptop Pro Bundle, and click Configure..
  8. It displays the informational message just as defined.
    Configure Laptop Pro Bundle page with an informative message prompting the user to add a wireless mouse.

This preview helps Joey make sure that the rule behaves exactly as expected before he rolls it out to the sales team.

With the Configurator with Business Rules Engine, SmartBytes reps can quote Laptop Pro bundles more efficiently, avoiding missing items and invalid combinations.

Next Up

You’ve learned how to create a rules-based configuration. In the next unit, learn about constraint-based configuration. For now, it’s time to complete the Hands-On Challenge to create a configurator.

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