Work with measures
To truly gain a 360-degree perspective on your customers, you need to track key performance indicators (KPIs) across all data sources that you're ingesting. By defining KPIs across all sources, you can get a clearer picture of the customer overall. Customer Insights - Data uses measures to define the KPIs that best reflect the performance and health of your business. Using measures, you can define customer-related measures such as their lifetime value. You can also define aggregated business-health measures such as monthly active users. Customer Insights - Data provides an intuitive experience that helps make it easy for you to build different types of measures. It includes a query-builder wizard that doesn't require you to manually code or validate a query.
Customer Insights - Data includes three different measure types that can be created. Depending on which type of measure that you define, they can be used in different parts of the application.
The three types of measures are as follows:
Customer attribute - These measures represent a single field for each customer. They typically reflect a score, value, or state such as a customer's lifetime value, total sales, or average purchase value.
Customer measure - Provides input that is related to an individual customer's behavior with breakdown by dimensions. For example, measuring the total number of visits that each of your customers made for each channel or each customer's total sales each day.
Business measure - Tracks items that are related to your business's performance and health. They might include items such as average sales per customer and monthly active users (MAU).
After the measures that you want to track are defined, they provide multiple benefits:
Displaying business measures on your organization's home page.
Viewing customer-specific measures as part of the customer card.
Using measures as criteria for defining customer segments with the Segment builder page.
Measures can be calculated on profile fields, for example, using a business measure to find the average date of birth across all customers. Additionally, measures can be calculated through interactions that your organization has with a customer. Interactions are any customer touch points across your data sources such as purchases, customer service cases, emails, phone calls, or branch visits. Interactions could also represent data that is gathered from connected devices, withdrawals, or deposits in banking, entry/exits of a premises or area, and so on.
Since the type of measure that you define affects where and how it displays in the application, you should spend a little extra time identifying which types of measures that you need. For example, if you want to compare the average value of all purchases made in your stores versus purchases made online, you need to define two business measures.
If you wanted to see how much an individual customer spent in their lifetime or their average store purchase versus web purchase values, you would define customer attributes. Defining these values as customer attributes ensures that the data is treated as fields when they display on the customer cards of each customer.
You can create measures from the Measures page by selecting the New measure button. You can either choose to build a measure based on a template or you can select to build your own from scratch.
Measure templates
Customer Insights - Data includes several measure templates that can be used to reduce the amount of time required to create your measure.
Available measure templates:
Average transaction value (ATV)
Total transaction value
Average daily revenue
Average yearly revenue
Transaction count
Loyalty points earned
Loyalty points redeemed
Loyalty points balance
Active customer lifespan
Loyalty membership duration
Time since last purchase
Based on the template selected, you need to ensure that you have data to support it ingested into Customer Insights - Data as an activity. For example, if you select the Loyalty Points earned template, you need to ensure that the activity being used, such as purchases includes a field that specifies the number of loyalty points earned for that transaction.
Build from scratch
If you indicate that you would rather create a measure from scratch, you're taken to the measure builder. The measure builder lets you filter data, group results, detect table relationship paths, and preview the output of the measure.
When you first create a measure, you need to decide which table to base the measure on. A measure can be associated with a single table or multiple tables depending on the measure. For example, a measure that calculates the total amount of in-store purchases would likely only require one table. However, a measure that calculates the lifetime value of all purchases would need data for every data source that contains purchase information.
Each measure includes dimensions that help group the data in the measure. By default, each new measure created automatically includes the customer profile as the dimension. More tables can be added to the measure as needed based on your needs. We discuss Dimensions in more detail later in this unit.
Calculations
Each measure has calculations that get the necessary values required by the measure, such as finding the average purchase amount. In the measure configuration area, you identify the aggregate function to use in the calculation. You can use the Select Function dropdown menu to identify the one you want to use.
Available aggregation functions include:
Sum
Average
Count
Count Unique
Max
Min
First: takes the first value of the data record
Last: takes the last value that was added to the data record
Once you identify the aggregation that you want to use for the measure, you need to identify what data to base the measure on. For example, if you want to find the average purchase price of online purchases, you need to select the total price attribute on the purchase's table. In the add attribute screen, you first need to expand the data table that includes the attribute you want to measure. Any attribute that can be used for the measure is available to select. Choose the attribute you want to use in the aggregation function. You can only select one attribute at a time.
Dimensions
As mentioned previously, one of the main things you need to define on a measure is the dimensions for the measure. Dimensions act as a group by function. They help define how to group the measure values by. Data within your measure table or attribute is grouped by all the defined dimensions. For example, if you wanted to group your measures by city, you can add the city field from the customer profile to your measure as a dimension item.
By default, when a new measure is created, the dimension is at the customer profile level. This means that the measure is grouped by individual customers. These are typically displayed in the application as a Customer Attribute measure. These measures are represented as new columns on the customer profile table and display on the customer profile screen.
If you remove the customer profile dimension from the measure so there are no dimensions included, the measure calculates at a business level rather than a customer level. These are typically displayed in the UI as Business Measures.
Using variables
Many times, you need to make variable calculations for each customer record to get the value of the measure. For example, if you want to get a customer's lifetime value, you define a measure to be the total value of point-of-sale (POS) purchases to the total value of online purchases for each of your customers' records.
To accomplish this, you would need multiple measures that include multiple dimensions. For example, to get the total value of online purchases for a customer, you create a measure that includes the Customer ID attribute from the Customer Profile, and Contact ID attribute from the online purchases table. This ensures that they're grouped by the same ID as the Customer Profile. These types of measures are referred to as Customer Measures. Customer Measures don't display in the User Interface. They're used when creating segments or to create Customer Attribute Measures.
As mentioned previously, once created, Measures can be easily used as variables in other measures. When you're defining the attributes for the measure calculation, any measures that can be used display.
The calculations from the measure can be used in the overall expression. In the image below, the total in-store spend and total online spend measures are used to calculate the lifetime spent value.
Relationship path
Many times, based on the attributes that you selected for the calculation, there can be multiple paths between the data table you mapped and the Customer table. For example, when you configured Customer Insights - Data, you might have related the purchases table to multiple customer tables. It might be related to the loyalty customer data table and the unified customer profile. In the image below, the measure dimension is set to the Customer ID of the Customer Profile, and the calculation is an average based on the total price field in the PosPurchases table.
Since Pos_Purchases is related to both a customer in the LoyCustomers table and the customer profile, you need to specify which table should be used to identify it. This is important because based on what you select your results might change.
View your measures
Any measures that you create display on the Measures page. The list provides you with high-level details such as the measure's type, creation owner, creation date and time, edit owner, last edit date and time, and last refresh date and time. When you select a measure, it displays a preview of the measure output. On the right side of the list is the Actions column. Each measure has various actions that you can perform on it by selecting the ellipsis under Actions for that measure. When you select actions, you can edit the measure, view the output, rename it, or delete it.
Depending on the type of measure that you defined, measures are also displayed in the following ways throughout the application:
Customer measure - Accessible from the measure table that was created for the measure from the Tables page.
Customer attribute - Accessible from the Customer_Measure table on the Tables page.
Business measure:
No dimensions - Accessible from the home page under the Insights section.
One or more dimensions - Accessible from the measure table that was created for the measure from the Tables page.
Schedule measures
Measures can be refreshed on the scheduled system refresh, weekly, monthly, or refreshed manually on demand. You might want to schedule last season's measures or measures that don't change often on a slower cadence such as monthly to help your most needed measures refresh faster. The default is every scheduled system refresh.
Define custom refresh schedules for measures
To define a refresh schedule for one or more measures. Go to Measures, select the measures you want to schedule, and choose Schedule.
In the Schedule pane, set the Schedule run to On to run the measure automatically. Set it to Off to refresh it manually. For automatically refreshed measures, select Recurrence and the details for it. If you're defining the schedule for several measures, you should make a selection under Keep or override schedules:
Keep individual schedules: Keep the previously defined schedule for the selected measures.
Define new schedules for all selected measures: Override the existing schedules of the selected measures.