Calculated fields enable you to track events as they come in, set up a calculation using event fields, and store the resulting data on a participant’s profile. Once the calculated field is set up, its value will update dynamically as you send impact.com events that meet your criteria.
This guide will show you the basic process for setting up a calculated field, including an example at the end. For more details about how calculated fields work and what types of calculations are possible, refer to Calculated Fields Explained.
From the left navigation menu, select Data Sources → Fields.
Select Create calculated field.
Complete the fields:
Name
Event
Calculation
Event field (if applicable for your calculation)
Optionally, apply a Tracking Window if you want to perform a sum or count calculation on a rolling basis. The time zone for your impact.com account will apply to the tracking window.
[Toggle on] if you want to only include events in calculations. For details about the window types and when to use them, see Tracking Windows for Calculated Fields
If you applied a sliding window, then you can set a maximum value to be counted for each unit of your interval (e.g., each day in a 60 day interval).
In the Filters field, add an Active Period if you want to set a start and end date for the calculation.
Select Additional filters if you only want events that meet specific criteria to be included in the calculation.
Filters can apply to event characteristics (e.g., revenue amount for a given purchase) or user characteristics (e.g., a count of the number of times a participant makes a purchase over $100)
Review your selections and decide if you want to backfill the values for all participants.
Select the [Checked box] if you want to backfill calculations.
Select Save to have your changes saved.
You have a referral program and want to reward participants who frequently make sizable purchases soon after they’ve been referred. You determine that for your program, this means any participant who makes 3 or more purchases of at least $50 in the month after the referral starts. A calculated field can help you determine which of your participants meet this threshold and act as the basis for a program rule that issues these participants a reward.
Here’s how the calculation can be set up:
Under the Calculation, complete the Name field.
Enter the following values for the event and calculation fields:
Event: Purchase
Calculation: Count
This will set up the calculation to count how many times impact.com receives purchase events that meet your criteria.
Apply a fixed Tracking Window. This will cause the calculation to reset each month.
Select Fixed Window.
Select a 1 calendar month window duration.
Add Filters to specify that you only want to count the purchase events with a value of $50 or more:
Select Add Rule.
For the first Condition [Drop-down menu], select the
events.fields.revenue
field.Change the operator type to greater than or equal to.
Enter
50
as the string variable value.
Review and Save.