> 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: Discount Rules

# Type: Discount Rule Object

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

## Description: Manage Discount Rules.

## Schema:

```json
 Type: Discount Rule Object | type: DiscountRule
 Description: Manage Discount Rules.
       - name: id  | type: string | description: Discount rule ID.
           - name: value  | type: string | description: 
       - name: revision  | type: string | description: Revision number, which increments by 1 each time the discount rule is updated. To prevent conflicting changes, the current `revision` must be passed when updating the discount rule.
           - name: value  | type: string | description: 
       - name: createdDate  | type: string | description: Date and time the discount rule was created.
           - name: seconds  | type: string | description: 
           - name: nanos  | type: number | description: 
       - name: updatedDate  | type: string | description: Date and time the discount rule was last updated.
       - name: active  | type: boolean | description: Whether the discount rule is active.  Default: `true`
           - name: value  | type: boolean | description: 
       - name: name  | type: string | description: Discount rule name.
       - name: trigger  | type: DiscountTrigger | description: Discount rule trigger. A set of conditions that must be met for the `discounts` to be applied. Not passing a trigger will cause the discount to always apply.
           - name: triggerType  | type: string | description: Trigger type.
               enum: AND, SUBTOTAL_RANGE, ITEM_QUANTITY_RANGE, CUSTOM, OR, CUSTOMER_ELIGIBILITY
           - ONE-OF:
               - name: and  | type: And | description: Chain multiple triggers with the `and` operator.
                   - name: triggers  | type: Array<DiscountTrigger> | description: List of triggers to have an "AND" operator between their results.
               - name: or  | type: Or | description: Chain multiple triggers with the `or` operator.
                   - name: triggers  | type: Array<DiscountTrigger> | description: List of triggers to have an "OR" operator between their results.
               - name: customTrigger  | type: Custom | description: Custom trigger.
                   - name: id  | type: string | description: Trigger ID.
                   - name: appId  | type: string | description: ID of the app that created the trigger.
               - name: subtotalRange  | type: SubtotalRange | description: Subtotal trigger range.
                   - name: scopes  | type: Array<Scope> | description: Relevant scopes for `SPECIFIC_ITEMS` target type.
                   - name: from  | type: string | description: Minimum subtotal price (inclusive).
                   - name: to  | type: string | description: Maximum subtotal price (inclusive).
               - name: itemQuantityRange  | type: ItemQuantityRange | description: Item quantity trigger range.
                   - name: scopes  | type: Array<Scope> | description: Relevant scopes for `SPECIFIC_ITEMS` target type.
                   - name: from  | type: number | description: Minimum item quantity (inclusive).
                   - name: to  | type: number | description: Maximum item quantity (inclusive).
               - name: customerEligibility  | type: CustomerEligibility | description: Customer Eligibility info
                   - name: eligibilityType  | type: string | description: Customer eligibility type.
                   - ONE-OF:
                       - name: individualMembersInfo  | type: IndividualMembers | description: Information about specific members.
       - name: activeTimeInfo  | type: ActiveTimeInfo | description: Time frame in which the discount rule is active.
           - name: start  | type: string | description: Date and time the discount rule is active **from**, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.
           - name: end  | type: string | description: Date and time the discount rule is active **till**, in [ISO-8601](https://en.wikipedia.org/wiki/ISO_8601#Combined_date_and_time_representations) format.
       - name: discounts  | type: Discounts | description: List of discounts that are applied when one or more triggers are met.  > **Notes:** > > + Currently, only 1 discount can be defined per discount rule. > + A discount rule can be applied on multiple items per cart. > + A discount rule can only be applied once per item.
           - name: values  | type: Array<Discount> | description: Discounts.
               - name: targetType  | type: string | description: Discount target.  + `SPECIFIC_ITEMS`: Discount applies to a specific set of items.
               - name: specificItemsInfo  | type: SpecificItemsInfo | description: Data related to `SPECIFIC_ITEMS` target type.
               - name: discountType  | type: string | description: Discount type.
               - ONE-OF:
                   - name: percentage  | type: number | description: Percentage to discount from original price.
                   - name: fixedAmount  | type: string | description: Amount to discount from original price.
                   - name: fixedPrice  | type: string | description: Fixed price. Line item will be fixed to this price.
                   - name: quantityBased  | type: QuantityBased | description: A special price is applied for a specific quantity of items. For example, 3 for $10.
       - name: status  | type: string | description: Discount rule status. Default: `UNDEFINED`
           enum: LIVE, EXPIRED, PENDING
       - name: usageCount  | type: number | description: Number of times the discount rule was used.
       - name: tags  | type: Tags | description: Tags for this discount rule.
           - name: privateTags  | type: TagList | description: Tags that require an additional permission in order to access them, normally not given to site members or visitors.
               - name: tagIds  | type: Array<string> | description: List of tag IDs.
           - name: publicTags  | type: TagList | description: Tags that are exposed to anyone who has access to the labeled entity itself, including site members and visitors.

```