Boxes - Correct Price Math

1. Add VAT

Use this box to add the VAT to a given price.

Example: Price without VAT = 17.25€

bdf6f7a666dd7154dd9d20d1465b5d81.png

After using the box with 19 % as default value: 20.53€

2. Column Math

Use this box to calculate with two additional input values. Enter static values or choose the input of other columns. Keep in mind that firstly the amount of Input 1 and Input 2 is calculated according to the chosen operator.

How to use the box: 1. Add that box to the column that includes one part of the calculation.

  1. Choose one of the operators (+,-,*,/). from the dropdown list.

  2. Choose an input column from the dropdown list (Be aware at what stage this calculation should be done) OR enter a static value for Input 1.

  3. Choose an input column from the dropdown list (Be aware at what stage this calculation should be done) OR enter a static value for Input 2.

  4. Enter a value for the rounding accuracy. The default value is 0.

34f8d574abf675e8739995bd9609b494.jpeg

2.2 Choose rounding type

The standard rounding rounds up, if the last digit is 5 or above, and down, if it is 4 or below.Some logics, do, however, need the numbers to be constantly rounded down or rounded up.You can achieve this by choosing either round up or round downfrom the dropdown.

Please note: You should only change the rounding logic, if needed for your logic.

3. Convert Currency

This box is used to convert the currency of the prices within your feed.

How to use the box: 1. Add the box to the connection containing the price you want to convert.

  1. Choose the current currency of the price.

  2. Choose the currency that you want the prices to be converted to.

This box uses the conversion rate that is valid at the point of processing (UTC). The source for this information is the "Open Exchangerates" API.

e24f725d303f3457f32e1703237a7bb3.gif

4. Discount

This box is used to give a discount on the prices for the criteria you select.

  1. Fill in the Mandatory Column including the main criteria.

  2. List all the searchterms in the free space that can appear in this column and you want to give a discount on. List them without any delimiter; just enter them per line.

    Choose from the dropdown list if the the discount should be given on the products that contain the searchterms or on all that don't include it, or if it should be given if the column is empty. You can also enter a mathematical value and choose from the dropdown list that a discount should be given if the values in the mandatory column are greater, less or equal to that.

  3. You can enter a second column and its searchterm values if you want to. It works as described before.

  4. Enter the value of the discount that shall be given.

  5. Choose from the dropdown list what should happen if the value in the column you want to change isn't a number: Should the value be left unchanged, treated as a 0 or if an empty string should be returned.

775aebfe12187b3e7bb63674a2217f59.jpeg

In this example a discount of 11% is given to all Boots and Sneaker for women.

5. Disount Percentage

This box is used to calculate the discount percentage between to given prices.

  1. Choose the column from the dropdown list where to find the old price.

  2. Choose the column from the dropdown list where to find the new price.

  3. Enter a value for the rounding accuracy. The default value is 0.

  4. Add a text before or after that value in the given free spaces.

26944a04e3d75e55650cd3f989f9aa00.jpeg

6. In-Row Math

The In-Row Math box can be used to add or mulitply the values in one cell.

How to use the box: 1. Type the delimiter that is used in your cells.

  1. Choose the operator that you want to apply.

The delimiters will now be replaced by the chosen operator and the according arithmetic result will be shown.

Example:

Values in one cell: 2,3,6

514c3bf3bd0789e97c79a8ed4a5e1209.jpeg

After using the box: 11

7. Make Valid Price

For Google and most of the other export channels the valid decimal separator is period ("."), not comma (","). Some feeds also contain currency in price column. With this box the decimal seperator can be changed and the currency is removed.

If there is an invalid value in your data that can't be transformed you can choose to assign a static value to that cell (0.00 or 0,00) or to leave that cell empty. If it will be 0.00 or 0,00 depends on the settings you did above.

Example: comma decimal separator and currency symbol in feed

2b797206e0718f1a20c77992811c35c5.png
fa6d75d8eb0b28cc0dbb53e4795cfad8.png

