Last updated December 29th, 2018

What you'll learn

  • What Set blocks are and how they function
  • How to Set variables manually
  • How to Set variables¬†

Video tutorial:

About the Set block

The Set block is used to set variables to a value defined by you, the creator. You can set variable values to numbers, or words. 

The Set block can have its value set through entering a value, or performing an equation. You can set multiple variables within one Set block.

This tutorial assume you are familiar with variables in Voiceflow. To learn more about variables, you can learn here.


Using the Set block
Variables are automatically set to the value '0' on creation. When a Set block is activated, the variable it is setting will be changed.

We can use the Set block to change the value of a variable. Below are several examples.

Example 1
We increase the value of a user's {score} variable when they choose the correct answer in our quiz game. In this case we are setting a variables value to its current value, plus one. 

Example 2
We multiply two user inputted numbers together to perform a multiplication function for them, and store the answer in a new variable called answer. In this case we are setting a variable to the value of other variables multiplied together.

Setting multiple variables at once

You can set multiple variables at once by clicking on the "add variable set" button.

You can set as many variables as you'd like within a single Set block. Set blocks start from the top variable Set and work downwards. Meaning you can override previous variable sets within the same Set block.

Still have questions? Did we miss something? Have a suggestion?
Message our team using the blue button in the bottom right corner!

Did this answer your question?