Custom Rollup Rules Overview
Custom rollup rules enable you to consolidate custom number and currency field values from a source object up to higher levels of the estimate hierarchy. Each rule defines a single source-to-target consolidation. It maps a source field on the source object to a target field on an object higher in the estimate hierarchy. When an estimate is saved or recalculated, active rules are applied and source values are consolidated using the rule's operator and applied to the target field. Organizations that track custom metrics across the estimate hierarchy, such as FTE counts or custom hours, can do this through configuration. The experience is similar to native Salesforce rollup summary fields.
Source and target fields must be of Number, Currency, Date, or Datetime type. Source fields can be any Number, Currency, Date, or Datetime field, including fields from managed packages. Target fields must be custom fields that do not belong to any managed package. If a field belongs to a managed package, include the full namespace prefix in its API name: for example, ffscpq__Hours__c, not Hours__c. For Currency fields, the source and target must use the same currency.
The target object must be higher in the estimate hierarchy than the source object, and only one active rule can write to a given target object and target field combination, though multiple rules can read from the same source field.
You can select an estimate role request, an estimate task, or an estimate line set as the source object. The target object must be higher in the estimate hierarchy than the source object. The table below details the target objects available for each source object.
| Source Object | Supported Target Objects |
|---|---|
| Estimate Role Request | Estimate Task, Estimate Line Set, Estimate Product Instance, or Estimate |
| Estimate Task | Estimate Task, Estimate Line Set, Estimate Product Instance, or Estimate |
| Estimate Line Set | Estimate Product Instance or Estimate |
The records that contribute to a consolidation depend on the source object:
- When the source object is an estimate role request and the target object is an estimate task, only role requests that are direct children of the task contribute. Role requests on nested child tasks are not included. For all other target objects, all role requests under the target contribute.
- When the source object is an estimate task, all tasks under the target object contribute, including parent tasks as well as the lowest-level tasks.
- When the source object is an estimate line set, all line sets under the target object contribute.
Operators
Each custom rollup rule uses an operator to determine how source records are consolidated. You select the operator on the rule. The table Custom Rollup Rule Operators details the available operators.
| Operator | Description |
|---|---|
| COUNT | Returns the number of source records that contribute to the target. COUNT does not use a source field. |
| MAX | Returns the largest source field value. Supports Number, Currency, Date, and Datetime fields. |
| MIN | Returns the smallest source field value. Supports Number, Currency, Date, and Datetime fields. |
| SUM | Adds the source field values together. SUM is the default operator. Only supports Number and Currency fields. |
When you select MIN or MAX, the source and target fields can also be Date or Datetime. A Date source field can roll up to a Date or Datetime target field. A Datetime source field can only roll up to a Datetime target field. Rolling a Datetime source field into a Date target field is not supported and returns a validation error when you save the rule. When a Date source field rolls up into a Datetime target field, the value is stored at midnight UTC.
The operator also determines the result when no source records contribute to a target. For SUM and COUNT, the target field is set to zero. For MIN and MAX, the target field is left blank. SUM treats a blank source value as zero. MIN and MAX skip blank source values, so they do not contribute to the result.
There is no average operator. To calculate an average, combine a SUM rule and a COUNT rule in a formula field on the target object that divides the total by the count.
Filtering Source Records
By default, every source record under the target object contributes to the consolidation. To include only some records, enter the API name of a checkbox field in the Source Filter Field API Name field on the rule. Only source records where that field is true contribute to the total. The rule excludes records where the field is false or empty. Leave the field blank to include all source records.
The filter field can be a standard checkbox field or a checkbox formula field, including a field from a managed package.
SECTIONS