Broadleaf Microservices
  • v1.0.0-latest-prod

Release Notes for 1.8.9-GA

Important
Release Train 1.8.2-GA includes changes from 1.8.5-1.8.9. These have been consolidated here for convenience. In the future, services like Cart Ops will see release candidates (RCs) created instead of GAs so that they align with Release Train RCs and GAs.

Requirements

  • JDK 11 is required for Broadleaf release trains 1.7.0-GA, and beyond.

  • JDK 17 is supported for Broadleaf release trains 1.8.1-GA, and beyond.

New Features & Notable Changes

  • Added alternativeOwningUserType, alternativeOwningUserRef, & attributes fields to the CreditAccount domain.

  • Added totalEverCaptured to the PaymentSummary domain.

  • Update error & warn logging to include stacktraces

  • Update java docs, as we no longer subtract the refunded amount when calculating the captured amount.

  • Update PaymentSummary to include totalEverCaptured instead of updating meaning of capturedAmount.

  • Always lookup CreditAccounts by accountNumber, instead of requiring that the customerId matches the cart’s customerId.

  • Added VAT registration ID as an optional field on customer and account.

  • Added support for using the new FulfillmentServices to get PricedFulfillmentOption for fulfillment prices and associated data.

Configuration Properties

Added Properties

  • broadleaf.cartoperation.creditaccountprovider.credit-accounts-uri

    • Description: The default URI to read the credit accounts

  • broadleaf.cartoperation.validation.fulfillment.validator.priced-fulfillment-option.enabled

    • Description: Enables loading the fulfillment validator beans compatible with PricedFulfillmentOption

  • broadleaf.cartoperation.fulfillment.pricing.use-common-fulfillment-pricing

    • Enables loading the cart pricing bean compatible with PricedFulfillmentOption

New Auth Configuration

To support new endpoints in CreditAccountTransactionExecutionProvider, the following configuration must be added to the cartops authorize client:

INSERT INTO blc_client_scopes (id, "scope") VALUES('cartopsclient', 'BACKEND_CREDIT_ACCOUNT');
INSERT INTO blc_client_permissions (id, permission) VALUES ('cartopsclient', 'READ_BACKEND_CREDIT_ACCOUNT');

Bug Fixes

  • Updated Free Gift pricing logic to avoid an extra call to the Broadleaf PricingService if free gifts are not being used.

  • Updated the ExternalOfferProvider to pass the CustomerContext using the "X-Customer-Context" header for offer & offer code usability calls.

  • Fixed bug where attempting to add an item to cart when the related catalog item could not be found would lead to an IndexOutOfBoundsException.

    • Along with this, we introduced the CatalogItemNotFoundException to better describe this situation.

  • Fixed NPEs related to Item Choice Product Options when specific item choice (singular) is initialized but the item choice uses multiple specific items choices.

  • Fix issues with multi-currency price results so that the requested currency is always favored.

    • Includes new properties to change the currency and reprice the cart when locale is changed.

      • Default is to reprice when currency changed but having a locale change also change currency is a separate property which in on in the BLC demo.

FulfillmentServices and PricedFulfillmentOption

FulfillmentServices is a new service in the Broadleaf ecosystem that provides fulfillment options and pricing. It replaces ShippingServices. PricedFulfillmentOption is the object used to hold fulfillment data for a FulfillmentGroup or FulfillmentItem.

Backward Compatability

The new interactions with FulfillmentServices are not enabled by default. Clients upgrading from previous versions do not have to do anything to continue to use the pre-existing functionality. The new functionality is provided via new endpoints. The pre-existing endpoints and service methods will continue to use the pre-existing objects and functionality.

FulfillmentServices vs ShippingServices

The new functionality is in FulfillmentServices (Artifact ID: broadleaf-fulfillment-services), and it uses the new common library FulfillmentCommon (Artifact ID: broadleaf-common-fulfillment). Fulfillment option data from FulfillmentServices is encapsulated in a PricedFulfillmentOption.

The pre-existing functionality is provided through ShippingServices (broadleaf-shipping-services) and ShippingCommon (broadleaf-common-shipping). Fulfillment option data from ShippingServices is encapsulated in a FulfillmentOption.

FulfillmentServices Integration

Endpoints

Most of the new fulfillment functionality provided via FulfillmentServices is available through new endpoints in CartOperations, in the class FulfillmentOptionEndpoint. When using the new endpoints, FulfillmentGroups will have a pricedFulfillmentOption member instead of a fulfillmentOption.

To retrieve PricedFulfillmentOptions for the cart, use the new /fulfillment-options/{cartId} GET endpoint. OpenAPI Doc

To apply a PricedFulfillmentOption to its corresponding group or item, POST to /fulfillment-options/{cartId}/select with the PricedFulfillmentOption to use. OpenAPI Doc

The pre-existing fulfillment group update endpoint, /checkout/{cartId}/fulfillment-groups/{referenceNumber}, now accepts a PricedFulfillmentOption in the UpdateFulfillmentGroupRequest. OpenAPI Doc

Pricing Configuration

The cart pricing logic utilizes a CommonFulfillmentPricingService to calculate the whole cart’s fulfillment pricing from the selected options. By default, CartOps loads the CommonFulfillmentPricingService bean compatible with the pre-existing FulfillmentOption object. To load the implementation compatible with PricedFulfillmentOption, set broadleaf.cartoperation.fulfillment.pricing.use-common-fulfillment-pricing=true.

Checkout FulfillmentGroup Validation

By default, the checkout process validates that FulfillmentGroups have fulfillment options selected.

To enable validation for PricedFulfillmentOptions, set broadleaf.cartoperation.validation.fulfillment.validator.priced-fulfillment-option.enabled=true to load the appropriate validation beans, and set a validation hint: broadleaf.cartoperation.validation.fulfillment.validator.checkout.hints=PRICED_FULFILLMENT_OPTION.

Properties Summary

Here are all three properties mentioned above in a single yaml structure:

broadleaf:
  cartoperation:
    validation:
      fulfillment:
        validator:
          priced-fulfillment-option:
            enabled: true
        checkout:
          hints: PRICED_FULFILLMENT_OPTION
    fulfillment:
      pricing:
        use-common-fulfillment-pricing: true