Broadleaf Microservices

BandedFulfillmentPricingProvider

Table of Contents

Overview

Provides banded or tiered fulfillment pricing where the tiers are based on a minimum price or weight. This implementation takes in a BandedFulfillmentPricingConfig that is read from a file defined by the property broadleaf.ship.banded.configPath. The default path provided by way of example is classpath:banded-ship-example.json.

Warning
Make sure to update the broadleaf.ship.banded.configPath property for production environments so as not to use the example file 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

Example 1. Sample Banded Configuration File
{
  "sampleConfig": true,
  "shipTables": [
    {
      "name": "BANDED_PRICE_STANDARD",
      "description": "Standard (Banded)",
      "bandType": "WEIGHT",
      "units": "KILOGRAMS",
      "useFlatRates": true,
      "daysToShip": 5,
      "bands": [
        {
          "minimum": 0,
          "fixedPricePerGroup": [{
            "currency": "USD",
            "amount": 5
          }]
        },
        {
          "minimum": 10,
          "fixedPricePerGroup": [{
            "currency": "USD",
            "amount": 4
          }]
        }
      ]
    },
    {
      "name": "BANDED_PRICE_PRIORITY",
      "description": "Priority (Banded)",
      "useFlatRates": true,
      "bandType": "WEIGHT",
      "units": "KILOGRAMS",
      "daysToShip": 3,
      "bands": [
        {
          "minimum": 0,
          "fixedPricePerGroup": [{
            "currency": "USD",
            "amount": 10
          }]
        },
        {
          "minimum": 10,
          "fixedPricePerGroup": [{
            "currency": "USD",
            "amount": 8
          }]
        }
      ]
    },
    {
      "name": "BANDED_PRICE_EXPRESS",
      "description": "Express (Banded)",
      "bandType": "WEIGHT",
      "units": "KILOGRAMS",
      "useFlatRates": true,
      "daysToShip": 1,
      "bands": [
        {
          "minimum": 0,
          "fixedPricePerGroup": [{
            "currency": "USD",
            "amount": 15
          }]
        },
        {
          "minimum": 10,
          "fixedPricePerGroup": [{
            "currency": "USD",
            "amount": 10
          }]
        }
      ]
    }
  ]
}