Recognize the 3 primary objects in Klaviyo
At its core, Klaviyo is a database that stores information about people, events, and items (usually products in the context of ecommerce). These records can be aggregated in different ways and used to power automated marketing communications through a variety of communication channels, like email, SMS, and push notifications.
While Klaviyo is extensible and offers numerous advanced capabilities, the underlying data model is made up of 3 primary objects:
- Profiles
- Events
- Catalogs
Profiles
Profiles represent people. The primary identifier for a profile can be an email, phone number, or a customer ID. Profiles store information about users in the form of properties. Properties are user-level attributes that can be created, updated, and deleted. Profiles are schemaless, which allows for easy manipulation of profile property data.
Profiles also store predictive analytics, which are AI-driven insights about a particular user. Within a profile, you can view all events related to a user in one consolidated view. Profiles serve as a single source of truth, providing a comprehensive view of every touchpoint across all channels and integrated tools.
Events
Events are timestamped historical actions that map to a Klaviyo profile, such as Placed Order, Clicked Email, or Added to Cart. Events are tracked by Klaviyo across all communication channels, and can also be synced to Klaviyo through third-party integrations like loyalty programs, shipping/logistics solutions, help desk services, and more. Events are powerful because they can be used to trigger automated messages and provide insight into customer behavior.
Catalogs
Catalogs represent products, or product-like records. Catalogs can be synced to Klaviyo through a native integration or a web feed. Catalogs specify variant relationships, meaning a particular product can have different variants, like different sizes or colors. Catalog item data can be dynamically pulled into emails and SMS messages to personalize content, and products can be dynamically recommended to customers based on predefined rules about their behavior. They can also trigger back-in-stock automations if the catalog is inventory-aware.
Identify the difference between events and metrics
When working with data in Klaviyo, it’s important to understand the difference between events and metrics. Events are individual actions performed by a profile. Each event has a unique event ID for that instance. Metrics are collections of similar events. Think of a metric as a container for individual event instances. Metrics also have a unique ID, but the ID refers to that container or group of events.
As illustrated in the example below, a single event has a unique ID that links directly to that instance, while a metric ID links to a group of similar events.
Locate a metric ID
To find the ID for a particular metric using an API, use the Get Metrics endpoint. Get Metrics will return all of the metrics within an account, along with their associated metric IDs. This should not be confused with the Get Metric(singular)endpoint. Get Metric requires that you already know the metric ID, and will return data for a single metric using that ID.
To find the ID for a particular metric within the Klaviyo app, navigate to Analytics > Metrics, click into the metric you want, and locate the string of characters within the webpage URL. This string is the metric ID.
Examine how data powers experiences in Klaviyo
Data from profiles, events, and catalogs power a huge variety of different outcomes and experiences in Klaviyo. In order to determine what you should build, it’s helpful to be familiar with some key features of the platform and how primary object data relates to each one.
Campaigns
A campaign is a message that is sent manually at a specified date and time. It can be sent through a variety of channels, including email, SMS, or push notification. Campaigns are sent to profiles, and the act of receiving or engaging with a campaign will log additional event instances on that profile.
Flows
A flow is an automated series of messages that is set in motion by a trigger. You can trigger a flow with a specific action. Trigger options built natively into Klaviyo include:
- Someone subscribes to a list
- Someone joins a segment
- Someone does something (an event is logged)
- The price of a product changes
- A specific date arrives
You can use APIs to trigger flows in Klaviyo by creating custom events that serve as the flow trigger.
Sign-up forms
Klaviyo sign-up forms are typically used to collect basic contact information from site visitors like name, email, and phone number. Beyond that, you can use a form to collect virtually any information that you want to know about users. Form fields map back to properties, which are stored on profiles. Create custom profile properties to store pertinent information that can help you segment and target profiles in the future.
Learn more about Klaviyo’s architecture and how data is stored.