For the complete documentation index, see llms.txt. This page is also available as Markdown.

Query segment

The segment type computed from a query on your datamart, and the one type where persistence is a choice.

What it is

A Query segment holds the users who satisfy a query on your datamart. It is the most common type, and the only one whose membership is recomputed on a schedule rather than filled by an external event.

These tools produce a Query segment, and all of them save the same object:

Tool
Who it is for

Business users, working from pre-built audience features

Users familiar with their schema, building AND / OR conditions visually

Schema and data experts, writing OTQL directly

What is specific to this type

  • Persistence is a choice. Every other segment type is always persisted. On a Query segment you decide, and the decision has consequences - see Persisted segment.

  • It has an evaluation period. By default the segment is recalculated once a day. This is a maximum interval, not a guarantee of timing.

  • Default lifetime does not apply. Users leave a Query segment when they stop matching the query, not on a timer.

See Segment metadata for all the advanced fields.

Edit a Query segment

You edit a Query segment through the tool that created it.

1

Open the segment

Go to Audience > Segments and click the segment, then click Edit.

2

Edit the query

If the segment was built in the Advanced Segment Builder, click Edit Query to reach the builder, change your criteria, then click Update.

If the segment was written in OTQL - through the query tool or as a User Expert Query - edit the query in its dedicated zone.

3

Save

Click Save. In the builder, Update only applies the change to the query - the segment itself is saved by the final Save, and a warning reminds you of that step.

After an edit, the segment must be computed again before its user count updates. Feeds attached to it adjust at that point: they upsert and delete users according to the newly computed segment, rather than resending the whole segment.

Last updated

Was this helpful?