Table of Contents


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):

DefaultValueAggregatesAggregated-field type required
COUNTNumber of qualifying child records.None — RelatedToFieldId not required.
SUMTotal of a numeric child field.Number, Currency, or Percent.
AVGAverage of a numeric child field.Number, Currency, or Percent.
MINMinimum value.Number, Currency, Percent, Date, or DateTime.
MAXMaximum 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

PropertyNotes
EntityIdThe parent entity ID.
Name, LabelStandard field payload.
FieldTypeId7NY00000000000i0000 (RollupSummary).
DefaultValueThe operation (COUNT, SUM, AVG, MIN, MAX).
RelatedToEntityIdThe child entity being aggregated.
RelatedToFilterFieldIdThe Master-Detail or Lookup field on the child that links back to this parent.
RelatedToFieldIdThe child field to aggregate. Required for every operation except COUNT.
DecimalPlacesDerived from the aggregated child field — not settable on the rollup. Any value you send is ignored.
RollupFilterCriteriaOptional. 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 operatorMeaning
equalsequal to
not equals tonot equal to (no trailing space)
greater than>
less than<
less or equal
greater or equal≥ (spelled correctly)
containssubstring match
does not containnegated substring
starts withprefix match
does not start withnegated prefix
includesmulti-select includes value
excludesmulti-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 >>

Last updated on 7/28/2026

Attachments