Build real-time segments in ODP Lite

  • Updated

Optimizely Data Platform (ODP) Lite's real-time segments builder leverages the ODP GraphQL API, allowing you to segment customers in real time and further personalize your customer's web-based experience. You can create custom-built, real-time segments using the ODP RealtimeSegments API or through the Real-Time Segments page in the ODP Lite application.

You can create up to five real-time segments in ODP Lite. Once you reach the limit (five segments), you can delete segments as desired so that you can create more up to the limit. To unlock the ability to create more than five real-time segments, contact the Optimizely sales team to upgrade to ODP.
Use real-time segments for customer events within the last 28 days. If you want to use data greater than 28 days old, upgrade to ODP and use the standard segments on the Customers > Segments page (see Create segments).

Real-Time Segments page

To access your real-time segments, go to Customers > Real-Time Segments. A table displays with the following columns:

  • Segment Name – Displays the name of your real-time segment as a link you can click to view the details of that segment.
  • Size Estimate – An estimate of the number of customers currently in the segment.
  • Creator – Displays Optimizely if the segment is pre-defined by ODP. Any segments that you build yourself do not display anything for the creator.
  • Edit – Click to edit the segment.
  • Copy – Click to copy the segment.

RealtimeSegments API

All segments created using the RealtimeSegments API display on the Real-Time Segments page in addition to all pre-defined and custom-built segments. You cannot edit segments that were built with the API in the real-time segment builder. When you view a segment built using the API, a message displays above the code for that segment.

If you need a segment ID to use in the RealtimeSegments API:

  1. Go to Customers > Real-Time Segments.
  2. Select the desired segment.
  3. Click Copy Segment ID.

Data latency and freshness

Data latency is the time it takes for data to become available to you after an event occurs. The data latency for real-time segments is less than 90 seconds, which means your customer data refreshes in real-time, giving you the most accurate view of your segments. Only 0.001% of requests experience a data latency greater than 90 seconds.

Create a real-time segment

To create a new real-time segment in ODP Lite:

  1. Go to Customers > Real-Time Segments.
  2. Click Create New Real-Time Segment.
  3. Enter the Segment Name.
  4. Click Create Segment.
  5. Click Add Attribute Conditions or Add Event Conditions. You can use the search bar to find specific attributes or events.
    This creates a condition group for whichever type you select (attribute or event).
    • Attribute Conditions – Anything that identifies a customer, such as their name, age, city, last seen email, user ID in ODP, and so on.
    • Event Conditions – Actions that a customer takes with your brand. For example, opening an email, adding items to their cart, viewing a page on your site, viewing product details on your site, and so on.
  6. Complete the condition as desired. You can also add more attributes or events within the condition group by clicking Add Attribute or Add Event.
    Within each group, you can only add conditions of the same condition type you originally selected for the group (attribute or event). For more information on how to build your desired conditions, see Real-time segment components.
  7. When you are done building your real-time segment, click Save Segment. The summary of your segment displays with the size estimate of customers who qualify for that segment.

Real-time segment components

Real-time segments have a variety of grouping and filtering options. For more information on the structure and filtering options for a real-time segment, see the sections below:

Condition groups

At the highest level, conditions are organized in groups. If you select Add Attribute Conditions, that creates an attribute condition group. Similarly, if you select Add Event Conditions, that creates an event condition group.

Each condition group starts with one of the following filters, depending on the condition group type (attribute or event):

  • Attribute conditions[Include/Exclude] people who match [all/any] of these attributes
  • Event conditions[Include/Exclude] people who have done [all/any] of these events

For both of the filtering statements above, select if you want to include or exclude customers who match all or any of the filters in the condition group.

Selecting all uses "and" logic for the rest of the filters in the condition group, meaning customers must match all of the filters in the condition group. It also populates an additional drop-down list only for event condition groups, with in any order and in this order options. Select in any order if it does not matter in which order customers match each event. Select in this order to define the order in which customers must match each event.

