Create, activate, and use calculated attributes from the mParticle user interface or Platform API. You can then view calculated attributes along with other user attributes in the UI or via the Profile API.
Define the data used to run the calculation.
a. Select values from the drop-downs to define and add criteria as needed.
b. Click Next to select a date range.
To choose the date range for your calculation, click on the Date Range drop-down:
Select All Time to use all the data available per your long-term data retention policy. Therefore, selecting All Time may incur additional expenses due to larger data volumes.
You can seed the calculated attribute with historical data if you select Since or All Time for your date range. To seed, add the date you want to start using incoming mParticle data—it can be a date different from the last date of seeded data. If you don’t want to seed this calculated attribute, click the X on the right to remove it. For more information about seeding, see Seed a calculated attribute.
A calculated attribute must be activated before mParticle starts calculating its values across your users.
To activate a calculated attribute:
When activated, mParticle computes and initializes the value for the calculated attribute.
Depending on the date range, volume of data in your workspace, and definition complexity, calculations require different amounts of time before they are available across your customer profiles. While calculating, the UI displays progress of the initialization.
You can use the default behavior for forwarding calculated attributes forwarding, or you can use the special Calculated Attributes feed.
mParticle automatically enriches incoming batches with active calculated attributes for that user. Like regular user attributes, you can restrict which outputs receive them using data filters.
The Calculated Attributes feed allows you to send calculated attributes downstream whenever they change, without an event from the user. This feed is especially useful for keeping calculated attributes with asynchronous calculations synchronized throughout your stack, and for sending calculated attributes downstream alongside kit integrations.
If your output partner supports the Calculated Attributes Feed, the input appears once you have activated a calculated attribute. When a new connection is made to this input, calculated attribute values for users who have not been seen since their asynchronous calculated attributes were calculated are sent. This feed sends an update when calculated attributes change (both synchronous & asynchronous); it does not send user attributes.
To control which downstream system receives these updates, connect specific platforms to receive the calculated attribute updates. You can also filter out calculated attributes you do not wish to forward using the platform filters page.
The calculated attributes feed is available with the following partners:
Use calculated attributes in the Audience builder by selecting User > Calculated Attributes.
Calculated attributes appear as ‘string’ types at first and then automatically switch to the correct type as they are computed across many users. You can build audience criteria with a calculated attribute even if it is calculating. After the attribute values are completed for each user, their audience membership is updated.
Seeding allows you to pass in historical values for calculated attributes that mParticle will build upon as new data arrives without passing in all the raw events. Seeding allows you to seamlessly transition from your own calculations to mParticle’s.
To use seeds with a calculated attribute:
Define a calculated attribute in the mParticle platform before sending any seeds.
The calculated attribute can be in either draft or active state. However, mParticle recommends the calculated attribute be activated after seeds for all users have been sent to mParticle. Once a calculated attribute is activated, mParticle starts calculating it, and thus some users may show inaccurate values until all seeds have been received.
Send seeds via the Calculated Attributes Seeding API.
Calculated attribute creation or update takes up to five minutes to be included in the mParticle cache. Therefore, if you send seeds immediately after creating or updating a calculated attribute, mParticle may send a NOT FOUND error.
Once mParticle has received seeds, mParticle combines them with calculated attribute results based on live data received after the cutoff date.
After seeds have been sent to mParticle, any of the following changes make the previously received seeds invalid and are deleted from mParticle.
To update the seeds after you have sent them to mParticle, send the updated seeds to mParticle again. mParticle overwrites previously received seeds.
If you load historical data using the historical endpoint of the HTTP API, after loading, you must recreate new calculated attributes or update the definition of an existing CA to trigger a recalculation.
Was this page helpful?