Loading
Salesforce now sends email only from verified domains. Read More
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
          Example: Apply Discounts Sequentially for a Product

          Example: Apply Discounts Sequentially for a Product

          In this scenario, let's apply discounts to the laptop sequentially. The first discount is calculated from the list price, and each subsequent discount is applied to the previously discounted price.

          Required Editions

          Available in: Lightning Experience
          Available in: Enterprise, Unlimited, and Developer Editions of Revenue Cloud where Salesforce Pricing is enabled
          User Permissions Needed
          To create pricing procedures: Salesforce Pricing Design Time

          Implementing this discount involves a few key steps.

          1. Create price adjustment tier records.
          2. Create custom or use existing Salesforce objects to hold your price adjustment data.
          3. Define decision tables, setting criteria (like product, price adjustment tiers) and their adjustments (types and values).
          4. Map these custom decision tables to the org’s pricing recipe.
          5. Create a procedure output resolution record to build a strategy to calculate discounts sequentially.
          6. Use the Price Adjustment Matrix to calculate these discounts.

          Create Price Adjustment Tier Records

          Since we’re creating a custom decision table using the Price Adjustment Tier Salesforce object to hold your price adjustment data, create a few price adjustment tiers to apply your discounts.

          1. Create a price adjustment tier record.
          2. Specify these details.
            1. Price Adjustment Schedule: Standard Price Adjustment Tier
            2. Product: Laptop
            3. Tier Type: Amount
            4. Tier Value: 100
            5. Lower Bound: 10
            6. Upper Bound: 20
            7. Effective From: 01-03-2025
            8. Product Selling Model: One Time
          3. Click Save & New.
          4. Create another price adjustment tier record with these details.
            1. Price Adjustment Schedule: Standard Price Adjustment Tier
            2. Product: Laptop
            3. Tier Type: Amount
            4. Tier Value: 150
            5. Lower Bound: 21
            6. Upper Bound: 40
            7. Effective From: 01-03-2025
            8. Product Selling Model: One Time
          5. Click Save & New.
          6. Create a third price adjustment tier record with these details.
            1. Price Adjustment Schedule: Standard Price Adjustment Tier
            2. Product: Laptop
            3. Tier Type: Amount
            4. Tier Value: 200
            5. Lower Bound: 41
            6. Effective From: 01-03-2025
            7. Product Selling Model: One Time
          7. Save your changes.
          8. Close the tabs for the new price adjustment tiers that you just created.
          9. On the Details tab, on the Standard Price Adjustment Tier page, select Active.
          10. Save your changes.

          Create a Custom Decision Table

          Each attribute value on a line item must resolve to a single unique row in the decision table. Salesforce Pricing doesn't support retrieving multiple outputs for the same attribute value. Set up your decision table to map each specific input value to only one discount entry.

          1. From the App Launcher, search for and select Lookup Tables .
          2. Select Decision Table.
          3. Specify these details.
            1. Enter a name and then press Tab to autopopulate the API Name. For our example, we’re calling the decision table, Procedure Output Resolution.
            2. Select Pricing as the application usage.
            3. Select Advanced as the decision table type.
          4. Click Save & Next.
          5. Specify these decision table details.
            1. Source Object: Price Adjustment Tier.
            2. Set the following condition.
              Set the source object field as Product2Id and the operator as Equals.
            3. Set another condition for the name.
              Set the source object field as Name and the operator as Equals.
          6. Ensure that the Condition Type is set to All conditions are met (AND).
          7. Specify the result details.
            1. Source Object Field: TierValue.
            2. Column Name: TierValue.
            3. Source Object Field: AdjustmentType.
            4. Column Name: AdjustmentType.
          8. Click Save & Next.
          9. Click Save & Next again.
          10. Click Finish.
          11. Activate your decision table.

          Configure Lookup Relationships for Multi-Value Attributes

          To apply multiple discounts to a single line item, you must establish a relationship between your transaction object and your adjustment data.

          1. From Setup, in the Quick Find box, find and select Object Manager.
          2. From Object Manager, find and select the object holding your adjustment data (e.g., Price Adjustment Tier).
          3. Under Fields & Relationships, create a custom field with the Lookup field type.
          4. Select your primary transaction object (e.g., Quote Line Item) as the reference object. This mapping allows a single line item to associate with multiple adjustment records.
          5. In your Context Definition, create a node to represent the adjustment object.
          6. Complete the Context Mapping to link the fields from your adjustment object to the context attributes.
          7. Map these new context tags to the variables in your Pricing Procedure to allow the engine to retrieve the list of values.
          8. On a record's Related tab, verify that you can associate multiple adjustment records with one line item.
          9. In the Pricing Procedure, click Simulate. The engine should now resolve all associated values for the line item and apply the discounts according to your sequence.

          Map the Variables in Your Custom Decision Table

          1. From Setup, in the Quick Find box, find and select Pricing Recipes.
          2. Choose the pricing recipe that you want to modify. For our example, select NGPDefaultRecipe.
          3. On the Price Adjustment Matrix tab, click Modify.
          4. Select the custom decision table created by you. Here, select Procedure Output Resolution.
          5. Map the following variables.
            1. AdjustmentValue: TierValue
            2. AdjustmentType: AdjustmentType
          6. Save your changes.

          Create a Procedure Output Resolution Record

          1. From the App Launcher, find and select Price Management.
          2. From the app navigation menu, select Procedure Output Resolution.
          3. Click New.
          4. Specify these details.
            1. Name: Sequential_Pricing
            2. Pricing Element: Price Adjustment Matrix
            3. Resolution Formula: SEQUENCE(TierValue)
          5. Activate your procedure output resolution record.
          6. Save your changes.

          Create a Constant for a Resolution Strategy

          1. Create a pricing procedure. To create a pricing procedure, follow the first 5 steps in Configure Your Pricing Procedure.
          2. On the Pricing Procedure builder canvas, click Pricing Elements icon.
          3. On the Resource Manager panel, click Add Resource.
          4. In the Add New Resource page, specify these details.
            1. Resource Type: Constant
            2. Resource Name: ResolutionStrategySequence
            3. Data Type: Text
            4. Default Value: Sequential_Pricing. This is the procedure output resolution record that you created in the step above.
          5. Save your changes.

          Use the Price Adjustment Matrix Element to Apply Discounts Sequentially

          1. Click Add Element iconto add the Pricing Setting element and map these variables.
            • Input Variables
              • Line Item: LineItem
            • Output Variables
              • Price Waterfall: price_water_fall
              • Net Unit Price: NetUnitPrice.
              • Subtotal: ItemNetTotalPrice
          2. Add the List Price element to fetch the base price of the product.
            Under Lookup Table Details, select the Price Book Entries V2 decision table and map these variables.
            • Input Rule Variables
              • Product: Product
              • Price Book: PriceBooks
              • Product Selling Model: ProductSellingModel
            • Input Variables
              • Quantity: LineItemQuantity
            • Output Variables
              • List Price: ListPrice
              • Subtotal: ItemNetTotalPrice
          3. Add the Price Adjustment Matrix element.
            Under Lookup Table Details, select the Procedure Output Resolution decision table. This is the custom decision table that we created.
          4. Select Enable Output Resolution.
          5. Map these variables.
            • Input Rule Variables
              • Product: Product
              • Price Adjustment Tier Name: Contributor
            We’ve mapped the price adjustment tier name variable to a generic tag called Contributor to track the price adjustment tier records. If you want to define a custom tag, you can edit your context definition and add a tag and map it accordingly.
            • Input Variables
              • Quantity: LineItemQuantity
              • Input Unit Price: ListPrice
            • Resolution Variables
              • Resolution Strategy: ResolutionStrategySequence
              • Use As List: Price Adjustment Tier Name
                Important
                Important If you want to select multiple rows for a line item, the input rows in the selected decision table should have at least one column with unique values. The value in that column is what we’ll use in tag associated with the Use As List resolution variable.
          6. Click Pricing Procedure Builder iconand select Include in Output.
          7. Finally, set your preferences to view pricing information, profile access, and rank information.
          8. Save your procedure.
          9. Click Simulate to test your procedure. Enter the input values for your laptop product and click Simulate again.
            The price waterfall shows that the pricing engine has sequentially applied all the discounts associated with different price adjustment tiers for the Laptop product, confirming that your procedure is working as expected.
            Sequential Discounts Waterfall
           
          Loading
          Salesforce Help | Article