Loading
Get Started with Communications, Media, and Energy & Utilities (CME)...
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Condition Weights

          Condition Weights

          Condition weight is a general property of context dimensions. Condition weights are numeric values ranging from 0 to 60. These values are used by the TightestMatchInterface to calculate the relative weight of rules assigned to a price list entry.

          Condition weight is only used for rules assigned to price list entries or child price lists and not for rules assigned to products and promotions. Because context dimensions are reusable, a context dimension might be used for rules for both price list entries and for products or promotions. The condition weight value is ignored on a context dimension used in a rule for a product or a promotion.

          Calculating Condition Weights

          When a product is added to the cart, the rules engine determines all of the qualified child price lists and price list entries based on the configured rules. Then, a weight is assigned to each qualified price list entry.

          With multiple price list entries, rules, and conditions, it is important to reduce the possibility for ties, so that a single price can be selected. Administrators can ensure that certain criteria can win over others by incrementing condition weight using integers. The Tightest Match algorithm further reduces the possibility of ties and uses bitwise operators for maximum processing speed, so the weights are calculated as 2n. For example, 21=2, 22=4, 23=8, 24=16, and so on.

          In the following formula, x is the condition weight set on the context dimension used by the child price list rule and y is condition weight set on the context dimension used by the price list entry rule.

          Condition Weight Formula

          Figure is described in preceding text.

          This formula ensures that price list entries on a child price list will win over price list entries on a parent price list if all other criteria are equal.

          Algorithm Assumptions

          The Tightest Match algorithm assumes:

          • Price list entries with no context rule are assigned a condition weight of 0, or 20, which equals 1.

          • Price list entries with a context rule that has a null condition weight are evaluated as 0, or 20, which equals 1.

          • Price list entries with condition weights that are greater than 60 default to 0, or 20, which equals 1.

          • Context rules on parent price lists are not evaluated.

          • If there are multiple price list entries with the highest weight for the same pricing variable (such as a One Time Charge or a Monthly Recurring Charge), the interface selects the most recently-created price list entry and applies that price to the variable in the line item.

          Calculating Multiple Condition Weights

          A rule can have multiple conditions, each with a different context dimension and condition weight. When there are multiple rule conditions, the rule conditions are joined together using the expression mode (AND or OR). The Tightest Match algorithm calculates multiple rule conditions as follows:

          • AND: Condition weights are summed together

          • OR: The highest condition weight is selected

          Calculating Multiple Rule Condition Weights

          When condition weights of 1, 5, and 2 are joined with AND, the result is 38, but when the same condition weights are joined with OR, the result is 32.

          Ensuring the Right Price Wins

          Using Tightest Match, you can more precisely control the selection of the right price by making slight increments to condition weights.

          For example, imagine you create two rules that evaluate multiple criteria such as sales channel, geographic region, customer segment, and SLA/service level, and your business objective is to prioritize existing customer service level agreements above other criteria. You can weight them as follows:

          Criteria

          Condition Weight

          Sales Channel

          1

          Geographic Region

          2

          Customer Segment

          3

          SLA

          4

          Then, you create two context rules as follows:

          • Rule #1 evaluates [Sales Channel] AND [SLA]

          • Rule #2 evaluates [Geographic Region] AND [Customer Segment]

          The total condition weight for Rule #1 is 1 + 4, and the total condition weight for Rule #2 is 2 + 3. If the condition weights were simply summed, these rules would tie. However, using the Tightest Match formula, the business objective of prioritizing the SLA/service level criteria is achieved because using bitwise operators, the total condition weights are not equivalent.

          • Rule #1 = 21 + 24 = 18

          • Rule #2 = 22 + 23 = 12

          To simplify your rules environment, the right approach is to leave the condition weight property blank for most context dimensions. Then, when you want to prioritize certain criteria, it is easy to weight conditions quickly because 21=2, 22=4, 23=8, 24=16, and so on.

           
          Loading
          Salesforce Help | Article