Skip to main content

Discount

Represents a discount that can be applied to a product or category.

type Discount implements IDiscount {
id: String!
createdAt: DateTime!
lastModifiedAt: DateTime!
value: Float!
quantityFrom: Int!
validFrom: DateTime
validTo: DateTime
pricesheetId: String!
productId: Int
categoryId: Int
priceGroup: String
discountType: PriceDiscountType!
pricesheet: Pricesheet
product(hidden: Boolean): Product
category(hidden: YesNo): Category
}

Fields​

Discount.id ● String! non-null scalar​

Unique identifier for the discount record

Discount.createdAt ● DateTime! non-null scalar​

Timestamp when the discount record was initially created

Discount.lastModifiedAt ● DateTime! non-null scalar​

Timestamp when the discount record was last updated

Discount.value ● Float! non-null scalar​

Discount value applied to qualifying purchases

Discount.quantityFrom ● Int! non-null scalar​

Minimum quantity threshold for bulk pricing eligibility.

The minimum number of units that must be purchased to qualify for the bulk price discount. Creates tiered pricing structure based on order volume.

Discount.validFrom ● DateTime scalar​

Bulk pricing effective start date.

The date when the bulk pricing becomes active and available for customer orders. Must be a valid ISO 8601 date string format.

Discount.validTo ● DateTime scalar​

Bulk pricing expiration date.

The date when the bulk pricing offer expires and is no longer available. Must be a valid ISO 8601 date string format.

Discount.pricesheetId ● String! non-null scalar​

Pricesheet identifier for discount association

Discount.productId ● Int scalar​

Product identifier for product-specific discounts

Discount.categoryId ● Int scalar​

Category identifier for category-wide discounts

Discount.priceGroup ● String scalar​

Price group classification for targeted discounts

Discount.discountType ● PriceDiscountType! non-null enum​

Method for calculating and applying the discount value

Discount.pricesheet ● Pricesheet object​

Retrieve the pricesheet associated with this discount.

Returns the pricesheet record that contains this discount, providing context for the discount's application scope and customer assignments.

AUTH: Role=[pricing.OWNER]

Discount.product ● Product object​

Product associated with the discount.

The product that this discount applies to, providing context for discount rules and application. Null when no product is associated with the discount.

Discount.product.hidden ● Boolean scalar​

Discount.category ● Category object​

Category associated with the discount.

The category that this discount applies to, providing context for discount rules and application. Null when no category is associated with the discount.

Discount.category.hidden ● YesNo enum​

Filter by category visibility status.

Y = include only if category is hidden, N = include only if category is visible. When omitted, includes category regardless of visibility status.

Interfaces​

IDiscount interface​

Returned By​

discount query ● discountCreate mutation ● discountUpdate mutation

Member Of​

DiscountResponse object