# Triggers

You can trigger Promotion Rules for either Searches or Category pages. Enabling you to promote results when people search for specific terms, curate the order of results on your category pages, or automate the ordering of results on sales pages based on your business goals.

{% hint style="info" %}
Promotion rules execute on top of search relevance settings. This means that promotion rules run for all search pipelines.
{% endhint %}

![Promote items on category pages or searches](https://3882858970-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FVeIbtsTcQaqaNeKzLbbU%2Fuploads%2FBmqjxZk4WX3hGlv6fuWk%2Fimage.png?alt=media\&token=eef6de02-0df8-406a-893d-f889e879345c)

### Searches <a href="#searches" id="searches"></a>

To execute a Promotion Rule, when a user searches for a particular term, select the *Searches* option.

Next up, specify the type of match for the query. Similar to , you can choose from several options to match a single phrase: is is not contains does not contain starts with ends with Or to match multiple phrases separated by commas. contains all contains any contains none of equals any equals none

**Examples**

| Expression                                 | Matching Searches                                                                                 |
| ------------------------------------------ | ------------------------------------------------------------------------------------------------- |
| *is* **star wars**                         | Only matches exact searches for "star wars". It **does not** match "star wars episode I"          |
| *contains* **star wars**                   | Matches all searches that contain the phrase "star wars". It **does** match "star wars episode I" |
| *starts with* **star**                     | Matches all searches starting with "star". For example, "star wars" and "star trek"               |
| *contains any* **luke**, **leia**, **han** | Matches all searches that contain either the phrase "luke", "leia", or "han"                      |

### Category pages <a href="#category-pages" id="category-pages"></a>

Filters typically power category pages using specific fields. The name itself hints at one of the most common use-cases, categories. However, in e-commerce, category pages are often used to show products of specific brands, items on sale, or new arrivals. Each of those cases uses a different field to identify the category page and filter the items shown.

The main difference between *Category pages* and *Searches* is the field we are matching. For Searches, we always match on the search query field (*q*). However, as hinted at above, the field we want to match can vary for category pages.

Therefore, to set up a promotion for a category page, you will have to specify the field to match. Examples of the most common fields are:

* category
* collection
* collection\_id
* brand
* type
* onSale

Specify the value you want to match when using a filter with this field. The available conditions will depend on the type of field. Numeric fields, for example, do not show the "contains" option.

### Scheduling <a href="#timeframe" id="timeframe"></a>

Schedule a rule to be triggered only during a certain period. Common use-cases for specifying timeframes include:

* Sale promotions on e-commerce sites
* Temporary rules with fixed end dates
* Time-bound rules to promote page during specific periods or events
  * Tax time
  * Holidays
  * New releases

### Advanced settings <a href="#advanced-settings" id="advanced-settings"></a>

Promotion rules in the UI are currently limited to the above settings. However, since promotion conditions are powered by the same [filter-expressions](https://docs.search.io/documentation/fundamentals/filter-expressions "mention") that are available for conditions in [search-settings](https://docs.search.io/documentation/fundamentals/search-settings "mention"), you can create advanced rules via the API. For more details, refer to the [Promotions API documentation](https://dev.search.io/docs/api/#tag/Promotions)


---

# 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.search.io/documentation/fundamentals/promotion-rules/triggers.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.
