# Advanced Targeting Filters

## Advanced Targeting Filters

Use advanced targeting when simple targeting is not enough. It lets you target campaigns with rule-based logic across product, visitor, page, session, cart, and behavior data.

Use this page as a reference while building conditions in the **Targeting** tab.

For the full campaign setup flow, see [Create a Campaign](https://docs.crobox.com/how-to-guides/dynamic-messaging/how-to-create-a-dynamic-messaging-campaign).

### Before you start

* Choose a filter
* Choose an operator
* Enter the value
* Combine conditions into groups when needed
* Check estimated reach and preview before publishing

{% hint style="warning" %}
Filters are only visible to users with **Editor**, **Publisher**, or **Admin** roles.
{% endhint %}

### Presets

Presets apply a common filter setup in one click. You can edit them after applying.

| Label                     | What it does                                   | Pre-configured as                                                    |
| ------------------------- | ---------------------------------------------- | -------------------------------------------------------------------- |
| Most Popular Products     | Top 30% most viewed products per category      | Product Popularity Rank ≤ 30%, per category, views, last 30 days     |
| Bestsellers               | Top 15% most sold products per category        | Product Popularity Rank ≤ 15%, per category, sold, last 30 days      |
| New Products              | Products added within the last 14 days         | Product Lifespan ≤ 14 days                                           |
| Sale Products             | Products with at least 15% discount            | Product Discount ≥ 15%                                               |
| Out-of-Stock Products     | Products currently unavailable or on pre-order | Product property `availability` equals `out_of_stock` or `pre_order` |
| Free Shipping Cart Filter | Cart total in a mid-range threshold            | Cart Value between 30 and 70                                         |

### Filter groups

#### Cart

| Filter              | Description                                                                                                                                  |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| Any Cart Product    | Whether the cart contains a product matching an optional sub-filter. Sub-filter options come from the Product and Product Engagement groups. |
| Total Cart Products | Number of products in the cart. Configurable per all products or per unique product. Default operator: ≥                                     |
| Total Cart Value    | Total monetary value of the cart. Always includes a product sub-filter. Default operator: ≥                                                  |

#### Client (Behavioral Targeting)

| Filter                | Description                                                                                   |
| --------------------- | --------------------------------------------------------------------------------------------- |
| Client Element Exists | Checks whether a specific DOM element or CSS selector is present on the page at trigger time. |
| Client Idle Time      | Seconds the visitor has been idle. Default operator: ≥                                        |
| Client Time On Page   | Seconds the visitor has spent on the current page. Default operator: ≥                        |
| Client Viewport       | The visitor's viewport size or breakpoint at trigger time.                                    |

#### General

These filters are available for campaign targeting only.

| Filter             | Description                                                                                                      |
| ------------------ | ---------------------------------------------------------------------------------------------------------------- |
| Time Period        | Restricts the campaign to a specific date and time window.                                                       |
| Recurring Schedule | A cron expression defining when a countdown timer starts and stops. Times are based on the visitor's local time. |

#### Page

| Filter        | Description                                                                                                                |
| ------------- | -------------------------------------------------------------------------------------------------------------------------- |
| Page Type     | The type of page the visitor is currently on, such as PDP or PLP. Options come from the container's configured view types. |
| Page Url Href | Full URL of the current page.                                                                                              |
| Page Url Host | Hostname of the current page URL.                                                                                          |
| Page Url Path | Path portion of the current page URL.                                                                                      |

#### Product

| Filter                      | Description                                                                                                                    |
| --------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| Parent ID                   | The parent or group product ID. Useful for targeting variant groups.                                                           |
| Product                     | Any custom product property from your feed. Available operators depend on the value type.                                      |
| Product Country             | Country associated with the product in the feed.                                                                               |
| Product Created             | Date the product was first created.                                                                                            |
| Product Discount            | Absolute discount amount on the product.                                                                                       |
| Product Discount Percentage | Discount expressed as a percentage.                                                                                            |
| Product Finder Position     | Position of the product in a specific Product Finder's results. Select a finder and operator such as top N or between N and M. |
| Product ID                  | The product's unique identifier.                                                                                               |
| Product Imported            | Date the product was first imported into the feed.                                                                             |
| Product Language            | Language associated with the product in the feed.                                                                              |
| Product Lifespan            | Number of days since the product was first seen. Default operator: ≤                                                           |
| Product Tag                 | Membership in a saved product tag. The dropdown shows tag names with estimated product counts.                                 |
| Product Updated             | Date the product was last updated in the feed.                                                                                 |

#### Product Engagement

| Filter                  | Description                                                                                                                                        |
| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
| Product Interactions    | Number of times a product was interacted with. Configure the interaction type, time window, and whether to count all events or per unique visitor. |
| Product Popularity Rank | Relative popularity rank of a product. Configure rank type, interaction type, scope, time window, and counting method.                             |

#### Referrer

| Filter          | Description                                                             |
| --------------- | ----------------------------------------------------------------------- |
| Referrer Medium | The medium of the traffic source, such as `email`, `cpc`, or `organic`. |
| Referrer Source | The source of the traffic, such as `google` or `newsletter`.            |

#### Region

| Filter          | Description                                                            |
| --------------- | ---------------------------------------------------------------------- |
| Region Country  | The visitor's country as configured in the container's active regions. |
| Region Currency | The visitor's active currency context.                                 |
| Region Language | The visitor's active language context.                                 |

#### Session

| Filter            | Description                                                                      |
| ----------------- | -------------------------------------------------------------------------------- |
| Entry URL Href    | Full URL of the page the visitor entered the site on during this session.        |
| Entry URL Host    | Hostname of the session entry URL.                                               |
| Entry URL Path    | Path of the session entry URL.                                                   |
| Session Property  | Any custom session-level property. Available operators depend on the value type. |
| Session Returning | Whether the visitor has visited before. Default value is `true`.                 |

#### Visitor

| Filter                | Description                                                |
| --------------------- | ---------------------------------------------------------- |
| Device Type           | The visitor's device category: Mobile, Tablet, or Desktop. |
| IP Address            | The visitor's IP address. Campaign targeting only.         |
| Visitor Geo City      | Visitor's city from geo-lookup.                            |
| Visitor Geo Continent | Visitor's continent from geo-lookup.                       |
| Visitor Geo Country   | Visitor's country from geo-lookup using ISO code.          |
| Visitor Geo Region    | Visitor's region or state from geo-lookup using ISO code.  |
| Visitor Platform      | Platform the visitor is on: Web, iOS, or Android.          |
| Visitor Segment       | Membership in a saved visitor segment.                     |

### Common examples

* Show only discounted shoes:
  * `Category = Shoes` AND `Product Discount Percentage >= 15`
* Show a message to returning mobile visitors:
  * `Device Type = Mobile` AND `Session Returning = true`
* Show a cart message when the threshold is close:
  * `Total Cart Value between 30 and 70`
* Highlight top-performing products:
  * `Product Popularity Rank <= 30%`

{% hint style="info" %}
If you only need broad rules like page type, visitor segment, schedule, or product tags, start with the simpler controls in [Create a Campaign](https://docs.crobox.com/how-to-guides/dynamic-messaging/how-to-create-a-dynamic-messaging-campaign).
{% endhint %}
