Personalize with pre-built real-time segments through GraphQL

  • Updated

This feature is currently available to Charter Program members only. Contact your Growth Success Manager if you are interested in participating in the program.

Discuss your launch plan for pre-built real-time segments with the Optimizely team and choose from the following plan options, depending on whether you have technical resources (such as a developer to help you launch pre-built real-time segments on your web pages):

  • Hands-on option – If you do not have technical resources available to you, Optimizely can help you launch. You create the web embeds or modals you want to use for pre-built real-time segments, then share their links with your Optimizely Customer Support Technician who will set up the triggers activating them.
  • Hands-off option – Using our SDK, your developer can interact with your customer data and execute a wide-range of use cases, beyond targeted web modals and web embeds. This option lets you get creative with dynamic personalization on your pages.

Optimizely Data Platform’s (ODP's) pre-built real-time segments feature lets you segment your e-commerce site visitors as they arrive on your page and offer them relevant on-site messages based on their engagement with your brand and site, which drives website conversions, revenue/growth and data collection.

ODP delivers pre-built real-time segments through GraphQL, a query language that provides a method for fetching an organization’s data and displaying dynamic content. ODP enabled a publicly accessible interface for GraphQL, the GraphQL Explorer, to make real-time data available on your site. (You can access data only from your ODP account and nobody else can access data from your account.)

Enable pre-built real-time segments in your account

After gaining access to the Charter Program, Optimizely installs a set of pre-built real-time segments in the back-end of your account. These segments are different from the ones available in your ODP account so you will not see these pre-built Real-Time Segments in your Customers > Segments list.

You can use the GraphQL Explorer in your account to confirm that the pre-built real-time segments were  installed. Go to Account Settings > APIs > GraphQL Explorer.


Run a query (like the following) inside the GraphQL Explorer:

query {
  audiences {
    edges {
      node {

If the query returns data, you can begin using your pre-built real-time segments.


During your conversations with the Optimizely team, you choose the pre-built real-time segments you want to have installed in your account. Currently, Optimizely offers two types of segments: attribute-based and behavior-based.

Attribute-based segments

  • Identified by email – The customer has an email on their profile (ignores consent and reachability).
  • Identified by phone – The customer has a phone number on their profile (ignores consent and reachability).
  • Email marketing opted-in – Opted-in for email marketing using the default consent model (consent is true or null).
  • Phone marketing opted-in – Opted-in for phone marketing using the default consent model (consent is true).
  • Email marketing opted-out – Opted-out for email marketing using the default consent model (consent is false).
  • Phone marketing opted-out – Opted-out for phone marketing using the default consent model (consent is false or null).
  • Opted-in for marketing on any channel – Opted-in at least one email or phone using the default consent model.
  • Email unreachable – The customer has an email address but it is invalid or bouncing.
  • Phone unreachable – Customer has a phone number but it bounces or the country code makes it unreachable.

Behavior-based segments

  • Recent Purchasers – Customers who have purchased in the last 28 days.
  • Intent to Buy – Customers who have added to cart and not purchased in the last 28 days.
  • Email Engaged – Customers who have opened or clicked on an email in the last 28 days.
  • Marketing Engaged – Customers who have engaged (active event) with a marketing message (email, phone, push) in the last 28 days.
  • Fresh visitors – Visitors who are visiting for the first day in the last 28 days.
  • Returning visitors – Visitors who have visited two or more days within 28 days.
  • Active visitors – Visitors who have visited at least two days in the last 7 days.
  • Visitors considering a purchase – Visitors who have browsed the same product on two or more days in the last 28 days and have not purchased since.
  • Super browsers – Visitors who have looked at 10 or more unique products in the last day.

Do you have ideas and suggestions for additional custom, pre-built Real-Time Segments and use cases? Let the Optimizely team know!