A Roll-up Summary Field can be defined at the Cart level or at a Bundle Product Level to aggregate value from each line item in the given context and with a match condition to filter out unwanted lines.

The Match Condition area enables you to enter an Expression created using the Expression Builder that establishes which line items will be filtered and have a Roll-Up.

The Operator defines the operation performed on all the aggregated line item values.

The Aggregate Expression is an Expression created using the Expression Builder that specifies the value to be rolled-up.

The Roll-up is by default created at the Cart level unless you add the following to the Match Condition:

ParentLineNumber = $scope.LineNumber

This retrieves all the options for the bundle line in the aggregation. You can use this expression to aggregate values at an individual bundle level in order to drive a bundle configuration rule.

The Expressions can be built for any line item field, product field, and attribute value fields. These Roll-Up Fields can be further used for multiple functions such as building other Expressions, Assign default quantities, attributes values.

Roll-up Field NameReturn TypeRoll-Up OperationMatch ConditionAggregate ExpressionObject
Total QuantityNumberSUMIsPrimaryLine = TRUEQuantityLine Item
Total WeightNumberSUMProduct.Type = HardwareQuantity * Product.UnitWeightLine Item
Bundle Heat DissipationNumberSUMParentLineNumber = $scope.LineNumber && IsPrimaryLine = TRUEQuantity * Product.UnitHeatDissLine Item
Lowest Setup FeeCurrencyMINChargeType = ‘Setup Fee’ListPriceLine Item
Max Line Item DiscountPercentageMAXALLNetAdjustmentLine Item
Avg CostCurrencyAVGExtendedCost>0ExtendedCostLine Item

Extensive use of rollups at quote level may have performance implications for a cart with more than 20 product line items. It is also recommended to limit numbers of quote level rollups to below 20.

You can model your numeric expressions at the configuration level so that can rollup custom fields at the deal level. Rollups on configuration can be set through Apttus_Config2_LineItem_c.$Config.$Rollups (but does not return any value in client mode).

To create roll-up summary field

Create a custom Salesforce field in Roll-up Summary Object. Ensure that the field is unique and multiple expressions are not used to populate the same field. This field comprises or holds the value derived from the aggregate expression in the Field Expression builder.

  1. You can invoke the field expression builder for:
    • Bundles: To define a rollup field for a particular bundle, navigate to the Products tab, search and select a product and click Product Console.
    • Quote or Product Groups: To define a rollup field for a product group or at header level, navigate to the CPQ Console tab.
  2. Click Rollups from the Additional Details section.
  3. Click  to add a new rollup field for a product.
  4. Expand the Untitled section by clicking the right-facing arrow.
  5. Select the Rollup Summary field created on the Rollup Summary object.
  6. In the Match Conditions area, specify the expression based on which the results are filtered. The numeric expression rollup is applicable only for those line items that satisfy the criteria in the Match Conditions area.
  7. From the Roll-up Operation area, select an operation based on which the rollup is created.
  8. In the Aggregate expression area, specify the expression based on which the value is populated in the Rollup Summary Field. For example, (Quantity__c * ProductId_r.Weight__c) *2 Based on the Aggregate expression values, the rollup summary field is populated. Data is populated in The Match Information area based on the information you enter in all the above steps.
  9. Click the Save icon in the top right corner of your screen.

The rollup for a product is created successfully. You can navigate to the cart page and check whether the rollup is applied successfully.

After you create rollup fields for a product, you can re-use the rollups across products or within the same product by searching for the rollup, product, or product group name in the Search field. Drag and drop the requisite roll-up conditions that you want to use to the right greyed out pane.