Formulas

Set a field calculations: add, subtract, multiply and divide numbers

Add, subtract, multiply and divide numbers with the Set a field block in your Landbot agent, apply a discount and move a date, one step at a time.

Desirée M
Updated by Desirée M

How to use the Formulas block: a beginner's guide

The Formulas block calculates or transforms a value, like an order total or a lowercase answer, and saves it in a Field. Add it, write formulas and fix errors.

Updated

Regex formulas: check that an answer follows a pattern

Regex formulas check that an answer follows a pattern in your Landbot agent: RegexTest and tested patterns for postal codes, phones, dates and emails.

Desirée M
Updated by Desirée M

Date formulas: get today's date, add time and turn text into dates

Date formulas get today's date and time, add days, months, hours or minutes, and turn text into dates and times in your Landbot agent.

Desirée M
Updated by Desirée M

String formulas: change, check and combine text

String formulas change, check and combine text in your Landbot agent: capitals, words in an answer, character counts, lists, prices and links.

Desirée M
Updated by Desirée M

Logical formulas: combine checks with And, Or, Not and If

Logical formulas combine checks with And and Or, reverse one with Not, or pick a value with If, so your Landbot agent can decide on more than one thing.

Desirée M
Updated by Desirée M

Math formulas: add, multiply, divide and round numbers

Math formulas add, subtract, multiply, divide and round numbers in your Landbot agent, for totals, bill splits, points and random codes.

Desirée M
Updated by Desirée M

Object formulas: read and build data with GetValue and ToJSON

Object formulas read values from an object with GetValue and build objects from JSON text with ToJSON in your Landbot agent, such as a price list or an order.

Desirée M
Updated by Desirée M

Comparison formulas: check if values are equal, bigger or smaller

Comparison formulas check two values or Fields, like a total and a limit, and answer True or False so your Landbot agent can take a different path.

Desirée M
Updated by Desirée M

Array formulas: check, count, add and remove items in a list

Array formulas check, count, add and remove items in a list in your Landbot agent, and turn a list into text for messages and Google Sheets.

Desirée M
Updated by Desirée M