# Query

## Overview

The Query Data Source enables Avonni Data Components—such as [**Data Table**](/experience-cloud/tutorials/components/data-table.md), [**List**](/experience-cloud/experience-components/ax-list.md), [**Gallery**](/experience-cloud/experience-components/ax-gallery.md), and Map—to dynamically retrieve and display Salesforce record data on Experience Cloud sites.

This data source is designed for situations where content must stay in sync with Salesforce data and respond dynamically to user interactions on the page.

***

## What is the Avonni Query Data Source?

The Avonni Query Data Source connects Avonni components directly to **Salesforce objects** via a configurable query, similar in concept to SOQL but built visually.

In an Experience Cloud context, it enables:

* Dynamic data retrieval from Salesforce records
* [**Reactive behavior**](/experience-cloud/getting-started/reactive-components.md) between components on the same page

***

## Creating a query

Queries are created **directly from an Avonni component**.

To create a new Query:

1. Select an Avonni Data Component (for example, a **Data Table** or **List**) in Experience Builder
2. In the component’s properties panel, open the **Data Source** section
3. Select **Query** as the data source
4. Configure the query fields, filters, and options

***

## Filtering data

### Configuring query filters

Filters allow you to control which Salesforce records are returned by the query, similar to a `WHERE` clause in SOQL.

Filters are configured directly in the query editor and apply to all components using that query.

***

### Types of filters

**Static filters**

Static filters use fixed values defined at configuration time.

Example:

* Field: `Location`
* Operator: `equals`
* Value: `New York`

Static filters do not change unless the query is edited.

***

## Reactive queries

**What are reactive queries?**

Reactive queries enable Avonni components on an Experience Cloud page to automatically update in response to user interactions or changes in other components.

This enables highly dynamic, interactive pages without page reloads or custom code.

<a href="/pages/dF4q5ayJxIV2essXv4FI" class="button primary" data-icon="square-info">Learn More</a>

***

## When to use the Query Data Source

Use the Query Data Source when:

* Data must stay synchronized with Salesforce records
* Content must react to user interactions
* Multiple components need to share the same dataset
* Filtering and grouping logic is required

For static or editorial content, consider using [**Manual**](/experience-cloud/properties-panel/data-sources/manual.md) or [**CMS Collection**](/experience-cloud/properties-panel/data-sources/cms-collection.md) data sources instead.


---

# Agent Instructions: 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:

```
GET https://docs.avonnicomponents.com/experience-cloud/properties-panel/data-sources/query.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
