# Manage cart item filters

> You can create, edit, and delete cart item filters for your campaign in your campaign's Rule Builder.

> For the complete documentation index, see [llms.txt](https://docs.talon.one/llms.txt).

To create and manage cart item filters that you can use in more than one campaign of your Application,
see [Manage Application cart item filters][app-cif].

## Create a cart item filter

Create a cart item filter to use it in a given campaign.
For performance reasons, we recommend creating a maximum of four cart item filters per campaign.

To create a cart item filter:

1. On the left-side menu of your campaign, click <RuleBuilder className="icon"/> **Rule Builder**.
1. In the top-right corner of the page, click <Filter className="icon"/> **Cart Item Filters**.

   :::tip
   If a filter exists, in the **Cart Item Filters** section,
   click <Add className="icon" /> **Add Filter**.
   :::

1. (Optional) To begin your filtering from a cart item filter that was created earlier,
   from **Start with this list of cart items**,
   select one of the following:

   - A filter you created earlier in the campaign.
   - An [Application cart item filter][app-cif].
   - A list of items from a [value map][value-map].
   - All the items in the cart.

   :::tip
   This step can improve the performance of the campaign evaluation and
   reduce the risk of making mistakes when creating filters from cart item lists.
   :::
1. To add a filter, click <Add className="icon" /> **Add Filter Step**.

   :::note
   - Add as many filter steps as you need in the order you want to apply them.
   - Only the filters that can be applied to the previous step are available for selection.
   :::

1. From the list of [available cart item filters][avail-cif],
   select a filter and define the required values.

1. In **Save As**, type a name for your filter. This name then appears in the **Rules** section
   of the <RuleBuilder className="icon"/> **Rule Builder**.

   :::note
   `Value_map_items` is a reserved name and cannot be used for naming a filter.
   See [Manage a value map][value-map].
   :::
1. Click **Save Filter**.

The cart item filter is created.

Additionally,
the following attributes
are available in the [Attribute Selector](/docs/product/rules/overview.md#attribute-selector):

- <Attribute type="filter" name="<Filter name> item count"/>
- <Attribute type="filter" name="<Filter name> total price"/>
- <Attribute type="filter" name="Discounted Price"/>, if [cascading discounts](/docs/product/applications/manage-general-settings.md#cascading-discounts) are enabled.

:::tip
Cart item filters can also be created from a [blueprint](/docs/product/rules/blueprints.md).
:::

## Edit a cart item filter

To edit a cart item filter:

1. On the left-side menu of your campaign, click <RuleBuilder className="icon"/> **Rule Builder**.
1. In the **Cart Item Filters** section, click the filter to edit.
1. Edit the required information.

   :::note
   - You cannot rename a filter marked <Lock className="icon" />.
     This means it's used in a rule, another filter, or a [bundle definition][bundle-def].
   - To add a filter step, click <Add className="icon" /> **Add Filter Step**.
     To delete a filter step, to the right of the step, click <Delete className="icon" />.
   :::

1. Click **Save Filter**.

## Delete a cart item filter

You can delete a cart item filter if it is not used in a rule, another filter,
or a [bundle definition][bundle-def].

To delete a cart item filter:

1. On the left-side menu of your campaign, click <RuleBuilder className="icon"/> **Rule Builder**.
1. In the **Cart Item Filters** section, to the right of the
   filter you want to delete, click <Delete className="icon" />.

## Related pages

- [Manage Application cart item filters][app-cif]
- [Create a discount using cart item filters](/docs/product/tutorials/coupons/cart-item-filters-discount.md)
- [Buy 3 and pay for 2](/docs/product/tutorials/coupons/buy-3-pay-2.md)
- [Evaluation order for rules and cart item filters](/docs/product/applications/evaluation-order-for-rules-and-filters.md)
- [Create and manage item bundles](/docs/product/rules/create-and-manage-bundles.md)

[app-cif]: /docs/product/applications/manage-application-cart-item-filters.md
[bundle-def]: /docs/product/rules/create-and-manage-bundles.md
[avail-cif]: /docs/product/rules/cart-item-filters/available-cart-item-filters.md
[value-map]: /docs/product/rules/manage-value-map.md
