PIM > Price Calculation > Price Rules > Create new price attributes for price calculation

This guide explains how to add a new attribute for price calculation, such as "Setup Price," to a page option (e.g., "Paper"), and then incorporate it into the price calculation formula by editing the price rules.

 
1
  
2

Click "Web Product"


 
3

Click "Page Options"


 
 
 
4

Select the page option you would like to add the attribute to and click on "Edit". For this example we choose "Paper".


 
5

Scroll down to "Attributes" section and click "Create".


 
6

Here you have to fill out all needed information like name, code, the kind of attribute and the default value.

First, start with a name of your choice. We use "Setup Price" as name. For the code we recommand that you add the name of the page option in front of the name of the attribute. This helps you if you e.g. have multiple setup prices (1 in paper, 1 in format, 1 in book binding, etc.)

In our example the code is "paper_setup_price"

 
7

Select the input type of your new attribute. This can be:

Input -> Simple input field for e.g. a number.
Textarea -> A multi line input field.
Dropdown -> A dropdown where you can add multiple values and later select one of them.
Multiselect -> A list with multiple values where you can later select more than just one value.
Row Pattern (table) - prices based on quantity -> A table where you can add tier prices per pcs.
Row Pattern (table) - prices based on surface -> A table where you can add tier prices per sqm

 
8

Default value and Mandatory: Here you can select what is already set up by default and if the field is mandatory or not.


 Important!

The attribute will be added into all existing values too. This means, that if you would like to have it as mandatory field, you have to add a default value. Otherwise all your already existing values now have a mandatory field without any selection. This can cause issues during the order process!

 
9

Last you can add a description for internal usage.

 
10

Save the attribute.


 
11

Now you can use it whenever you edit on of your existing values or create a new value.

You can see here the example from an existing value. Just add the price now as you want.


 

By simply adding an attribute the system does not know what to do with it. You the next part is to add this attribute to the mathematical formulas (or create a complete new one) so that it can be used for calculation.

 
12

Click "Web Product"


 
13

Click "Price Rules"


 
14

Click "Rules"


 
15

Now you can decide if you want to create a new rule or just edit an existing one.

In our example we added the setup price into the page option paper. So we will simply add the price rule that calculates the paper price by clicking on "Edit".


 
16

Scroll down to the "Expression" part of the rule. Here you can see the default formula that is used to calculate the price for the page option "Paper". All you have to do is to add your new attribute wherever you need into the formula. Just click on the position where you want to add it.


 
17

Add the operator (also possible to do this later)

 
18

And then click on "Add Variable".


 
19

You get a drop down menu with all available variables for price calculation. If you check the section with your page option (in our example "Paper") you can find your new created attribute as variable.

20

Click "Add Variable"


 
21

Once you did this the variable is added to the formula. Finish your work by (in not already done) adding the operators of adjusting the formula.


 
22

 
23

Click on "Save" or "Save and continue". Now you are done and your new attribute is added to the calculation. To test this you can check the price directly on fronted or check the price debugger for detailed information.