Create a bot that shares weather info from API call.
Introduction
Right weather information can save the day. A call sharing such important details is of great help. Let’s see how to simply automate it with bots using DialSense.
Create a new bot
Click on the drop-down beside Agents from the left panel. Select Bots.
A list of previously created bots appears. Click on the Add button.
The section to add a new bot appears. Select the Campaign to which the new bot should be assigned.
Enter the other required information. Set the Conversation Starter to hello_intent and click on the Save button.
Add post function
- A new bot is created. Click on Functions tab above and then go to the Post tab. Define the API call function and click on Save.
Customize the new bot
Now click on Flow to manage how the bot interacts and responds.
The first intent hello_intent is already created for you. Double click it to edit.
You can either change the Inputs/Outputs or simply let them remain unchanged.
Click on the Save button whenever you’re done editing an intent.
Now click the green + button to add more intents. You can drag the intents to a different place using the sign beside the intent.
Change the Intent Name, add some fresh Inputs and Outputs.
Click on the Save button.
Similarly add more intents like one for replying with the weather information. Add relevant outputs, select the Post Intent Function and click on the Save button.
The last intent should be named exit_intent and it is alright for an intent to have empty inputs.
Now that all intents are created and visibly placed, click on the yellow bar below the intent and drag to connect to the green bar above the next intent to form a graph. Click on the blue save button on the left to save the entire graph.
Deploy the new bot
- Click on the Publish tab above and finally click on the blue Publish button to deploy the bot.
Test the new bot
- Click on the Test button on the top right corner of the publish page. Enter your message and let the conversation flow.
Conclusion
We see how simply we can create our very first bot. More complex graphs can be formed for advanced bots. If the flow doesn’t go as intended, we can test it and adjust the graph accordingly.