Manage Variables

Manage Variables

Overview

Variables in Journey Builder store and manage data dynamically within conversational journeys, enabling personalization, data manipulation, and efficient bot interactions.

Variables are categorized into five types:

  • Local
  • Global
  • System
  • Constant
  • CDP

Variable Types

1. Local Variables

  • Purpose: Store session-based information. Eg. : API Responses, User inputs etc.
  • Lifecycle: Persist until the conversation ID resets at the backend (typically after 72 hours from the last user message).
  • Data Types: String, Number, JSON

2. Global Variables

  • Purpose: Store persistent data associated with the user’s channel ID.
  • Lifecycle: Persistent and does not clear automatically.
  • Data Types: String, Number, JSON

3. System Variables

  • Purpose: Provide read-only system-generated information.
Variable NameDescriptionData Type
event_typeType of incoming event (user_input, ctx, ai_intent, etc.)String
user_inputKeyword or button click payload sent by user (e.g., "Hi", Button "Yes")String
channelChannel from which the event/message was received (e.g., WhatsApp)String
user_channel_idChannel ID from which the event/message was received (e.g., WhatsApp)String
payloadStringComplex JSON object containing metadata of the eventString
timeStampEpochTimestamp in epoch formatString
user_nameName of the userString
conversation_context_typeContext type of the conversationString
conversation_context_idContext ID of the conversationString
ai_inference_payloadJSON payload from AI BackendJSON
ai_intentIdentified intent from user messageString
payloadJsonJSON payload from the backendJSON
event_idUnique ID for the eventString
message_metadataAdditional message metadataJSON
conversation_languageLanguage used in the conversationString

4. Constant Variables

  • Purpose: Store values consistent across all users, typically used for static information like interest rates, discounts, or event dates.
  • Lifecycle: Values are editable from the variable management interface and persist across all conversations until manually updated.

5. CDP Variables

  • Purpose: Fetch dynamic customer-specific attributes from the Personalize Module(also know as CDP) for real-time personalization.
  • Lifecycle: Read-only and dynamically fetched from CDP, reflecting real-time updates.

How to Use

  1. Open Manage Variables in the Journey Builder.
  2. Select the appropriate variable type.
  3. Create or select existing variables.
  4. Map variables directly into nodes for data handling or personalization.