Why Use Variables?
Variables enable powerful training logic:- Track scores: Keep a running total of correct answers
- Count attempts: Limit how many times a learner can retry
- Remember choices: Store what the learner selected in a quiz
- Branching decisions: Use variable values in conditions to create different paths
- Personalization: Store the learner’s name and use it in messages
correctAnswers variable. Later, in a condition, check correctAnswers >= 8 ? "Passed" : "Failed" to decide the ending.
Opening the Variables Pane
The Variables pane is where you create and manage all variables in your training. Open it from the ribbon: in the Variables group, click the Set Variable button (the database icon). The pane slides in on the right. Click the same button again to close it.
Variables pane showing System Variables, Internal Variables, Meta Variables, and custom Variables with an Add Variable button
- System Variables (Read-only) — provided by Altoura (e.g.,
_altoura.sessionId,_altoura.userId). - Internal Variables (Read-only) — system-managed values like the steps list. Only shown when present.
- Meta Variables — system-defined configuration variables. Read-only fields, collapsible.
- Variables — your custom variables. This is the section you edit.
Creating a Variable

Variable editor — configure name, type, description, default value, allowed values, and min/max constraints
Open the Variables pane
Click the Add Variable button
variable1, type string) and is automatically expanded for editing.Rename the variable
Pick a Type from the dropdown
Configure the variable's fields
- All types: Description, Default Value
- String: also Allowed Values (comma-separated), Pattern (Regex)
- Number: also Allowed Values (comma-separated), Min Value, Max Value
- Boolean: Default Value is a True/False dropdown (no Allowed Values, no Min/Max)
- Array: Default Value is a JSON array (e.g.,
["a", "b"]or[1, 2, 3])
Variable Naming Conventions
Choose clear, meaningful names for your variables. Good naming makes your training logic easier to understand and debug. Recommendations:- Use camelCase:
correctAnswers,userScore,isComplete(start lowercase, capitalize new words) - Be descriptive:
scoreis better thansortemp - No spaces: Use
attemptCountnotattempt count - Avoid special characters: Stick to letters, numbers, and underscores
userName(string)score(number)isComplete(boolean)correctAnswers(number)selectedOption(string)completedSteps(array)
var1,temp,x(not descriptive)Correct Answers(spaces)correct-answers(hyphens)_internal(too cryptic)
Viewing All Variables
In the Variables section of the pane, each custom variable is shown as a collapsible card. The card header shows:- The variable’s name (editable inline)
- A colored type badge (string, number, boolean, or array)
- A trash icon for deleting the variable
System Variables (Read-Only)
Your training has access to system variables that are provided automatically by Altoura. You cannot create or modify these — they’re read-only. But you can read their values and use them in conditions and text.Editing a Variable
All edits are inline — there is no separate Edit or Save button. Changes are applied as you type or pick a value.Open the Variables pane
Expand the variable's card
Edit any field directly
"" for string, 0 for number, true for boolean, [] for array). It can also break references in conditions or actions that assumed the old type, so review uses of the variable after a type change.Deleting a Variable
Open the Variables pane
Click the trash icon on the variable's header
Variable Initialization (Default Values)
Every variable must have a default value — the value it starts with when the training begins. Examples:Example: Creating Variables for a Quiz
Here’s a realistic set of variables for a 10-question quiz: Variables to create:score(number, default: 0) — Running total of points earnedquestion(number, default: 1) — Current question number (1–10)attempts(number, default: 0) — How many times the learner has attempted the quizisQuizComplete(boolean, default: false) — Whether all 10 questions are doneselectedAnswers(array, default: []) — Array of the learner’s choices for each questionpassingScore(number, default: 70) — Minimum score needed to pass
- Tracking progress (question 1 of 10)
- Tracking performance (score, attempts)
- Branching logic (
score >= passingScore ? "Pass" : "Fail") - Limiting retries (
attempts < 3 ? retry : quit)
Testing Variables in Preview
When you preview your training, you can:Best Practices
Use consistent naming
Use consistent naming
Create variables before using them
Create variables before using them
Set meaningful defaults
Set meaningful defaults
Document your variables
Document your variables
Use arrays and objects sparingly
Use arrays and objects sparingly
Next Steps
Learn about:- Variable Types — Understand string, number, boolean, and array types
- Variable Interpolation — Use variables in text with syntax
- Conditions — Use variables in conditions to control training flow

