---
title: Add Prerequisites to Product Discount Functions - Shopify developer changelog
description: >-
  Shopify’s developer changelog documents all changes to Shopify’s platform.
  Find the latest news and learn about new platform opportunities.
source_url:
  html: >-
    https://shopify.dev/changelog/posts/add-prerequisites-to-product-discount-functions
  md: >-
    https://shopify.dev/changelog/posts/add-prerequisites-to-product-discount-functions.md
metadata:
  effectiveApiVersion: 2026-04
  affectedApi:
    - displayName: Functions
      handle: functions-api
  primaryTag:
    displayName: API
    handle: api
  secondaryTag:
    displayName: New
    handle: new
  indicatesActionRequired: false
  createdAt: '2026-03-26T14:27:21-04:00'
  postedAt: '2026-04-01T18:00:00-04:00'
  updatedAt: '2026-04-01T12:17:53-04:00'
  effectiveAt: '2026-04-01T12:00:00-04:00'
---

April 1, 2026

# Add Prerequisites to Product Discount Functions

DateApril 1, 2026

Version[2026-04](https://shopify.dev/changelog?api_version=2026-04)

FlagsNew

SurfacesAPI

Affected APIs[Functions](https://shopify.dev/changelog?api_type=functions-api)

Discount functions now support prerequisites for product discount candidates, allowing you to define the "Buy X" portion of a Buy X, Get Y (BXGY) discount. In a BXGY discount, customers must purchase a specified quantity of one product (Buy X) to receive a discount on another product (Get Y).

**What's New:**

* A `prerequisites` field has been added to product discount candidates.

* Each prerequisite is defined as a `cartLinePrerequisite`, which includes:

  * `id`: The identifier for the cart line used as the prerequisite.
  * `quantity`: The number of items from that cart line required to qualify for the discount.

For more detailed information, please visit the [Discount Functions documentation](https://shopify.dev/docs/api/functions/latest/discount).
