Qonfi - Guided Selling & Product Configuration Platform
Qonfi - Guided Selling & Product Configuration Platform
Qonfi - Guided Selling & Product Configuration Platform
Product

Platform

  • How it works

    Explore the interface and all the features. Understand step by step how Qonfi works.

  • Examples

    See how Qonfi works: with a pop-up, sidebar, or in-page. Discover examples of guided selling, product check, and product bundle.

Commercial goals

  • Increase conversions and up-sell

  • Increase cross-sell with bundles

  • Boost marketing automation & personalization

  • Optimize your customer journey & UX

  • Generate higher quality leads

Sectors

  • Pet food

  • Tools & equipment

  • Health & Supplements

  • Sport & Cycling

  • Lighting

  • Living & duvets

Case studies

  • Betersport: more conversions

  • Traphekjes: less returns and more revenue

  • Vehikit: Higher order value in 7 countries

  • Qub: +19% revenue with product bundles

  • Lammertink Isolation: More leads with a calculator

Cases
Documentation
Contact
Pricing
Examples
EN
NL NL
Sign in Get started

On this page

  • Using if/else statement
  • Display prices correctly
  • Rounding
    • round
    • ceiling
    • floor
    • roundTo
  • Comparing
    • ==
    • !=
    • <=
    • >=
    • <
    • >
  • Calculations
    • +
    • -
    • /
    • *
  • Parentheses
  • Logical operators
    • And operator
    • Or operator
  1. Homepage
  2. Documentation
  3. How to's
  4. Settings
  5. How to calculate and display variables in texts

How to calculate and display variables in texts

Sometimes you want to display values that need to be calculated. The amount of square meters for example. If you dont have that available in you feed, but you do have the width and depth, then you can let Qonfi calculate the square meters for you.

In this article we will try to explain how to calculate and display values based on variables and static numbers.

Using if/else statement

Sometimes you want to display a variable, but it might not always be set. Instead of showing an empty or broken value, you can add conditions that decide what to display.

In this article we will explain how to conditionally show variables in your result text.

To only display a variable when it has a value, you can use:
{if(vars.VARIABLE, vars.VARIABLE, '')}

This will show the value of vars.VARIABLE if it exists, and nothing if it doesn’t.

You can also provide a fallback, for example showing another variable when the first one isn’t set:
{if(vars.VARIABLE, vars.VARIABLE, vars.OTHER_VARIABLE)}

This gives you more flexibility in your flow, since you don’t need to set every variable upfront, you can choose what to display based on your own conditions.

Display prices correctly

Sometimes you don’t just want to show a raw number — you want it formatted as a proper price. For this, you can use the price method.

This method takes the number you provide and formats it according to your settings under Settings > Price display. That means the output may look different depending on how your flow is configured.

For example:
{price(12)} might output €12.00

You can also pass in a variable instead of a static number, which makes the output fully dynamic:

{price(vars.total)}

Rounding

Rounding makes numbers easier to read or display by adjusting them to a simpler or more meaningful value based on defined rules. Here are clear definitions and behaviors for common rounding-related methods: round, ceil, floor, and roundTo.

round

The round method: round(12.4444) will round the number using "grade-school rounding". Meaning that in this case it will round 12.4444 down to 12. However round(12.89) will return 13. round(12.5) should return 13 as well.

ceiling

Whatever the number is, this function should round it up to the next full number. ceil(8.2) for example, should return 9.

floor

The floor method is the opposite of the ceiling function. Instead of rounding it up, it will round down to the next full number. floor(30.9) shall return 30, because its the last full number.

roundTo

The roundTo method requires 2 parameters. The number to round, and a number to define how many decimals you want. As an example, roundTo(21.6384, 2) should return 21.64.

Comparing

You can also compare 2 values to one another. This could be a variable to another variable, or a variable to a static number.

==

You can check if 2 values are equal to each other. This can compare texts and numbers. 
1 == 1 is true.
vars.price == 3 could be true or false, based on the value that the variable.

!=

You can also compare these numbers are not equal to each other. 
1 != 1  would return false. 

