All Collections
Advanced features
Calculations and Advanced logic
Calculations and Advanced logic

How to do calculations and redirect to a specific Page using logic.

Kamil Kaderbay avatar
Written by Kamil Kaderbay
Updated over a week ago

There are two (2) ways of using conditional logic in Snackeet.

A. To display/hide a page according to some criteria.

๐Ÿ‘‰ B. To do Calculations and redirect to a specific Page using logic.

โš ๏ธ All calculations and actions will be executed when the user leaves the current page and go forward

  1. Click on " Page Animation and logic " at the top right to "Set up advanced logic"

2. [IF] Click on " + Condition " to add a line with a condition. You can even create groups of conditions.

3. According to the variable's type, you will be able to use different logic operators

  • For text

  • For number

  • For date

4. [THEN ] Choose what will be done ( go to, replace, or calculations )

โš ๏ธ If you add several steps in "THEN" they will be executed one after the other in the order.

  • Go to

It will allow you to redirect to a page if the condition in the IF is true. You will be able to select any page except the current one.

  • Replace ( e.q. give a value to a variable )

  • Numerical ( e.q. use arithmetic operator to do calculations.)

โš ๏ธ Calculations are available only for the "number' type

You can realize different types of operations add (+), subtract (-), multiply (x), divide(/), power(^) and root

  1. Operation with a number

For example, if you want to add 10 to a variable called var1,

> Select "add" > "Enter an number" > give a value ( 10 ) > to var1

2. Operation with an another variable

For example, if you want to add the value of a variable called var2 to a variable called var1,

> Select "add" > Select var2 > to Select var1

so in that case assuming var2 = 10 and var1 = 5

the new value of var1 will be var1 = 15

5. [Multiple IFs] Add another "IF" condition

You can set several IFs.

Note that ALL "Operations" and "Replace" have the same level of priority and will be executed in their line order in ALL FULFILLED conditions

"Go to" will be executed only once for the first fulfilled condition AFTER ALL "Operations" and "Replace" actions.

We recommend keeping your conditions as simple as possible.

5. What is default settings

"In ALL other cases redirect by default Settings." means that if no conditions are fulfilled it will use the default redirection that you can set at the bottom of any page.

Related article

Did this answer your question?