> For the complete documentation index, see [llms.txt](https://kbase.whitelabel-loyalty.com/product/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kbase.whitelabel-loyalty.com/product/loyalty-engine/audiences/audience-criteria.md).

# Audience criteria

Creating meaningful and targeted audiences is a core part of using the Loyalty Engine effectively. Our platform offers two powerful ways to define audience criteria — **Query Builder** and **Expression Editor**. Each method provides different levels of control and complexity, allowing you to build segments that match your use case, whether you need simple rules or advanced logic.

This page introduces both options to help you choose the right approach for your audience strategy. You can explore each in more detail on their dedicated pages.

***

## Query builder

The Query Builder is a visual, user-friendly tool that lets you create audience segments using predefined criteria. It’s ideal for marketers and analysts who want to quickly define rules based on customer attributes, actions, or engagement data — without needing to write code or logic.

#### Key benefits

* Visual, no-code interface
* Fast to set up with predefined criteria options

#### Limitations

* Less flexible for highly specific or custom conditions
* Difficult to represent complex logic or calculations
* Can't calculate event values across a range of events (e.g., totalling how much was spent in a given month across all transaction events)

<i class="fa-magnifying-glass-arrow-right">:magnifying-glass-arrow-right:</i> **Find out more in the** [Audience query builder](/product/loyalty-engine/audiences/audience-criteria/audience-query-builder.md) **article.**

***

## Expression editor

The Expression Editor is a more advanced tool that gives you full control over your audience logic. It uses JSONata expressions to allow you to define complex conditions, use nested logic, or reference calculated fields across multiple events or data sources.

#### Key benefits

* Maximum flexibility for complex audience definitions
* Supports advanced logic, grouping, and time-based calculations
* Can utilise variables to enable easy duplication of audience logic

#### Limitations

* Requires familiarity with JSONata

<i class="fa-magnifying-glass-arrow-right">:magnifying-glass-arrow-right:</i> **Find out more in the** [Audience expression editor](/product/loyalty-engine/audiences/audience-criteria/audience-expression-editor.md) **article.**


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://kbase.whitelabel-loyalty.com/product/loyalty-engine/audiences/audience-criteria.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
