Convert a Composer bot
Greeting message
We need to start the conversational flow of the bot by giving the user some direction for how to prompt the weather flow. We can do this in one of two ways:
- Adjusting the Greeting message
- Creating a Prompt flow
Option 1 - Adjust Greeting message
The Greeting message flow is the first flow to trigger when a user begins a dialog with your bot. This is the place where a bot should introduce itself and lay down the scope of the conversation. The Dialogue Resources include a pre-built greeting located in the top-level folder Greeting Message.
The flow contains standard greeting responses and picks which response to send based on the time of day. You can easily adjust these responses to match your use case or remove or add responses. For now, let's simply edit the existing responses:
- In the Explore panel, locate the Greeting Message folder.
- Select the 'Greeting Message' flow and click on 'Edit'. This will open the flow in edit mode.
- One by one, click on the output nodes (in purple) and replace the last sentence of each output with the sentence
Type "weather" to get started.
. - Hit 'Save' and close the flow.
Option 2 - Create a Prompt flow
Another option is to create a Prompt flow to start the weather conversation. Prompt triggers are tested after the normal flow execution but right before the response is given. If a prompt trigger matches, the flow containing this trigger will be executed and the resulting output will be added to the response.
- Create a new Prompt Flow by selecting the dropdown menu under Flow located in the 'New' section.
- Give the flow the name
Prompt for weather
. - Name the prompt trigger
Weather prompt
. - Add
true
to the expression field. - Make sure the prompt trigger is set to repeatable - 'Once per session' (it will be chosen by default and can be changed in 'Advanced Options').'
- Select the output node and add the following answer text:
Type weather to get started.
Give the output node the nameType weather
. - Hit 'Save' and close the flow.