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 of Tracking information to expose the context state for this object. This value is not persisted, and instead it is dynamically calculated and populated when the ChangeDetails for the parent object's entire attributes 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
      • Serialized Fields

    • 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 of Tracking 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
    • 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 in CodeFormatAvailableCharHelper
        • 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 in CodeFormatAvailableCharHelper
        • 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 with CodeGenerator.getNumberOfCodesGenerated() / CodeGenerator.getNumberOfCodesToGenerate() If those values are equal, just returns CodeGenerator.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 to Campaign.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 of Tracking 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 this CodeGenerator 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 of Tracking information to expose the context state for this object. This value is not persisted, and instead it is dynamically calculated and populated when the ChangeDetails for the parent object's entire attributes 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
    • 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 is 10, then whether it is calculated as a percentage (10%) or a currency amount ($10) is determined by DiscountTier.methodType. Overrides Discount.amount of the parent Offer.
        • contextState
          com.broadleafcommerce.data.tracking.core.EmbeddedContextState contextState
          A subset of Tracking information to expose the context state for this object. This value is not persisted, and instead it is dynamically calculated and populated when the ChangeDetails for the parent object's entire attributes map are compared.
        • methodType
          String methodType
          Determines the method used to apply the discount. The method can be DiscountMethodType.PERCENT_OFF, DiscountMethodType.AMOUNT_OFF, or DiscountMethodType.FIXED_PRICE. Overrides Discount.methodType of the parent Offer.
          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 the ItemCriteria.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 with ItemCriteria.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 the ItemCriteriaRule.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 a SpelExpression, 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 of Tracking 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 locales
          The Locale to which this message is applicable.
        • locationType
          String locationType
          Deprecated.
          since 1.6 functionality moved to MarketingMessage.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 parent Offer.
        • 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.
          See Also:
        • 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 its offer'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
          The ContextInfo 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 hydrated EnhancedLineItems used by the MarketingMessageResolver to retrieve MarketingMessages
        • 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 than Offer.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 require Offer.getTargetItemCriteria() to be entered for an ITEM promotion. If the value is null, delegates to Offer.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, and Offer.timeCriteria).
        • campaignTrackingIds
          Set<String> campaignTrackingIds
          The tracking identifiers of the campaigns of which this offer is a part. See com.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
          The CombinabilityOverrides 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 is CombinabilityType.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 of Tracking information to expose the context state for this object.
        • currency
          javax.money.CurrencyUnit currency
          The currency that an EnhancedOrder.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 in USD and EUR.

        • description
          String description
          Description of this offer.
        • discount
          Discount discount

          Basic discount information for this offer.

          If Offer.tieredDiscount is true, then Discount.getMethodType() and Discount.getAmount() are overridden by the same fields in the tiers (see DiscountTier).

        • discountTiers
          List<DiscountTier> discountTiers
          List of discount tiers determining the discount applied with this offer.
          See Also:
        • 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 by MaxUsageStatusType. This reason applies to general offer usage as specified by either Offer.getMaxUses(), or Offer.getMaxTotalDiscount(). Exceeding max thresholds for specific order or users scenarios is not tracked here. Status will be MaxUsageStatusType.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 set Discount.getProrationType() to ProrationType.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 with Offer.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 with Offer.maxUsesPerUser to limit the frequency with which an individual user can use this offer. If maxUsesPerUser = 3 and maxUsesPerUserFrequency = 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 this Offer.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 be UserMaxUsesStrategyType.CUSTOMER.
        • minTotalOfQualifierPrices
          javax.money.MonetaryAmount minTotalOfQualifierPrices
          Determines the price subtotal threshold that all qualifying items must reach in addition to Offer.itemQualifierCriteria in order to qualify an order items to receive this offer's discount. That is, the system will find all qualifying items (based on Offer.itemQualifierCriteria) for the given offer and sum their prices before any discounts are applied. If that sum reaches or exceeds this minTotalOfQualifierPrices, 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 to Offer.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 this minTotalOfTargetPrices, then the targets can receive the discount.
        • name
          String name
          Display name for this offer.
        • offerCodes
          Set<OfferCode> offerCodes
          The shared codes that can be used to retrieve this offer. These codes would be used in situations where this offer is not automatically considered (meaning Offer.automaticallyConsidered is false}
        • offerDiscountStrategy
          String offerDiscountStrategy
          Represents the discount strategy for this offer. Refer to OfferDiscountStrategy for supported offer strategies.
        • orderCriteria
          String orderCriteria

          String expression used in conjunction with Offer.itemQualifierCriteria to determine if an order qualifies for this offer. Whereas Offer.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 per Offer.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's EnhancedOrderLineItem.getParent() to find the root ancestor; then, from the root, repeatedly calling EnhancedOrderLineItem.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 the EnhancedLineItem.getSegment() property.
        • stackable
          boolean stackable
          Determines whether this offer can be stacked on top of other offers of the same type. This is different than CombinabilityType.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 to TargetGroupingStrategy.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.
          See Offer.offerDiscountStrategy. Offers with this value set to true are now considered to have a discount strategy of OfferDiscountStrategy.TIERED_ITEM_QTY. To check if an offer is tiered, use Offer.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%
          Default is false.

          If true, then Discount.getMethodType() and Discount.getAmount() are overridden by the same fields in the tiers (see DiscountTier).

          See Also:
        • 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 an offer'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.

        • 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 of Tracking information to expose the context state for this object.
        • dateApplied
          Instant dateApplied
          The date and time when the related offer 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 an Offer.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 of Tracking 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 reason MaxUsageStatusType.MAX_USES_EXCEEDED. This reason applies to general offercode usage as specified by OfferCode.getMaxUses(). Exceeding max thresholds for specific users scenarios is not tracked here. Status will be MaxUsageStatusType.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
      • Serialized Fields

        • codeUsabilityInfos
          Map<String,com.broadleafcommerce.promotion.offer.client.web.context.CodeUsabilityInfo> codeUsabilityInfos
        • offerUsabilityInfos
          Map<String,com.broadleafcommerce.promotion.offer.client.web.context.OfferUsabilityInfo> offerUsabilityInfos
    • 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 of Tracking information to expose the context state for this object. This value is not persisted, and instead it is dynamically calculated and populated when the ChangeDetails for the parent object's entire attributes 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.
          See Also:
    • Class com.broadleafcommerce.promotion.offer.domain.VoucherCodeGenerationRequest

      class VoucherCodeGenerationRequest extends Object implements Serializable
      serialVersionUID:
      1L
  • Package com.broadleafcommerce.promotion.offer.provider.jpa.domain

  • Package com.broadleafcommerce.promotion.offer.service.dto

  • Package com.broadleafcommerce.promotion.offer.service.messaging.cache

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

          See Also:
        • secondaryPhone
          String secondaryPhone
    • Class com.broadleafcommerce.promotion.offer.web.context.EnhancedFulfillmentLineItem

      class EnhancedFulfillmentLineItem extends EnhancedLineItem implements Serializable
      serialVersionUID:
      1L
    • 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 about offers 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 the Offer#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

  • Package com.broadleafcommerce.promotion.offer.web.endpoint.exception