Create the #weather intent and modify the dialog flow
In this section, create a weather intent and dialog node to detect and handle weather-related utterances.
- Use the Watson Conversation tooling to create and train a new #weather intent.
- Add a dialog node with the condition
#weather
. Add this node before the dialog node, whose condition is@National Parks
. - Update the dialog node’s response object. Use the Advanced editor to add
cardType: weather
to the response’s output object.
By addingcardType: weather
, you signal the UI to use theWeatherCard
component in WeatherCard.js to render the weather response.
Important
: If you forget to include this property, the UI will fail to render the result. - Add some arbitrary response text to the dialog node; for example,
Weather
.
Adding this response text is not necessary. The UI won’t actually use this text. However, this text is useful, particularly if you plan to test this intent by using the Watson Conversation tooling.