AltScore
Builder Rules

Variables

Variables store and manage data throughout your conversational flow. They allow you to capture user inputs, store intermediate values, and pass data between nodes.

Variable Types

The builder supports seven variable types, each designed for specific data needs:

String

Text values of any length. Use for names, addresses, free-form responses, and any textual data.

Examples: User name, email content, custom messages

Number

Numeric values including integers and decimals. Use for amounts, quantities, scores, and calculations.

Examples: Loan amount, age, credit score

Date

Date and time values. Use for scheduling, deadlines, and temporal data.

Examples: Birth date, appointment date, deadline

Boolean

True/false values. Use for flags, toggles, and binary states.

Examples: Is verified, has accepted terms, is eligible

Object

Complex structured data with key-value pairs. Use for storing related data together.

Examples: User profile data, API response objects

Array

Ordered lists of values. Use for collections, multiple selections, and lists.

Examples: Selected options, list of documents, phone numbers

Attachment

File references and attachments. Use for documents, images, and uploaded files.

Examples: ID document, profile photo, signed contract

Variable Scope

All variables have global scope within the flow. This means:

  • Variables created in any node are accessible from all other nodes
  • Variable values persist throughout the flow execution
  • Variables are reset when a new flow session starts

Naming Rules

Variable names must follow specific rules:

Format Requirements

  • Must start with a letter (a-z, A-Z) or underscore (_)
  • Can contain letters, numbers (0-9), and underscores
  • Cannot contain spaces or special characters
  • Case-sensitive (userName and username are different variables)

Valid Names

user_name       ✓
firstName       ✓
_tempValue      ✓
loan_amount_1   ✓

Invalid Names

1stName         ❌  (starts with number)
user-name       ❌  (contains hyphen)
user name       ❌  (contains space)
user@email      ❌  (contains special character)

Reserved Names

Certain variable names are reserved by the system and cannot be used:

System Reserved Names

NamePurpose
phoneUser's phone number (auto-populated)
nameUser's name (auto-populated)
nowCurrent timestamp
todayCurrent date
liveness_idLiveness verification identifier

Conversation Reserved Names

NamePurpose
borrower_idIdentifier for the borrower entity
metadataConversation metadata object

Attempting to create variables with these names will result in an error.

Variable Usage Analysis

The builder provides tools to analyze how variables are used in your flow:

Usage Indicators

  • Set in: Nodes where the variable value is assigned
  • Used in: Nodes where the variable value is read

Warning Indicators

IndicatorMeaningRecommendation
UnusedVariable is not used in any nodeConsider removing it
Not SetVariable is used but never assigned a valueAdd a node to set its value

Best Practices

Naming Conventions

  • Use descriptive names: user_full_name instead of x or temp
  • Use consistent casing: choose either snake_case or camelCase and stick with it
  • Prefix related variables: user_name, user_email, user_phone

Organization

  • Document the purpose of complex variables
  • Remove unused variables to keep the flow clean
  • Group related data in objects when appropriate

Type Selection

  • Choose the most specific type for your data
  • Use number for values that need calculations
  • Use date for temporal data (not string)
  • Use object for structured data from API responses