Create a computed attribute for the sum of purchases
Last update: February 14, 2025
- Topics:
- Profiles
CREATED FOR:
- Intermediate
- User
Learn how to use computed attributes to sum the purchase amounts made by a user across multiple sales channels. A single customer might purchase on your website, in your mobile app, and in your brick-and-mortar store. With the computed attributes feature, you can sum the purchase amounts made by a customer across these channels and use this sum to define audiences and for other personalization. For more information, please visit the computed attributes UI guide.
Transcript
Hi marketers, let’s say you have a brand that sells things and you have loyal customers who buy from you over and over again. I’m going to show you how you can use the computed attributes feature to sum the purchase amounts across multiple purchases on all of your sales channels. You’ll be able to use this sum in your segment definitions and for personalization. Sounds pretty awesome, right? The first thing you need to know is how the purchase amounts are captured in your XDM schemas. Our sample brand Luma captures this in the standard XDM field price total or commerce.order.price total. We set the price total in events that set the event type field to commerce.purchases and we do that consistently across all event data sets containing purchases. Once I’ve confirmed my data model, I can set up the computed attribute. In the platform or AJO interface, go to customer profiles and then open the computed attributes tab. Click create computed attribute. Then enter display name and description. Then you need to define the attribute. I’ll start by creating a condition. For this I’ll just drag the purchases event onto the canvas. Then I define my function. For this I want to use sum and I want to sum those commerce order price total fields. Then I choose my time window. I want to sum purchases over the last month. Now ordinarily this would sum the purchases at the end of each month but I want to calculate this daily as the month progresses. So here I’ll use the fast refresh feature which will calculate a new sum daily. I’ll save. At this point it’s in a draft state and I can still edit. You’ll see it hasn’t evaluated yet and is set to run daily. I’ll hit publish. Then I’ll come back to my website and make a few test purchases. Then I can come back tomorrow and confirm that my computed attribute has evaluated successfully. On a weekly basis a sampling job will run and you can see sample profiles containing the attribute. You can also look up your test profile using any of its identities. That’s it and good luck!
More help on this topic
Previous pageUnion schemas overview
Next pageDelete profiles
Experience Platform
- Platform Tutorials
- Introduction to Platform
- A customer experience powered by Experience Platform
- Behind the scenes: A customer experience powered by Experience Platform
- Experience Platform overview
- Key capabilities
- Platform-based applications
- Integrations with Experience Cloud applications
- Key use cases
- Basic architecture
- User interface
- Roles and project phases
- Introduction to Real-Time CDP
- Getting started: Data Architects and Data Engineers
- Authenticate to Experience Platform APIs
- Import sample data to Experience Platform
- Administration
- AI Assistant
- Audiences and Segmentation
- Introduction to Audience Portal and Composition
- Upload audiences
- Overview of Federated Audience Composition
- Connect and configure Federated Audience Composition
- Create a Federated Audience Composition
- Audience rule builder overview
- Create audiences
- Use time constraints
- Create content-based audiences
- Create conversion audiences
- Create audiences from existing audiences
- Create sequential audiences
- Create dynamic audiences
- Create multi-entity audiences
- Create and activate account audiences (B2B)
- Demo of streaming segmentation
- Evaluate batch audiences on demand
- Evaluate an audience rule
- Create a dataset to export data
- Segment Match connection setup
- Segment Match data governance
- Segment Match configuration flow
- Segment Match pre-share insights
- Segment Match receiving data
- Audit logs
- Data Collection
- Collaboration
- Dashboards
- Data Governance
- Data Hygiene
- Data Ingestion
- Overview
- Batch ingestion overview
- Create and populate a dataset
- Delete datasets and batches
- Map a CSV file to XDM
- Sources overview
- Ingest data from Adobe Analytics
- Ingest data from Audience Manager
- Ingest data from cloud storage
- Ingest data from CRM
- Ingest data from databases
- Streaming ingestion overview
- Stream data with HTTP API
- Stream data using Source Connectors
- Web SDK tutorials
- Mobile SDK tutorials
- Data Lifecycle
- Destinations
- Destinations overview
- Connect to destinations
- Create destinations and activate data
- Activate profiles and audiences to a destination
- Export datasets using a cloud storage destination
- Integrate with Google Customer Match
- Configure the Azure Blob destination
- Configure the Marketo destination
- Configure file-based cloud storage or email marketing destinations
- Configure a social destination
- Activate through LiveRamp destinations
- Adobe Target and Custom Personalization
- Activate data to non-Adobe applications webinar
- Identities
- Intelligent Services
- Monitoring
- Partner data support
- Profiles
- Understanding Real-Time Customer Profile
- Profile overview diagram
- Bring data into Profile
- Customize profile view details
- View account profiles
- Create merge policies
- Union schemas overview
- Create a computed attribute
- Pseudonymous profile expirations (TTL)
- Delete profiles
- Update a specific attribute using upsert
- Privacy and Security
- Introduction to Privacy Service
- Identity data in Privacy requests
- Privacy JavaScript library
- Privacy labels in Adobe Analytics
- Getting started with the Privacy Service API
- Privacy Service UI
- Privacy Service API
- Subscribe to Privacy Events
- Set up customer-managed keys
- 10 considerations for Responsible Customer Data Management
- Elevating the Marketer’s Role as a Data Steward
- Queries and Data Distiller
- Overview
- Query Service UI
- Query Service API
- Explore Data
- Prepare Data
- Adobe Defined Functions
- Data usage patterns
- Run queries
- Generate datasets from query results
- Tableau
- Analyze and visualize data
- Build dashboards using BI tools
- Recharge your customer data
- Connect clients to Query Service
- Validate data in the datalake
- Schemas
- Overview
- Building blocks
- Plan your data model
- Convert your data model to XDM
- Create schemas
- Create schemas for B2B data
- Create classes
- Create field groups
- Create data types
- Configure relationships between schemas
- Use enumerated fields and suggested values
- Copy schemas between sandboxes
- Update schemas
- Create an ad hoc schema
- Sources
- Use Case Playbooks
- Experience Cloud Integrations
- Industry Trends