The best moment to reach a customer is the moment their behavior changes, like a fifth deposit, a spending milestone, or a loyalty points threshold. Until now, reacting to these moments meant calculating the aggregation yourself and sending it to Optimove as an event parameter.
With this capability, Optimove does the calculation for you. Every time a customer's real-time attribute updates, Optimove automatically fires a matching event that carries the new value. A triggered campaign can listen to that event and react within seconds. You can use lifetime and time-window aggregations, and you can combine several attribute conditions in a single trigger.
This guide will walk you through how to trigger a campaign from a real-time attribute change, from creating the attribute to watching the campaign fire.
How to Trigger a Campaign from a Real-Time Attribute Change
Throughout this guide, we'll use one example: sending a campaign as soon as a customer's total deposits go over $500.
Create a Real-Time Attribute
First, define the value you want Optimove to calculate in real-time. In this example, that's the total deposit amount, calculated from the deposit event.
- Navigate to Data Studio → Real-Time Attributes.
- Click "Add New Attribute".
- Enter an Attribute Name (30 characters or fewer, must start with a letter). The name becomes the parameter name the trigger will reference, so choose something descriptive — for example, Total Deposits.
- Select an Attribute Format. For numeric values like a deposit amount, choose Number, Decimal, or Currency. String and Date formats are also available, but only support Latest Value and Count aggregations.
- Choose a Calculation Type:
- Lifetime — aggregates across the customer's entire history from the moment the attribute is published. Automatically generates a full set of related aggregations (Sum, Count, Average, Min, Max, Latest).
- Sliding Window — aggregates over a rolling window of 1–7 days. You define a single aggregation function and timeframe.
- Select the source event (e.g.,
deposit) and the event parameter to aggregate (e.g.,amount). - Save and publish the attribute.
aggregations_ followed by the source event name, so a deposit-based attribute creates aggregations_deposit. The event name is shown on the attribute's Real-Time Attributes page. You can also check that the event exists and is published under Settings → Events.Create a Trigger for the Aggregations Event
Next, create a Real-Time Triggers (RTT, formerly Track & Trigger) trigger that listens to the auto-created event. The event carries the updated attribute values as parameters, so you can use them in the trigger's conditions.
- Navigate to Plan > Realtime Triggers and click New Trigger.
- Select the aggregations event for your source event. In this example, that's
aggregations_deposit. - Add a condition on the attribute parameter. Each attribute arrives as one parameter, named after the attribute's column in lowercase. For example: total deposits > 500.
- Optionally, add more attribute conditions to the same trigger. For example: deposit count ≥ 3 AND total deposits > 500.
- Click Save.
deposit → aggregations_deposit. This gives you access to the original event's parameters and to the updated attribute values.Create a Triggered Campaign That Uses the Trigger
Now connect the trigger to a campaign.
- Create a triggered campaign in Campaign Builder.
- Select the trigger you created in Step 2.
- Configure the Target Group, Action, channel, and message as usual.
- Save and activate the campaign.
Send an Event and Watch the Campaign Fire
That's it. From now on, the flow runs end to end automatically:
- The customer sends a
depositevent from your website, app, or server. - The related real-time attributes recalculate with the new value.
- The
aggregations_depositevent fires for that customer, carrying the updated values. - If the trigger conditions are met, your campaign is sent to that customer.
The update typically takes a few seconds from the customer's action to the trigger.
How Real-Time Attribute Triggers Work
Each real-time attribute is calculated from a source event. When that event arrives, Optimove recalculates every attribute that depends on it and then sends one aggregations event that holds all of the updated values.
- One event per update: If several attributes share the same source event, a single aggregations event carries all of their updated values. Your campaign evaluates once per update, never twice.
- Only related attributes: Each aggregations event carries only the attributes that depend on its source event.
- Flexible aggregations: You can aggregate over the last 1, 2, or 7 days, or over the customer's lifetime.
- Frequency capping: Your usual triggered-campaign frequency capping still applies, so customers won't be over-messaged even if their attributes update often.
How is this different from Live Formulas? The concept is similar: an event is sent every time a calculated value changes. Real-time attributes are the long-term approach and will replace Live Formulas over time.
- No event setup: You don't need to create a formula-based event. The aggregations event is created automatically.
- More aggregation windows: Live Formulas cover recent time windows. Real-time attributes add longer windows and lifetime aggregations.
- Reusable beyond triggers: Real-time attributes can also be used in scheduled campaigns and for personalization.
Use Case Examples
- Gaming, deposit milestone: Trigger a campaign on a customer's 5th deposit, using a lifetime deposit-count attribute.
- Gaming, activity milestone: Trigger a campaign when a customer reaches 5,000 spins.
- Gaming, weekly missions: Trigger a campaign when a customer meets a weekly mission goal, such as a total bet amount over a set value in the last 7 days.
- Gaming, vertical value: Trigger a campaign when a customer's Casino GGR goes over $300.
- Loyalty: Remind customers when their points balance reaches a threshold, for example, at 4,500 points or at 5,000+ points.
- Engagement on login: When a customer logs in, trigger a campaign if they haven't yet completed a Minigames (formerly Adact) game.
Targeting New Customers with Lifetime Attributes
When you build a flow for new customers that relies on a lifetime attribute (for example, total deposits over $300), customers who already met that threshold before you created the attribute could also qualify. To exclude them, add a condition to the campaign's Target Group so that it includes only customers whose Registration Date is later than the real-time attribute's creation date.
To start using real-time attribute triggers in your Optimove account, contact your Customer Success Manager.