Why a customer profile needs to be real-time

A real-time customer profile is a profile that updates as events arrive, so what the customer did a moment ago is already in it when a system reads it. It matters whenever something reads the profile to act during the visit, because a profile rebuilt last night describes a customer who has since moved on.

By Alex DeanUpdated

What is a real-time customer profile?

A customer profile is the record of one customer that your systems read. A real-time customer profile is one whose contents change as the customer acts: each view, search or basket change is computed into the profile as it happens, and the next read sees it.

The opposite is a batch profile, rebuilt on a schedule, whether nightly, hourly or every few minutes. It is as current as the last run, and anything the customer did since is missing.

A unified customer profile joins every source and identifier under one customer. Unified is about whose data is in the record, and real-time is about how old it is. A profile can be unified and a day behind, or current and keyed on a single cookie. Acting during a visit needs both.

Who reads a customer profile, and when

Something reads a profile to decide what to do, such as a recommender choosing what to rank first or an agent deciding how to open a conversation. That decision is only as good as the match between the profile and the customer at the moment of the read. A weekly newsletter reads the profile once a week, so last night’s version is plenty. A homepage reads it on every page load, while the customer is there and changing what they want.

What goes stale in a batch profile?

Not every part of a profile ages at the same speed. Declared fields, what a customer told you such as their country, change rarely, and transactions change when they buy. The comparison is in behavioral vs declared customer data.

The behavioral part is what goes stale. Values computed from what the customer does, such as the category they are browsing, the searches they ran this session or the items in their basket, change with every action. In a batch profile those values lag behind the visit:

  • The recommender ranks products the customer already bought yesterday, because the order is not in the profile yet.
  • Search results reflect last week’s interests, not the three queries the visitor just ran.
  • A visitor who is new today has no profile at all until the next run, so they get the default experience for their whole first visit.
  • A basket left idle is noticed after the customer has gone.

Each is a timing problem. The data exists and reaches the profile too late.

How do batch and real-time profiles compare?

Aspect Batch profile (warehouse or CDP rebuilt on a schedule) Real-time profile
Freshness As of the last run: daily, hourly, or a sync interval of minutes Updated as each event arrives
What it can react to What the customer did before the last run What the customer is doing in this visit
Identity before login Usually joined after the fact, when the warehouse stitches anonymous history to the account Can be keyed so anonymous activity counts from the first event, and joined to the known profile at login on a device already linked to the account
Cost Lower: scheduled queries on data you keep anyway Higher: streaming compute, a store built for fast reads, and someone on call for both
Typical uses Reporting, segments for scheduled campaigns, churn and lifetime value models, model training In-session recommendations, search ranking, offers during the visit, agents that need the current session

Real-time CDPs are a category that blurs the two columns. Some CDP vendors sell products under that name, and the CDP Institute describes CDPs as sharing profiles with other systems in real time, without defining the term (CDP Institute). In practice “real-time” can describe when an event is accepted, when a segment updates or how fast a profile reads. When you evaluate one, ask separately how long it takes from an event to the computed value changing, and how long a read takes.

When is a batch profile fine?

Often. If the system reading the profile acts on a schedule, a scheduled profile matches it and costs less. A weekly digest, a monthly churn report and a model’s training set all read history. Running them on a streaming system buys freshness nobody reads.

Batch also stays the right home for values that are expensive to compute and slow to change, such as a churn score. A real-time profile can carry those beside the live ones, synced from the warehouse.

The case for real-time starts when the reader acts during the visit and the answer depends on what happened in it.

Example: a returning reader on a news site

A reader has a free account on a news site. Over the past month they have read mostly football, and the nightly profile says their top section is sports. They have signed in on this laptop before, but today they arrive without signing in.

In ten minutes they read three articles about a local election. A homepage module asks the profile what to lead with.

The nightly profile answers sports, because today’s reading is not in it yet. A real-time profile answers politics. The site’s recommender still decides what to show, now with today’s reading.

Here is that attribute, a value computed from events about one key, defined in the Signals Python SDK:

from datetime import timedelta
from snowplow_signals import (
    Attribute,
    AttributeKey,
    EntityProperty,
    Event,
    StreamAttributeGroup,
    snowplow_id,
)

article_view = Event(name="article_view", vendor="com.example", version="1-0-0")

top_section_1d = Attribute(
    name="top_section_1d",
    type="string",
    events=[article_view],
    aggregation="most_frequent",
    property=EntityProperty(vendor="com.example", name="article", major_version=1, path="section"),
    period=timedelta(days=1),
)

reader_profile = StreamAttributeGroup(
    name="reader_profile",
    version=1,
    attribute_key=snowplow_id,
    owner="you@example.com",
    attributes=[top_section_1d],
)

# The site reads by the cookie and the backend by the user id
signals.publish([
    AttributeKey(name="snowplow_id", lookup_identifiers=["domain_userid", "user_id"]),
    reader_profile,
])

Keying on snowplow_id needs snowplow-signals 0.4.11 or later.

The key is what makes it work before login. A group keyed on user_id would hold nothing from this visit, because the reader has not signed in. This one is keyed on snowplow_id, the ID that Snowplow Identities, Snowplow’s identity resolution service, gives each person. Identities has to run on the same pipeline as Signals for this key; built-in keys such as user_id do not need it. Because the reader signed in on this laptop before, Identities already links the browser’s cookie to their account, and today’s anonymous reading counts toward the same person. The site reads the profile by the cookie while they browse. When they sign in to comment, the backend reads it by their user id and gets the same values.

A first-time visitor gets a Snowplow ID of their own from their first event, so their profile starts filling at once, and it joins their account if they sign up on this device.

There is a limit. On a device the reader has never signed in on, the browsing before sign-in stays on a separate profile in Signals for now, and only activity from sign-in onward joins the known one. The warehouse can still join that earlier history after the fact.

Where Signals fits

You can build a real-time profile yourself, and teams do, on Kafka, Flink and Redis. The build is achievable. The ongoing cost is late events, windowing, keeping streaming and warehouse definitions in step, and being on call for it.

Snowplow Signals is another route to the behavioral part of the profile. It collects events, computes attributes like top_section_1d on the key you choose, and serves them to your app or agent while the customer is still there. It works beside a CDP or a warehouse rather than replacing either: the CDP keeps building audiences for marketing tools, the warehouse keeps the history, and Signals supplies what the customer is doing now. How fast attributes update and how fast a read returns are on real-time attributes, and how profiles follow a customer across identifiers is on identity resolution. More explainers are in customer profiles and identity.

See it on your own traffic

Add the SDK, define one attribute, and see an attribute updating against your own traffic in the first session. The free tier runs on the real engine: no card, no sales call.