Broadleaf Microservices
  • v1.0.0-latest-prod

BandedFulfillmentPricingProvider

Table of Contents
Important
This is deprecated in favor of Fulfillment Services. Fulfillment Services will be responsible for all fulfillment pricing calculations (by default) after Release Trains versions 1.8.2-GA+

Overview

Provides banded or tiered fulfillment pricing where the tiers are based on a minimum price or weight.

As of ShippingServices 1.1.0-GA (part of the Broadleaf 1.8.0-GA release train), this implementation takes in a list of BandedFulfillmentPricingOptions that is defined by the property broadleaf.shipping.service.banded.ship-tables, rather than reading from a json config file defined by the property broadleaf.shipping.service.banded.configPath. The objective of this change is to support discriminated properties based on a given ContextInfo.

Warning
Make sure to update the broadleaf.shipping.service.banded.ship-tables property for production environments so as not to use the example configurations provided out-of-box.

Configuration

The config takes a list of BandedFulfillmentPricingOptions. Each option takes:

  • bandType: The type of banding to use, either PRICE or WEIGHT by default

  • units: The units for the bands if applicable

    • For weight, either POUNDS or KILOGRAMS by default

  • daysToShip: The number of days this option is expected to ship.

  • bands: The list of bands

    • A FulfillmentOptionBand takes these properties in addition to the default FulfillmentOption properties:

      • minimum boundary

      • percentagePerItem: A percentage of an item’s subtotal to charge as a fulfillment cost

      • fixedPricePerItem: A set of fixed prices to charge per item, depending on the currency

      • fixedPricePerGroup: A set of fixed prices to charge per fulfillment group, depending on the currency

Sample Banded Configuration (classpath:banded-ship-example.yml)
broadleaf:
  shipping:
    service:
      banded:
        # Default configuration
        sample-config: true
        active: true
        ship-tables:
          - name: BANDED_PRICE_STANDARD
            description: Default Standard (Banded)
            band-type: WEIGHT
            units: KILOGRAMS
            use-flat-rates: true
            days-to-ship: 5
            bands:
              - minimum: 0
                fixed-price-per-group:
                  - currency: USD
                    amount: USD 5
              - minimum: 10
                fixed-price-per-group:
                  - currency: USD
                    amount: USD 4
          - name: BANDED_PRICE_PRIORITY
            description: Default Priority (Banded)
            band-type: WEIGHT
            units: KILOGRAMS
            use-flat-rates: true
            days-to-ship: 3
            bands:
              - minimum: 0
                fixed-price-per-group:
                  - currency: USD
                    amount: USD 10
              - minimum: 10
                fixed-price-per-group:
                  - currency: USD
                    amount: USD 8
          - name: BANDED_PRICE_EXPRESS
            description: Default Express (Banded)
            band-type: WEIGHT
            units: KILOGRAMS
            use-flat-rates: true
            days-to-ship: 1
            bands:
              - minimum: 0
                fixed-price-per-group:
                  - currency: USD
                    amount: USD 15
              - minimum: 10
                fixed-price-per-group:
                  - currency: USD
                    amount: USD 10
      tenant:
        inactive-tenant-id:
          sample-config: true
          # Inactive for a tenant
          active: false
        some-tenant-id:
          sample-config: true
          # Tenant-specific banded shipping configurations
          active: true
          ship-tables:
            - name: BANDED_PRICE_STANDARD
              description: Some Tenant Standard (Banded)
              band-type: WEIGHT
              units: KILOGRAMS
              use-flat-rates: true
              days-to-ship: 5
              bands:
                - minimum: 0
                  fixed-price-per-group:
                    - currency: USD
                      amount: USD 5
                - minimum: 10
                  fixed-price-per-group:
                    - currency: USD
                      amount: USD 4
            - name: BANDED_PRICE_PRIORITY
              description: Some Tenant Priority (Banded)
              band-type: WEIGHT
              units: KILOGRAMS
              use-flat-rates: true
              days-to-ship: 3
              bands:
                - minimum: 0
                  fixed-price-per-group:
                    - currency: USD
                      amount: USD 10
                - minimum: 10
                  fixed-price-per-group:
                    - currency: USD
                      amount: USD 8
            - name: BANDED_PRICE_EXPRESS
              description: Some Tenant Express (Banded)
              band-type: WEIGHT
              units: KILOGRAMS
              use-flat-rates: true
              days-to-ship: 1
              bands:
                - minimum: 0
                  fixed-price-per-group:
                    - currency: USD
                      amount: USD 15
                - minimum: 10
                  fixed-price-per-group:
                    - currency: USD
                      amount: USD 10
      application:
        inactive-application-id:
          sample-config: true
          # Inactive for an application
          active: false
        some-application-id:
          sample-config: true
          # Application-specific banded shipping configurations
          active: true
          ship-tables:
            - name: BANDED_PRICE_STANDARD
              description: Some Application Standard (Banded)
              band-type: WEIGHT
              units: KILOGRAMS
              use-flat-rates: true
              days-to-ship: 5
              bands:
                - minimum: 0
                  fixed-price-per-group:
                    - currency: USD
                      amount: USD 5
                - minimum: 10
                  fixed-price-per-group:
                    - currency: USD
                      amount: USD 4
            - name: BANDED_PRICE_PRIORITY
              description: Some Application Priority (Banded)
              band-type: WEIGHT
              units: KILOGRAMS
              use-flat-rates: true
              days-to-ship: 3
              bands:
                - minimum: 0
                  fixed-price-per-group:
                    - currency: USD
                      amount: USD 10
                - minimum: 10
                  fixed-price-per-group:
                    - currency: USD
                      amount: USD 8
            - name: BANDED_PRICE_EXPRESS
              description: Some Application Express (Banded)
              band-type: WEIGHT
              units: KILOGRAMS
              use-flat-rates: true
              days-to-ship: 1
              bands:
                - minimum: 0
                  fixed-price-per-group:
                    - currency: USD
                      amount: USD 15
                - minimum: 10
                  fixed-price-per-group:
                    - currency: USD
                      amount: USD 10