This lesson will cover the following topics:

02 | Overview

01 Getting Started

This tutorial covers global variables, including:
  • Global variables overview.
  • Adding variables.
  • Usage examples.

02 Overview

Variables are hidden inputs where you can store data that is not visible to end users. Global variables are available across your whole project. It is important to set your variables on the correct level to ensure that affect the correct elements.

Note: When working with variables, ensure you have debug mode enabled so you can review how the variables are being passed.

03 Adding Variables

1. Click the Project Settings gear icon.
project settings gear icon
2. Select the Tools tab and click the Custom Variables gear icon.
project settings > tools tab > custom variables
There are two kinds of variables: system and static.

System variables are values that are set at the operating system level and can be accessed by various programs and processes running on the system. These variables provide information about the environment and configuration of the system. You cannot assign a value to a system variable.
custom variables > system variables tab
Static Variables are used to affect elements, either from Salesforce, project elements, or other variables. You can set a specific value for static values.
custom variables > static tab

Formula fields will be covered in a later lesson but we’ve provided a brief overview for you here:
  • A numeric variable is used for creating dynamic calculations and storing them, sending them via email, or pushing them to Salesforce.
  • A text variable is used to perform dynamic manipulations using text inputs and fields from Salesforce and store them, send them via email, or push them to Salesforce.
  • A custom JS variable is a fully customized variable that will hold a JS code.

04 Global Variable Example

Smart V is a great example of a global variable. When enabling Smart V for your projects you are essentially creating a global variable for your project as it can be accessed from any page in the project.

When configuring on-click actions for interactive elements, you can choose to affect your global variables. For example, setting a value.
affecting elements > global variables

Global variables can be used when assigning a value from page to page. For example, an action from a second project page can be passed to the first page.

05 Running Conditions on Variables

When creating a condition for a global variable, it is important to keep in mind that this action will be applied no matter where the user is in the project. If you only want an action to run when a user is on a specific page, it is best to work with page-level variables.

If you would like to apply a condition to your variable:
1. Navigate to the Custom Variables window and click Conditions.
custom variables conditions tab
2. Double-click the condition to configure your condition parameters.
custom variables > configuring conditions

06 Got Feedback?

Additional Resources