# Search Triggers

> Choose which of your store's search boxes AI Search listens to — the results open right below the field as the shopper types.

URL: https://help.yasan.ai/en/search-triggers-in-ai-search/
Updated: 2026-11-15

Search triggers tell AI Search **which of your store's search boxes** to listen to. You'll find them under **AI Sales Agent → your store → Search → Search triggers**.

![The Search triggers page](https://help.yasan.ai/help/search-triggers-in-ai-search/search-triggers.en.png)

*The Store search selectors on the Search triggers page*

## Before you start

> **Info**
>
> Search triggers are part of [AI Search](https://help.yasan.ai/en/setting-up-ai-search/). If the **Search** group is missing from your store's settings, search isn't switched on for your store yet.

## Where the results appear

Shoppers type into your store's own search field just as before, and the smart search results appear right under it. The cursor stays in your field, so the search feels like a natural part of the page. Pressing Enter in the field doesn't submit your store's old search — the shopper stays in the smart search.

On phones, the search opens full-screen with its own field instead, since it would otherwise cover the field the shopper is typing into.

## Store search selectors

**Store search selectors** holds the CSS selectors of your search field or of a box that contains it. When a shopper types into any of them, the smart search opens.

> **Tip**
>
> The search follows what the shopper types, so it only listens to text fields. The selector has to point at the search field itself, or at a box that contains it — a search button alone isn't enough, and clicks on it are left to your store.

```css
form.search input[name="q"]
```

> **Warning**
>
> Without a selector the smart search never opens — it has nothing on your store to listen to. The app warns you when the list is empty. On Shoptet, Shopify, Eshop-rychle and Upgates, the selector for the standard search field is filled in for you, and on WooCommerce a best guess for common themes that you may need to correct; on other platforms you add it yourself.

### Finding the selector in your browser

You don't have to write the selector by hand — your browser can hand it to you.

**1. Inspect the search field**

Open your store, right-click its search field and choose **Inspect** (in Safari, **Inspect Element**, once the Develop menu is enabled). The developer tools open with that field highlighted.

**2. Copy the selector**

Right-click the highlighted line and choose **Copy → Copy selector** (in Firefox, **Copy → CSS Selector**).

**3. Paste it into Search triggers**

Paste the selector into **Store search selectors** exactly as copied.

**4. Save and try it out**

Click **Save changes**, open your store and use its search field. If nothing happens, purge your cache or CDN and try again.

### Several search boxes

A store often has several search boxes — one in the header, another in the mobile menu or on the results page. Add a selector for each with **Add another selector**; the search listens to any of them. Remove a selector you no longer need with the trash icon next to its row.

> **Tip**
>
> A selector copied from the browser tends to be long and tied to your current theme. If the field has a stable `id` or `name`, a shorter selector such as `#search` or `input[name="q"]` survives small theme changes.

## Related Articles
- [Setting Up AI Search](https://help.yasan.ai/en/setting-up-ai-search/)