What is And/Or Logic

Ometria helps you simply create complicated segments by adding boolean logic or AND/OR logic between different filter criteria.

This helps you quickly create advanced segmentation with no need to create multiple segments and join them up.


It's important to remember that there are no priorities in segmentation. Either one criteria is used, or the other or both. There are no priorities.

Important tips you need to know 

  • Each grey filter block in the Customer Filter is connected with other filter blocks by either an AND or an OR connector.

Fig 1: Grey blocks are connected with the AND connector in the above example

  • ‘All’ of the conditions = AND connector. Meaning each of the criteria has to be met

  • ‘Any’ of the conditions = OR connector. Meaning any criteria can be met.

  • Within each grey filter block, you can create nested filters, again with AND/OR connectors.

Fig 2: Even within a grey block you can add AND/OR logic for conditions. The above example allows you to select OR for nested conditions as AND is already the logic between the grey container blocks.


Fig 3: The above example has OR logic for nested conditions and AND logic for the overall filter.


Fig 4: Conditions inside the grey block will always have the same logic connecting them within the grey block.


  • Clicking on the ALL-ANY toggle at the top would switch EVERY logic connector. Switching halfway through would affect the conditions of your entire segment.

Fig 5: Toggle between ALL and ANY to switch between 

  • Top-level or grey blocks will always have a different connector than the nested filters. So if the top-level logic is AND, nested-level logic would be OR. And vice versa.

    This simply allows you to create any kind of segment you need with boolean logic as well as prevents you from making a confusing and messy segment that you would find difficult to make sense of later.


How-to: Examples

The best way to find out how to segment is to segment! Try working out these examples on your own to get the hang of it.

E.g. 1: How many of my active VIPs have purchased this March? 

Or you would want to know How many active VIPs are purchasing a new product you’ve released this March? 

Here’s how to filter this in Ometria: 

  • Belongs to a segment X (Active VIPs)
    AND
  • has made a purchase in Month Y (March)
    (add the condition Products Purchased to select your new product to find how many active VIPs are purchasing it this March)


Fig 6: Segmenting with AND logic only (ALL)


E.g. 2: How many BlackFriday and Christmas shoppers are still engaged with emails? 

Depending on what period you define as ‘are still’, and how long your Christmas + Black Friday sales last, you would do something like this:

  • has made a purchase in the BF and Christmas period
    AND
  • is opted in
    AND
  • has opened an email in the last 90 days
    OR
  • Has clicked an email in the last 90 days


Fig 7: Example of segmenting with AND and OR logic, both.


E.g. 3: From which country or city are contacts most engaged with emails?

Another email engagement test you’d like to perform on your contacts could be by country or city.

Which would spell out in Ometria as:

  • Customer is from a country which is one of X, Y
    AND
  • Has last opened an email in the last 90 days
    OR
  • Has last clicked an email in the last 90 days.

Quite similar to the demo above.



E.g. 4: How many of your UK contacts are engaged in any way with your brand

I.e. via orders, website visits, email interactions?

Here’s is how you will be able to filter this segment in Ometria.

  • is from the UK
     AND 
  • is opted in
    AND
    (has done one of the following:)
  • bought in the last 6 months
    OR 
  • visited in the last 3
    OR
  • opened an email in the last 6


Fig 8: another example of segmenting with AND and OR logic, both.


 Fig 9: Breakdown of segment portions. The grey blocks are connected via AND logic.


E.g. 5: How many of your high engagers even convert? 

How many of them actually click through to your website or place orders?

How to segment in Ometria:

  • is highly engaged with emails
    OR
  • has purchased in the last 6 months
    OR
  • has visited the site in the last 3 months
    (any of the above)
    AND 
  • is opted in


Fig 10: Segmenting high engagers who have actually converted (visited website or purchased) by AND and OR logic.


If you need any help creating segments, don’t hesitate to submit a ticket or ask your CSM.