Broadleaf Microservices

VirtualFulfillmentPricingProvider

Table of Contents

Overview

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

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

Configuration

The config takes a list of VirtualFulfillmentPricingOption. 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

Example 1. Sample Virtual Configuration File
{
  "sampleConfig": true,
  "fulfillmentOptions": [
    {
      "name": "DOWNLOAD",
      "description": "Download",
      "fixedPricePerGroup": [{
        "currency": "USD",
        "amount": 0
      }],
      "percentagePerItem": 0,
      "fixedPricePerItem": [{
        "currency": "USD",
        "amount": 0
      }]
    },
    {
      "name": "EMAIL",
      "description": "Email",
      "fixedPricePerGroup": [{
        "currency": "USD",
        "amount": 0
      }],
      "percentagePerItem": 0,
      "fixedPricePerItem": [{
        "currency": "USD",
        "amount": 0
      }]
    },
    {
      "name": "GRANT_ENTITLEMENTS",
      "description": "Grant Entitlements",
      "fixedPricePerGroup": [{
        "currency": "USD",
        "amount": 0
      }],
      "percentagePerItem": 0,
      "fixedPricePerItem": [{
        "currency": "USD",
        "amount": 0
      }]
    }
  ]
}