Convert a Composer bot
Extend Teneo web Chat functionality
The Composer bot presents the weather information with a card and an icon, which is achieved using an attachment. In Teneo, we can achieve the same thing using the card functionality of Teneo Web Chat. Let's add that functionality now.
- Open the Get weather flow in edit mode.
- Navigate to the output node where the bot summarizes the weather information.
- Locate the Output Parameters section in the configuration panel and click on 'Add'.
- Give the output parameter the name
teneowebclient
. - Paste in the following value:
json
1{
2 "type": "card",
3 "image": {
4 "image_url": "http://openweathermap.org/img/wn/${icon}@2x.png",
5 "alt": "Weather icon"
6 },
7 "title": "Weather in ${city} in ${country}",
8 "text": "It is ${weather} in ${postalCode} and the temperature is ${fahrenheit}°F or ${celsius}°C. Have a nice day."
9}
10
- Hit 'Save'.
- Republish your bot and try talking to it in Teneo Web Chat again to see the updated bot response.
Was this page helpful?