# How to Create Buy X Get y Discounted?🤔

### Step 1: Start Creating the Discount Function

* Go to your **dashboard** and click on **Create Function.**

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXeWTS7TLaiRafEVQ4ZndzcDW1ZjpIejj6eytgaD1LhzMcHTgoGHK1NXxIlAqRVgAnvDYIztFxGPzkPp9q5cI6xw1jVfwBDyfCts-jx_pCiSQ8zy41a79F4L1GXbGE4xfySO6Mw32w?key=XHBNr_XRasDLQzq5MfrM2Q" alt=""><figcaption></figcaption></figure>

* Choose **Discount Functions** from the available list.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfrVMP0eP6ymgHo9BjoGm-LtsuEx-bH97UrS9-YhSiLPx4HNyiHCH1YCF4KmFJ-9shTseTEXdaHFQqmkZbywszV3qTOCtHMqMHfn8qiRtJR1kTU7DCAlCr_C4B6uFW0foe-etVfmA?key=XHBNr_XRasDLQzq5MfrM2Q" alt=""><figcaption></figcaption></figure>

* Select **Amount Off Product** as your **function type**

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXfiUidq0N0L1rlMvMi9CBpJ2jBUyqPjsuVuLP_azBldZRWjWlqgDTeQXgGnzV9Vt6ks6hHJE3o7iqPTzoS0C4oojAZ6EECMUbsM64psYvnvB16kzTEPnkUO6xdIKoosu2q9ipEvLA?key=XHBNr_XRasDLQzq5MfrM2Q" alt=""><figcaption></figcaption></figure>

### Step 2: Configure the Campaign Details

* Set **Campaign Type** to **Buy X Get Y Discounted.**
* Use the **Buy Item Selector** to define **qualifying products.**
* Use the **Get Item Selector** to specify the **discounted products** using similar filters.
* Enter the required **Buy Quantity** and the **Get Quantity** (e.g., **Buy2Get1**).

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXewJvjagb2zxZgtVTvSQUd-5DSqd9fj9p_-961UjAwNNj1fWbFMrtoV_HoVRnuxnTr-dP1xLHKARn6qAPUZx81XMUGMQoYUrkbckGyAJonTKEHbmqpW9yAEY-SeAmKrZPZr2U-r?key=XHBNr_XRasDLQzq5MfrM2Q" alt=""><figcaption></figcaption></figure>

### Step 3: Save and Activate

* Click **Save** to publish your **campaign.**
* Your **Buy X Get Y Discounted** offer is now live and ready to **boost sales! 🎉**

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdI9z5Hb5LzT6Hx8npIvUFfOhtQGCSUGtph-M1ZQxcG5hoaP9IcTcs52plifYuT6GtEBtTUXqZuKHtpDS60Fggj50vAVqVhBxS8wE1KKe3e9MUGrbTSLi2DBJEh0F61mr-d-9yO4g?key=XHBNr_XRasDLQzq5MfrM2Q" alt=""><figcaption></figcaption></figure>

{% embed url="<https://www.youtube.com/watch?v=XLn5nVPfJV0>" %}

<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://nexus-functions-creator-and-disc.gitbook.io/nexus-functions-creator-and-discounts/faqs/how-to-create-buy-x-get-y-discounted.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.
