Serialized Form
-
Package com.broadleafcommerce.promotion.offer.domain
-
Class com.broadleafcommerce.promotion.offer.domain.Attribute
class Attribute extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
contextState
com.broadleafcommerce.data.tracking.core.EmbeddedContextState contextState
A subset ofTracking
information to expose the context state for this object. This value is not persisted, and instead it is dynamically calculated and populated when theChangeDetails
for the parent object's entireattributes
map are compared. -
value
Object value
The value represented by this attribute. Attributes are generally placed on domain objects as a map of attribute names to attribute values:Map<String, Attribute>
.
-
-
Class com.broadleafcommerce.promotion.offer.domain.ByTrackingIdContainer
class ByTrackingIdContainer extends Object implements Serializable -
Class com.broadleafcommerce.promotion.offer.domain.Campaign
class Campaign extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
activeEndDate
Instant activeEndDate
Defines the ending time for which this campaign is active. -
activeStartDate
Instant activeStartDate
Defines the beginning time for which this campaign is active. -
codePrefix
String codePrefix
Defines a prefix to updateUses when generating campaign codes for this campaign. -
contextState
com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState
A subset ofTracking
information to expose the context state for this object. -
externalId
String externalId
This is an arbitrary ID, typically assigned by or used by 1st or 3rd party systems that are not Broadleaf. -
id
String id
The id of this campaign. This is also used as an identifier to track this campaign. -
name
String name
The user-readable name of this campaign
-
-
Class com.broadleafcommerce.promotion.offer.domain.CodeGenerationResult
class CodeGenerationResult extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
errorMessage
String errorMessage
Error message from attempting to generateCampaignCodes
. -
generatedCodes
List<OfferCode> generatedCodes
GeneratedCampaignCodes
. -
successful
boolean successful
Indicates whether the attempt to generateCampaignCodes
was successful.
-
-
Class com.broadleafcommerce.promotion.offer.domain.CodeGenerator
class CodeGenerator extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
activeEndDate
Instant activeEndDate
Sets the Active End Date for codes generated by this generator. -
activeStartDate
Instant activeStartDate
Sets the Active Start Date for codes generated by this generator. -
allowedLetters
String allowedLetters
Returns a String with the allowed letters to use when generating codes. If not set, code generation uses the character sets configured inCodeFormatAvailableCharHelper
-
allowedNumbers
String allowedNumbers
Returns a String with the allowed numbers to use when generating codes. If not set, code generation uses the character sets configured inCodeFormatAvailableCharHelper
-
campaignId
String campaignId
Defines the id for the campaign that originated this code generator. -
codeFormat
String codeFormat
The custom formatter for generating codes. Customer formatters allow for precise control of the code format. For example, consider "CF-##-@@-**-1" which might generate the following code "CF-99-AB-Z3-1". Each symbol is processed by the CodeGenerator. The default implementation is as follows: # is replaced by a random number (not including 0, 1, or 5) @ is replaced by a random character (not including 0, L, or S) * is replaced by random alphanumeric character (not including those mentioned above).- See Also:
-
codeGenerationMessage
String codeGenerationMessage
Returns a String withCodeGenerator.getNumberOfCodesGenerated()
/CodeGenerator.getNumberOfCodesToGenerate()
If those values are equal, just returnsCodeGenerator.getNumberOfCodesGenerated()
Provides an easy way to determine progress. This field is automatically updated. -
codeGenerationStatus
String codeGenerationStatus
The current status -
codeLength
Integer codeLength
The code length the generator should use when generating the codes. -
codePrefix
String codePrefix
Defines a prefix to updateUses when generating campaign codes for this campaign. This will default toCampaign.getCodePrefix()
, if not set. This is intended to be used as an override, if required. -
contextState
com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState
A subset ofTracking
information to expose the context state for this object. -
createDate
Instant createDate
The date this generator was created. -
emailRegEx
String emailRegEx
Provides a customer email validation when the generated codes are requested for use. -
id
String id
-
maxUses
int maxUses
The maximum number of uses to set for each code generated. -
numberOfCodesGenerated
int numberOfCodesGenerated
The current number of codes that have been generated -
numberOfCodesToGenerate
int numberOfCodesToGenerate
The number of codes that will be generated -
segment
String segment
The segment to which this offer can apply. -
updateDate
Instant updateDate
The date this generator was created. -
voucherCodeGenerator
boolean voucherCodeGenerator
Determines if thisCodeGenerator
is for voucher offers.
-
-
Class com.broadleafcommerce.promotion.offer.domain.CombinabilityOverride
class CombinabilityOverride extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
contextState
com.broadleafcommerce.data.tracking.core.EmbeddedContextState contextState
A subset ofTracking
information to expose the context state for this object. This value is not persisted, and instead it is dynamically calculated and populated when theChangeDetails
for the parent object's entireattributes
map are compared. -
overrideType
String overrideType
The type of override being performed for this offer combination.- See Also:
-
relatedOfferRef
String relatedOfferRef
The id of an offer for which combinability is being overridden for this offer.
-
-
Class com.broadleafcommerce.promotion.offer.domain.Discount
class Discount extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
amount
BigDecimal amount
The discount amount that this discount represents. If the amount is10
, then whether it is calculated as a percentage (10%) or a currency amount ($10) is determined byDiscount.methodType
. -
applicableToDependentItems
boolean applicableToDependentItems
Whether this discount should apply to an item's dependent order items (e.g., add-ons). Default is false. -
applicableToSalesPrice
boolean applicableToSalesPrice
Whether this discount should apply to an item's sale price or just its non-sale price(s). Default is true. -
methodType
String methodType
Determines the method used to apply the discount. The method can beDiscountMethodType.PERCENT_OFF
,DiscountMethodType.AMOUNT_OFF
, orDiscountMethodType.FIXED_PRICE
.- See Also:
-
prorationType
String prorationType
Determines how an offer'sdiscount amount
is distributed across the offer's related order item types. This can either be set to prorate across target items or target and qualifier items. Default isProrationType.TARGET_AND_QUALIFIER
.This property is used downstream in `OrderOperationServices` or other custom services to calculate the proper refund amounts when factoring in offer discounts.
-
targetType
String targetType
Determines the type of entity that receives the discount. The entity can beDiscountTargetType.ORDER
,DiscountTargetType.ORDER_ITEM
,DiscountTargetType.FULFILLMENT_GROUP
,DiscountTargetType.FULFILLMENT_GROUP_ITEM
. In the case of orders, order items, and free gift, the discount will be applied to their prices. In the case of fulfillment groups and group items, the discount will be applied to their fulfillment costs (e.g., shipping cost).- See Also:
-
timingType
String timingType
Determines the timing of the discount's application. The discount can be applied eitherimmediately as an ORDER_DISCOUNT
orlater as a FUTURE_CREDIT
. Default value isDiscountTimingType.ORDER_DISCOUNT
.- See Also:
-
-
Class com.broadleafcommerce.promotion.offer.domain.DiscountTier
class DiscountTier extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
amount
BigDecimal amount
The discount amount that this tier represents. If the amount is10
, then whether it is calculated as a percentage (10%) or a currency amount ($10) is determined byDiscountTier.methodType
. OverridesDiscount.amount
of the parentOffer
. -
contextState
com.broadleafcommerce.data.tracking.core.EmbeddedContextState contextState
A subset ofTracking
information to expose the context state for this object. This value is not persisted, and instead it is dynamically calculated and populated when theChangeDetails
for the parent object's entireattributes
map are compared. -
methodType
String methodType
Determines the method used to apply the discount. The method can beDiscountMethodType.PERCENT_OFF
,DiscountMethodType.AMOUNT_OFF
, orDiscountMethodType.FIXED_PRICE
. OverridesDiscount.methodType
of the parentOffer
.- See Also:
-
minAmount
BigDecimal minAmount
The minimum currency amount to qualify for this tier. -
minQuantity
Long minQuantity
The minimum quantity of items needed to reach this tier.
-
-
Class com.broadleafcommerce.promotion.offer.domain.ItemCriteria
class ItemCriteria extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
connectiveOperator
String connectiveOperator
The connective with which to join all of theItemCriteria.rules
together. Individual rules can also have separate sub-rules connected with unrelated operators.- See Also:
-
DefaultConnectiveOperatorType
-
rules
Set<ItemCriteriaRule> rules
Rules that comprise this criteria. When multiple rules are present, they will be connected withItemCriteria.connectiveOperator
.
-
-
Class com.broadleafcommerce.promotion.offer.domain.ItemCriteriaRule
class ItemCriteriaRule extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
numberOfMatchesRequired
int numberOfMatchesRequired
Determines the number of items that must match theItemCriteriaRule.rule
in order for this criteria to be met. -
rule
String rule
String expression used to determine which items must be present so that an order may receive this offer's discount. This could be a string representation of aSpelExpression
, e.g.,name == 'some-name' || id == '1'
, or that of some other expression language.
-
-
Class com.broadleafcommerce.promotion.offer.domain.MarketingMessage
class MarketingMessage extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
activeEndDate
Instant activeEndDate
Defines the ending time for which this message is active -
activeStartDate
Instant activeStartDate
Defines the beginning time for which this message is active -
contextState
com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState
A subset ofTracking
information to expose the context state for this object. -
displayHint
String displayHint
Defines a hint to the client on how to display this message -
id
String id
-
locale
Locale locale
Deprecated.since 1.6 use translations for different localesTheLocale
to which this message is applicable. -
locationType
String locationType
Deprecated.since 1.6 functionality moved toMarketingMessage.locationTypes
.Determines in what locations this message can appear, whether on product detail, browse, search, or cart pages or everywhere.- See Also:
-
locationTypes
List<String> locationTypes
Determines in what locations this message can appear, whether on product detail, browse, search, or cart pages or everywhere.- See Also:
-
maxCartSubtotal
javax.money.MonetaryAmount maxCartSubtotal
The maximum cart subtotal to display this message. If this value is specified, this message will only display if the cart subtotal is equal to or less than this value. -
minCartSubtotal
javax.money.MonetaryAmount minCartSubtotal
The minimum cart subtotal to display this message. If this value is specified, this message will only display if the cart subtotal is equal to or greater than this value. -
offerId
String offerId
Id of the parentOffer
. -
priority
Integer priority
When multiple messages match a context, the message with the higher priority wins out, where smaller integer values represent higher priorities. Nulls are implicitly given lower precedence than any other value - they will appear last. -
showIfOfferApplied
boolean showIfOfferApplied
Determines whether the message should be show to the customer if the associated offer is already applied to the cart. -
targetType
String targetType
Determines whether this message should appear only next to itsoffer's
targets or qualifiers or next to both.- See Also:
-
text
String text
The actual text of the message to display. -
useCartSubtotal
boolean useCartSubtotal
Determines whether the message should be show based on the current subtotal of the customer's cart.
-
-
Class com.broadleafcommerce.promotion.offer.domain.MarketingMessageRequest
class MarketingMessageRequest extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
appliedOfferIds
List<String> appliedOfferIds
A list of currently applied offer ids -
cartProductIds
List<String> cartProductIds
The ids of any products currently in the customer's cart -
cartSubtotal
javax.money.MonetaryAmount cartSubtotal
The subtotal of the customer's cart -
categoryId
String categoryId
The current category's id -
contextInfo
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo
TheContextInfo
derived from the original request containing tenant and sandbox info. -
customerContext
com.broadleafcommerce.promotion.offer.client.web.context.CustomerContext customerContext
The customer context information that should be used in determiningwhich offers apply -
lineItems
List<EnhancedLineItem> lineItems
A list of hydratedEnhancedLineItem
s used by theMarketingMessageResolver
to retrieveMarketingMessage
s -
maxMessageCount
Integer maxMessageCount
The maximum number of messages for each location and location / product combination -
productIds
List<String> productIds
The ids for all products to retrieve marketing messages for
-
-
Class com.broadleafcommerce.promotion.offer.domain.Offer
class Offer extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
activeEndDate
Instant activeEndDate
Defines the ending time for which this offer is active. Must be later thanOffer.activeStartDate
or null which indicates that this offer applies indefinitely. -
activeStartDate
Instant activeStartDate
Defines the beginning time for which this offer is active. -
applyDiscountToAllTargets
Boolean applyDiscountToAllTargets
Returns TRUE if this ITEM offer should be applied to all discountable target items in the order. Setting this value to TRUE will not requireOffer.getTargetItemCriteria()
to be entered for an ITEM promotion. If the value is null, delegates toOffer.hasTargetItemCriteriaRules()
. -
applyRemainderToFulfillment
Boolean applyRemainderToFulfillment
This property applies to amount off Order offers. When set, it allows the amount off to apply to both the Order total and the Fulfillment total. For example, if the offer amount was $50 and the order subtotal was $45 and the fulfillment price was $10, this property will allow the order offer to adjust the order by $45 and then use the remainder ($5) off of the fulfillment price leaving a cart total of $5. -
attributes
Map<String,
Attribute> attributes Dynamic attributes that are a part of the offer. This is an admin-centered concept -
automaticallyConsidered
boolean automaticallyConsidered
Determines whether this offer should be considered to be applied without needing any
shared codes
(or some other, similar constraint). Default is false.Setting to true does not guarantee that the offer will be applied. All criteria and rules associated with this offer must still be met (e.g.,
Offer.targetItemCriteria
,Offer.itemQualifierCriteria
,Offer.orderCriteria
, andOffer.timeCriteria
). -
campaignTrackingIds
Set<String> campaignTrackingIds
The tracking identifiers of the campaigns of which this offer is a part. Seecom.broadleafcommerce.promotion.campaign.domain.Campaign#id
-
cartLabel
String cartLabel
A label for this offer typically used by the storefront. -
cartSubtotal
javax.money.MonetaryAmount cartSubtotal
The minimum cart subtotal to apply this offer. If this value is specified, this offer will only apply if the cart subtotal is equal to or greater than this value. -
combinabilityOverrides
Set<CombinabilityOverride> combinabilityOverrides
TheCombinabilityOverrides
that override how this offer combines with other offers.- See Also:
-
combinabilityType
String combinabilityType
Determines whether this offer can be combined with other offers. Default isCombinabilityType.ANY
, meaning this offer is combinable with any other offer.- See Also:
-
contextState
com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState
A subset ofTracking
information to expose the context state for this object. -
currency
javax.money.CurrencyUnit currency
The currency that anEnhancedOrder.getCurrency()
must be for this offer to apply.This is typically used for offers where currency matters more. For example, an offer with
Discount.getAmount()
of 5 has different values inUSD
andEUR
. -
description
String description
Description of this offer. -
discount
Discount discount
Basic discount information for this offer.
If
Offer.tieredDiscount
is true, thenDiscount.getMethodType()
andDiscount.getAmount()
are overridden by the same fields in the tiers (seeDiscountTier
). -
discountTiers
List<DiscountTier> discountTiers
List ofdiscount tiers
determining the discount applied with this offer.- See Also:
-
DiscountTier
Offer.tieredDiscount
-
distributeOfferAmountToTargets
boolean distributeOfferAmountToTargets
This property impacts the way that items share the same discount. The intended use is for offers with multiple targets such as a "bundle offer" - that is setup as Buy 2 for $10" -
estimatedValue
BigDecimal estimatedValue
Provide an estimated value for this offer. This is used when comparing one offer combination with another.This property was added for voucher offers where a voucher can represent a later value. If two vouchers are not combinable, the one with the higher estimated value will be used. Likewise, if a there is a voucher offer and an order offer that are not combinable, the one with the higher value will be used.
This property is used for free gift offers as well.
-
excludeDiscountedItemsFromTotals
Boolean excludeDiscountedItemsFromTotals
This property controls how order and fulfillment group offers consider subtotal qualifications. Some offers may only want to consider items that have not already received a discount as part of the subtotal calculation. -
externalId
String externalId
This is an arbitrary ID, typically assigned by or used by 1st or 3rd party systems that are not Broadleaf. -
fgItemSubtotal
javax.money.MonetaryAmount fgItemSubtotal
The minimum total for all items in a fulfillment group to apply this offer. This is only relevant to fulfillment group offers and has no effect on other offer types. This property supports promotions like free shipping if you spend $200 in ship to home products. -
freeGift
boolean freeGift
Determines whether this is a free gift offer. -
freeProduct
String freeProduct
Defines the id of the free product for this offer. -
fulfillmentGroupCriteria
String fulfillmentGroupCriteria
String expression used to determine if a fulfillment group qualifies for this offer. For example, this allows for restricting this offer only to fulfillment groups with shipping price greater than $100.
Can be a string representation of a
SpelExpression
, e.g.,name == 'some-name' || id == '1'
, or that of some other expression language. -
fulfillmentServiceLevel
String fulfillmentServiceLevel
For Fulfillment offers, restrict the discount to a specific service level. For most applications, a fulfillment group has a single service level but some implementations allow the items in the group to have a variety of service levels (e.g. some NEXTDAY, some STANDARD). When this value is set, it will only impact the amount for the selected service levels. If this value is not set, the discount will apply to the group fulfillment price as a whole. -
generalMaxUsageStatus
String generalMaxUsageStatus
If an offer has been deemed to have exceeded is max usage threshold, this field will be set with a reason as denoted byMaxUsageStatusType
. This reason applies to general offer usage as specified by eitherOffer.getMaxUses()
, orOffer.getMaxTotalDiscount()
. Exceeding max thresholds for specific order or users scenarios is not tracked here. Status will beMaxUsageStatusType.VIABLE
when the offer has not exceeded thresholds yet, or is not bound by max usage thresholds. -
id
String id
The context ID of the offer. -
itemQualifierCriteria
ItemCriteria itemQualifierCriteria
Info related to determining what items are required so that an order or other items qualify to receive this offer's discount. If these items should not just qualify but also receive the discount, then setDiscount.getProrationType()
toProrationType.TARGET_AND_QUALIFIER
.- See Also:
-
maxSavingsPerOrder
javax.money.MonetaryAmount maxSavingsPerOrder
Determines the maximum savings a single order can receive from this offer. For example, suppose this field has a value of $50 and this is a 10% off offer. If the order's total is $600, then it would receive a $50 discount instead of $60 (i.e., 10%). A value of 0 indicates unlimited usage. Default is 0. -
maxTotalDiscount
javax.money.MonetaryAmount maxTotalDiscount
Determines the maximum savings this offer is valid for. For example, this offer can discount a total of $5000 before it is considered unavailable for further usage. A value of 0 indicates unlimited usage. Default is 0. -
maxUses
int maxUses
Determines the maximum number of times this offer can be used. A value of 0 indicates unlimited usage. Default is 0. -
maxUsesPerOrder
int maxUsesPerOrder
Determines the maximum number of times this offer can be used on a single order. A value of 0 indicates unlimited usage. Default is 0. -
maxUsesPerUser
int maxUsesPerUser
Determines the maximum number of times this offer can be used by the same user. Works in conjunction withOffer.maxUsesPerUserFrequency
to limit the frequency with which an individual user can use this offer. A value of 0 indicates unlimited usage. Default is 0. -
maxUsesPerUserFrequency
int maxUsesPerUserFrequency
This field works in conjunction withOffer.maxUsesPerUser
to limit the frequency with which an individual user can use this offer. IfmaxUsesPerUser = 3
andmaxUsesPerUserFrequency = 5
, then a user cannot use this offer more than 3 times in any 5 day period. Note that this is a sliding-window of opportunity. If a user uses this offer on days 1, 4, and 5, then they can use it on 6 but not on 7 since day 7 is within 5 days of days 4, 5, and 6. A value of 0 indicates that a user can only use thisOffer.maxUsesPerUser
times ever. Default is 0. -
maxUsesPerUserStrategy
String maxUsesPerUserStrategy
Enum that allows implementations to vary how user max uses will be interpreted. By default the strategy will beUserMaxUsesStrategyType.CUSTOMER
. -
minTotalOfQualifierPrices
javax.money.MonetaryAmount minTotalOfQualifierPrices
Determines the price subtotal threshold that all qualifying items must reach in addition toOffer.itemQualifierCriteria
in order to qualify an order items to receive this offer's discount. That is, the system will find all qualifying items (based onOffer.itemQualifierCriteria
) for the given offer and sum their prices before any discounts are applied. If that sum reaches or exceeds thisminTotalOfQualifierPrices
, then the targets of the offer "qualify" to receive the discount. -
minTotalOfTargetPrices
javax.money.MonetaryAmount minTotalOfTargetPrices
Determines the price subtotal threshold that all targeted items must reach in addition toOffer.targetItemCriteria
in order to receive this offer's discount. That is, the system will find all targeted items in an order and sum their prices before any discounts are applied. If the sum reaches or exceeds thisminTotalOfTargetPrices
, then the targets can receive the discount. -
name
String name
Display name for this offer. -
offerCodes
Set<OfferCode> offerCodes
Theshared codes
that can be used to retrieve this offer. These codes would be used in situations where this offer is not automatically considered (meaningOffer.automaticallyConsidered
is false} -
offerDiscountStrategy
String offerDiscountStrategy
Represents the discount strategy for this offer. Refer toOfferDiscountStrategy
for supported offer strategies. -
orderCriteria
String orderCriteria
String expression used in conjunction with
Offer.itemQualifierCriteria
to determine if an order qualifies for this offer. WhereasOffer.itemQualifierCriteria
runs against an order's items, these criteria are run against general order attributes like locale, currencyCode, subtotal, etc. For example, this allows for restricting this offer only to orders with subtotals greater than $100.Can be a string representation of a
SpelExpression
, e.g.,name == 'some-name' || id == '1'
, or that of some other expression language. -
preferCartBundling
boolean preferCartBundling
This property provides a hint to the front-end application to perform grouping for items that share the same discount. The intended use is for offers with multiple targets such as a "bundle offer" - that is setup as Buy 2 for $10" As the offer engine supports the concept of an item being part of more than one bundle, applications will need to make decisions on how to interpret this flag. -
priority
Long priority
When multiple offers match a context, the offer with the higher priority is applied first, where smaller integer values represent higher priorities. When used for comparisons, null should treated as lowest priority perOffer.getPriorityForComparisons()
. -
qualifiersCanBeQualifiers
boolean qualifiersCanBeQualifiers
Determines whether items that qualify an order to receive this offer's discount can also be used as qualifiers for other offers of the same type (e.g., Order, Order Item, Fulfillment). For example, if an offer requires that an order contains a "red t-shirt" item in order to qualify for a 10% discount and another offer also requires that a "red t-shirt" be present to qualify for a 10% shipping discount, then this field determines whether that red t-shirt can be used by both offers to qualify the order for both 10% off the subtotal and 10% off shipping or if only the better offer can be applied. Default is false: A single qualifier cannot cause more than 1 offer to be applied. -
qualifiersCanBeTargets
boolean qualifiersCanBeTargets
Determines whether items that qualify an order to receive this offer's discount can also receive discounts from other offers of the same type (e.g., Order, Order Item, Fulfillment). For example, if this offer requires that an order contains a "red t-shirt" be present to qualify for a 10% discount on another item (think BOGO) and another offer targets that same "red t-shirt" for a 10% discount (rather than as a qualifier), then this field determines whether that red t-shirt can both qualify the another item for a 10% discount and itself receive a 10% discount or just 1 can be discounted. Default is false: A qualifier cannot also receive an individual discount. -
qualifyFulfillmentAcrossAllItems
boolean qualifyFulfillmentAcrossAllItems
Whether items across the entire order should be considered as potential qualifiers for fulfillment groups instead of just the items in the same fulfillment group. Default behavior is to use only the items within the fulfillment group as qualifiers. -
requiresRelatedTargetAndQualifiers
boolean requiresRelatedTargetAndQualifiers
Determines whether a qualifier must be matched to targets that are in its lineage, that is, targets must either be descended from or an ancestor of a qualifier. This is discovered by repeatedly calling the qualifier'sEnhancedOrderLineItem.getParent()
to find the root ancestor; then, from the root, repeatedly callingEnhancedOrderLineItem.getChildren()
to find if a potential order item is a descendant thereof, that is, in the same lineage as the qualifier. -
roundDiscountsByItemUnit
Boolean roundDiscountsByItemUnit
For testing. Future enhancement to allow population via a JpaOrder property. -
segment
String segment
The segments to which this offer can apply. Segments are useful for systems that create offers for portions of the cart. For example, a vendor might have 10% off all items in the "vendor A" segment. Another example, is a site that uses a shared cart for 3 different store concepts (aka banners). A value of null, empty or "ANY" is the most common usage and means that this offer can apply to any qualifying part of the order. This field qualifies items using theEnhancedLineItem.getSegment()
property. -
stackable
boolean stackable
Determines whether this offer can be stacked on top of other offers of the same type. This is different thanCombinabilityType.ANY
which indicates tha two offers can coexist in the same order but doesn't allow them to apply to the same target. For example, consider two offers where the first is "10% off jeans" and the second is "5% off clothing". If these are not stackable, then any jeans in the order will get 10% off while other clothing will get 5% off. If they are stackable, the jeans will get both offers and be 15% off.- See Also:
-
subscriptionDiscount
SubscriptionDiscount subscriptionDiscount
Information around discounting subscription items that have recurring billing. -
targetGroupingStrategy
String targetGroupingStrategy
The target grouping strategy. This affects how order items are grouped when applying discounts. Optional. If not set, defaults toTargetGroupingStrategy.COSTLIEST
.- See Also:
-
targetItemCriteria
ItemCriteria targetItemCriteria
Info related to determining what order items can receive this offer's discount.- See Also:
-
tieredDiscount
boolean tieredDiscount
Deprecated.SeeOffer.offerDiscountStrategy
. Offers with this value set to true are now considered to have a discount strategy ofOfferDiscountStrategy.TIERED_ITEM_QTY
. To check if an offer is tiered, useOffer.isTieredOffer()
Determines whether this offer uses tiered discounts such that the discount changes per item quantity. For example, an offer could have 3 tiers:
- Tier 1: if 0-3 items, then the discount is 10%
- Tier 2: if 4-10 items, then the discount is 15%
- Tier 3: if 11+ items, then the discount is 20%
If true, then
Discount.getMethodType()
andDiscount.getAmount()
are overridden by the same fields in the tiers (seeDiscountTier
).- See Also:
-
DiscountTier
Offer.discountTiers
-
timeCriteria
String timeCriteria
String expression used to determine whether this offer can be qualified for only at certain times or on certain days or months. For example, this allows an offer to only be applicable on Fridays or the last day of any month.
Can be a string representation of a
SpelExpression
, e.g.,name == 'some-name' || id == '1'
, or that of some other expression language. -
useQtyOnlyTierCalculation
boolean useQtyOnlyTierCalculation
Determines whether to match an
offer tier's min quantity
against the number of items in an order or to match it against the number of target item sets that match anoffer's target item criteria
.Consider the following offer:
- Has 2 tiers:
- 1st tier min quantity: 1
- 2nd tier: 5
- An order must meet the following target item criteria
- Has 3 items in the "Hot Sauces" category
- and 1 item in the "Merchandise" category
When
useQtyOnlyTierCalculation = false
, the 2nd tier would apply if the order had 3 hot sauces, 1 t-shirt, and at least 1 of an item in any category. When it's true, then the order must have 5 sets of 3 hot sauces and 1 t-shirt, that is, 15 hot sauces and 5 t-shirts to match this offer. - Has 2 tiers:
-
userTargets
Set<UserTarget> userTargets
Set of users directly targeted by this offer.- See Also:
-
voucher
boolean voucher
Determines whether this is a voucher offer. -
voucherCampaign
String voucherCampaign
Defines the id of the campaign for this offer.
-
-
Class com.broadleafcommerce.promotion.offer.domain.OfferAuditDetail
class OfferAuditDetail extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
campaignTrackingId
String campaignTrackingId
The tracking ID of the campaign this audit is for. -
contextState
com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState
A subset ofTracking
information to expose the context state for this object. -
dateApplied
Instant dateApplied
The date and time when the relatedoffer code
was applied. -
id
String id
The context ID of the offer audit detail. -
offerAuditSummaryId
String offerAuditSummaryId
The ID of the offer audit summary that this audit is for. -
offerCodeId
String offerCodeId
The ID of the offer code that this audit information is for. -
offerId
String offerId
The ID of the offer this audit is for. -
transactionReferenceId
String transactionReferenceId
The id of the transaction upon which the related offer was used. Used to check against anOffer.getMaxUsesPerOrder()
. -
transactionReferenceType
String transactionReferenceType
The type of the transaction upon which the related offer was used. For example, "ORDER". -
user
UserTarget user
The identifying info of the user that used the offer code.
-
-
Class com.broadleafcommerce.promotion.offer.domain.OfferCode
class OfferCode extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
activeEndDate
Instant activeEndDate
Defines the ending time for which this offer code is active. -
activeStartDate
Instant activeStartDate
Defines the beginning time for which this offer code is active. -
assigned
boolean assigned
Defines whether this code has been assigned for use. -
attributes
Map<String,
Attribute> attributes Dynamic attributes that are a part of the offer code. -
campaignId
String campaignId
Defines the id for the campaign that originated the offer code. -
code
String code
The string code that represents this record. -
contextState
com.broadleafcommerce.data.tracking.core.filtering.business.domain.ContextState contextState
A subset ofTracking
information to expose the context state for this object. -
emailRegEx
String emailRegEx
Defines a regex to be used for validating the offer code for customer updateUses. -
externalId
String externalId
This is an arbitrary ID, typically assigned by or used by 1st or 3rd party systems that are not Broadleaf. -
generalMaxUsageStatus
String generalMaxUsageStatus
If an offercode has been deemed to have exceeded its max usage threshold, this field will be set with a reasonMaxUsageStatusType.MAX_USES_EXCEEDED
. This reason applies to general offercode usage as specified byOfferCode.getMaxUses()
. Exceeding max thresholds for specific users scenarios is not tracked here. Status will beMaxUsageStatusType.VIABLE
when the offercode has not exceeded thresholds yet, or is not bound by max usage thresholds. -
generatorId
String generatorId
Defines the id for the code generator that originated the offer code. -
id
String id
-
maxUses
int maxUses
Defines the number of max uses allowed for this offer code. By default, a code can be used only once. -
maxUsesPerUser
int maxUsesPerUser
Determines the maximum number of times this offer code can be used by the same user. A value of 0 indicates unlimited usage. Default is 0. -
offerId
String offerId
Defines the id for the offer that originated the offer code. -
segment
String segment
The segment to which this offer can apply. A value of empty or "ANY" is the most common usage and means that this offer can apply to any qualifying part of the order. Typical uses of segments include using them to restrict an offer to a specific vendor or store (aka banner).
-
-
Class com.broadleafcommerce.promotion.offer.domain.OffersAndOfferCodesUsabilityInfo
class OffersAndOfferCodesUsabilityInfo extends Object implements Serializable- serialVersionUID:
- 1L
-
Class com.broadleafcommerce.promotion.offer.domain.SubscriptionDiscount
class SubscriptionDiscount extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
applyToFuturePeriods
boolean applyToFuturePeriods
Whether an offer should be applied to items' future periods, i.e., items that have a recurring billing cycle based on a frequency and a period. If this is false, none of the other fields on this class will be considered. Default to false. -
beginPeriod
int beginPeriod
The beginning period for which this offer should be applied. 1 refers to the first recurring billing period, and so on. -
discountCurrentOrder
boolean discountCurrentOrder
Whether to apply this discount to the current provided order. Otherwise, it will only apply to future billing cycles resulting from the current order. Default to true. -
endPeriod
int endPeriod
The ending period for which this offer should be applied. 1 refers to the first recurring billing period, and so on.
-
-
Class com.broadleafcommerce.promotion.offer.domain.UserTarget
class UserTarget extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
contextState
com.broadleafcommerce.data.tracking.core.EmbeddedContextState contextState
A subset ofTracking
information to expose the context state for this object. This value is not persisted, and instead it is dynamically calculated and populated when theChangeDetails
for the parent object's entireattributes
map are compared. -
label
String label
A friendly label for admin display. Typically only set on initial creation of the target and not kept in sync. -
targetType
String targetType
The type of the user. This could be "CUSTOMER", "ACCOUNT", etc. -
targetValue
String targetValue
An identifying value for the user. Could be an email, username, or some similarly identifying value.
-
-
Class com.broadleafcommerce.promotion.offer.domain.VoucherCodeGenerationRequest
class VoucherCodeGenerationRequest extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
codeGenerator
CodeGenerator codeGenerator
TheCodeGenerator
to use to generate voucher codes. -
voucherCampaignId
String voucherCampaignId
TheCampaign.getId()
to generate the voucher codes from.
-
-
-
Package com.broadleafcommerce.promotion.offer.provider.jpa.domain
-
Class com.broadleafcommerce.promotion.offer.provider.jpa.domain.JpaAttribute
class JpaAttribute extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
value
Object value
- See Also:
-
-
Class com.broadleafcommerce.promotion.offer.provider.jpa.domain.JpaCampaign
class JpaCampaign extends Object implements Serializable- serialVersionUID:
- 1L
-
Class com.broadleafcommerce.promotion.offer.provider.jpa.domain.JpaCampaignTracking
class JpaCampaignTracking extends Object implements Serializable- serialVersionUID:
- 1L
-
Class com.broadleafcommerce.promotion.offer.provider.jpa.domain.JpaCampaignTrackingId
class JpaCampaignTrackingId extends Object implements Serializable- serialVersionUID:
- 1L
-
Class com.broadleafcommerce.promotion.offer.provider.jpa.domain.JpaCodeGenerator
class JpaCodeGenerator extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
activeEndDate
Instant activeEndDate
-
activeStartDate
Instant activeStartDate
-
allowedLetters
String allowedLetters
-
allowedNumbers
String allowedNumbers
-
campaignId
String campaignId
-
codeFormat
String codeFormat
-
codeGenerationMessage
String codeGenerationMessage
-
codeGenerationStatus
String codeGenerationStatus
-
codeLength
Integer codeLength
-
codePrefix
String codePrefix
-
contextId
String contextId
-
createDate
Instant createDate
-
emailRegEx
String emailRegEx
-
maxUses
int maxUses
-
numberOfCodesGenerated
int numberOfCodesGenerated
-
numberOfCodesToGenerate
int numberOfCodesToGenerate
-
segment
String segment
-
tracking
com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking tracking
-
updateDate
Instant updateDate
-
voucherCodeGenerator
boolean voucherCodeGenerator
-
-
Class com.broadleafcommerce.promotion.offer.provider.jpa.domain.JpaCombinabilityOverride
class JpaCombinabilityOverride extends Object implements Serializable- serialVersionUID:
- 1L
-
Class com.broadleafcommerce.promotion.offer.provider.jpa.domain.JpaCombinabilityOverrideId
class JpaCombinabilityOverrideId extends Object implements Serializable- serialVersionUID:
- 1L
-
Class com.broadleafcommerce.promotion.offer.provider.jpa.domain.JpaDiscountTier
class JpaDiscountTier extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
amount
BigDecimal amount
-
methodType
String methodType
-
minAmount
BigDecimal minAmount
-
minQuantity
Long minQuantity
-
-
Class com.broadleafcommerce.promotion.offer.provider.jpa.domain.JpaItemCriteriaRule
class JpaItemCriteriaRule extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
numberOfMatchesRequired
int numberOfMatchesRequired
-
rule
String rule
- See Also:
-
-
Class com.broadleafcommerce.promotion.offer.provider.jpa.domain.JpaMarketingMessage
class JpaMarketingMessage extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
_id
String _id
-
activeEndDate
Instant activeEndDate
-
activeStartDate
Instant activeStartDate
-
contextId
String contextId
-
currency
javax.money.CurrencyUnit currency
Transient property that holds the currency used to convert price to a MonetaryAmount. -
displayHint
String displayHint
-
locale
Locale locale
Deprecated. -
locationType
String locationType
Deprecated. -
locationTypes
List<String> locationTypes
-
maxCartSubtotal
BigDecimal maxCartSubtotal
-
minCartSubtotal
BigDecimal minCartSubtotal
-
offerContextId
String offerContextId
-
priority
Integer priority
-
showIfOfferApplied
Boolean showIfOfferApplied
-
targetType
String targetType
-
text
String text
-
tracking
com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking tracking
-
useCartSubtotal
Boolean useCartSubtotal
-
-
Class com.broadleafcommerce.promotion.offer.provider.jpa.domain.JpaOffer
class JpaOffer extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
_id
String _id
-
activeEndDate
Instant activeEndDate
- See Also:
-
activeStartDate
Instant activeStartDate
- See Also:
-
applyDiscountToAllTargets
Boolean applyDiscountToAllTargets
- See Also:
-
applyRemainderToFulfillment
Boolean applyRemainderToFulfillment
- See Also:
-
applyToFuturePeriods
boolean applyToFuturePeriods
-
attributes
Map<String,
JpaAttribute> attributes -
automaticallyConsidered
boolean automaticallyConsidered
- See Also:
-
beginPeriod
Integer beginPeriod
-
campaignTrackingIds
Set<JpaCampaignTracking> campaignTrackingIds
- See Also:
-
cartLabel
String cartLabel
- See Also:
-
cartSubtotal
BigDecimal cartSubtotal
- See Also:
-
combinabilityOverrides
Set<JpaCombinabilityOverride> combinabilityOverrides
- See Also:
-
combinabilityType
String combinabilityType
- See Also:
-
contextId
String contextId
- See Also:
-
currency
javax.money.CurrencyUnit currency
Note that this is different from the transientJpaOffer.resolvedCurrency
. The transientJpaOffer.resolvedCurrency
is used to convert fields such asJpaOffer.cartSubtotal
fromBigDecimal
intoMonetaryAmount
, whereas this currency specifies which currency the offer can be applied to.- See Also:
-
description
String description
- See Also:
-
discountAmount
BigDecimal discountAmount
-
discountApplicableToDependentItems
boolean discountApplicableToDependentItems
-
discountApplicableToSalesPrice
boolean discountApplicableToSalesPrice
-
discountCurrentOrder
boolean discountCurrentOrder
-
discountMethodType
String discountMethodType
-
discountProrationType
String discountProrationType
-
discountTargetType
String discountTargetType
-
discountTiers
List<JpaDiscountTier> discountTiers
- See Also:
-
discountTimingType
String discountTimingType
-
distributeOfferAmountToTargets
boolean distributeOfferAmountToTargets
-
endPeriod
Integer endPeriod
-
estimatedValue
BigDecimal estimatedValue
Estimated value for this offer, used in scoring the best offer permutation for voucher and free gift offers.- See Also:
-
excludeDiscountedItemsFromTotals
Boolean excludeDiscountedItemsFromTotals
-
externalId
String externalId
-
fgItemSubtotal
BigDecimal fgItemSubtotal
- See Also:
-
freeGift
boolean freeGift
- See Also:
-
freeProduct
String freeProduct
- See Also:
-
fulfillmentGroupCriteria
String fulfillmentGroupCriteria
- See Also:
-
fulfillmentServiceLevel
String fulfillmentServiceLevel
- See Also:
-
generalMaxUsageStatus
String generalMaxUsageStatus
- See Also:
-
maxSavingsPerOrder
BigDecimal maxSavingsPerOrder
- See Also:
-
maxTotalDiscount
BigDecimal maxTotalDiscount
- See Also:
-
maxUses
int maxUses
- See Also:
-
maxUsesPerOrder
int maxUsesPerOrder
- See Also:
-
maxUsesPerUser
int maxUsesPerUser
- See Also:
-
maxUsesPerUserFrequency
int maxUsesPerUserFrequency
- See Also:
-
maxUsesPerUserStrategy
String maxUsesPerUserStrategy
- See Also:
-
minTotalOfQualifierPrices
BigDecimal minTotalOfQualifierPrices
- See Also:
-
minTotalOfTargetPrices
BigDecimal minTotalOfTargetPrices
- See Also:
-
name
String name
- See Also:
-
offerDiscountStrategy
String offerDiscountStrategy
-
orderCriteria
String orderCriteria
- See Also:
-
preferCartBundling
boolean preferCartBundling
-
priority
Long priority
- See Also:
-
qualifierItemCriteriaConnectiveOperator
String qualifierItemCriteriaConnectiveOperator
- See Also:
-
qualifierItemCriteriaRules
Set<ItemCriteriaRule> qualifierItemCriteriaRules
- See Also:
-
qualifiersCanBeQualifiers
boolean qualifiersCanBeQualifiers
- See Also:
-
qualifiersCanBeTargets
boolean qualifiersCanBeTargets
- See Also:
-
qualifyFulfillmentAcrossAllItems
boolean qualifyFulfillmentAcrossAllItems
-
requiresRelatedTargetAndQualifiers
boolean requiresRelatedTargetAndQualifiers
-
resolvedCurrency
javax.money.CurrencyUnit resolvedCurrency
Transient property that holds the currency used to convert price to a MonetaryAmount.Same as
JpaOffer.currency
if it is provided, otherwise it's resolved fromContextInfo
-
segment
String segment
- See Also:
-
stackable
boolean stackable
- See Also:
-
targetGroupingStrategy
String targetGroupingStrategy
-
targetItemCriteriaConnectiveOperator
String targetItemCriteriaConnectiveOperator
- See Also:
-
targetItemCriteriaRules
Set<ItemCriteriaRule> targetItemCriteriaRules
- See Also:
-
tieredDiscount
Boolean tieredDiscount
Deprecated.- See Also:
-
timeCriteria
String timeCriteria
- See Also:
-
tracking
com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking tracking
-
useQtyOnlyTierCalculation
boolean useQtyOnlyTierCalculation
- See Also:
-
userTargets
Set<JpaUserTarget> userTargets
- See Also:
-
voucher
boolean voucher
- See Also:
-
voucherCampaign
String voucherCampaign
- See Also:
-
-
Class com.broadleafcommerce.promotion.offer.provider.jpa.domain.JpaOfferAuditDetail
class JpaOfferAuditDetail extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
campaignTrackingId
String campaignTrackingId
-
contextId
String contextId
-
dateApplied
Instant dateApplied
-
offerAuditSummaryId
String offerAuditSummaryId
-
offerCodeId
String offerCodeId
-
offerId
String offerId
-
targetType
String targetType
-
targetValue
String targetValue
-
tracking
com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking tracking
-
transactionReferenceId
String transactionReferenceId
-
transactionReferenceType
String transactionReferenceType
-
-
Class com.broadleafcommerce.promotion.offer.provider.jpa.domain.JpaOfferAuditSummary
class JpaOfferAuditSummary extends Object implements Serializable-
Serialized Fields
-
contextId
String contextId
-
currency
javax.money.CurrencyUnit currency
Transient property that holds the currency used to convert price to a MonetaryAmount. -
offerId
String offerId
-
totalDiscounted
BigDecimal totalDiscounted
-
totalUsages
int totalUsages
-
tracking
com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking tracking
-
-
-
Class com.broadleafcommerce.promotion.offer.provider.jpa.domain.JpaOfferCode
class JpaOfferCode extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
activeEndDate
Instant activeEndDate
-
activeStartDate
Instant activeStartDate
-
assigned
boolean assigned
-
attributes
Map<String,
JpaAttribute> attributes -
campaignId
String campaignId
-
code
String code
-
contextId
String contextId
-
emailRegEx
String emailRegEx
-
externalId
String externalId
-
generalMaxUsageStatus
String generalMaxUsageStatus
-
generatorId
String generatorId
-
maxUses
Integer maxUses
-
maxUsesPerUser
Integer maxUsesPerUser
-
offerId
String offerId
-
segment
String segment
-
tracking
com.broadleafcommerce.data.tracking.jpa.filtering.domain.ApplicationJpaTracking tracking
-
-
Class com.broadleafcommerce.promotion.offer.provider.jpa.domain.JpaUserTarget
class JpaUserTarget extends Object implements Serializable- serialVersionUID:
- 1L
-
Class com.broadleafcommerce.promotion.offer.provider.jpa.domain.JpaUserTargetId
class JpaUserTargetId extends Object implements Serializable- serialVersionUID:
- 1L
-
-
Package com.broadleafcommerce.promotion.offer.service.dto
-
Class com.broadleafcommerce.promotion.offer.service.dto.BaseCandidateOffer
class BaseCandidateOffer extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
combinableOverrides
Set<String> combinableOverrides
Convert offer data into easier structures for combinability algorithms -
currency
javax.money.CurrencyUnit currency
Offer.getCurrency()
if specified, otherwiseEnhancedOrder.getCurrency()
is used. -
excludedItemIds
Set<String> excludedItemIds
Store the list of excludedItemIds included which can be passed in via the OfferCodeDto -
nonCombinableOverrides
Set<String> nonCombinableOverrides
-
offer
Offer offer
The candidateOffer
. -
offerCodesMap
Map<String,
OfferCode> offerCodesMap -
offerCombinabilityCriteriaKey
OfferCombinabilityCriteriaKey offerCombinabilityCriteriaKey
Holds the combinability criteria for this offer. The offer domain contains combinability flags and rules but the criteria will vary with each execution of the offer engine. For example, if "item offer a" can be combined with any "order offer except b" and b is not in the scope of the current offer engine execution, then we can say that "item offer a" can be combined with ANY order offer. Practically, this allows us to reduce the overall complexity of offer engine by getting rid of scenarios that are irrelevant to the current execution. -
offerDtosMap
Map<String,
com.broadleafcommerce.promotion.offer.client.web.context.OfferCodeDto> offerDtosMap -
overrideOfferId
String overrideOfferId
When processing the same offer for more than one segment, we need to override the id used for the underlying offer id temporarily. -
potentialSavings
javax.money.MonetaryAmount potentialSavings
The total potential amount saved by applying this offer to its targets. -
roundingMode
RoundingMode roundingMode
TheRoundingMode
to use when rounding. Default isRoundingMode.HALF_EVEN
. -
roundOfferValues
boolean roundOfferValues
Determines whether to round
BaseCandidateOffer.potentialSavings
. Default is false. Note: This is only relevant for adjustments that apply to items. The additional precision is important when multiplying by a "qty". Order and fulfillment group adjustments will always be rounded in the default implementations.It is sometimes problematic to use
DiscountMethodType.PERCENT_OFF
offers
with regards to rounding. For example, consider an item that costs $9.99 and has a 50% discount. To be precise, the offer value is 4.995, but this may be a strange value to display to the user depending on the currency being used. Keeping this false produces more accurate results when using quantities > 1. For example, 20% off of $9.99 with a quantity of 5 will produce a savings of exactly $9.99 which would be expected. The savings will always be rounded to the correct precision of the currency, however theS
"totalSavings" will always be displays may want to round the value unit adjustment will be up to 5 digits of precision if roundOfferValues is false. Client displays may with to round the adjustment amount if showing per quantity level adjustments. -
segment
String segment
Store the effective segment for this Offer. The segment can be narrowed by the use of an OfferCode or OfferCodeDto. -
stackableOverrides
Set<String> stackableOverrides
-
-
Class com.broadleafcommerce.promotion.offer.service.dto.CandidateFulfillmentGroup
class CandidateFulfillmentGroup extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
candidateQualifiersMap
Map<ItemCriteriaRule,
Collection<EnhancedFulfillmentLineItem>> candidateQualifiersMap Map ofItemCriteriaRule
from anoffer's item qualifier criteria
to aCollection
ofEnhancedFulfillmentLineItem
that meet that criteria for thisCandidateFulfillmentGroup.fulfillmentGroup
. -
discountedAmount
javax.money.MonetaryAmount discountedAmount
The amount off this fulfillment group would get if thecandidate offer
was applied. -
discountedTotal
javax.money.MonetaryAmount discountedTotal
The adjusted discounted price for this candidate fulfillment group if thecandidate offer
was applied. -
fulfillmentGroup
EnhancedFulfillmentGroup fulfillmentGroup
TheEnhancedFulfillmentGroup
that is decorated for consideration as part of aCandidateFulfillmentGroupOffer
.
-
-
Class com.broadleafcommerce.promotion.offer.service.dto.CandidateFulfillmentGroupOffer
class CandidateFulfillmentGroupOffer extends BaseCandidateOffer implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
candidateFulfillmentGroups
List<CandidateFulfillmentGroup> candidateFulfillmentGroups
TheCandidateFulfillmentGroups
that can be targeted byBaseCandidateOffer.offer
, each one representing a decoratedEnhancedFulfillmentGroup
with savings information. -
totalSavings
javax.money.MonetaryAmount totalSavings
Total savings across allCandidateFulfillmentGroupOffer.candidateFulfillmentGroups
for theBaseCandidateOffer.offer
.
-
-
Class com.broadleafcommerce.promotion.offer.service.dto.CandidateItemOffer
class CandidateItemOffer extends BaseCandidateOffer implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
candidateQualifiersMap
Map<ItemCriteriaRule,
Collection<EnhancedLineItem>> candidateQualifiersMap Map ofItemCriteriaRule
from anoffer's item qualifier criteria
to aCollection
ofEnhancedLineItem
that meet that criteria. -
candidateTargetsMap
Map<ItemCriteriaRule,
Collection<EnhancedLineItem>> candidateTargetsMap Map ofItemCriteriaRule
from anoffer's target item criteria
to aCollection
ofEnhancedLineItem
that meet that criteria. -
maxSavingsCheckRequired
boolean maxSavingsCheckRequired
-
maxSavingsDiscounts
Map<LineItemOfferDetail,
OfferDiscount> maxSavingsDiscounts Keep track of the current iteration targets so that the estimated discount can be calculated. This structure is solely for assisting with the maxSavingsPerOrder calculation -
maxSavingsQualifiers
Map<LineItemOfferDetail,
OfferQualifier> maxSavingsQualifiers -
maxSavingsRemainderAmount
Optional<javax.money.MonetaryAmount> maxSavingsRemainderAmount
Represents the remainder of max savings per order that can be applied to qualifying items. Occurs when the max savings threshold is reached such that a given item can not receive the full item discount and instead qualifies for only a part of the discount due to the max threshold calculation. -
originalPrice
BigDecimal originalPrice
The original, unadjusted price of the item being targeted byBaseCandidateOffer.getOffer()
. -
potentialSavingsQtyOne
javax.money.MonetaryAmount potentialSavingsQtyOne
Potential savings per single use ofBaseCandidateOffer.getOffer()
. TakesBaseCandidateOffer.getPotentialSavings()
and divides it byCandidateItemOffer.uses
. Used in weighting the potential savings to determine the best permutation of all applicable offers. -
promotionUsageId
String promotionUsageId
The id of each individual usage of this promotion instance. -
useAmountOnlyTierCalculation
boolean useAmountOnlyTierCalculation
- See Also:
-
Offer#useAmountOnlyTierCalculation
-
useQtyOnlyTierCalculation
boolean useQtyOnlyTierCalculation
Determines whether to match an
offer tier's min quantity
against the number of items in an order or to match it against the number of target item set that match anoffer's target item criteria
.Consider the following offer:
- Has 2 tiers:
- 1st tier min quantity: 1
- 2nd tier: 5
- An order must meet the following target item criteria
- Has 3 items in the "Hot Sauces" category
- and 1 item in the "Merchandise" category
When
useQtyOnlyTierCalculation = true
, the 2nd tier would apply if the order had 3 hot sauces, 1 t-shirt, and at least 1 of an item in any category. When it's false, then the order must have 5 sets of 3 hot sauces and 1 t-shirt, that is, 15 hot sauces and 5 t-shirts to match this offer.By default this behavior can be configured globally using
broadleaf.offer.useQuantityOnlyTierCalculation
- Has 2 tiers:
-
uses
int uses
Tracks the number of times this candidate offer has been used. This is used while determining potential savings and the best permutation of applicable offers where we don't want to create anOfferAuditDetail
because we're calculating potential rather than actually usages. -
weightedPercentSaved
BigDecimal weightedPercentSaved
Takes theBaseCandidateOffer.getPotentialSavings()
and divides them by the item's price before multiply by 100 to get a percentage. Sometimes a more complex weighting algorithm is used such as when an offer has qualifiers that cannot be used by other offers.
-
-
Class com.broadleafcommerce.promotion.offer.service.dto.CandidateOffers
class CandidateOffers extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
allCandidateOffers
List<BaseCandidateOffer> allCandidateOffers
A set of all the relevant candidate offers for given offer engine execution -
allOfferIds
Set<String> allOfferIds
Set of ids for all offers that are applicable to a given offer engine execution. -
candidateFulfillmentGroupOffers
List<CandidateFulfillmentGroupOffer> candidateFulfillmentGroupOffers
List of candidate offers targetingfulfillment groups
.- See Also:
-
candidateFulfillmentItemOffers
List<CandidateItemOffer> candidateFulfillmentItemOffers
List of candidate offers targetingfulfillment items
. -
candidateOrderItemOffers
List<CandidateItemOffer> candidateOrderItemOffers
List of candidate offers targetingorder items
.- See Also:
-
candidateOrderOffers
List<CandidateOrderOffer> candidateOrderOffers
List of candidate offers targetingorders
.- See Also:
-
otherTypeOfferIdsList
Map<String,
Set<String>> otherTypeOfferIdsList For combinability algorithms, it is helpful to know the ids of all other offer types. For example, an order offer needs to know the ids of all item and fulfillment offers to see which ones it can be combined with.
-
-
Class com.broadleafcommerce.promotion.offer.service.dto.CandidateOrderOffer
class CandidateOrderOffer extends BaseCandidateOffer implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
candidateQualifiersMap
Map<ItemCriteriaRule,
Collection<EnhancedLineItem>> candidateQualifiersMap Map ofItemCriteriaRule
from anoffer's item qualifier criteria
to aCollection
ofEnhancedLineItem
that meet that criteria. -
order
EnhancedOrder order
The order being targeted byBaseCandidateOffer.getOffer()
}. -
roundDiscountsByItem
boolean roundDiscountsByItem
Whether to round the offer discounts at the item level instead of the order level.
-
-
Class com.broadleafcommerce.promotion.offer.service.dto.CombinedTypesOfferPermutation
class CombinedTypesOfferPermutation extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
allFulfillmentGroupPermutations
Set<OffersPermutation> allFulfillmentGroupPermutations
-
allFulfillmentItemPermutations
Set<OffersPermutation> allFulfillmentItemPermutations
-
allItemPermutations
Set<OffersPermutation> allItemPermutations
-
allOrderPermutations
Set<OffersPermutation> allOrderPermutations
-
allVoucherPermutations
Set<OffersPermutation> allVoucherPermutations
-
bestFulfillmentGroupOfferPermutation
FulfillmentGroupOfferPermutationResult bestFulfillmentGroupOfferPermutation
-
bestFulfillmentItemOfferPermutation
ItemOfferPermutationResult bestFulfillmentItemOfferPermutation
-
bestItemOfferPermutation
ItemOfferPermutationResult bestItemOfferPermutation
-
bestOrderOfferPermutation
OrderOfferPermutationResult bestOrderOfferPermutation
-
bestVoucherOfferPermutation
OffersPermutation bestVoucherOfferPermutation
-
initialOrderTotals
OrderTotals initialOrderTotals
-
orderTotals
OrderTotals orderTotals
-
-
Class com.broadleafcommerce.promotion.offer.service.dto.DiscountParameters
class DiscountParameters extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
discountAmount
BigDecimal discountAmount
-
discountMethodType
String discountMethodType
-
-
Class com.broadleafcommerce.promotion.offer.service.dto.OfferCombinabilityCriteria
class OfferCombinabilityCriteria extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
compatibleOffers
List<BaseCandidateOffer> compatibleOffers
-
key
@NonNull OfferCombinabilityCriteriaKey key
-
permutations
Set<OffersPermutation> permutations
-
-
Class com.broadleafcommerce.promotion.offer.service.dto.OfferProcessingContext
class OfferProcessingContext extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
bestOfferPermutation
CombinedTypesOfferPermutation bestOfferPermutation
-
candidateOffers
CandidateOffers candidateOffers
-
combinedTypesOfferPermutations
List<CombinedTypesOfferPermutation> combinedTypesOfferPermutations
-
fulfillmentGroupCriteriaMap
Map<OfferCombinabilityCriteriaKey,
OfferCombinabilityCriteria> fulfillmentGroupCriteriaMap -
fulfillmentItemCriteriaMap
Map<OfferCombinabilityCriteriaKey,
OfferCombinabilityCriteria> fulfillmentItemCriteriaMap -
hasOffers
boolean hasOffers
-
itemOfferCriteriaMap
Map<OfferCombinabilityCriteriaKey,
OfferCombinabilityCriteria> itemOfferCriteriaMap -
order
EnhancedOrder order
-
orderOfferCriteriaMap
Map<OfferCombinabilityCriteriaKey,
OfferCombinabilityCriteria> orderOfferCriteriaMap -
voucherCriteriaMap
Map<OfferCombinabilityCriteriaKey,
OfferCombinabilityCriteria> voucherCriteriaMap
-
-
Class com.broadleafcommerce.promotion.offer.service.dto.OffersPermutation
class OffersPermutation extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
candidateOffers
List<T extends BaseCandidateOffer> candidateOffers
-
offerTargetType
String offerTargetType
-
sorted
boolean sorted
-
-
Class com.broadleafcommerce.promotion.offer.service.dto.TotalPotentialSavings
class TotalPotentialSavings extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
amount
javax.money.MonetaryAmount amount
-
weightedSavingsPercentage
BigDecimal weightedSavingsPercentage
-
-
-
Package com.broadleafcommerce.promotion.offer.service.messaging.cache
-
Class com.broadleafcommerce.promotion.offer.service.messaging.cache.PromotionCacheInvalidationEvent
class PromotionCacheInvalidationEvent extends org.springframework.context.ApplicationEvent implements Serializable -
Class com.broadleafcommerce.promotion.offer.service.messaging.cache.PromotionCacheInvalidationRemoteEvent
class PromotionCacheInvalidationRemoteEvent extends Object implements Serializable
-
-
Package com.broadleafcommerce.promotion.offer.web.context
-
Class com.broadleafcommerce.promotion.offer.web.context.EnhancedFulfillmentGroup
class EnhancedFulfillmentGroup extends Object implements Serializable-
Serialized Fields
-
adjustedTotal
javax.money.MonetaryAmount adjustedTotal
-
attributes
Map<String,
Object> attributes -
destination
com.broadleafcommerce.promotion.offer.client.web.context.Destination destination
-
faxNumber
String faxNumber
-
fulfillmentItems
List<EnhancedFulfillmentLineItem> fulfillmentItems
-
fulfillmentOptionName
String fulfillmentOptionName
-
fulfillmentOptionType
String fulfillmentOptionType
-
groupAdjustments
List<FulfillmentGroupAdjustment> groupAdjustments
-
id
String id
-
priceBeforeAdjustments
javax.money.MonetaryAmount priceBeforeAdjustments
-
priceBeforeAdjustmentsByServiceLevel
Map<String,
javax.money.MonetaryAmount> priceBeforeAdjustmentsByServiceLevel -
primaryPhone
String primaryPhone
-
proratedFulfillmentAdjustments
javax.money.MonetaryAmount proratedFulfillmentAdjustments
Prorated fulfillment adjustments for the fulfillment group itself.Fulfillment-level adjustments are prorated between the charges of the fulfullment group and those of the individual fulfullment items, the prorated fulfillment adjustments for the items are set at the item level.
-
secondaryPhone
String secondaryPhone
-
-
-
Class com.broadleafcommerce.promotion.offer.web.context.EnhancedFulfillmentLineItem
class EnhancedFulfillmentLineItem extends EnhancedLineItem implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
orderLineItem
EnhancedOrderLineItem orderLineItem
The correspondingEnhancedOrderLineItem
for thisEnhancedFulfillmentLineItem
. Built out as part of the offer engine and not provided by the original JSON caller.- See Also:
-
relatedOrderLineItemNumber
String relatedOrderLineItemNumber
-
-
Class com.broadleafcommerce.promotion.offer.web.context.EnhancedLineItem
class EnhancedLineItem extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
attributes
Map<String,
Object> attributes -
currency
javax.money.CurrencyUnit currency
-
discountable
boolean discountable
-
finalPrice
javax.money.MonetaryAmount finalPrice
The final price, including adjustments, for a single merchandising item represented by this order line item. -
fulfillmentGroupRef
String fulfillmentGroupRef
-
fulfillmentPrice
javax.money.MonetaryAmount fulfillmentPrice
-
id
String id
Matches the line number unless the line number isn't available in which case it will represent a uuid. -
isSubscription
boolean isSubscription
-
lineNumber
String lineNumber
-
offerDetails
List<LineItemOfferDetail> offerDetails
DTOs containing information aboutoffers
applicable to this item. -
proratedAdjustments
List<com.broadleafcommerce.promotion.offer.client.web.context.info.ProratedOfferAdjustment> proratedAdjustments
Prorated offer adjustment information for this line item.This is typically used to communicate the adjustments prorated to this item from order-level or fulfillment group-level offer adjustments.
-
quantity
int quantity
-
salePrice
javax.money.MonetaryAmount salePrice
-
segment
String segment
Segments can be used to restrict offers. Common examples include segmenting an order by vendor or by store (a.k.a. banner). For applications that do not use segments at all, this value can be left null or set to ANY. The method getEffectiveSegment() will convert null or empty string to "ANY" This field works with theOffer#getRestrictedToSegments
- See Also:
-
standardPrice
javax.money.MonetaryAmount standardPrice
-
-
Class com.broadleafcommerce.promotion.offer.web.context.EnhancedOrder
class EnhancedOrder extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
adjustedSubtotal
javax.money.MonetaryAmount adjustedSubtotal
-
attributes
Map<String,
Object> attributes -
cartSubtotal
javax.money.MonetaryAmount cartSubtotal
-
codeResponseMap
Map<String,
com.broadleafcommerce.promotion.offer.client.web.context.discounts.CodeResponse> codeResponseMap Map of codes and reasons they were not applied. -
codes
com.broadleafcommerce.promotion.offer.client.web.context.Codes codes
-
currency
javax.money.CurrencyUnit currency
-
customerContext
com.broadleafcommerce.promotion.offer.client.web.context.CustomerContext customerContext
-
freeGiftItems
List<com.broadleafcommerce.promotion.offer.client.web.context.info.FreeGiftItem> freeGiftItems
-
fulfillmentGroups
List<EnhancedFulfillmentGroup> fulfillmentGroups
-
locale
Locale locale
-
offerCodeData
OfferCodeData offerCodeData
-
offerCodes
List<com.broadleafcommerce.promotion.offer.client.web.context.OfferCodeDto> offerCodes
-
orderAdjustments
List<OrderOfferAdjustment> orderAdjustments
-
orderLineItems
List<EnhancedOrderLineItem> orderLineItems
-
orderNumber
String orderNumber
-
orderSubmitDate
Instant orderSubmitDate
-
runOrderAndItemOffers
boolean runOrderAndItemOffers
-
segmentLineItemsMap
Map<String,
List<EnhancedOrderLineItem>> segmentLineItemsMap -
segments
Set<String> segments
-
timeOfRequest
Instant timeOfRequest
-
totalFufillmentCharges
javax.money.MonetaryAmount totalFufillmentCharges
-
vouchers
List<com.broadleafcommerce.promotion.offer.client.web.context.info.Voucher> vouchers
-
-
Class com.broadleafcommerce.promotion.offer.web.context.EnhancedOrderLineItem
class EnhancedOrderLineItem extends EnhancedLineItem implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
children
Set<EnhancedOrderLineItem> children
Not part of the incoming or outgoing payloads but populated at the start of the offer engine in order to provide faster lookup during processing. -
parent
EnhancedOrderLineItem parent
Not part of the incoming or outgoing payloads but populated at the start of the offer engine in order to provide faster lookup during processing. -
parentLineNumber
String parentLineNumber
-
-
-
Package com.broadleafcommerce.promotion.offer.web.context.info
-
Class com.broadleafcommerce.promotion.offer.web.context.info.EnhancedProratedItemOfferAdjustment
class EnhancedProratedItemOfferAdjustment extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
amount
javax.money.MonetaryAmount amount
The amount of the adjustment applied to the item. -
codeUsed
String codeUsed
The code used (if any) that triggered the application of the offer for this adjustment. -
lineItem
com.broadleafcommerce.promotion.offer.client.web.context.info.LineItemRef lineItem
TheLineItemRef
of theEnhancedLineItem
that gets this adjustment. -
offer
com.broadleafcommerce.promotion.offer.client.web.context.info.OfferRef offer
TheOfferRef
for theOffer
that caused this adjustment to be applied. -
parentDetail
LineItemOfferDetail parentDetail
-
quantity
int quantity
The quantity of merchandising items from theEnhancedLineItem
to which this adjustment applies.
-
-
Class com.broadleafcommerce.promotion.offer.web.context.info.EnhancedProratedOfferAdjustment
class EnhancedProratedOfferAdjustment extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
amount
javax.money.MonetaryAmount amount
The amount of the prorated adjustment for the item.This should equal to the sum of
ItemProrationDetail.getUnitAmount()
*ItemProrationDetail.getQuantity()
inEnhancedProratedOfferAdjustment.getItemProrationDetails()
. -
codeUsed
String codeUsed
The code used (if any) that triggered the application of the offer for this adjustment. -
itemProrationDetails
List<com.broadleafcommerce.promotion.offer.client.web.context.info.ItemProrationDetail> itemProrationDetails
The details about how this prorated adjustment on a per-quantity basis.For example, if the prorated adjustment for this item is $5 and this item has a quantity of 3, there should be one detail with quantity of 2 and amount of $1.67, and one detail with quantity of 1 and amount of $1.66, totaling to $5
-
lineItem
com.broadleafcommerce.promotion.offer.client.web.context.info.LineItemRef lineItem
TheLineItemRef
of theEnhancedLineItem
that gets this adjustment. -
offer
com.broadleafcommerce.promotion.offer.client.web.context.info.OfferRef offer
TheOfferRef
for the offer where this prorated adjustment is from. -
quantity
int quantity
The total quantity of merchandising items from theEnhancedLineItem
to which this adjustment applies.This should equal to the sum of
ItemProrationDetail.getQuantity()
inEnhancedProratedOfferAdjustment.getItemProrationDetails()
.
-
-
Class com.broadleafcommerce.promotion.offer.web.context.info.FulfillmentGroupAdjustment
class FulfillmentGroupAdjustment extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
amount
javax.money.MonetaryAmount amount
-
candidateFulfillmentGroup
CandidateFulfillmentGroup candidateFulfillmentGroup
-
candidateFulfillmentGroupOffer
CandidateFulfillmentGroupOffer candidateFulfillmentGroupOffer
-
isFutureCredit
boolean isFutureCredit
-
offer
Offer offer
-
serviceLevel
String serviceLevel
-
-
Class com.broadleafcommerce.promotion.offer.web.context.info.ItemOfferAdjustment
class ItemOfferAdjustment extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
adjustmentValue
javax.money.MonetaryAmount adjustmentValue
The final amount by which to adjust theorder item's
price. -
appliedToSalePrice
boolean appliedToSalePrice
Whether theItemOfferAdjustment.adjustmentValue
was applied toEnhancedLineItem.getStandardPrice()
orEnhancedLineItem.getSalePrice()
. -
candidateItemOffer
CandidateItemOffer candidateItemOffer
TheCandidateItemOffer
DTO related toItemOfferAdjustment.offer
. -
futureCredit
boolean futureCredit
Future credit means that the associated adjustment will be discounted at a later time to the customer via a credit. It is up to the implementor to decide how to achieve this. This field is used to determine if the adjustment originated from an offer marked as FUTURE_CREDIT.- See Also:
-
itemAdjustmentQuantity
int itemAdjustmentQuantity
The total quantity of the current line item this offer was applied to. -
maxSavingIndicator
String maxSavingIndicator
Set to "Y" if the adjustment should ignore a merge due to being part of a max savings calculation. -
offer
Offer offer
TheOffer
targeting someEnhancedLineItem
. -
offerUses
int offerUses
The total number of times that the offer this adjustment was created from is applied. -
parentDetail
LineItemOfferDetail parentDetail
-
qualifierDetails
List<com.broadleafcommerce.promotion.offer.client.web.context.info.OfferItemDetail> qualifierDetails
A list ofOfferItemDetails
representing the qualifier items where this adjustment was from. -
quantityPerUsage
int quantityPerUsage
The quantity per offer usage of the item where this adjustment is applied to (target item). -
saleAdjustmentValue
javax.money.MonetaryAmount saleAdjustmentValue
The amount by which to adjust theEnhancedLineItem.getSalePrice()
. -
standardAdjustmentValue
javax.money.MonetaryAmount standardAdjustmentValue
The amount by which to adjust theEnhancedLineItem.getStandardPrice()
.
-
-
Class com.broadleafcommerce.promotion.offer.web.context.info.LineItemOfferDetail
class LineItemOfferDetail extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
adjustedTotal
javax.money.MonetaryAmount adjustedTotal
The total value of allLineItemOfferDetail.adjustments
times theLineItemOfferDetail.quantity
of this detail. -
adjustments
Set<ItemOfferAdjustment> adjustments
-
adjustmentsFinalized
boolean adjustmentsFinalized
Whether theLineItemOfferDetail.adjustments
are the orderAdjustments to actually use rather than being potential or incomplete. -
bundleRatio
double bundleRatio
The ratio of the offer discount to apply to this item. Used for bundle offers like buy 3 for a fixed price of $10. -
lineItem
EnhancedLineItem lineItem
TheEnhancedLineItem
affected byoffers
. -
offerDiscounts
Set<OfferDiscount> offerDiscounts
Additional info for all theoffers
treating theLineItemOfferDetail.lineItem
as a target. WhileLineItemOfferDetail.adjustments
are the price orderAdjustments, offer discounts track whichOffer.getTargetItemCriteria()
matched theLineItemOfferDetail.lineItem
and how many were matched. -
offerQualifiers
Set<OfferQualifier> offerQualifiers
Additional information about theoffers
using theLineItemOfferDetail.lineItem
as item qualifiers. This includes the quantity used and theOffer.getItemQualifierCriteria()
of an order item matched. -
proratedAdjustments
Set<EnhancedProratedItemOfferAdjustment> proratedAdjustments
TheProratedItemOfferAdjustments
caused byoffers
withDiscount.getProrationType()
orProrationType.TARGET_AND_QUALIFIER
treating bothLineItemOfferDetail.lineItem
as a target and the items that qualify it. -
quantity
int quantity
The quantity of items related to this detail. -
useSaleAdjustments
boolean useSaleAdjustments
Whether to useEnhancedLineItem.getSalePrice()
in price adjustment calculations. Default is false.
-
-
Class com.broadleafcommerce.promotion.offer.web.context.info.OfferDiscount
class OfferDiscount extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
candidateItemOffer
CandidateItemOffer candidateItemOffer
TheCandidateItemOffer
DTO related toOfferDiscount.offer
. -
finalizedQuantity
int finalizedQuantity
The actual item quantity of anEnhancedLineItem
matched to theOfferDiscount.offer
. -
lineItemOfferDetail
LineItemOfferDetail lineItemOfferDetail
-
lineNumber
String lineNumber
The line item number of theEnhancedLineItem
that this target represents. -
offer
Offer offer
TheOffer
targeting someEnhancedLineItem
. -
partialSavingsAmount
Optional<javax.money.MonetaryAmount> partialSavingsAmount
Stores the remainder when the max per order item threshold has been reached. -
quantity
int quantity
The potential item quantity of anEnhancedLineItem
that matched theOfferDiscount.offer
. -
targetItemCriteria
ItemCriteriaRule targetItemCriteria
TheOffer.getTargetItemCriteria()
that anEnhancedLineItem
matched. -
usageDetails
Map<String,
Integer> usageDetails A map of usageIds to quantity of theEnhancedLineItem
for the usages of this target.
-
-
Class com.broadleafcommerce.promotion.offer.web.context.info.OfferQualifier
class OfferQualifier extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
finalizedQuantity
int finalizedQuantity
The actual item quantity of anEnhancedLineItem
matched to theOfferQualifier.offer
. -
itemQualifierCriteria
ItemCriteriaRule itemQualifierCriteria
TheOffer.getItemQualifierCriteria()
that anEnhancedLineItem
matched. -
lineNumber
String lineNumber
The line item number of theEnhancedLineItem
that this qualifier represents. -
offer
Offer offer
TheOffer
using someEnhancedLineItem
as an item qualifier. -
price
javax.money.MonetaryAmount price
Tracks the discount amount of the relateditem qualifier
. The discount amount will be 0 if this item was only used as a qualifier. -
quantity
int quantity
The potential item quantity of anEnhancedLineItem
that matched theOfferQualifier.offer
. -
usageDetails
Map<String,
Integer> usageDetails A map of usageIds to quantity of theEnhancedLineItem
for the usages of this qualifier.
-
-
Class com.broadleafcommerce.promotion.offer.web.context.info.OfferUsageDetails
class OfferUsageDetails extends Object implements Serializable-
Serialized Fields
-
campaignTrackingId
String campaignTrackingId
The ID of the campaign (if any) this audit is for. -
customerReferenceId
String customerReferenceId
The ID of the customer this audit is for. -
customerReferenceType
String customerReferenceType
The customer type this audit is for, for example "CUSTOMER". -
errorIfMaxExceeded
boolean errorIfMaxExceeded
Whether or not to error if there is an overage of offer usage. -
offerCode
String offerCode
The string offer code (if any) that this audit information is for. -
offerCodeId
String offerCodeId
The ID of the offer code (if any) this audit is for. -
offerId
String offerId
The ID of the offer this audit is for. -
totalSavings
javax.money.MonetaryAmount totalSavings
The total savings to record on this audit. -
transactionReferenceId
String transactionReferenceId
The ID of the transaction this audit is for. -
transactionReferenceType
String transactionReferenceType
The transaction type this audit is for, for example "ORDER". -
usageDate
Instant usageDate
The usage date for this audit.
-
-
-
Class com.broadleafcommerce.promotion.offer.web.context.info.OrderOfferAdjustment
class OrderOfferAdjustment extends Object implements Serializable- serialVersionUID:
- 1L
-
Serialized Fields
-
amount
javax.money.MonetaryAmount amount
-
candidateOrderOffer
CandidateOrderOffer candidateOrderOffer
-
isFutureCredit
boolean isFutureCredit
-
offer
Offer offer
-
order
EnhancedOrder order
-
roundingMode
RoundingMode roundingMode
-
roundOfferValues
boolean roundOfferValues
-
-
-
Package com.broadleafcommerce.promotion.offer.web.endpoint.exception
-
Exception com.broadleafcommerce.promotion.offer.web.endpoint.exception.BadOrderDataException
class BadOrderDataException extends RuntimeException implements Serializable
-