# Bundle discount

You can set up bundle discounts to increase customers' total items per transaction. You can bundle individual products together with a wide range of options, including by collection, tags, vendor, type, and by manually selecting products and variants.&#x20;

Discounts are applied to each item in the cart that qualifies for the bundle discount.

## In this section

* [Bundle discount example](#bundle-discount-example)
* [Setting up a bundle discount](#setting-up-a-bundle-discount)

***

## Bundle discount example

In this example, the customer saves 15% when they add products from the Eyes collection and the Lips collection to their carts.

#### The result:

Each qualifying item that's bundled receives the 15% discount.&#x20;

The discount message displays in the cart.

### The function trigger

Two conditions trigger the discount:

If the cart has an item from the Eyes collection with a quantity of one or more, and the cart has an item from the Lips collection with a quantity of one or more, then the discount is applied.&#x20;

The function verifies that the items belong to the chosen collections and then applies a percentage discount to each qualifying item in the cart.&#x20;

<figure><img src="/files/n9mWTelA1fGBYBMfL4fC" alt=""><figcaption><p>Overview of Eyes and Lips bundle discount</p></figcaption></figure>

***

## Setting up a bundle discount

### Step 1 of 4: Campaign name

1. From the Function Junction dashboard, under **Quick start templates**, click **Bundle Discount**.
2. Under **Function name**, give your discount a unique name so you can identify it later.

{% hint style="info" %}
**Note:**

Function names (also called campaign names) need to be unique. Once created, they appear in the **Discounts** section of the Shopify admin.
{% endhint %}

### Step 2 of 4: Function trigger

In this example, the function is looking for items in the cart that belong to the Eyes collection AND items in the cart from the Lips collection. The requirements are that there is one item from each collection needed to build the bundle:

1. Set up the conditions that customers need to meet to get the discount. In this example, the function needs two conditions:

Condition 1:

* `If` `cart has items`
* `collection` `is any` and select the Eyes collection
* `selected items quantity` `is greater than or equal to` `1`

Condition 2:

* `and` `cart has items`
* `collection` `is any` and select the Lips collection
* `selected items quantity` `is greater than or equal to` `1`

2. Click **Next**.

### Step 3 of 4: Function action

1. Set up the action (the discount) that is taken when the conditions you set are met. In this example, the customer is rewarded with $25 off products from the two collections.&#x20;
   1. `collection` `is any`, and then select both the Lips and Eyes collections.
   2. `then` `percentage discount per item` `is` `15`

### Step 4 of 4: Discount details

1. Under **Discount type**, select if you want the discount to be **Automatic** or **With Discount Code**. In this example, the discount applies automatically.
   1. **Automatic**: Under **Discount message**, if you select **Yes**, then enter the discount message in the field provided below.
   2. **With Discount Code**: Enter the discount code that you want customers to enter at checkout.
2. Under **Combinations**, if you want this discount to be combined with other discounts, then click **Yes**, and check which types of discounts that you want it to be combinable with.&#x20;
3. When you're done, click **Publish**.

When your discount is published, if you want to advertise it, then you can [publish a widget to your store](/creating-and-publishing.md#step-2-publishing-a-widget-to-your-storefront).


---

# 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://support.functionjunctionapp.com/templates/bundle-discount.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.
