Through custom fields, you can send impact.com a wide range of additional information about your Advocate participants beyond the basics required to run your referral program.
Calculated fields receive user and event data, and the values are calculated, stored, and become visible on the participant’s profile. Once the calculated field is set up, its value will update dynamically as you send your Advocate program events that meet your criteria.
Example: A calculated field can be configured to count how many times a participant makes a purchase of at least $100 in a one-month window. Then, you can set up your program to issue special rewards to participants who make at least 3 of these $100 purchases in a month.
By default, all clients are supplied with four calculated fields. You can reference these as soon as you start setting up the rules for your program.
Calculated field | Description |
---|---|
lastSeenDate | Tracks the last time the user was upserted in Advocate. |
firstPurchaseDate | Tracks the first date that we received a purchase event for this participant. |
lastPurchaseDate | Tracks the date of the participant’s most recent purchase event. |
totalPurchaseCount | Tracks the total number of purchase events for this participant. |
You can create your own calculated fields that go beyond the default ones provided. When you set up a calculated field, you can:
Add a start and end date if you want the calculation to run for a limited time (e.g., January 1st to February 17th). This set time frame is called an active period.
Specify a recurring tracking window for your sum and count calculations. Tracking windows can be either fixed windows (e.g., a singular calendar month or year) or sliding windows (e.g., last 90 days).
Set additional constraints for when the calculation is performed by adding a filter or writing a JSONata expression. These options are discussed in greater detail in our article Setting Up a Calculated Field.
Note: If your calculated field has an active period or tracking window, then values won’t be updated after the calculation period ends. If your calculated field has an active period (or a tracking window, for sum/count calculations only), then values won’t be further updated after the calculation period ends. However, the values will remain visible on each participant’s profile.
There are several types of calculations that you can use when building a calculated field.
Calculation | Description | Example |
---|---|---|
Sum | Calculate the sum of the | Sum all purchases a referred friend makes within the first 30 days after signup. Issue tiered rewards to the customer advocate based on the amount spent. |
Count | Count the number of | Reward participants when they have made more than 10 purchases. |
First Seen (Date) | Calculate the timestamp of the first | Reward participants if they started making purchases before a certain date. |
Last Seen (Date) | Calculate the timestamp of the last | Reward participants if their last purchase was within 5 days. |
First Value | Calculate the value of the | Reward participants when they make a large first purchase. |
Last Value | Calculate the value of the | Reward participants when their last payment was at least a certain value. |