Conditional operators for various data types

While creating the logical building blocks of a segment, the type of search you can run for an attribute is determined by the attribute type. 

Note: Your first payload determines the data type of your attribute

Strings

Consider the following points when you use operators on strings:

  • Use operators marked with * with caution, as they can slow down the performance of the segmentation query.
  • The “is empty” operator matches both nil/null and empty values.

The following operations are supported for strings:

  • is equal to
  • is not equal to
  • *contains
  • *does not contain
  • is empty
  • is not empty
  • *begins with
  • *ends with

Numbers

The following operations are supported for numbers:

  • is equal
  • is not equal to
  • is greater than
  • is less than
  • is less than or equal to 
  • is greater than or equal to 
  • is missing
  • is empty
  • is not empty

Dates

You can choose from the following options for date-based conditions:

  • Between fixed windows – Choose specific start and end dates.

Segment-Between-Fixed-Window.png

  • Between moving windows
    • Select a dynamic time window centered around the current time, using units such as minutes, hours, days, weeks, or months.
    • The window starts from the beginning of the “from” unit and ends at the end of the “to” unit.

Segment-Between-Moving-Window.png

  • Within past – Look back from the current date using relative time units.

Segment-Within-Past.png

How date ranges are interpreted

Blueshift interprets your selected date ranges based on the unit of time you choose:

  • Days → Counted as full calendar days from 12:00 AM to 11:59 PM
  • Weeks → Start on Monday and end on Sunday
  • Months → Start on the 1st and end on the last date of the month

  Note on behavior

Times are evaluated using the account's time zone, as set in the Account Settings.

When using months or weeks in moving windows, Blueshift aligns the range to full calendar boundaries. For example, “past 1 month” on May 28 includes May 1–May 31.

If you need a precise rolling window (e.g., from a month before today to one month after), use days as the unit of measurement instead.

Segment-Moving-Time-Ex-4.png

More examples

  • From the past 1 week to the next 1 week on May 28:
    → May 19 (12:00 AM) to June 8 (11:59 PM)

Segment-Moving-Time-Ex-1.png

  • From the past 3 hours to the next 3 hours at 6:20 AM:
    → 3:00 AM to 9:59 AM

Segment-Moving-Time-Ex-2.png

  • From the past 10 minutes to the next 10 minutes at 6:50 AM:
    → 6:40 AM to 7:00 AM

Segment-Moving-Time-Ex-3.png

Being aware of how date ranges are interpreted can help you set up accurate and reliable filters in your segments.

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.