Loading
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 Rounding Values Element

          Use the Rounding Values Element

          Use the Rounding Values element to ensure that the output of any pricing element in a pricing procedure is rounded to the specified decimal place.

          Required Editions

          User Permissions Needed
          To create, update, and delete pricing procedures: Salesforce Pricing Design Time User

          Let's consider a scenario where you want to set conditions to only give discounts when a customer purchases 50 or more printer bundles, and you're calculating the discounts using a formula. For this example, let's set ItemNetTotalPrice to be rounded down to the first decimal point.

          Important
          Important In a multicurrency organization, the user's personal currency setting determines the currency code used during rounding operations, not the currency code parameter passed in the procedure context.

          Create a Constant for the Precision Variable

          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: PrecisionVariable
            3. Data Type: Number
            4. Decimal Places: 2
            5. Default Value: 1. This value specifies that the product's price should be rounded to one decimal place.
          5. Save your changes.

          Add the Rounding Values Element

          1. Now, 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 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 List Group element.
          4. In the list group, configure the List Operation by setting a condition that a 10% discount on the final price of the printers can only be applied if the user purchased over 50 units.
            • Filter Condition Requirements: All Conditions Are Met (AND)
            • Resource: # LineItemQuantity
            • Operator: Greater Than
            • Value: 50
          5. Within the list container, add the Formula Based Pricing element and specify these variable values.
            • Calculation Formula: ItemNetTotalPrice - ( ItemNetTotalPrice * 0.10 )
            • Output Variable: TotalLineAmount
          6. Outside the list container, add the Rounding Values element and specify these variables.
            • Fixed Input Variables
              • Precision: PrecisionVariable
            • Rounding Rules and Variables
              • Input Variable: ItemNetTotalPrice
              • Rounding Rule: Round Down.
              • Output Variable: 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. Enter the input values for your printer bundle product and click Simulate again.
            The price waterfall shows the formula used to calculate the total cost of the printer bundles with a discount of 10%. You can also see that the rounded price has been applied to the Net Amount to the first decimal.
            Rounded price waterfall
           
          Loading
          Salesforce Help | Article