> For the complete documentation index, see [llms.txt](https://docs.yaycommerce.com/yaypricing/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.yaycommerce.com/yaypricing/use-cases/discount-cheapest-cart-item.md).

# Discount cheapest cart item

In this guide, you’ll learn how to set up:

* Apply a Discount (x% % or x$ $) to the Cheapest Cart Item

Set the rule as buy any 3 products and get a discount on the cheapest one. (You can set another rule with more products.)

Instead of giving the cheapest item for free, you can apply a specific discount. This could be:

* Percentage discount (e.g., 50% off the cheapest item)
* Fixed discount (e.g., $10 off the lowest-priced item)

#### Step 1: Add a New Dynamic Pricing Rule

* Go to YayPricing > Click Add Rule and select Buy X Get Y

<figure><img src="/files/q6hj8NfCFkmQSKGTGVkV" alt=""><figcaption></figcaption></figure>

#### Step 2: Define the Pricing Rule for Buying 2 of 3 Products

In the Buy Product section:

Choose Cart Subtotal, Quantity, or Products in Cart depending on your campaign.

Example: Customer must buy at least 2 items.

<figure><img src="/files/ioOdKhlSh9H0YbmezOnl" alt=""><figcaption></figcaption></figure>

#### Step 3: Choose the Cheapest Item Target

In the “Get Products” section, choose the “Discount" option > the Cheapest one. Specify the discount type as a percentage discount and the discount value. Assign 3 similar products as above.&#x20;

Option A: Percentage Discount

In the Get Product section, choose:

* Type: Discount %
* Amount: 30%
* YayPricing will automatically apply the percentage to the cheapest item.

<figure><img src="/files/a9PUT0tKr3YUzttP1TF7" alt=""><figcaption></figcaption></figure>

Option B: Fixed Price Discount ($)

* Type: Discount amount
* Amount: $10
* YayPricing will subtract this amount from the lowest-priced product.

<figure><img src="/files/xCMkxLfYUvyrlNzHPf7x" alt=""><figcaption></figcaption></figure>

#### Step 4: Save the change and see how it works!

After setting up, let's see how this discount rule is applied on the checkout page.

<figure><img src="/files/o00erTHxMq11PmLRmUzK" alt=""><figcaption></figcaption></figure>

Your discount will now apply automatically to the cheapest item in the cart.\
\ <br>

<br>