<=

This comparison checks if the first number is smaller or equal to the second.
11 <= 11 is true, so is 11 <= 14.
14 <= 11 would return false.

>=

The >= comparison is the exact opposite of <=. The >= would check if the first number is equal or bigger then the second number.
11 >= 11 is true, so is 14 >= 11.
11 >= 14 would return false.

<

The < is a lot like the <=  comparator. This checks if the first number is smaller then the second number. It returns false if they're equal.
11 < 11 is false, so is 14 < 11.
11 < 14 would return true.

>

This is the comparator that checks if the first number is bigger then the second. This also returns false if both numbers are equal to each other.
11 > 11 is false, so is 11 > 14.
14 > 11 would return true.

Calculations

In some cases, you want to be able to add 2 numbers together, or do some other basic calculations, before displaying a number. This can be done in the results texts as well.

+

The addition is quite straight forward. You can add multiple numbers together to form 1 bigger number.

{10 + 89} would return 99. You can also add 2 variables together. This way you can programmatically display bigger numbers.

-

Subtraction works the same way as addition, but instead removes value from the number.
{100 - 25} would return 75.

You can also subtract variables from one another:

{vars.price - vars.discount}

/

Division lets you split one number by another.
{20 / 5} would return 4.

Keep in mind that dividing by 0 is not possible and will return an error or empty result, depending on your setup.

*

Multiplication is useful when you want to scale numbers.
{12 * 12} would return 144.

You can also multiply variables together:
{quantity * unit_price}

Parentheses

It is allowed to use mathematical parentheses. So when you want to first add 2 numbers, and then multiply that result, you can use:
{( 1 + 3 ) * 7} would return 28. 
{1 + 3 * 7} would return 22. (missing parentheses)

Logical operators

Logical operators let you combine multiple conditions together. They are especially useful when you want to check if more than one thing is true, or if at least one condition is true.

Logical operators always return either true or false.

And operator

The and operator only returns true if both conditions are true.
If either condition is false, the whole expression becomes false.

1 == 1 and 2 == 2     → true   (both are true)
1 == 1 and 2 == 3     → false  (second is false)
5 > 3 and 10 > 5      → true   (both true)
5 > 3 and 10 < 5      → false  (second false)

Or operator

The or operator returns true if at least one of the conditions is true.
It only returns false if both conditions are false.

1 == 1 or 2 == 3      → true   (first is true)
1 == 2 or 2 == 2      → true   (second is true)
5 < 3 or 10 < 5       → false  (both are false)

Documentation

  • How to's
    • Configuration
    • Account
    • Preview & Styling
    • Settings
    • Feed
    • Matching
    • Apps
    • Insights
    • Publish
  • Definitions
  • FAQ
Qonfi - Guided Selling & Product Configuration Platform
Lage Gaardenstraat 98
7772 CN Hardenberg
The Netherlands
Qonfi - GDPR compliant

Discover

  • What is guided selling
  • Guided selling on your website
  • Pricing
  • Examples
  • Blog

Support

  • About us
  • Documentation
  • Contact
  • How-to's

Stay connected

Want to know what we're working on? Subscribe to our newsletter.

Follow us

© 2025 Qonfi. All rights reserved.

  • Privacy policy
  • Cookies
  • Terms & Conditions
  • Product
    • Platform
      • How it works
      • Examples
    • Commercial goals
      • Increase conversions and up-sell
      • Increase cross-sell with bundles
      • Boost marketing automation & personalization
      • Optimize your customer journey & UX
      • Generate higher quality leads
    • Sectors
      • Pet food
      • Tools & equipment
      • Health & Supplements
      • Sport & Cycling
      • Lighting
      • Living & duvets
    • Case studies
      • Betersport: more conversions
      • Traphekjes: less returns and more revenue
      • Vehikit: Higher order value in 7 countries
      • Qub: +19% revenue with product bundles
      • Lammertink Isolation: More leads with a calculator
  • Cases
  • Documentation
  • Contact
  • Pricing
  • Examples