Docs
Dashboard

CartDiscount

Object

Fusion lookup resolver for retrieving a cart discount by its ID.

#

Fields


channelsDeprecated
ChannelConnection!

Gets a list of channels associated with the specified cart discount.

Deprecated: Do not use. This has no effect and will be removed in 5.0.0
discountCodes
CartDiscountCodeConnection!

A list of discount codes associated with the cart discount.

displayName
String

The display name of the cart discount.

id
ID!

The unique identifier for the cart discount.

name
String!

The name of the cart discount.

predicate
String!

The predicate that defines the conditions under which the cart discount is applied. For example, a predicate could specify that the discount only applies if the cart total exceeds a certain amount or if specific products are in the cart.

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 cart discount, which determines the order in which discounts are applied. Lower priority discounts are applied first.

requiresDiscountCode
Boolean!

True if the cart discount requires a discount code before it applies.

target
CartDiscountTarget!

The target of the cart discount, which specifies what the discount applies to. For example: shipping, total price or all/specific line items.

validFrom
DateTime

The date and time the discount is valid from.

validUntil
DateTime

The date and time the discount is valid until.

value
CartDiscountValue!

The value of the cart discount, which can be an absolute or relative discount.

#

Queries


Gets a cart discount by its ID.

Returns a list of cart discounts.

#

Mutations


Creates a new cart discount based on the provided input.

This mutation deletes a cart discount based on the provided input.

Creates a new cart discount based on the provided input.