System Variables
System variables are predefined, read-only variables that are automatically managed by the indigo.ai platform. Unlike custom variables, they cannot be edited using blocks like Set Value or Capture. Instead, they provide real-time context about the user, session, platform environment, and conversation history, allowing you to create more intelligent and personalized experiences.
System variables help your AI Agents:
Identify users, channels, and environments
React based on the time and date
Track conversation flow and user behavior
Dynamically adapt logic based on platform state
Access content retrieved via document search (RAG) or current workflow status
Use them to build smarter flows, trigger conditional logic, and create more relevant, responsive interactions.
Categories and Variables
π Platform & Session Context
$install_url
β The URL where the widget is installed (useful for multi-site setups).$project_id
β Your workspace's unique identifier.$env
β ReturnsTEST
orPRODUCTION
, depending on where the assistant is running.$lang
β Language code set for the workspace (e.g.,en
,it
).$detected_language
β Language detected from the user's latest message.
π€ User Identification
$user_id
β Session-based ID for the current user.$user_ref
β Persistent user identifier that remains consistent across sessions (ideal for CRM matching).
π Time & Date
$timestamp
β Current time in seconds (Unix timestamp).$date
β Full timestamp in your workspaceβs timezone (YYYY-MM-DD hh:mm:ss
).$date_year
,$date_month
,$date_weekday
,$date_hour
β Individual date components useful for business logic (e.g., trigger actions only during working hours).
π§ Conversation & Context
$last_user_message
β Content of the user's most recent message or button click.$intent
β Last recognized intent label.$message_id
β ID of the most recent inbound message (for tracking or referencing externally).$conversation
β Full list of the last 100 messages in the current chat (in JSON format).jsonCopiaModifica[ {"sender": "bot", "text": "..."}, {"sender": "user", "text": "..."} ]
$context_1
to$context_5
β Store the last 1 to 5 pairs of user and assistant messages in plain text. Ideal for use in prompts or as input for LLMs.
π Content & Workflow State
$documents
β A list of documents retrieved from your knowledge base. Use this to:Display matched sources
Trigger logic based on content relevance
Chain actions across workflows using retrieved data
$current_workflow
β Label of the currently executing workflow.$previous_workflow
β Label of the workflow executed immediately prior to the current one.
β
Utility
$true
β A constant that always returnstrue
. Handy for testing or creating unconditional branches in Condition Blocks.
Last updated
Was this helpful?