Choose “Custom Field” in your flow. Then, select the custom field where your values are stored as numbers. Opt for a custom formula and define it in the Value field. This way, you can easily customize calculations to fit your specific needs within the chatbot flow.

Example: Performing (A+B)*(A-B) calculation
Get the values of A & B from user input as numbers,
Now set the calculation formula on the flow. For that, choose action on the basic builder and select the set custom field. Then, setup the wizard by choosing the custom field (number) in which you want to store the calculated values (here, we created that as “amount_paid”).
Now, the interesting part. Set the formula on the Value field (here we used the formula ( {{value a}} - {{value b}} ) * ( {{value a}} + {{value b}} ) to do the above said calculation.
That’s it, if you take A as 4 and B as 2, the result will be shown by a chatbot as 12 (as per the calculation).
Calculation on Web chatbot example.
Here are some basic math examples that you can do:
1+2*3-4
1 + 2 * 3 – 4
pi * 2
PI * 2
abs(1) + min(1,2) * max(1,2,3)
min(1+2, abs(-1))
1 + ((2 – 3) * (5 – 7))
2 * (-3)
1
A term can consist of just a number
(1+((2)))
Usage of obsolete brackets is allowed
00001
Prefixing a number with obsolete zero digits is possible
.1
Omitting a zero digit before a period character is okay
Operators:
+
Addition
-
Subtraction
*
Multiplication
/
Division
Functions:
abs
aCos
aCosH
aSin
aSinH
aTan
aTanH
aTanTwo
ceil
cos
cosH
degToRad
en
exp
expMOne
floor
fMod
hypot
log
logOneP
logTen
max
min
pow
radToDeg
round
sin
sinH
sqrt
tan
tanH
Constants:
e
euler
lnPi
lnTen
lnTwo
logTenE
logTwoE
onePi
pi
piFour
piTwo
sqrtOneTwo
sqrtPi
sqrtThree
sqrtTwo
twoPi
twoSqrtPi
Others:
(
right-faced brackets
)
left-faced brackets
,
comma
.
dot