After using the box:

94d6a3702a95ae5c23a05de0ead199f2.png

8. Math

The Math box is used to calculate with basic arithmetic operators. The column were this box is added is the first part of the calculation. Then choose the operator and the column were the second part of the calculation is in from the dropdown list or enter a static value. This could come in handy to add shipping to the price in order to get the total.

8.1 Calculate with a value from another column

  1. Choose an operator (+,-,* /) in the first dropdown.

  2. Choose a column from that dropdown list to calculate with. Leave the free space next to Static Value unchanged.

  3. Enter a value for the rounding accuracy.

  4. Choose from the dropdown list what should happen if the value in the column you want to change isn't a number: Should the value be left unchanged, treated as a 0 or if an empty string should be returned.

Example: price= 7.99

(+ shipping 2.99)

c51a718c6ab6c2c7b760e8e91dd63503.jpeg

After using this box: (new total) price = 10.98

8.2 Calculate with a fixed value

The other way to use it is to add, subtract, multiply or divide with a static value. A useful case could be to calculate a 20% discount (e.g. multiply with 0.8).

  1. Choose an operator (+,-,* /) in the first dropdown.

  2. Enter a static value. Leave the free space next to Column unchanged.

  3. Enter a value for the rounding accuracy.

  4. Choose from the dropdown list what should happen if the value in the column you want to change isn't a number: Should the value be left unchanged, treated as a 0 or if an empty string should be returned.

Example:

9.99
b8ff94042ba6d3e9368138bfb3c8c042.jpeg

After using the box::

7.99

Please note: The result would be 7.992 but it is rounded to two decimals. The Rounded Precision is an optional field to specify the decimals.

8.3 Choose rounding type

The standard rounding rounds up, if the last digit is 5 or above, and down, if it is 4 or below.Some logics, do, however, need the numbers to be constantly rounded down or rounded up.You can achieve this by choosing either round up or round downfrom the dropdown.

Please note: You should only change the rounding logic, if needed for your logic.

9. Math Template

This box is used to calculate the amount of up to 4 columns.

How to use the box: 1. Add that box to the column that includes one part of the calculation.

  1. Choose 1 to 3 columns from the dropdown lists.

  2. Enter a calculation template using "value" for the current field, "column1" for the first chosen column, "column2" for the second chosen column and "column3" for the third chosen column. Enter brackets and operators as used for calculations. You don't need to add Whitespaces inbetween. Just start your input with {{ and end your input with }}.

  3. Enter a value for the rounding accuracy.

da5cf3c50107876cf61fa3c4cfcfecec.jpeg

9.2 Choose rounding type

The standard rounding rounds up, if the last digit is 5 or above, and down, if it is 4 or below.Some logics, do, however, need the numbers to be constantly rounded down or rounded up.You can achieve this by choosing either round up or round downfrom the dropdown.

Please note: You should only change the rounding logic, if needed for your logic.

10. Round Numeric Values

Use this box to round numeric values according to the given value. Choose from the dropdown list what should happen if the value in the column you want to change isn't a number: Should the value be left unchanged, treated as a 0 or if an empty string should be returned.

Example:

9.95863935
a19fa70a29865c982745c7692a613b59.jpeg

After using the box:

9.96

11. Add thousand delimiter

To add thousand delimiters to your prices you can use our "Preg Replace Box".

Make sure you have valid prices with a dot as the decimal delimiter before you execute the following steps. Enter the the expression

/(\d{1,3})(\d{3})?(\.\d{2})/

into the search field. This expression separates your price into several groups.

To rearrange this group (adding thousand delimiters) enter

$1,$2$3

into the replace field. This will enter the groups and add commas in between.

This will work for prices up to 999,999.99.

Price before using the box:

13337.99
Figure 1. Box
Box


After using the box:

13,337.99

For prices under 1.000, you will see that the comma will be set nevertheless. To cover theses cases, you can use a Text Replace box and simply replace ",." with ".".