Loading
Ongoing maintenance for Salesforce HelpRead 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
          Use the Discount Distribution Service Element

          Use the Discount Distribution Service Element

          To calculate discounts that can be spread evenly across all line items or specifically across a subsection of line items, use the Discount Distribution Service element.

          Required Editions

          User Permissions Needed
          To create pricing procedures: Salesforce Pricing Design Time

          Let’s look at a scenario where we are applying a $300 discount equally across a laptop and a printer on their net unit price.

          1. Create a pricing procedure. To create a pricing procedure, follow the first 5 steps in Configure Your Pricing Procedure.
          2. 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
            Remember, Discount Distribution Service doesn't support derived products on quote line items, so don't map your Is Derived variable.
          3. Add the List Price element to fetch the base price of the product.
            Under Lookup Table Details, select the Price Book Entries 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
          4. Add the Discount Distribution Service element.
            Important
            Important You can only add the Rounding Values and Aggregate Price element after the Discount Distribution Service element in a pricing procedure.
          5. Select the line items that must be eligible for a discount. In our example, we aren't selecting any because we want all input line items in the quote to be considered for calculation.
            If you've selected either of the options, this is how the procedure would read the information.
            Lookup Table

            Discounts are distributed across all line items based on the decision table you select to retrieve data from.

            Define participating conditions

            Discounts are applied to quotes based on the conditions you set. For example, you could set a condition to apply discounts to quotes where the product category is Electronics and the product's Net Unit Price doesn't exceed $150.

          6. Map these variables.
            • Input Variables
              • Header Discount Type: HeaderDiscountType
              • Header Discount Value: HeaderDiscountValue
              • Header Distribution Logic: HeaderDistributionLogic
              • Header Distribution Type: HeaderDistributionType
              • List Price: ListPrice
              • Quantity: LineItemQuantity
              • Line Item: Lineitem
              • Input Unit Price: ListPrice
              • Minimum Net Unit Price: MinimumNetUnitPrice
            • Output Variables
              • Discount Value: LineItemDiscountValue
              • Distribution Type: LineItemDiscountType
              • Discount Type: LineItemDiscountType
              • Net Unit Price: NetUnitPrice
              • Subtotal: ItemNetTotalPrice
          7. Click Pricing Procedure Builder iconand select Include in Output.
          8. Finally, set your preferences to view pricing information, profile access, and rank information.
          9. Save your procedure.
          10. Click Simulate to test your procedure.
            Specify the input values for a laptop and printer along with the header discount details which is a $300 discount that must be equally or proportionally applied across all line items.
          11. Test your input values by specifying the discount distribution logic as Equals and click Simulate again.
            Discount Equally Spread
          12. Now, change your input values by specifying the discount distribution logic as Proportionate and click Simulate again.
            Discount Proportionally Spread

          Now, let's use the same scenario to learn how floor limits are set and how you can store the remainder amount for future use. Go back to the Discount Distribution Service element and select Set floor price limit. Here, under the Floor Price Limit section, select Store remainder amount and map the TotalRemainderAmount tag to the Total Remainder Amount variable.

          Floor Price Limit

          Let's simulate this scenario. In your input value, change the HeaderDiscountValue as $900 instead of $300.

          Upon simulation, since we've provided floor prices (the Minimum Net Unit Price) for the printer and laptop, after applying discounts equally across the products, you'll see a remainder amount after the system honors their floor prices. This remainder amount value is then written back to the TotalRemainderAmount tag.

          Total Remainder Amount JSON

           
          Loading
          Salesforce Help | Article