Chapter 13: Variables
Variables enable dynamic, personalized content in your video templates. Use variables to create templates that can be customized for different audiences, products, or contexts.
What Are Variables?
Variables are placeholders in your content that get replaced with actual values when the video is rendered:
Hello {firstName}!
Your order #{orderNumber} is ready for pickup.
Becomes:
Hello Sarah!
Your order #12345 is ready for pickup.
Variable Syntax
Variables use curly brace syntax:
{variableName}
Naming Rules
- Start with a letter or underscore
- Contain only letters, numbers, underscores, and hyphens
- Case-sensitive (
{Name}≠{name}) - No spaces inside braces
Hyphens are supported mainly for templates imported from the classic editor,
which names variables like {first-name}. For new templates, camelCase
({firstName}) reads better and matches the rest of the documentation.
Valid Examples
{firstName}
{product_name}
{Order123}
{_private}
{first-name} // Classic-editor style
Invalid Examples
{first name} // No spaces
{123start} // Can't start with number
{-leading} // Can't start with a hyphen
Where Variables Work
Variables can be used in:
| Location | Example |
|---|---|
| Text elements | Hello {name}! |
| Voiceover transcript | Welcome, {company}... |
| Pattern sound URLs | audio/{language}/intro.mp3 |
| TTS text | Your code is {code} |
Using Variables in Text
Adding a Variable
- Double-click a text element to edit
- Type the variable with braces:
{variableName} - Click outside to confirm
- The variable appears with braces in the editor
In Preview
During preview, variables show their set values:
- If value is set: Shows the value
- If no value: Shows the variable name
The Variables Panel
Access the Variables panel to manage all variables:
- Click Variables in the top toolbar
- The panel shows all detected variables
- Set default values for each variable
- See where each variable is used
Variable List
The panel displays:
- Variable name
- Current default value
- Usage count and locations
- Edit/delete controls
Setting Default Values
- Find the variable in the list
- Click the value field
- Enter a default value
- Press Enter or click outside
Default values are used in preview and when no override is provided.
Variable Usages
FX Express tracks where each variable is used:
Text Usages
Shows which scenes and elements contain the variable:
- Scene number
- Element type
- Click to navigate to usage
Voiceover Usages
Shows timestamp in the voiceover:
- Time position (e.g., “1:23”)
- Click to jump to that point
Creating Variables
Variables are auto-detected when you type them:
- Type
{newVariable}in any text element - The variable automatically appears in the Variables panel
- Set its default value
You can also pre-create variables:
- Open Variables panel
- Click “Add Variable”
- Enter name and default value
Common Variable Patterns
Personalization
Hi {firstName}!
Welcome back, {username}.
Dear {customerName},
Product Information
{productName}
${price}
{description}
SKU: {sku}
Dynamic Data
Date: {currentDate}
Time: {appointmentTime}
Location: {venue}
Conditional Content
Combined with Optional scenes:
Scene shows only if {hasCoupon} is "true"
Coupon code: {couponCode}
Variable Best Practices
Naming Conventions
- Use descriptive names:
{customerFirstName}not{n} - Be consistent:
{productName}everywhere, not mixed with{product_name} - Use camelCase or snake_case consistently
Default Values
- Set realistic defaults for preview
- Use typical-length text to test layout
- Consider longest expected values
Documentation
- Keep a list of variables and their purposes
- Note expected formats (dates, currency)
- Document any required vs optional variables
Testing
- Preview with different value lengths
- Test empty values (if possible)
- Verify all variables have values before export
Variable Workflow
Template Creation
- Design with placeholder text
- Replace placeholders with variables
- Set default values for preview
- Test with various value lengths
Template Usage
- Load the template
- Provide variable values via API or interface
- Render with actual data
- Each render can have different values
Variables and Scene Modes
Variables work with conditional scenes:
Optional Scenes
Show scene only when condition is met:
Variable: {showPromo}
Condition: equals "true"
Scene appears only when {showPromo} = "true"
Choice Scenes
Select variant based on variable value:
Variable: {language}
Variants: en, es, fr
Scene shows matching language variant
Troubleshooting
Variable Not Replacing
- Check spelling exactly matches
- Verify braces are correct
{and} - Ensure variable has a value set
- Check for extra spaces inside braces
Variable Not Detected
- Must use exact syntax:
{name} - No spaces:
{ name }won’t work - Check for invisible characters
- Re-type the variable
Wrong Value Showing
- Check default value in Variables panel
- Verify no duplicate variable names
- Check if override value is provided
Variable Shows in Output
- Variable name appears = no value set
- Set a default value
- Or ensure value is provided at render time
API Integration
When rendering videos programmatically, provide variable values:
{
"variables": {
"firstName": "Sarah",
"orderNumber": "12345",
"productName": "Widget Pro"
}
}
Each render can have different values, enabling:
- Personalized videos at scale
- Dynamic content based on data
- Localized versions from one template
← Previous: Animations and Keyframes | Next: Smart Objects →