The discount_application object

The 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.

The 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:

  • line_item
  • shipping_line


The customer-facing name of the discount. For example, Welcome10 or CBBWQQAKYBYY.


The total amount that the price of an order is reduced by the discount.


The type of the discount. type has the following possible values:

  • automatic
  • discount_code
  • manual
  • script


The value of the discount.


The value type of the discount. value_type has the following possible values:

  • fixed_amount
  • percentage