The discount_application object
discount_application object captures the intent of a discount applied on an order. The object can be accessed on customer order and notification templates. Shopify Plus merchants can also access properties of the
discount_allocation object in the checkout.liquid layout file.
discount_application object has the following attributes:
Describes how a discount selects line items in the cart to be discounted.
target_selection has the following possible values:
all: The discount applies to all line items.
entitled: The discount applies to a particular subset of line items, often defined by a condition.
explicit: The discount applies to a specifically selected line item or shipping line.
Describes the type of item that a discount applies to.
target_type has the following possible values:
The customer-facing name of the discount. For example,
The total amount that the price of an order is reduced by the discount. This amount is in the customer's local (presentment) currency.
The type of the discount.
type has the following possible values:
The value of the discount. This value is in the customer's local (presentment) currency.
The value type of the discount.
value_type has the following possible values: