> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.upsellplus.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Intro to discounts


### Overview

UpsellPlus offers two primary methods to apply discounts to upsell products: **Shopify Functions** and **Shopify Scripts**. By default, the app utilizes Shopify Functions, allowing you to simply enter a discount value when creating an upsell offer. When the upsell item is added to the cart, the specified discount is automatically applied.

To add a discount to upsells, you can just add in the amount or percentage you want to discount. When the item gets added to cart, the discount will be applied to the upsell.

![](https://storage.crisp.chat/users/helpdesk/website/abfa0cd47f75e80/screenshot-2024-12-04-at-10063_1rnoqte.png)

 You can use the latest Shopify Functions or use the legacy Shopify Scripts to apply this discount. By default, the app will use Shopify Functions. This makes it as easy as just entering a discount value and saving the offer. 

| [Discounts: Shopify Functions and Shopify Scripts](/en/article/discounts-shopify-functions-and-shopify-scripts-yj7gwb/)
---

If you want to set up the discounts using a script, you'll need the Shopify Scripts app. It is free and can be installed [here](https://apps.shopify.com/script-editor).

We've built these script templates you can use by copying and pasting them into the Script Editor:

1. [Simple % or $ off for an upsell](https://help.upsellplus.com/en/article/how-do-i-apply-a-discount-to-a-checkout-upsell-eub04u/)
2. [Discount products in an A/B test](/en/article/how-to-ab-test-discounts-on-checkout-upsells-uc5ui3/)
3. [Limit the discount to 1 item](https://help.upsellplus.com/en/article/how-to-limit-an-upsell-discount-to-just-1-item-1qehwjj/)
4. [Different discounts for different products in a multiproduct upsell](https://help.upsellplus.com/en/article/how-to-apply-different-discounts-to-different-products-in-a-multiproduct-upsell-1vrkgz7/)
5. [Add a discount to Ai generated upsell products](/en/article/how-to-add-a-discount-to-an-ai-generated-upsell-rrrfsu/)
---

More helpful resources:

* [Using the offer ID to target a specific upsell offer with a discount](https://help.upsellplus.com/en/article/how-to-target-specific-offers-with-a-discount-using-the-offer-id-pl9ii8/)
* [How to customize discount codes](https://help.upsellplus.com/en/article/how-to-customize-discount-codes-for-upsells-ze8vqi/)
* [Remove discounts to an upsell product when the conditions for getting the upsell are no longer met](https://help.upsellplus.com/en/article/how-to-remove-upsell-products-from-cart-when-the-conditions-for-the-upsell-offer-are-do-longer-met-15w0ru0/)
* [How to only apply a discount when a product is added as an upsell](https://help.upsellplus.com/en/article/how-do-i-only-discount-a-product-when-its-added-as-an-upsell-183atoe/)
