Query Builder (preview)
Now available for preview
Query Builder is currently in preview. Features and functionality may change.
About
Query Builder extends metrics by adding flexibility and richer logic. It lets you define conditions and relationships in a more natural, visual way.
For example: Get the top 10 users who are most engaged by the count of messages. Get users posting duplicate messages to many channels.
Use the predefined queries in Query Builder to quickly set up ranking and spam detection use cases, view results, and automate the actions you want to trigger.

Predefined queries
In this initial preview release, Query Builder includes four predefined queries with default configurations:
| Predefined Query | Purpose |
|---|---|
| Top N | Reward the top 10 users who are most engaged. ![]() |
| Bottom N | Incentivize users who are least engaged. ![]() |
| Cross-posting spam | Detect users sending duplicate messages across multiple channels. ![]() |
| Chat flooding spam | Detect users posting excessive or repetitive messages in a single channel. ![]() |
Create a query from a predefined query
-
Click Business Object. Query Builder can be found at the top of the main page of the Business Object when at least one Business Object has been created.

-
Choose one of the available predefined queries. If you don't see the list, click New query.

-
Provide a name for your query.
-
Add a data source by selecting an active Business Object that is already capturing data.
You can also select an inactive Business Object, but note that you won't see any data when you run the query.
Once a Business Object is selected, the predefined query automatically preselects the data fields from that object that best match the selected use case. Typically, these fields include User, Channel, and Message Text (or Chat).
You can edit the query to meet your use case. The Top N users or Bottom N users can be adjusted to be based on the
count of recordsor rows captured, thecountof a specific data field like message chats, theaverage,sum,maxorminof a number data type like purchases or game points. -
Choose the time period or window you'd like to use for this query (for example, last 1 minute, last 10 minutes, last 1 hour).
-
After selecting the aggregation window, click Save again to store your configuration.
-
Optionally, add filters to refine your results. You can also do this after you run the query.

Available filters include:
equals, does not equal, greater than, less than,
greater than or equal to, less than or equal to,
is empty, is not empty, between, not between,
contains, does not contain, starts with,
ends with, min length, max length -
Click Run to execute the query and view results.

No data appears
If no data appears, extend the time window (for example, to 1 hour or more) and click Refresh to run the query again. Don't save the extended time window unless that's the aggregation window you actually want to use.
-
Check the query results to verify your setup, add or adjust filters, or refine the query as needed. When used in a Decision, each row displayed in the query results represents a condition that can trigger an action.



