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
|IsPrimaryLine = TRUE
|Product.Type = Hardware
|Quantity * Product.UnitWeight
|Bundle Heat Dissipation
|ParentLineNumber = $scope.LineNumber && IsPrimaryLine = TRUE
|Quantity * Product.UnitHeatDiss
|Lowest Setup Fee
|ChargeType = ‘Setup Fee’
|Max Line Item Discount
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.
- 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.
- Click Rollups from the Additional Details section.
- Click to add a new rollup field for a product.
- Expand the Untitled section by clicking the right-facing arrow.
- Select the Rollup Summary field created on the Rollup Summary object.
- 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.
- From the Roll-up Operation area, select an operation based on which the rollup is created.
- 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.
- 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.