Cart Discount Allocation
A common interface for querying discount allocations regardless of how the discount was applied (automatic, code, or custom). Each implementation represents a different discount source.
Tracks how a discount distributes across cart lines. Each allocation includes the details, the discounted amount, and whether the discount targets line items or shipping.
Anchor to FieldsFields
- discountedAmount (MoneyV2!)
- targetType (DiscountApplicationTargetType!)
- discountApplication (CartDiscountApplication!): deprecated
- Anchor to discountedAmountdiscounted•Money
Amount V2! non-null The discounted amount that has been applied to the cart line.
- Anchor to targetTypetarget•Discount
Type Application Target Type! non-null The type of line that the discount is applicable towards.
- Anchor to discountApplicationdiscount•Cart
Application Discount Application! non-nullDeprecated
Anchor to Types implemented inTypes implemented in
- CartAutomaticDiscountAllocation (CartAutomaticDiscountAllocation)
- CartCodeDiscountAllocation (CartCodeDiscountAllocation)
- CartCustomDiscountAllocation (CartCustomDiscountAllocation)
- •OBJECT
A discount allocation that applies automatically to a cart line when configured conditions are met. Unlike
, automatic discounts don't require customers to enter a code.- Anchor to discountedAmountdiscounted•Money
Amount V2! non-null The discounted amount that has been applied to the cart line.
- 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 allocated discount.
- Anchor to discountApplicationdiscount•Cart
Application Discount Application! non-nullDeprecated
- •OBJECT
A discount allocation applied to a cart line when a customer enters a discount code.
- Anchor to codecode•String!non-null
The code used to apply the discount.
- Anchor to discountedAmountdiscounted•Money
Amount V2! non-null The discounted amount that has been applied to the cart line.
- Anchor to targetTypetarget•Discount
Type Application Target Type! non-null The type of line that the discount is applicable towards.
- Anchor to discountApplicationdiscount•Cart
Application Discount Application! non-nullDeprecated
- •OBJECT
The discounts automatically applied to the cart line based on prerequisites that have been met.
- Anchor to discountedAmountdiscounted•Money
Amount V2! non-null The discounted amount that has been applied to the cart line.
- 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 allocated discount.
- Anchor to discountApplicationdiscount•Cart
Application Discount Application! non-nullDeprecated