Step 3: Store the username value

Now that we've asked the user for their name, let's assign their response as the value of variable.

Values are assigned to variables using actions. Actions can be attached to almost any interaction your user has with your chatbot, including pressing buttons or Quick Replies, sending information, or entering passages, conversations, or entry points.

We'll add an action to the Send Info expected response so the chatbot assigns the user's response to our Username variable.

In the Request user name passage you created:

  1. Scroll down below the passage selector for the Send Info response.
  2. Click Actions.
  3. Click + Action.
  4. Select Save value to variable.
  5. Leave with what users send selected.
  6. In the dropdown, select the Username variable.
  7. Click Save to close the Actions configuration.
  8. Click Save to save the passage.

When the user sends their name in response to the passage, the chatbot stores what they send in the Username variable before it moves on to the next passage.

The Send Info response created a new passage to send the conversation to. Let's configure that passage to use the variable to address our user by name.

Was this article helpful?
0 out of 0 found this helpful



Article is closed for comments.