Scaled Pricing

Scaled pricing is for complex cases when pricing might differ based on the volume of the order. It is a combination of price points and pricing strategies.

It also supports date overrides for special prices for certain periods or to implement seasonal pricing of fresh products.

Properties

  • strategy: The pricing strategy, one of "VOLUME", "INCREMENTAL", or "DIVISIBLE"
  • price_points: The prices used for different order quantities.
    • from: The quantity at which the price point starts
    • price: Price in cents
    • price_per: Optional unit for this price point, such as "vessel" or "bundle". If used, it must be compatible with the product's pricing unit.
  • date_overrides: Optional property, an array of date periods where the price points are different from the default ones. Each item of the array can have the following properties:
    • from_date: The start of the validity for the date override. Can be open ended if no to_date is given.
    • to_date: Optional field, represents the last day of the date range. It is inclusive, the override is still valid on this date.
    • price_points: The price points to be used for this date range or from this start date.

Example:

{
  "pricing": {
    "strategy": "INCREMENTAL",
    "price_points": [
      { "from": 1, "price": 2675 },
      { "from": 6, "price": 2650 },
      { "from": 96, "price": 2610 }
    ],
    "date_overrides": [
      {
        "from_date": "2022-11-25",
        "to_date": "2022-11-28",
        "price_points": [
          { "from": 1, "price": 2650 },
          { "from": 6, "price": 2610 },
          { "from": 96, "price": 2575 }
        ]
      }
    ]
  }
}

It is recommended to add a price point with from = 1, or if order_by is kg and strategy is VOLUME then from = 0. The shop will not use the price set on the product itself if scaled pricing is defined.

Constraints

  • If min_order_count is set and the first price point starts above one unit, it must be either one unit or match that first price point. An omitted min_order_count is not automatically set by this rule.
  • order_by: 'kg' can only be used with the VOLUME strategy. The price points from field may be fractional only in this case.
  • Avoid overlapping date_overrides. The to_date is optional; without it, the range ends at the next from_date, or remains open-ended.
  • DIVISIBLE and INCREMENTAL strategies require from to be ≥ 1 – zero is not allowed.
  • With DIVISIBLE pricing and product bundles, each bundle size must be divisible by at least one price point's from value.
  • For other ordering units, from must be an integer. Zero is only supported with the VOLUME strategy.

Strategies

Scaled pricing supports three strategies: VOLUME, INCREMENTAL and DIVISIBLE

VOLUME

This is the most straightforward pricing strategy, the more a customer orders, the cheaper the product becomes.

Example:

{
  "pricing": {
    "strategy": "VOLUME",
    "price_points": [
      { "from": 1, "price": 2675 },
      { "from": 50, "price": 2650 },
      { "from": 100, "price": 2625 }
    ]
  }
}

With the pricing above here are some quantities with their total price:

number of items calculation total
49 items 49 x 26.75 1310.75
50 items 50 x 26.50 1325.00
99 items 99 x 26.50 2623.50
100 items 100 x 26.25 2625.00

INCREMENTAL

This strategy will break the pricing down to multiples of price points. If you have different bundles for a product and they are priced differently base on their size, this strategy will find the breakdown for a customer's order. Let's say there are two shipping bundles, a carton of 12 and a pallet of 8 cartons (96 items). If a customer orders 13 cartons (156 items), it will be shipped and priced as one pallet and five cartons.

Example:

{
  "pricing": {
    "strategy": "INCREMENTAL",
    "price_points": [
      { "from": 1, "price": 2675 },
      { "from": 12, "price": 2650 },
      { "from": 96, "price": 2625 }
    ]
  }
}

With the pricing above here are some quantities with their total price:

number of items calculation total
11 items 11 x 26.75 294.25
12 items 12 x 26.50 318.00
95 items 7 x 12 x 26.50 + 11 x 26.75 2520.25
111 items 96 x 26.25 + 12 x 26.50 + 3 x 26.75 2918.25

DIVISIBLE

This is the bundle pricing strategy, prices will always be calculated based on the highest price point that is divisible with the quantity ordered. Unlike INCREMENTAL, this strategy will only apply one price point, the one with the highest from value that is divisible with the quantity.

Example:

{
  "pricing": {
    "strategy": "DIVISIBLE",
    "price_points": [
      { "from": 1, "price": 2675 },
      { "from": 12, "price": 2650 },
      { "from": 96, "price": 2625 }
    ]
  }
}

With the pricing above here are some quantities with their total price:

number of items calculation total
11 items 11 x 26.75 294.25
12 items 12 x 26.50 318.00
36 items 36 x 26.50 954.00
95 items 95 x 26.75 2520.25
96 items 96 x 26.25 2520.00
192 items 192 x 26.25 5040.00

Date Overrides

Price points can be defined for specific date ranges or from specific dates by using the date_overrides property. When a customer is placing an order, the price points from the date override with the latest from_date will be applied, if any found.

If a date override is found, the original price points are completely ignored and replaced with the price points from the override.

Example:

{
  "strategy": "VOLUME",
  "price_points": [
    { "from": 1, "price": 2700 },
    { "from": 100, "price": 2650 }
  ],
  "date_overrides": [
    {
      "from_date": "2022-07-01",
      "price_points": [
        { "from": 1, "price": 2700 },
        { "from": 100, "price": 2550 }
      ]
    },
    {
      "from_date": "2022-10-01",
      "price_points": [
        { "from": 1, "price": 2700 },
        { "from": 100, "price": 2575 }
      ]
    },
    {
      "from_date": "2022-11-25",
      "to_date": "2022-11-28",
      "price_points": [
        { "from": 1, "price": 2700 },
        { "from": 100, "price": 2475 }
      ]
    }
  ]
}

With the above setup, given the date of ordering, the price for 100 items will be:

date of order date override price for 100 items
16th of June 2022 none 2650.00
7th of July 2022 Q3 2550.00
22nd of November Q4 2575.00
26th of November Black Friday 2475.00
21st of December Q4 2575.00