Assign Variable
The Assign Variable action allows chatbot builders to store, update, and manage variable values during a chatbot workflow.
This utility action helps store customer responses, selections, feedback, names, phone numbers, or other dynamic values that can later be reused throughout the chatbot flow.
The walkthrough demonstrates configuring Send Buttons, selecting response storage variables, assigning a value to a variable, and publishing the workflow to production.
When to Use Assign Variable
Use the Assign Variable action when your chatbot needs to store or modify values during a conversation.
Common Use Cases
Saving customer feedback
Storing user selections
Tracking customer responses
Saving order information
Managing chatbot workflow conditions
Reusing values later in the flow
Example Interaction
Bot: How was your experience with our service? User: Positive
The chatbot stores the response in a variable for future use.
How to Add Assign Variable
Follow these steps to add the Assign Variable action to your bot workflow.
Open Bot Builder
Click the menu icon on the selected node
Configure the Send Buttons response storage
Click Update
Open the Utilities tab
Select Assign Variable
Configure the variable settings
Click Create
Click Publish to deploy the workflow
The walkthrough demonstrates configuring the Assign Variable node after a feedback collection button flow.
Configuring Response Storage in Send Buttons
Before assigning a variable, the chatbot response must first be stored.
To configure response storage:
Open the Send Buttons configuration.
Scroll to the response variable field.
Select a storage option for the response.
Click Update to save the configuration.
The walkthrough demonstrates selecting a response storage field before proceeding to variable assignment.
Accessing the Utilities Section
To access the Assign Variable action:
Drag the output connector from the previous action.
Open the action selection panel.
Click the Utilities tab.
The Utilities section contains helper functions and workflow automation actions.
Selecting Assign Variable
Inside the Utilities tab:
Locate the Assign Variable action.
Click the action to open the configuration panel.
The walkthrough highlights the Assign Variable action within the Utilities section.
Assign Variable Configuration
When configuring the Assign Variable action, several fields must be completed.
Action Name
The Action Name identifies the utility action inside the bot workflow.
This name is visible only within the bot builder.
Example
Stored Feedback Assign Customer Selection Save User Response
The walkthrough demonstrates renaming the default value to:
Stored feedback
before saving the action.
Variable Name
The Variable Name field allows you to select the customer field where the value will be stored.
To configure:
Click the Variable Name dropdown.
Select the required customer field.
The walkthrough specifically selects:
feedback_shared
from the dropdown menu.
Dynamic Value Toggle
The Is Dynamic Value toggle determines whether the assigned value should be:
Static or Dynamically generated from variables
When disabled, the chatbot uses a fixed value entered manually.
Value Field
The Value field defines the value that will be assigned to the selected variable.
Example:
Positive
The walkthrough demonstrates entering a value manually for the feedback_shared variable.
This value can represent:
Customer feedback
User selections
Order status
Workflow responses
Add Variable Option
The Add Variable option allows additional variables to be inserted dynamically into the value field.
This helps create reusable and personalized chatbot workflows.
Creating the Action
After configuring the variable settings:
Review the selected variable and value.
Click the Create button.
The Assign Variable node will now be added to the chatbot workflow.
Workflow Behavior
Once triggered, the Assign Variable action:
Stores user responses
Updates existing values
Saves customer selections
Makes values reusable later in the workflow
Supports chatbot personalization and automation
The walkthrough specifically notes:
The Assign Variable action is used to store or update values (like customer name, phone number, selection, etc.) so you can use them later in the chatbot flow.
Publishing the Bot Changes
After configuring the action:
Review the workflow setup.
Click the Publish button.
Deploy the updated chatbot workflow to production.
The final page of the walkthrough demonstrates publishing the bot actions successfully.
Example Workflow
Example Chatbot Workflow
Send Feedback Request ↓ Store User Response ↓ Assign Variable → feedback_shared ↓ Continue Workflow
Example Interaction
Bot: Would you recommend our service? User: Yes System Action: feedback_shared = Positive
The chatbot stores the assigned value and continues the workflow.
Best Practices
Follow these recommendations when using Assign Variable.
Use meaningful variable names
Use descriptive variable names for easier workflow management.
Store responses immediately
Save important customer responses as soon as they are collected.
Use dynamic values when needed
Enable dynamic values when variables depend on customer responses.
Keep workflows organized
Use clear action names to identify workflow logic easily.
Publish changes after updates
Always publish the workflow after modifying variable assignments.
Summary
The Assign Variable action allows chatbot builders to dynamically store and manage values during chatbot conversations.
With Assign Variable, you can:
Store customer responses
Save chatbot selections
Update workflow variables
Reuse values later in conversations
Build personalized and dynamic chatbot workflows
This utility action helps businesses create smarter chatbot automation and better workflow management inside Ownchat
Last updated