Offers in Broadleaf allow a wide array of configuration options, the combinations of which can be quite complex. These configuration include targeting specific items, requiring certain items as qualifiers, cart subtotal thresholds, fulfillment address rules, tiers, and user, usage, and time restrictions.
There are additional configuration options available including defining rules for whether offers can be combined in the cart, whether their discounts can be stacked onto the same target, whether a qualifier item can also receive discounts, etc. For more details on these options, refer to Offer Features.
The complexity of offers produces a lot of different flags controlling different dependent fields, not all of which are compatible with each other.
Therefore, Broadleaf uses a catch-all offerTemplate
computed field to drive the Offer Admin UI.
These templates represent configurations for common offer use cases.
Templates are broken into groups based on the discount target type: Order, Order Item, Fulfillment Group, or Fulfillment Item.
This keeps the list of options shown to users to a manageable number and makes it clear what each means.
Order targeting Offers typically conform to one of the following:
PERCENT_OFF_ORDER
: A simple percent-off discount to the entire order, e.g., 10% off.
Complex flags and options are hidden for this template.
AMOUNT_OFF_ORDER
: A simple amount-off discount to the entire order, e.g., $5 off.
Complex flags and options are hidden for this template.
VOUCHER
: This type of offer is linked to a Campaign and results in a voucher code being generated when applied that can be redeemed on a future order.
Discount method and amount are hidden for this type.
ORDER_DISCOUNT
: A generic order discount.
This allows the user to make more granular choices to configure this offer and essentially means "a custom order discount" that doesn’t follow a common template.
Tip
|
Other than Vouchers, each type can specify a discount strategy other than standard such as when setting up tiers based on the cart subtotal. |
Order Item targeting Offers are likely the most complex and most used variety. These include providing rules for what items are targets of the discount. These rules are driven by having the item added to cart matching particular values such as being in a particular category, having a particular attribute, quantity, or tag.
Item Offers can also have qualifiers, items that are not discounted but must already be in the cart in order for the targets to qualify for a discount.
We have defined quite a few different templates for Order Item Offers:
PERCENT_OFF_ITEMS
: A simple percent-off discount to specified items, e.g., 10% off socks.
Complex flags and options are hidden for this template.
AMOUNT_OFF_ITEMS
: A simple amount-off discount to specified items, e.g., $5 off shirts.
Complex flags and options are hidden for this template.
BOGO
: This stands for "Buy One, Get One Free" and really stands for any kind of "Buy x, Get Y" with some amount of discount, not necessarily free, e.g., Buy a Shirt and get Pants 10% off.
This allows either amount or percent off discounts and allows defining qualifier items—the "Buy x" side of the offer.
FREE_GIFT
: An offer that results in a free item being added to the user’s cart when applied based on the presence of qualifier being added to the cart.
This type of offer always has a 100% off discount, so those fields are hidden and defaulted for the user to keep things simple.
It additionally reveals fields for specifying the item to gift and its estimated value.
Note: The automatic addition of the cart item is handled in CartOperationServices, since Offer Services does not have the ability to add items to a cart. If using OfferServices as a standalone service, the gift item information will be returned in the payload and can be configured in the cart-managing service.
PERCENT_OFF_SUBSCRIPTION
: A simple percent-off discount to a target item’s recurring or subscription price for a specified number of billing periods, e.g., 10% off the first 3 months of a new software license.
Subscription offers show fields to specify a begin and end period to determine when the offer starts applying and limit how long it applies.
AMOUNT_OFF_SUBSCRIPTION
: A simple amount-off discount to a target item’s recurring or subscription price for a specified number of billing periods, e.g., $5 off each month for the first year of a new internet service subscription.
Subscription offers show fields to specify a begin and end period to determine when the offer starts applying and limit how long it applies.
SUBSCRIPTION_BOGO
: Similar in concept to a "Buy x, Get y" item offer, but discounts the subscription price of an item instead of the upfront, e.g., buy a new phone and get 10% off a 5G service plan.
Subscription offers show fields to specify a begin and end period to determine when the offer starts applying and limit how long it applies.
FREE_TRIAL
: An offer that allows a trial period for a subscription item before billing begins, e.g., 7-day free trial on a new software license.
This type always has 100% off discount and so those fields are hidden.
The begin and end period are also hidden unlike other subscription Offers.
Instead, they are replaced with fields for the length of the trial and units of that length, e.g., 7 days, 2 weeks, 3 months.
SUBSCRIPTION_DISCOUNT
: A generic discount to subscription items.
This allows the user to make more granular choices to configure this offer and essentially means "a custom order item recurring discount" that doesn’t follow a common template.
ITEM_DISCOUNT
: A generic order item discount.
This allows the user to make more granular choices to configure this offer and essentially means "a custom order item discount" that doesn’t follow a common template.
This might be useful when wanting to use a FIXED_PRICE
discount that overrides the target’s price to some fixed value rather than subtracting some amount or percentage.
Tip
|
Other than gift and free trial item offers, a discount strategy other than standard may be set to allow configuring discount tiers either by item quantity or item subtotal. Example Use Cases:
|
Also known as a shipping discount, fulfillment discounts apply to groups of items with the same fulfillment information rather than to individual items granularly.
FREE_SHIPPING
: An offer providing 100% fulfillment costs for groups matching certain criteria, e.g., Free shipping for orders of $100 or more.
This hides the discount amount and method fields since they’re always 100% off.
This also hides target item rules and instead shows target fulfillment rules such as shipping address fields.
PERCENT_OFF_FULFILLMENT
: A simple percent-off discount to specified fulfillment groups, e.g., 10% off for loyalty program members.
AMOUNT_OFF_FULFILLMENT
: A simple amount-off discount to specified fulfillment groups, e.g., $5 off shipping for orders of $25 or more.
FULFILLMENT_DISCOUNT
: A generic fulfillment discount.
This allows the user to make more granular choices to configure this offer and essentially means "a custom fulfillment discount" that doesn’t follow a common template.
Fulfillment Item discounts apply to the fulfillment (or shipping) costs of individual items.
FREE_SHIPPING
: An offer providing 100% fulfillment costs for target items, e.g., Free shipping for appliances ordered during a Labor Day sale.
This hides the discount amount and method fields since they’re always 100% off.
PERCENT_OFF_ITEM_FULFILLMENT
: A simple percent-off discount to specified fulfillment items, e.g., 10% off shipping when ordering $25 or more in socks.
AMOUNT_OFF_ITEM_FULFILLMENT
: A simple amount-off discount to specified fulfillment items, e.g., $5 off shipping when ordering $25 or more in socks.
FULFILLMENT_DISCOUNT
: A generic fulfillment item discount.
This allows the user to make more granular choices to configure this offer and essentially means "a custom fulfillment item discount" that doesn’t follow a common template.
This could include adding qualifier items to the rules rather than just fulfillment-base criteria.
Below we will cover other use cases not covered by templates.
An example of this use case is a "Buy 2 Hot Sauces and a Shirt for $25."
An Offer could be set up to treat these as a bundle even if they are separate items in the Catalog.
In this case, merchandising may then want to inform the frontend to display these like a bundle so they are visually linked.
This can be controlled by the preferCartBundling
flag on Offer
.
Tip
|
In the admin this is in the Advanced Section labeled as "Prefer to use Cart Bundling?" |