# 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>


---

# 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.yaycommerce.com/yaypricing/use-cases/discount-cheapest-cart-item.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.
