Broadleaf Microservices

FixedFulfillmentPricingProvider

Table of Contents

Overview

Provides simple fixed fulfillment pricing based on a configuration file. This implementation takes in a FixedFulfillmentPricingConfig that is read from a file defined by the property broadleaf.ship.fixed.configPath. The default path provided by way of example is classpath:fixed-ship-example.json.

Warning
Make sure to update the broadleaf.ship.fixed.configPath property for production environments so as not to use the example file provided out-of-box.

Configuration

The config takes a list of FixedFulfillmentPricingOptions. Each option takes the following properties in addition to the default FulfillmentOption properties:

  • 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

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

Example 1. Sample Fixed Configuration File
{
  "sampleConfig": true,
  "shipTables" : [
    {
      "name": "FIXED_STANDARD",
      "description": "Standard",
      "fixedPricePerGroup": [{
        "currency": "USD",
        "amount": 5
      }, {
        "currency": "MXN",
        "amount": 100
      }
      ],
      "percentagePerItem": 0.1,
      "fixedPricePerItem": [{
        "currency": "USD",
        "amount": 1
      }, {
        "currency": "MXN",
        "amount": 20
      }],
      "useFlatRates": true,
      "daysToShip": 5
    },
    {
      "name": "FIXED_PRIORITY",
      "description": "Priority",
      "fixedPricePerGroup": [{
        "currency": "USD",
        "amount": 10
      }],
      "percentagePerItem": 0.2,
      "fixedPricePerItem": [{
        "currency": "USD",
        "amount": 1
      }],
      "useFlatRates": true,
      "daysToShip": 3
    },
    {
      "name": "FIXED_EXPRESS",
      "description": "Express",
      "fixedPricePerGroup": [{
        "currency": "USD",
        "amount": 15
      }],
      "percentagePerItem": 0.3,
      "fixedPricePerItem": [{
        "currency": "USD",
        "amount": 1
      }],
      "useFlatRates": true,
      "daysToShip": 1
    }
  ]
}