Now that we've created our variable, we need to create the passage where we assign a value to it.
It's important to consider the flow of conversation when planning out when you will assign and use your variables: make sure you're setting variables early in the conversation flow if you want to use their values.
In this guide, we're using our variable to store our user's name during the chatbot's welcome conversation. First, let's create the passage where we ask them their name:
- Open the Create section of the left-hand navigation.
- Click Conversations.
- Click the Welcome conversation.
- Click the Passage icon to create a new passage in the conversation.
- Rename the passage to Request user name.
- Add some text messages to greet the user and ask their name.
- In the Expected Response section, click Send Info.
Leave the default configuration of creating a new passage. We'll use that new passage in a moment. - Click Save.
We have our variable, and the passage where we're asking the user their name. In the next step, we'll assign their response to our Username variable.
Comments
Article is closed for comments.