Set variable
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
The Set Variable action block lets you assign a specific value to a variable during a conversation flow. As the name suggests, you can define or update a variable with a new value at any point in the chat.
Variables are powerful because they allow you to store information, pass it between steps, and personalize the conversation. The Set Variable block makes it easy to:
Control logic in the flow – Define flags or states (e.g., mark if a user is a “qualified lead”).
Pass data to integrations – Pre-set values that need to be sent to your CRM, helpdesk, or other systems.
Simplify expressions – Store a reusable value instead of repeating it in multiple places.
Personalize experiences – Assign values like “plan = Premium” or “status = Returning Visitor” to tailor responses.
You can use the Set Variable block in a variety of situations, such as:
Lead qualification
Example: If a user selects “Company Size = 500+,” you can set a variable lead_segment = Enterprise.
This makes it easier to filter and route leads later.
Conversation routing
Example: Set support_priority = High if the user reports an urgent issue.
You can then use this variable in assignment or branching rules.
Default values
Example: When no data is captured from the user, you can set a variable like region = Unknown.
Experimentation & tracking
Example: For A/B testing different flows, set test_group = A or test_group = B.
Drag and drop the Set Variable action block into your flow.
Choose the variable you want to set (or create a new one).
Enter the value you want the variable to hold.
Connect it to the next step in the conversation.