Price lists

Price list can be linked on the Dimension option and enable the setup of dynamic prices based on the dimension inputs without the need to implement a price formula.

Price lists are also available in all option types within a price formula via: Price Lists lookup

Enable extension

Price lists are included in the Price formula Extension.

Setup

Price lists are defined on the Assets page > Lists tab:

You can choose from the available price list types:

Dimension

Price lists can be linked to the Dimension option, on the Advanced tab:

There you will find the Price list setting, click on "Link list" to select a previously created Price list:

IMPORTANT: for the price list to be applied automatically, the Price formula field has to be empty.

If there is a price formula present it will always be preferred over the linked list.

Note: You can also combine a price formula with a price list. You can find examples at the end in the section Price formula.


The following sections go into detail on the different type of price lists.

Price list area

Prices are configured by area. The app finds the matching area range by checking area >=

The area calculation can be configured on the Dimension option Advanced tab:


Price list dimension

Prices are configured by X and Y input ranges. The app finds the matching X and Y range by checking >= from the biggest range downwards.

Price formula

For more advanced use cases, you can also lookup a price from the linked price list inside a Price formula.

The following functions are available within a price formula:

Function Description
lookup(area) lookup price by area
lookup(area, option) lookup price by area and option column in price list
lookup(x,y) lookup price by dimension X/Y input

Examples

The following examples make use of the linked price list and add some additional calculations.

Area lookup with custom price increase

// lookup price by area from linked price list
var squarePrice = lookup(area);

console.log('square price', squarePrice);

// calculate price for the used area
var price = squarePrice * area;

// custom price increase
if(x > 80 && y>80){
  price += 10;
  console.log('adding price increase:', price);
}

return price;

Note: the returned price from the lookup function always has to be multiplied by the * area


Area lookup with option for Material

The Price list area can have one more column that can be used to match for a combination of other selected options. In this example we've setup two different Materials with each their own price per area.


On the price list definition, right click on the header row, and select the "option" column:

Create a row for each area & option combination:

In the price formula we first get the selected material, then provide it as a parameter in the lookup function:

// get the selected material selection
var material = options.value('material');

console.log('square material', material);

// lookup price by area & option
var squarePrice = lookup(area, material);

console.log('square price', squarePrice);

// calculate price for the used area
return squarePrice * area;

Note: you can also combine multiple options into a single variable and pass it to the lookup function.


Multiple Lists

Price formulas support loading lists dynamically. Instead of linking a single list on the Dimension option, it is possible to load multiple lists in a single formula and lookup the right price based on selected options.

The following example loads two separate Dimension price lists and uses the right list based on the selected material:

// fetch multiple price lists 
var priceWood = options.list("dimension wood");
var priceMetal = options.list("dimension metal");

// get the selected material selection
var material = options.value('material');

// select the price list based on selected option
var priceList = null;
if(material === 'wood') {
  priceList = priceWood;
} else if(material === 'metal'){
  priceList = priceMetal;
}

// lookup price via the selected priceList
var price = options.lookup(priceList, x, y);

// return the calculated price
return price;

NOTE: the method for price lookup for dynamic lists is called options.lookup instead of the linked list variant, which is just called lookup().

IMPORTANT: the price list has to be defined before the price formula is saved, if the list is added afterward, make sure to edit the price formula again. Calls to options.lists(<name>) have to use a fixed string parameter (not a variable name - this is due to how the lists are cached internally).

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.