Working with aggregate fields
Overview
An aggregate field is designed to display a calculated total based on data from specific activities. This field type is useful when you want to track or summarize the frequency, sum, average, or another calculation of occurrences related to a particular activity within a given timeframe.
Creating an aggregate field
To create an aggregate field, go to Settings > Customer data > Fields. Click New custom field > select Aggregate under Field type.
Aggregate field options
Total count
It counts the number of times the activity has occurred.
TIP: Great for tracking recurring activities for the same contact over time. For instance, you can use this option to count how many times a contact has opened an email, placed an order, logged into your app, and more.
Sum of attribute
It sums a specific attribute from the selected activity.
EX: Contact has 3 Placed order activities:
- First order - Total price: $5
- Second order - Total price: $10
- Third order - Total price: $10
The aggregate field sums the Total Price attribute across the Placed order activities that occurred during the specified Aggregate time period. In this case, the aggregate field would be $25, calculated as follows: $5 + $10 + $10.
Average of attribute
It calculates the average of a certain attribute across all contacts for the activity you've selected.
EX: Contact had 4 Placed order activities:
- First order - Total price: $5
- Second order - Total price: $10
- Third order - Total price: $10
- Fourth order - Total price: $5
The aggregate field calculates the average of the Total Price attribute across the Placed order activities that occurred during the specified Aggregate time period. In this case, the aggregate field would be $7.5, calculated as follows: ($5 + $10 + $10 +$5) / 4
Ratio of another activity
It compares two activities as a ratio.
EX: Contact received 10 emails (Received email activity) and placed 3 orders (Placed order activity) during the specified Aggregate time period. In this case, the aggregate field would be 30%, calculated as follows: (3 / 10) * 100
TIP: Great for calculating rates such as open rate, click rate, conversion rate, etc.
List of values
It aggregates values from the specified attribute as a list.
EX: Contact placed 3 orders (Placed order activity), each with a different discount code. You can use the List of values option to display all discount codes in a field, separated by a comma. For example: WELCOME10, SAVE20, FREESHIP.
When does an aggregate field calculate?
An aggregate field calculates in real-time whenever the selected activity takes place. If you select a specific time period for the Aggregate time period, the historical data is calculated once every 24 hours at midnight in the account's timezone.
TIP: If you select All time in the Aggregate time period, we will aggregate the data indefinitely as this doesn't rely on the data retention feature.