Rollup Summary Fields
A Rollup Summary field lives on a parent entity and aggregates values from its child records. It is read-only and recalculates automatically whenever a child record changes.
Requirements
- A parent-child relationship must already exist between the two entities — either a Master-Detail or Lookup field on the child that references the parent.
- The Rollup Summary field is created on the parent entity.
Rollup Operations
Set the operation on the DefaultValue property (uppercase string):
| DefaultValue | Aggregates | Aggregated-field type required |
|---|
COUNT | Number of qualifying child records. | None — RelatedToFieldId not required. |
SUM | Total of a numeric child field. | Number, Currency, or Percent. |
AVG | Average of a numeric child field. | Number, Currency, or Percent. |
MIN | Minimum value. | Number, Currency, Percent, Date, or DateTime. |
MAX | Maximum value. | Number, Currency, Percent, Date, or DateTime. |
The operation is matched case-insensitively on input (sum or Sum is accepted), but it is stored exactly as you send it — send uppercase (SUM, COUNT, …) so the stored and returned value stays canonical.
Payload Reference
| Property | Notes |
|---|
EntityId | The parent entity ID. |
Name, Label | Standard field payload. |
FieldTypeId | 7NY00000000000i0000 (RollupSummary). |
DefaultValue | The operation (COUNT, SUM, AVG, MIN, MAX). |
RelatedToEntityId | The child entity being aggregated. |
RelatedToFilterFieldId | The Master-Detail or Lookup field on the child that links back to this parent. |
RelatedToFieldId | The child field to aggregate. Required for every operation except COUNT. |
DecimalPlaces | Derived from the aggregated child field — not settable on the rollup. Any value you send is ignored. |
RollupFilterCriteria | Optional. When present, only children matching all criteria are included in the aggregate. |
Example — Sum
POST /api/3.0/entity/EntityField
Authorization: Bearer <token>
Content-Type: application/json
Accept: application/json
{
"EntityId": "7NS0000000000A50001",
"Name": "TotalContractValue",
"Label": "Total Contract Value",
"FieldTypeId": "7NY00000000000i0000",
"DefaultValue": "SUM",
"RelatedToEntityId": "7NS0000000000A60001",
"RelatedToFilterFieldId": "7NX0000000000D80001",
"RelatedToFieldId": "7NX0000000000D90001",
"RollupFilterCriteria": [
{ "FieldId": "7NX0000000000DA0001", "Operator": "equals", "Type": "Value", "Value": "Active", "SequenceNo": 1 }
]
}
Example — Count
POST /api/3.0/entity/EntityField
Content-Type: application/json
{
"EntityId": "7NS0000000000A50001",
"Name": "ContractCount",
"Label": "Contract Count",
"FieldTypeId": "7NY00000000000i0000",
"DefaultValue": "COUNT",
"RelatedToEntityId": "7NS0000000000A60001",
"RelatedToFilterFieldId": "7NX0000000000D80001"
}
RollupFilterCriteria — Different Operators From Lookup Filters
Rollup filters use their own operator strings, which differ from the Lookup Filter operators — the two lookup-filter quirks (trailing space on "not equals to" and the misspelling "greator or equal") do not apply here:
| Rollup filter operator | Meaning |
|---|
equals | equal to |
not equals to | not equal to (no trailing space) |
greater than | > |
less than | < |
less or equal | ≤ |
greater or equal | ≥ (spelled correctly) |
contains | substring match |
does not contain | negated substring |
starts with | prefix match |
does not start with | negated prefix |
includes | multi-select includes value |
excludes | multi-select excludes value |
RollupFilterCriteria are always AND-ed — every criterion must match for a child record to be included. There is no FilterLogic grouping for rollups.
Each criterion supports FieldId, Operator, Type, Value, and SequenceNo. Unlike lookup filter criteria, rollup criteria compare against a literal Value only — there is no field-to-field (ValueEntityFieldId) comparison.
Behavior
- The rollup field is read-only. Direct writes are rejected.
- Recalculation is automatic when a child record is created, updated, or deleted, or when a child's aggregated field changes.
- If a parent has no qualifying children, the rollup returns
null (or 0 for COUNT). - Multiple rollups per parent are allowed (for example, both
SUM(Amount) and COUNT children). - Deep aggregation across more than one level of parent-child is not supported natively — use a formula on the rollup's aggregate for higher-order values.
<< Lookup Filters | Formula Fields >>