Create new dialogs with Bot Framework Composer
![](/assets/images/azure_bot_dialog/azure_bot_dialog_banner.png)
Here you can find how to create your own custom dialogs using Bot Framework Composer.
Dialogs provide a way to manage a long-running conversation with the user. A dialog performs a task that can represent part of or a complete conversational thread. It can span just one turn or many, and can span a short or long period of time.
Create
Open up Bot Framework Composer and create an Empty Bot.
![](/assets/images/azure_bot_dialog/create_bot.png)
Give a name to your bot and click Next.
![](/assets/images/azure_bot_dialog/name_bot.png)
In the Greeting trigger click on the little “+” sign bellow the last response. Then, choose the Begin a new dialog option from Dialog management.
![](/assets/images/azure_bot_dialog/begin_new_dialog.png)
Press the arrow in the Dialog name field and click Create new dialog.
![](/assets/images/azure_bot_dialog/create_new_dialog.png)
Give a name to your dialog and click OK.
![](/assets/images/azure_bot_dialog/create_dialog.png)
In your new dialog, navigate to the new trigger. Press the “+” sign and select Text from the Ask a question list.
![](/assets/images/azure_bot_dialog/ask_question.png)
Here you can enter the contents of your new question.
![](/assets/images/azure_bot_dialog/ask_name.png)
In the Property field of the new User Input, put the name of the variable that stores the user’s answer. For example “user.name”.
![](/assets/images/azure_bot_dialog/save_user_name.png)
Continue with asking a Number question.
![](/assets/images/azure_bot_dialog/ask_number.png)
Enter a question that can be answered with a number.
![](/assets/images/azure_bot_dialog/ask_age.png)
In the Property field of User input, you have to give a name to the variable again. For example “user.age”
![](/assets/images/azure_bot_dialog/save_user_age.png)
Now add a Multi-choice question.
![](/assets/images/azure_bot_dialog/ask_multi_choice.png)
Enter the text for your question.
![](/assets/images/azure_bot_dialog/ask_gender.png)
And again, enter the variable name in the Property field of User input, like “user.gender”.
![](/assets/images/azure_bot_dialog/save_user_gender.png)
If you scroll down, you will find an Array of choices. Here you can add all the choices that will be available to the user as answers.
![](/assets/images/azure_bot_dialog/add_choices.png)
Now, let’s send a message to the user with all the info we gathered. Click the “+” and select Send a response.
![](/assets/images/azure_bot_dialog/send_response.png)
You can find all of your variables under the {x} list.
![](/assets/images/azure_bot_dialog/variables.png)
Use the variables above to compose your message.
![](/assets/images/azure_bot_dialog/compete_response.png)
Adaptive Card
Another way of presenting information to the user, is with Adaptive Cards. They look more appealing to the user and provide a better user experience. If you want to learn more about Adaptive Cards, check out this post.
After you select a new response, click on the big “+” sign at Bot responses. From there select Attachments.
![](/assets/images/azure_bot_dialog/send_attachment.png)
Select Add new attachment -> Create form template -> Adaptive card.
![](/assets/images/azure_bot_dialog/create_adaptive_card.png)
Click the icon at your right to enlarge the code box.
![](/assets/images/azure_bot_dialog/show_code.png)
Relpace your card’s body with the JSON bellow.
"body": [ { "type": "TextBlock", "text": "Name", "weight": "bolder", "isSubtle": false }, { "type": "TextBlock", "text": "${user.name}", "isSubtle": false }, { "type": "TextBlock", "text": "Age", "weight": "bolder", "isSubtle": false }, { "type": "TextBlock", "text": "${user.age}", "isSubtle": false }, { "type": "TextBlock", "text": "Gender", "weight": "bolder", "isSubtle": false }, { "type": "TextBlock", "text": "${user.gender}", "isSubtle": false } ]
Test
Now it is time to test our bot.
![](/assets/images/azure_bot_dialog/test.png)
As you can see, our bot can hold the dialog pretty well and the card looks quite nice!