Broadleaf Microservices
  • v1.0.0-latest-prod

Fulfillment Common Library


This library contains DTO structures for communicating with FulfillmentServices. This library is used by Cart Operations Services to determine fulfillment pricing for carts.


Fulfillment Common Data Model


A FulfillmentPricingConfig contains properties shared by all fulfillment calculators in a given context, e.g. a tenant or application. The most important field is fulfillmentPricingStrategy, which indicates if fulfillment options will be priced and selected at the group level or the item level. see FulfillmentPricingStrategy javadocs. There is also the defaultServiceLevel field to indicate which "Service Level" should be the default selected for new carts.



The FulfillmentOptionRequest holds cart data when CartOps requests fulfillment pricing from FulfillmentServices.


fulfillmentPriceGroups - Contains a FulfillmentPricingGroup for each FulfillmentGroup in the cart. Each FulfillmentPricingGroup contains a list of FulfillmentPricingItem, among other fields.

priceCurrentServiceLevelsOnly - Indicate whether FulfillmentServices should return prices for all available fulfillment options, or only the options that are currently selected in the cart.

cartSubtotal - Subtotal of all items in the cart.

totalCartWeight - Aggregate weight of all items in the cart.

additionalAttributes - Map to hold arbitrary additional attributes.



The FulfillmentOptionResponse holds the PricedFulfillmentOptions generated for the corresponding FulfillmentOptionRequest.

Both fields are a map of fulfillment reference id to a list of PricedFulfillmentOption for that fulfillment object. One of the maps has options that target groups and the other map’s options target items. Only the map that corresponds to the value of FulfillmentPricingConfig#getFulfillmentPricingStrategy() should have entries.



PricedFulfillmentOption holds data about a specific fulfillment service level and price for a particular FulfillmentGroup or FulfillmentItem.

PricedFulfillmentOption resides in OrderCommon. It is a member of FulfillmentGroup, FulfillmentItem, OrderFulfillment, and OrderFulfillmentItem. It is used by FulfillmentServices, CartOps, OrderOps, and front-end clients. CartServices and OrderServices save PricedFulfillmentOption as a JSON structure on their parent objects.


price - The fulfillment price of this fulfillment option.

serviceLevel - Specific description for how this fulfillment option is fulfilled, for example "STANDARD", "SAME_DAY", "FIRST_CLASS", "PICKUP".

fulfillmentType - Broad categorization of how this fulfillment option is fulfilled. For instance, SHIP, PICKUP, or VIRTUAL. See link:/shared-concepts/cart-and-order-concepts/order-common#enums for system defaults.

description - Human-readable description.

calculatorIds - The list of calculatorIds which were used to compute the price for this option.

fulfillmentReference - This is the "reference number" of the FulfillmentGroup or FulfillmentItem that this fulfillment price applies to.

estimatedMinDaysToFulfill - The minimum number of days estimated for delivery.

estimatedMaxDaysToFulfill - The maximum number of days estimated for delivery.

taxable - Indicate if this fulfillment price is taxable.

taxCode - A tax code for this fulfillment option.

additionalAttributes - Map to hold arbitrary additional attributes.