# Discount items in a bundle

> We can offer our customers a discount on certain items if the items are included in a bundle.

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

Let's imagine that our business is an apparel store. We can [define a bundle](/docs/product/rules/create-and-manage-bundles.md#create-a-bundle-definition)
containing two t-shirts and one jacket of the same brand and offer our customers a $20 pro rata
discount on the items in every bundle they have in their carts if they spend $80 or more in
our store.

This campaign can be useful to increase sales of certain items and the number of items per
order.

In a [standard campaign](/docs/product/campaigns/overview#standard-campaigns), let's
create:

1. Two [cart item filters](/docs/product/rules/cart-item-filters/overview.md) to
   filter items by item category (in our example, the categories are _t-shirt_ and _jacket_).
1. A bundle definition for two t-shirts and one jacket of the same brand.
1. A [promotion rule](/docs/product/rules/overview.md#promotion-rules) to issue a discount on all
   bundles formed from the bundle definition.

:::note
Our items have _Item category_ and _Brand_ attributes. While _Item category_ is a built-in
attribute and is available to all items in any customer session, _Brand_ is a [custom attribute](/docs/product/account/dev-tools/manage-attributes.md).
:::

## Filter the cart items to find t-shirts

Let's [filter the customer's cart by **item category**](/docs/product/rules/cart-item-filters/manage-cart-item-filters.md)
to find all the t-shirts in it. This allows us to use a list with only t-shirts when
defining our bundle.

**Filter items by conditions**:

- Attribute is **Item category (Item)**.
- **Is equal to** `tshirt`.
- **Save as** `tshirt_list`.

To the right of the filter name, you can see the kind of value assigned to our filter. In this
case, it is **list of cart items**. This means that this filter will be available wherever
other lists, such as the list of cart items, are available.

## Filter the cart items to find jackets

Let's filter the customer's cart by **item category** again to find all the jackets in it.
This allows us to use a list with only jackets when defining our bundle.

**Filter items by conditions**:

- Attribute is **Item category (Item)**.
- **Is equal to** `jacket`.
- **Save as** `jacket_list`.

To the right of the filter name, you can see the kind of value assigned to this filter: **list
of cart items**.

## Define a bundle containing two t-shirts and one jacket

Let's [create a bundle definition](/docs/product/rules/create-and-manage-bundles.md#create-a-bundle-definition)
with two lists of cart items and _brand_ as a bundling attribute. This means that a bundle
can only be created when all the items are of the same brand.

- **Bundle definition name** is `tshirts_and_jacket`.
- **List of cart items** is `tshirt_list` and **Number of items** is `2`.
- **List of cart items** is `jacket_list` and **Number of items** is `1`.
- **Bundling attributes** is `brand`.

## Issue a pro rata discount on the bundle

Let's [build the rule](/docs/product/rules/create-and-manage-rules.md#create-a-rule)
for customers who spend $80 or more to receive a $20 pro rata discount on each bundle they
have in their cart. We can name it `Pro rata discount on t-shirts + jacket bundle`, and it
has one condition and one effect.

### Condition

**Check attribute value**:

- Attribute is **Cart items total (Current session)**.
- **Is greater than or equal to** `80`.

### Effect

**Discount bundles pro rata**:

- **Bundle definition** is `tshirts_and_jacket`.
- **Discount name** is `$20 off a bundle of items`.
- **Discount value for each bundle** is `20`.

## Related pages

- [Create a discount using cart item filters](/docs/product/tutorials/coupons/cart-item-filters-discount.md)
- [Available effects in promotion rules](/docs/product/rules/effects/available-effects.md)
