Sniffie extension allows you to do any mathematical operations (i.e. functions) to Price column and other numeric data type columns easily. Mathematical operations are new feature introduced in Sniffie v0.7. If you need to remove or add e.g. value added tax to any price or some unit conversions, this is an easy way to do it. Here’s how it works.
Basics of mathematical operations in Sniffie extension
- all numbers (0-9)
- dot (for decimal separators)
- multiplication sign (*)
- division sign (/)
- addition sign (+)
- subtraction sign (-)
- basic parenthesis, i.e. ( and )
- VAL string (in uppercase, used to point to the original value in the cell)
All non-allowed characters will produce produce an “Invalid expression” error. In addition, if there is an error in your expression (i.e. it is not valid maths), you’ll get an error. Mathematical operations are the final touch made to your extraction after everything else has been processed. Mathematical operations are not (as of November, 2017) saved to the raw extraction result, but those are applied when the extraction result is imported to Sniffie’s ecommerce platform.
How it works
- Activate advanced mode.
- Select Price column (or other numeric column data type such as original price).
- Write your expression to Math operation field. This will create a mathematical function that is evaluated by Sniffie during extraction. You will see the evaluation result.
- If the expression is invalid, you’ll see an error. Otherwise, the expression changes the value in the table immediately.
- You can combine a regular expression or a standard find/replace with a function. Regular expression is evaluated before the mathematical operation.
divides the original value by 100 (useful in certain decimal separation cases).
divides the original value by 1.24 (i.e. removes 24% value added tax, Finnish VAT rate, from the result).
multiplies the original value of the by two.
multiplies the original value by two and divides the result by 0.78.
adds 10 to the original value and then squares the resulting value.
subtracts 10 to the original value and then squares the resulting value and divides the result by 0.72.