So far, we've created a variable to store the chatbot user's name, a passage that prompts the chatbot user for their name, and stored their response as the variable's value. Now let's use that variable in our chatbot content to address our chatbot user by name.
Variables can be used almost anywhere in your chatbot content by adding variable placeholder chips. To add a variable, type the @ key and choose the variable you want to use. Before the chatbot starts this passage, it replaces the placeholder chip with the value of the variable.
Let's address our user by name:
- Click Create in the left navigation, then click Conversations.
- Click the welcome conversation, then click the new passage created by the Send Info respose.
- Rename the passage to Greet user by name.
- In the text message, type a greeting to the chatbot user.
To use the Username variable to display their name, type @ and choose the Username variable. - Click Save.

We're all done! Now our chatbot will ask the chatbot user their name, save their reply to our Username variable, and use that value in the next passage to address them by name. The value will be available in any passage for the rest of the conversation with that chatbot user.
When writing content with variables, remember that the variable value will be the default value (or blank, if you haven't set a default) until a value is saved by an action during the conversation. If the chatbot user reaches this second passage without the Username variable being set, the chatbot will use the default value we set of 'friend'.
It's good practice to check whether a chatbot user can reach your passage without the variable being set, or if they might reach a passage after a variable value has expired. If they can, then either add a default value to your variable, or write your chatbot content so that it it will still seem natural if the value is blank.