ProductDiscount
ObjectFields returned for product discount.
Fields
- ID!
id Gets the unique identifier of the product discount.
- String!
name Gets the name of the product discount.
- String!
predicate 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.- Int!
priority The priority of the discount.
- DateTime
validFrom The date and time the discount is valid from.
- DateTime
validUntil The date and time the discount is valid until.
- ProductDiscountValue!
value 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.