dw.campaign
Class Discount
Object
dw.campaign.Discount
Constants
TYPE_AMOUNT  :  String = "AMOUNT"
Constant representing discounts of type amount.
TYPE_BONUS  :  String = "BONUS"
Constant representing discounts of type bonus.
TYPE_BONUS_CHOICE  :  String = "BONUS_CHOICE"
Constant representing discounts of type bonus choice.
TYPE_FIXED_PRICE  :  String = "FIXED_PRICE"
Constant representing discounts of type fixed-price.
TYPE_FIXED_PRICE_SHIPPING  :  String = "FIXED_PRICE_SHIPPING"
Constant representing discounts of type fixed price shipping.
TYPE_FREE  :  String = "FREE"
Constant representing discounts of type free.
TYPE_FREE_SHIPPING  :  String = "FREE_SHIPPING"
Constant representing discounts of type free shipping.
TYPE_PERCENTAGE  :  String = "PERCENTAGE"
Constant representing discounts of type percentage.
TYPE_PERCENTAGE_OFF_OPTIONS  :  String = "PERCENTAGE_OFF_OPTIONS"
Constant representing discounts of type percent off options.
TYPE_PRICEBOOK_PRICE  :  String = "PRICE_BOOK_PRICE"
Constant representing discounts of type price book price.
TYPE_TOTAL_FIXED_PRICE  :  String = "TOTAL_FIXED_PRICE"
Constant representing discounts of type total fixed price.
Properties
itemPromotionTiers  :  Map  (Read Only)
The tier index by quantity Id of Product promotion. ProductLineItems may have more than one quantity, but not all items of that SKU may have received the same tier of promotion. Each quantity of the ProductLineItem is indexed from 1 to n, where n is the quantity of the ProductLineItem, and this method returns a mapping from that quantity index to the index of tier of the promotion that item received. For more information about tier indexes, see getPromotionTier() method.
promotion  :  Promotion  (Read Only)
The promotion this discount is based on.
promotionTier  :  Number  (Read Only)
The tier index for promotion at order level or bonus product. Promotion tiers are always evaluated in the order of the highest threshold (e.g. quantity, or amount) to the lowest threshold. The tier that is evaluated first (i.e. the highest quantity or amount) is indexed as 0, the next tier 1, etc. The lowest tier will have index n - 1, where n is the total number of tiers.
quantity  :  Number  (Read Only)
The quantity of the discount. This quantity specifies how often this discount applies to its target object. For example, a 10% off discount with quantity 2 associated to a product line item with quantity 3 is applied to two items of the product line item.
Discounts of order and shipping promotions, and bonus discounts have a fix quantity of 1.
type  :  String  (Read Only)
The type of the discount.
Constructor Summary
This class does not have a constructor, so you cannot create it directly. To get an instance of this class, use one of the subclass constructors.
Method Summary
getItemPromotionTiers() : Map
Returns the tier index by quantity Id of Product promotion.
getPromotion() : Promotion
Returns the promotion this discount is based on.
getPromotionTier() : Number
Returns the tier index for promotion at order level or bonus product.
getQuantity() : Number
Returns the quantity of the discount.
getType() : String
Returns the type of the discount.
Salesforce Commerce Cloud Courses
Salesforce B2C Commerce Developer - Certification Tests
Why risk failing the SFCC exam? Get 180 real questions, killer content, and everything you need to crush the Salesforce B2C Commerce Developer certification.

Becoming a Salesforce B2C Commerce Developer is your ticket to higher salaries, better job opportunities, and the credibility to stand out from the competition. But let's be honestβ€”passing the certification exam isn't easy. That's where we come in.
Salesforce Javascript Developer I - Certification Tests
Not just another prep courseβ€”this is your shortcut to passing. Master JavaScript for Salesforce and go from 'hoping to pass' to knowing you will. Ready to start?

This isn't just another prep courseβ€”it's your shortcut to mastering the skills and confidence you need to pass. With multiple practice tests covering every section and a final exam simulation designed to mirror the real thing, you'll feel like you've already aced it before test day.
Salesforce B2C Commerce Architect - Certification Tests
Think the Developer exam was hard? Welcome to the next level.

The Salesforce B2C Commerce Architect certification is a whole different gameβ€”complex solutions, elevated difficulty, and skills that set you apart in the eCommerce industry. That's why we're including 11 downloadable PDF guides, packed with best practices and strategies to help you prepare for the exam and build confidence in every topic.
Method Detail
getItemPromotionTiers
getItemPromotionTiers() : Map
Returns the tier index by quantity Id of Product promotion. ProductLineItems may have more than one quantity, but not all items of that SKU may have received the same tier of promotion. Each quantity of the ProductLineItem is indexed from 1 to n, where n is the quantity of the ProductLineItem, and this method returns a mapping from that quantity index to the index of tier of the promotion that item received. For more information about tier indexes, see getPromotionTier() method.
Returns:
Map of Tier index by quantity Id or empty map
See Also:

getPromotion
getPromotion() : Promotion
Returns the promotion this discount is based on.
Returns:
Promotion related to this discount

getPromotionTier
getPromotionTier() : Number
Returns the tier index for promotion at order level or bonus product. Promotion tiers are always evaluated in the order of the highest threshold (e.g. quantity, or amount) to the lowest threshold. The tier that is evaluated first (i.e. the highest quantity or amount) is indexed as 0, the next tier 1, etc. The lowest tier will have index n - 1, where n is the total number of tiers.
Returns:
Tier index or null

getQuantity
getQuantity() : Number
Returns the quantity of the discount. This quantity specifies how often this discount applies to its target object. For example, a 10% off discount with quantity 2 associated to a product line item with quantity 3 is applied to two items of the product line item.
Discounts of order and shipping promotions, and bonus discounts have a fix quantity of 1.
Returns:
Discount quantity

getType
getType() : String
Returns the type of the discount.
Returns:
Discount type

β™₯
Notifications pending to read