Creating Numeric Roll-Up Summary Fields for Objects
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 Name | Return Type | Roll-Up Operation | Match Condition | Aggregate Expression | Object |
---|---|---|---|---|---|
Total Quantity | Number | SUM | IsPrimaryLine = TRUE | Quantity | Line Item |
Total Weight | Number | SUM | Product.Type = Hardware | Quantity * Product.UnitWeight | Line Item |
Bundle Heat Dissipation | Number | SUM | ParentLineNumber = $scope.LineNumber && IsPrimaryLine = TRUE | Quantity * Product.UnitHeatDiss | Line Item |
Lowest Setup Fee | Currency | MIN | ChargeType = ‘Setup Fee’ | ListPrice | Line Item |
Max Line Item Discount | Percentage | MAX | ALL | NetAdjustment | Line Item |
Avg Cost | Currency | AVG | ExtendedCost>0 | ExtendedCost | Line 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).