> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: Introduction

## Article: Introduction

## Article Link: https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/discounts/discount-rules/introduction.md

## Article Content:

# About Discount Rules API

The Wix eCommerce Discount Rules API allows you to create and manage discount rules.
Discount rules are sets of triggers and scopes that together define the necessary conditions for a discount to apply to items in the cart/checkout.

With the Discount Rules API, you can:

+ [Create](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/discounts/discount-rules/create-discount-rule.md), [update](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/discounts/discount-rules/update-discount-rule.md), and [delete](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/discounts/discount-rules/delete-discount-rule.md) discount rules.
+ [Get](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/discounts/discount-rules/get-discount-rule.md) and [query](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/discounts/discount-rules/query-discount-rules.md) discount rules.

## Before you begin

+ Currently only item-level discounts are supported. Discounts for an entire cart/checkout are not yet supported.
+ Up to 5 triggers can be chained together.

## Terminology

- **Discount rule:** A set of conditions (scope and trigger) that dictate whether an item qualifies for a specified discount.

- **Discount:** The change applied to an item's price when conditions are met. Discounts can reduce an item's price by percentage or a specified amount, and also by setting an item to a fixed price.
  - Discounts must have a defined scope/s


- **Scope:** A group of catalog items that qualify for a discount.
  - Every catalog has up to 2 scopes "out of the box". For example, Wix Stores has `Specific Products` and `All Products` scopes.
  - Scopes are required in default triggers and discount objects.
  - Triggers and discounts can have multiple scopes.


- **Trigger**: A set of conditions that must be met for a discount to become applicable. Triggers can be chained so that more than 1 condition must be met.
  - **Default triggers:** These built-in triggers fire when a specified minimum/maximum item quantity (for example, "at least 5 items") or cart subtotal ("no more than $100") is reached. For this trigger to fire, the items must also be part of a defined scope.
  - **Custom triggers:** Using the [Custom Trigger Integration service plugin](https://dev.wix.com/docs/api-reference/business-solutions/e-commerce/extensions/discounts/custom-discount-triggers-integration-service-plugin/introduction.md) you can provide any set of conditions you want. For example, a trigger that only fires for grey items, or only between 8pm-10pm on Mondays and Thursdays.