Selecting any uses "or" logic, meaning customers must match at least one of the filters in the condition group.

Add events or attributes within condition groups

After you select the desired include/exclude, all/any, and in this order/in any order filters, complete the rest of the conditions in each condition group. For each condition:

  1. Select an attribute or event from the first drop-down list.
  2. Select the qualifying term from the second drop-down list (for example, is exactly, is at least, is, is not known, in the last, between, and so on).
  3. Enter the desired value for the attribute or event that you selected in step 1.
  4. Select the time unit (minutes, hours, or days).
    Only available for event conditions. The maximum is 28 days.

As described in step 6 of the Condition groups section above, you can continue to define attributes or events within condition groups by clicking Add Attribute or Add Event.

You can also continue to add more condition groups to your segment by clicking Add Attribute Conditions or Add Event Conditions.

Additional filters for event conditions

For each event condition, you can click the filter icon to Add Count or Add Filter.

Select Add Count to define the amount of times you want customers to match the corresponding event. For example, if the event is App View, you can define how many times you want customers to view the app to qualify for the segment.

Select Add Filter to define a specific property to further filter customers that match the corresponding event. For example, if the event is App View, and you define a filter on that event for Campaign ID, then customers who have viewed the app within your specified time and belong to the defined campaign would qualify for the segment.

Add exclusions for event conditions

When you set a specific order for your event condition group, an additional option displays to Add Exclusion. To add an exclusion to an event condition group:

  1. Click Add Exclusion and select the desired event from the drop-down list.
  2. In the second drop-down list that displays, select one of the following options:
    • with anything – Excludes customers who have not matched the selected event since step 1. For example, if you select App Uninstall success for your exclusion event, the segment will not include customers who have uninstalled the app at any point, even if they qualify for the other conditions in the segment.
    • with the same – Excludes customers who have matched the selected event and property since your chosen step. This option displays two additional drop-down lists: Select a property and step. For example, if you select App Uninstall success for your exclusion event, Email Sent for the property, and step 1, the segment will not include customers who have uninstalled the app with the same email sent from step 1.
  3. Continue to add exclusions as desired, or remove any that you no longer want.

Exclusions only apply to one event condition group. They do not affect any other condition groups in the segment.
You can also add exclusions as an entire condition group. See Condition groups.

Edit a real-time segment

To edit an existing real-time segment:

  1. Go to Customers > Real-Time Segments.
  2. To edit, either click the name of the segment or click the edit icon.

    If you click the name of the segment, you need to then click Edit Segment to begin editing the segment. If you click the edit icon, the edit view displays automatically.
  3. Edit the segment as desired. For example, you can delete conditions or entire condition groups, add attributes or events within condition groups, add new condition groups, and so on.
  4. Click Save Segment. The summary of your segment displays with the size estimate of customers who qualify for that segment.

Delete a real-time segment

To delete real-time segments you built:

  1. Go to Customers > Real-Time Segments.
  2. Click Delete.
  3. A confirmation message displays. Click Delete Segment.
You cannot delete real-time segments that are pre-defined or that you built using the real-time segments API.

Use ODP Lite real-time segments in other Optimizely products

The following integrations are currently available for ODP Lite real-time segments:

  • Optimizely Web Experimentation – Use ODP Lite real-time segments as audiences in your Optimizely Web Experimentation experiments. For more information, see Configure Advanced Audience Targeting with ODP (beta).
  • Optimizely Feature Experimentation – Use ODP Lite real-time segments as audiences in your Optimizely Feature Experimentation experiments. For more information, see Advanced Audience Targeting with Optimizely Data Platform (ODP).
  • Optimizely Content Management System (CMS) – Use ODP Lite real-time segments in the audiences feature in CMS. You must have the audience package installed. See Audiences.
  • Optimizely Campaign – Use ODP Lite real-time segments as audiences in your newsletter, transactional, and marketing automation campaigns. For more information, see ODP Synchronization.
    The Optimizely Campaign integration is only available for the EU region.