---
title: Computed Attributes
slug: docs/computed-attributes
docTags: 
createdAt: 2023-10-12T11:28:21.416Z
---

author: Marisa McKay Tarantino, Ludovic Latapie

LINK to Latest Deck and Materials: 

- [Computed Attributes Overview](https://experienceleague.adobe.com/docs/experience-platform/profile/computed-attributes/overview.html?lang=en) 
- [Computed Attributes UI Guide](https://experienceleague.adobe.com/docs/experience-platform/profile/computed-attributes/ui.html?lang=en) 
- [Computed attributes](docId:2arf65cWpTmi6MZm832H7) Example in Public Luma project



![](https://api.archbee.com/api/optimize/bAgVaanSi1tFmfc8PghaH/r1ezbEdChqIshaR5TVowK_.blob)

**Background/Setup Narrative:** 

- Computed Attributes can be defined in two ways: 
- **Computed Attributes (noun):&#x20;**&#x53;pecific values derived using experience event behavior and written to a customers’ unified profile to be used in segmentation and downstream activation.  
- **Computed Attributes (verb):&#x20;**\[AEP’s ability] To aggregate, sum or count the number of specific events over a pre-determined amount of time and subsequently write that aggregate number, sum or count as a profile attribute within a customers’ unified profile.  
- If your customer meeting is solely focused on computed attributes, the below script assumes some setup has been done from a slideware perspective to orient the customer on what computed attributes is prior to jumping into the demo.  
- If your customer meeting is a double click into RTCDP and you want to highlight computed attributes, you should talk about it when discussing and showing the unified profile.  
- Computed attributes simplify using event level data in segmentation, eliminating the limitations of binary yes/no logic and instead computing values that can be attach to the profile. In other words, customers can now retire granular segment definitions and use a CA 
- The overarching value point of using computed attributes is to enable richer profiles, build more advanced segments and driver deeper personalization opportunities with end customers.  

## Creating a computed attribute&#x20;

:::hint{type="info"}
DEMO ON YOUR OWN SANDBOX (Edit permissions are required):
:::

<font color="#878686">Talk track (assuming the customer has seen a few upfront slides describing what computed attributes is as a feature and high-level value points)\: </font>

Now that we’ve gone through some slides talking about computed attributes and how they can be used to enhance downstream personalization, I want to hop into the UI to show you how to create a computed attribute and show specific examples around how they can be leveraged within the profile, for segmentation and for activation. 

::::VerticalSplit{layout="middle"}
:::VerticalSplitItem
Right now, we are at the main dashboard for Adobe Real-Time CDP, and you can see that there are sources, segments, and destinations meaning that data is coming in from different channels, audiences are being curated, and there will be some marketing action delivered to these audiences. What I’m going to focus on today are the profiles, segmentation, and destinations sections to illustrate the concept of computed attributes.  

Marketers will be able to use this UI in a self-service fashion to take aggregates of event-level data and turn those aggregates into profile attributes for both known and unknown customers instead of solely relying on granular segment definitions. These profile attributes can then be used for downstream segmentation and personalization without any SQL or programming knowledge. 
:::

:::VerticalSplitItem
![](https://api.archbee.com/api/optimize/bAgVaanSi1tFmfc8PghaH/mfxJE1GKO66vxt-Z80OC3_image.png)
:::
::::



::::VerticalSplit{layout="middle"}
:::VerticalSplitItem
&#x20;<font color="#3b9f0f">Click on “Profiles” under Customer </font>

<font color="#3b9f0f"> Click on “Computed Attributes”. </font>

Once inside of the profiles section, I can navigate to the computed attributes. Here I can see a list of the existing Computed Attributes I have created along with the different evaluation statutes. 

 
:::

:::VerticalSplitItem
![](https://api.archbee.com/api/optimize/bAgVaanSi1tFmfc8PghaH/XkgYXcR_PWYufFX3PXaxA_image.png)
:::
::::

::::VerticalSplit{layout="middle"}
:::VerticalSplitItem
Let’s go ahead and build a new computed attribute from scratch. On the right-hand side, we can select “Create computed attribute”  
:::

:::VerticalSplitItem
![](https://api.archbee.com/api/optimize/bAgVaanSi1tFmfc8PghaH/_8UW9KigT4E3fFDj9oG8B_image.png)
:::
::::



::::VerticalSplit{layout="middle"}
:::VerticalSplitItem
Background: 

 The first step will be to name your computed attribute. To do this, you’ll fill in a display name, a field name, and a short description.   

One timesaver and marketer-friendly feature is that there is no need to go into the schema manually to add the field as an attribute. The field name is auto inferred from the display name user enters at the time of configuration of the computed attribute using an algorithm (ex. "sum of purchases in the last 30 days" will become "sumPurchasesLast30days"). 

Computed Attributes are best suited for batch use cases at this time as computed attributes will be evaluated in batches. The lookback period selected will determine the refresh frequency (up to, 24 hours = hourly, 7 days = daily, 4 weeks = weekly, 6 months = monthly). There is also the option to enable “fast refresh” to keep attributes up to date, meaning attributes refresh daily, even for longer lookback periods – there is a maximum of five attributes per sandbox that can have fast refresh enabled. 

Talk track: 

Now this is where you will create the computed attribute. There are three main inputs required: attribute name, definition, and aggregate function.  

The first step will be to name your computed attribute. To do this, you’ll fill in a display name, a field name, and a short description. For a display name, this could be something like “the sum of purchases in the last 30 days” and the description could be something similar like, “total sum of purchase amount in the last 30 days”. One timesaver and marketer-friendly feature is that there is no need to go into the schema manually to add the field as an attribute. The field name will automatically be mapped to the schema based off the name of the computed attribute. 

<font color="#3b9f0f">*Type\:* </font>

<font color="#3b9f0f">*Display name\:*</font><font color="#3b9f0f">*Sum product list adds last 2 days* </font>**

<font color="#3b9f0f">*Description\: Sum purchases in California with standard shipping method*</font>

 
:::

:::VerticalSplitItem
![](https://api.archbee.com/api/optimize/bAgVaanSi1tFmfc8PghaH/x8CKGWcKHV30D_E1lJOI2_image.png)
:::
::::

::::VerticalSplit{layout="middle"}
:::VerticalSplitItem
The second step is to define the attribute using the events and event attributes on the left. These events and event attributes represent the building blocks by which you will build your computed attribute. In the definition section, you can drag and drop these events or event attributes to act as filters, such as only looking at people who have made orders in California and/or have used a certain purchase method. 

 

<font color="#3b9f0f">*Type\: "State" in the events field to set up condition regarding the state California.*</font>

<font color="#3b9f0f">*Drag and drop the the Shipping address --&gt; state field and add condition "equals California"*</font>
:::

:::VerticalSplitItem
![](https://api.archbee.com/api/optimize/bAgVaanSi1tFmfc8PghaH/6ritybnVL9n54BYDbT4wR_image.png)

![](https://api.archbee.com/api/optimize/bAgVaanSi1tFmfc8PghaH/Em7r7mYHDAKV4QNlxQ6Gi_image.png)
:::
::::





::::VerticalSplit{layout="middle"}
:::VerticalSplitItem
**<font color="#3b9f0f">*Type "shipping" in the events field to set up a condition regarding the shipping method.*</font>**

**<font color="#3b9f0f">*Drag it to the canvas and add "equals standard"*</font>
:::

:::VerticalSplitItem
![](https://api.archbee.com/api/optimize/bAgVaanSi1tFmfc8PghaH/DDX622RUNZ-my4OEQzypJ_image.png)
:::
::::

::::VerticalSplit{layout="middle"}
:::VerticalSplitItem
The third input is the function. This is where you can select one of the five aggregate functions by which you want to aggregate your attribute. Today, the available options are: **sum, min, max, count, most recent**. The product team is discussing other functions to bring to market, but these are the functions available OOTB today.  

From here, I will pick the aggregate field I am going to be using in this function. If we are thinking about the example of the sum of purchases in the last 30 days, I would want to select something like the “Price Total” as the input for my sum function from the event schema. 

 <font color="#3b9f0f">*Click on "Select an attribute" in the add an atribute section, and type "priceTotal" in the search box. Click on "Price Total" field to add it to the canvas*</font>*.*
:::

:::VerticalSplitItem
![](https://api.archbee.com/api/optimize/bAgVaanSi1tFmfc8PghaH/j-lccCOTzR70lEfgzIgl-_image.png)
:::
::::







::::VerticalSplit{layout="middle"}
:::VerticalSplitItem
Lasty, we will need to choose the timeframe or lookback window I want to be applied to this function. This dictates how many hours, days, weeks, or months ago I should be going back to calculate my value. I can specify if I want the total to be hours, days, weeks, or months (up to six months). 

<font color="#3b9f0f">*Change the number of days to\: 2*</font>

**<font color="#3b9f0f">*Save the attribute*</font>
:::

:::VerticalSplitItem
![](https://api.archbee.com/api/optimize/bAgVaanSi1tFmfc8PghaH/kXzU4MGhqUAI2NHi6RFzJ_image.png)
:::
::::

::::VerticalSplit{layout="middle"}
:::VerticalSplitItem
Now all three of these areas have been completed and I can save as a draft or publish. Once I hit publish, this new computed attribute field will be added to the union schema and be available on the profile for all qualifying profiles moving forward. 

**SIDE NOTE FOR PRESENTERS:** Computed attributes will not retroactively compute attributes for qualifying profiles in the time period before the computed attribute is created. The value will be computed using the destinated lookback window from the time the CA is created *moving forward.&#xA0;*&#xA0;

**SIDE NOTE FOR PRESENTERS:** Be aware of the limitations and requirements associated with lookback windows. Those limitations and requirements are summarized on slides 5-8 in [this link](https://adobe-my.sharepoint.com/\:p:/r/personal/orenstei_adobe_com/_layouts/15/Doc.aspx?sourcedoc=%7B98604C45-4D1B-47E9-B43D-FE8449314107%7D\&file=Computed%20Attributes%20-%20P%26A%20Team%20Enablement.pptx\&action=edit\&mobileredirect=true)


:::

:::VerticalSplitItem
![](https://api.archbee.com/api/optimize/bAgVaanSi1tFmfc8PghaH/vCem1USkZlDHR8dTYAWJI_image.png)
:::
::::

## Computed attributes results

:::hint{type="info"}
The next demo steps ara available on public-luma sandbox in Adobe Demo System Shared org or an org where you already have computed attributes working on any data, e.g. created using quick setup
:::

### Computed attributies available for Luma brand:

### Sales and Purchasing Metrics

| Name                       | Description                                       | Aggregate Function | Lookback period |
| -------------------------- | ------------------------------------------------- | ------------------ | --------------- |
| TotalPurchasesAmount       | Sum of all purchases made by a customer           | SUM                | 6 months        |
| TotalPurchases             | Count of all purchases made by a customer         | COUNT              | 6 months        |
| WeeklyTotalPurchasesAmount | Sum of all purchases made by a customer last week | SUM                | 7 days          |
| MaxPurchaseValue           | Maximum purchase value in the last 6 months       | MAX                | 6 months        |
| MinPurchaseValue           | Minimum purchase value in the last 6 months       | MIN                | 6 months        |
| TotalDiscounts             | Total discounts offered to a customer             | COUNT              | 6 months        |
| RewardsPoints              | Total reward points accumulated by a customer     | SUM                | 6 months        |
| MostRecentProductPurchased | The most recent purchase made by a customer       | MOST\_RECENT       | 24 hours        |
| MostRecentDiscount         | The most recent discount availed by a customer    | MOST\_RECENT       | 7 days          |

### Customer Engagement Metrics

| Name                      | Description                                    | Aggregate Function | Lookback period |
| ------------------------- | ---------------------------------------------- | ------------------ | --------------- |
| EmailSentLastMonth        | Count of all emails sent to a customer         | COUNT              | 1 month         |
| emailLinkClickedLastMonth | Count of all email links clicked by a customer | COUNT              | 1 month         |
| RecentSubscription        | Most recent List Subscription                  | MOST\_RECENT       | 7 days          |

### Customer Behaviour Metrics

| Name                      | Description                                 | Aggregate Function | Lookback period |
| ------------------------- | ------------------------------------------- | ------------------ | --------------- |
| LastVisitedStore          | The most recent store visited by a customer | MOST\_RECENT       | 7 days          |
| TotalStoreVisitsLastMonth | Count of all store visits last month        | COUNT              | 1 month         |
| PurchaseFrequency         | Number of purchases made in the last month  | COUNT              | 1 month         |
| LastProductViewed         | The last product viewed by a customer       | MOST\_RECENT       | 24 hours        |
| ProductViewsLastMonth     | Number of products viewed in the last month | COUNT              | 1 month         |
| MostRecentPartnerID       | Most recent Partner ID from web visitors    | MOST\_RECENT       | 7 days          |



::::VerticalSplit{layout="middle"}
:::VerticalSplitItem
<font color="#3b9f0f">*Go to the CA details page (page landed on before building the computed attribute)*</font>, <font color="#3b9f0f">in case of Luma project\: </font>

<font color="#3b9f0f">*Select a computed attribute*  </font>

 

Talk track:  

There are a few ways that we can visualize the “results” of our computed attribute function. The first way I want to show is on this computed attributes details page. This view allows me to see a summary of the field name, description, and definition. I can also see what the distribution of values is using this chart. This bar chart gives us a great summary view of the number of profiles within each computed attribute range value. For example, using this chart, you could get a brief look at how many people (profiles) spent between $500 - $1000 in the last 30 days. One of the cool roadmap item the product team is planning for in the future is the ability to create a segment for activation directly using this chart. If your familiar with Adobe Analytics, this would essentially mean the ability to “right click” on any of these distributions and automatically create a segment with the profiles that fall into that value range, which could immediately be activated to downstream channels for activation.  

 

If I scroll down, I can also see the sample profiles that qualify for this computed attribute, according to value range distribution.   

 

**<font color="#3b9f0f">*Click on a Profile ID*  </font>

 

If I click on the profile ID itself, it brings me to the unified profile, where we can see the computed attribute as an attribute as part of this persons’ profile. This is a great way to validate that value for the new attribute. 

 

 

 
:::

:::VerticalSplitItem

:::
::::

## Using computed attributes in Audiences

:::hint{type="info"}
Continue this part of script on the sandbox where you have edit rights. Please do not create audiences on the public sandboxes.
:::



::::VerticalSplit{layout="middle"}
:::VerticalSplitItem
To illustrate how we could use a computed attribute value to drive personalization within activation, I’m first going to start be creating a segment.  

 

<font color="#3b9f0f">*Click on Segment under customer*  </font>

<font color="#3b9f0f">*Create new segment from “Build Rule” to get to the segment builder canvas*  </font>

 

Once inside the segment builder, I can search through my attributes to find the “Computed Attributes” field. This is where you’ll find all of your different computed attributes. By dragging and dropping these fields onto the segment builder canvas, I can create specific rules and apply logic to build dynamic segments. To make the segment more granular and thus more personalized, we can combine the computed attribute with other attributes, events, or even additional audiences (internal and external). Once finished, this segment can be published for activation to be sent to downstream systems. 
:::

:::VerticalSplitItem

:::
::::

## Computed attributes in Adobe Journey Optimizer

::::VerticalSplit{layout="middle"}
:::VerticalSplitItem
One of the great benefits of this feature is that the new computed attribute is housed within the unified profile. The same unified profile that is used for segment creation can also be used for journey orchestration and optimization.  

 

What I’m showing now is the canvas builder for an Adobe Journey Optimizer email journey that I’ve already created. In the “email send” step, let’s say I want to personalize this email further by featuring an image or information on the last product a customer purchased.  

 

Select “edit content” on the right pane 

 

Using the built-in editor, I can click on the personalization icon to select a specific profile attribute. Since my newly created computed attribute is now an attribute on the profile, I can search for and select the computed attribute field to add that value to the email. This not only will help you personalize your email further, but also ensures that all personalization activities using this value are updated in real-time, using the rolling calculations from computed attributes.  
:::

:::VerticalSplitItem

:::
::::





