Docs
Dashboard

ProductDiscount

Object

Fields returned for product discount.

#

Fields


id
ID!

Gets the unique identifier of the product discount.

name
String!

Gets the name of the product discount.

predicate
String!

The predicate of the discount.

Thor predicates are boolean expressions. Cart discounts and shipping rules evaluate against cart context; product discounts evaluate against price and product context. Cart predicate language and product predicate language.
priority
Int!

The priority of the discount.

validFrom
DateTime

The date and time the discount is valid from.

validUntil
DateTime

The date and time the discount is valid until.

value
ProductDiscountValue!

Gets the value of the product discount.

#

Queries


Gets a product discount by its ID.

Returns a list of product discounts.

#

Mutations


Creates a new product discount.

Deletes an existing product discount. Note: Product discounts work on an eventual consistency model, changes will be asynchronously reflected in the product’s price.

Updates an existing product discount. Note: Product discounts work on an eventual consistency model: This means that the discount changes may not be reflected immediately in the product’s price.