Section Calculations

Standard quote fields are not displayed in the Solution Design tab, but administrators can add quote item custom fields and manage calculations for them.
Prerequisite: make the field visible on quotes in Quote Layout Permissions and Quote Layout pages.

The following sections contain more details on how to manage section calculations:

Creating Section Calculations

  1. Access Quote Fields and Calculations > Fields and Calculations.
  2. Click Add New Field.
    A modal window pops up.
  3. Click Save.
    The field is added to each group of fields (MainItem, LineItem, ProductType, CartTotal and Sections).
  4. In Sections, select the field you just created.
    Additional settings display on the right.
  5. In Aggregate Type, select the calculation that will be performed on all items in sections.
    The aggregate types are fixed in the system:
    • Sum - the sum of all items
    • Count - the total number of items
    • Avg - the average value of all items
    • Min - the minimum value of all fields
    • Max - the maximum value of all fields
      The system applies the aggregate function to all items in the section and subsections, calculates the amount and displays the results in the section field.
  6. Save the changes.
    A section calculation is automatically created and it is available in the list of all calculations.

Reverse calculations are not enabled for sections. Consequently, a quote item custom field in a section can either be made editable or you can select an aggregate type for it.

Triggering Section Calculations

The following procedure describes how to add a section calculation to the list of calculations that are triggered every time an item is added and updated in the quote.

  1. In Fields and Calculations, click Item Add/Update Calculations.
    A list of calculations that are triggered whenever an item in the quote is added or updated displays on the right.
  2. Click Add calculation.
  3. Click next to the new calculation.
    All section calculations have Section before their label.
  4. Close the window and save the changes.
    The calculation is added.
  5. In the Editing tab, make the quote item custom field editable in MainItem, LineItem, ProductType and CartTotal.
    The calculation is set up.
    After you change the value in the quote item custom field for an item on the quote, the system reapplies the aggregate type to the new values, triggers the calculations and displays a new value in the section row in Solution Design.

On the user side, calculations are triggered every time users click outside the field they have edited. It is not necessary to press the Enter button to run the calculations.

Custom Section Calculations

The following example shows you how to create a custom calculation that calculates a discounted value of a quote item custom field in a section.

    • Sum - aggregate type Sum
    • Discount_Percent - type Number
    • Discount_Value - type Number
  1. Add a custom calculation to the Discount_Percent field.
    x = context.AffectedSection
    x[“Discount_Value”] = x[“Sum”] * x[“Discount_Percent”] / 100;
  2. Save the changes and open the Solution Design tab in a quote.
    The Sum column is populated with values for each item and a summed up value displays in the section field. If you change the percent in the Discount_Percent field, and refresh the section, the Discount_Value field will be populated with the new discounted values.

More Information
You are here: SAP Sales Cloud CPQ Online HelpAdmin Page HelpQuotes AdministrationQuote 2.0Solution DesignSection Calculations