Discount Application
Captures the intent of a discount at the time it was applied. Each implementation represents a different discount source, such as automatic discounts, discount codes, and manual discounts.
The actual discounted amount on a line item or shipping line is represented by the object, which references the discount application it originated from.
Anchor to FieldsFields
- allocationMethod (DiscountApplicationAllocationMethod!)
- targetSelection (DiscountApplicationTargetSelection!)
- targetType (DiscountApplicationTargetType!)
- value (PricingValue!)
- Anchor to allocationMethodallocation•Discount
Method Application Allocation Method! non-null The method by which the discount's value is allocated to its entitled items.
- Anchor to targetSelectiontarget•Discount
Selection Application Target Selection! non-null Which lines of targetType that the discount is allocated over.
- Anchor to targetTypetarget•Discount
Type Application Target Type! non-null The type of line that the discount is applicable towards.
- Anchor to valuevalue•Pricing
Value! non-null The value of the discount application.
Anchor to Types implemented inTypes implemented in
- AutomaticDiscountApplication (AutomaticDiscountApplication)
- DiscountCodeApplication (DiscountCodeApplication)
- ManualDiscountApplication (ManualDiscountApplication)
- ScriptDiscountApplication (ScriptDiscountApplication)
- •OBJECT
An automatic discount applied to a cart or checkout without requiring a discount code. Implements the
interface.Includes the discount's title, value, and allocation details that specify how the discount amount distributes across entitled line items or shipping lines.
- Anchor to allocationMethodallocation•Discount
Method Application Allocation Method! non-null The method by which the discount's value is allocated to its entitled items.
- Anchor to targetSelectiontarget•Discount
Selection Application Target Selection! non-null Which lines of targetType that the discount is allocated over.
- Anchor to targetTypetarget•Discount
Type Application Target Type! non-null The type of line that the discount is applicable towards.
- Anchor to titletitle•String!non-null
The title of the application.
- Anchor to valuevalue•Pricing
Value! non-null The value of the discount application.
- •OBJECT
Records the configuration and intent of a discount code when a customer applies it. This includes the code string, allocation method, target type, and discount value at the time of application. The
applicablefield indicates whether the code was successfully applied.NoteNote: To see the actual amounts discounted on specific line items or shipping lines, use the <a href="/docs/api/storefront/unstable/objects/DiscountAllocation"><code><span class="PreventFireFoxApplyingGapToWBR">Discount<wbr/>Allocation</span></code></a> object instead.
- Anchor to allocationMethodallocation•Discount
Method Application Allocation Method! non-null The method by which the discount's value is allocated to its entitled items.
- Anchor to applicableapplicable•Boolean!non-null
Specifies whether the discount code was applied successfully.
- Anchor to codecode•String!non-null
The string identifying the discount code that was used at the time of application.
- Anchor to targetSelectiontarget•Discount
Selection Application Target Selection! non-null Which lines of targetType that the discount is allocated over.
- Anchor to targetTypetarget•Discount
Type Application Target Type! non-null The type of line that the discount is applicable towards.
- Anchor to valuevalue•Pricing
Value! non-null The value of the discount application.
- •OBJECT
A discount created manually by a merchant, as opposed to automatic discounts or discount codes. Implements the
interface and includes a title, optional description, and the discount value as either a fixed amount or percentage.- Anchor to allocationMethodallocation•Discount
Method Application Allocation Method! non-null The method by which the discount's value is allocated to its entitled items.
- Anchor to descriptiondescription•String
The description of the application.
- Anchor to targetSelectiontarget•Discount
Selection Application Target Selection! non-null Which lines of targetType that the discount is allocated over.
- Anchor to targetTypetarget•Discount
Type Application Target Type! non-null The type of line that the discount is applicable towards.
- Anchor to titletitle•String!non-null
The title of the application.
- Anchor to valuevalue•Pricing
Value! non-null The value of the discount application.
- •OBJECT
A discount application created by a Shopify Script. Implements the
interface and captures the discount's value, allocation method, and targeting rules at the time the script applied it.- Anchor to allocationMethodallocation•Discount
Method Application Allocation Method! non-null The method by which the discount's value is allocated to its entitled items.
- Anchor to targetSelectiontarget•Discount
Selection Application Target Selection! non-null Which lines of targetType that the discount is allocated over.
- Anchor to targetTypetarget•Discount
Type Application Target Type! non-null The type of line that the discount is applicable towards.
- Anchor to titletitle•String!non-null
The title of the application as defined by the Script.
- Anchor to valuevalue•Pricing
Value! non-null The value of the discount application.