# Introducing Formulas ⚡️⚡️⚡️

Updated by Niklas Puertolas Larsson

#### Formulas Block

The Formulas Block is a feature that allows you to do complex operations as you would do on a spreadsheet or Excel document. It's like a set variable block but on steroids. And not only that, it lets you work with strings as well. Whereas before you could only transform data with JavaScript or with external APIs, now you will be able to do it, easily, using Formulas. What else can you ask for?

Watch this video below to get a glimpse of what the formula block is really like.

#### Formulas in a Real-World Example

We consider that the best way to understand the Formula block is to put it to test in a real-world example. For this example, we came up with a bot for a Burger restaurant that does home delivery.

Formulas is a tool that enables you to complete many different tasks and can give a whole new power to your bot. In this case, we use Formulas not only to calculate the final price of the selected burger and toppings but also to apply the discount and to make sure that the delivery information collected from the client is correct.

For that, we created a series of four videos, starting with:

• Introduction: What are we going to do? How are we going to do it? Why are formulas so useful? What type of features will we use? All these questions are answered in this video.

• Building the bot - part 1: Here starts the building of the bot. We are going to set a limit for the multiple-choice block and calculate the pricing of the burger. In the multiple-choice blocks, we will ask the client to decide which type of toppings and sauces he wants in the burger. Here we will use Formulas to limit the number of toppings and sauces available for the client.

• Building the bot - part 2: Continuing the building from the last video, using formulas, we will apply different discounts and validate the format of the phone number given by the client.

• Bot in action: The building of the bot is done! Let's try it out and see how it works.