Broadleaf Microservices
  • v1.0.0-latest-prod

Broadleaf Offer Services


Offer Services is used to maintain promotional offers & campaigns, generate campaign offer codes, and apply offers & offer codes to a cart. The service provides a full set of APIs and Broadleaf admin compatible screens for managing offers and campaigns.

Offers are promotions that impact pricing within a cart or provide a promotional value after checkout (e.g. Vouchers). The primary use of a campaign is as a container of limited use offer codes.

The service supports a wide variety of offer scenarios including:

  • Item, Order, and Shipping offers

  • Discount methods of fixed price, $ off, and percent off

  • BOGO offers

  • Bundle offers

  • Free gift offers

  • Restricted offers

  • Voucher offers

See the Offer Features page for a more complete list of capabilities.

Apply Offers Client Application Flow

Client applications will invoke the offer engine indirectly through API endpoints in CartOperationService. This orchestration service will make calls to the offer engine anytime the cart is being priced.

CartOperationService also provides an endpoint to add an offer code to the cart which will qualify the cart for more offers.

For more details on the calls made from CartOperationServices, see Understanding Offers Applied to the Cart.

Apply Offers OfferEngine Flow

At a high-level view the offer engine apply offers does the following:

  1. The request for applying offers to the order is received in the offer engine endpoint

  2. The endpoint then calls into the offer engine services to process applying offers to the order

  3. Within the services, calls are made to populate all eligible offers for the order and then builds permutations of these offers for evaluation

  4. After the permutations are built, they are processed to determine the best permutation of offers and apply adjustments to the order

  5. All prorations for the offer adjustments are also calculated at this point, and offer information is attached to the order and returned in the API response

For a more detailed view on the interactions within the apply offer workflow, see Notable Services.

Java and API docs can be found on the menu on the left hand side of the page. Offers administration can be explored by signing up for a demo site which will give you access to the Broadleaf admin.

See Offer Features for use cases that are handled with offers.

See Data Model for a diagram and description of the key entities used by the Offer Service