One of the examples already provided in the API.AI documentation is an example bot for a florist shop. I really like this example as a teaching tool because it covers so many different features that you will use as you are building out your chatbots. But the biggest reason why I like this example is that someone made the effort to post the agent’s ZIP file online so you can download it, create your own agent with it and play around to get a better picture of the different concepts.
In the excellent book Bot Business 101, Ekim Kaya mentions the following:
“My biggest recommendation is to have a very, very detailed conversational flow as to how the scenario will be executed….Intent management is not easy and if it does not work on paper, it will not work on the computer either.”
Ekim has been in the bot business for a long time, and you can see from the book’s reviews that he knows what he is talking about.
So designing the bot’s conversation flow in a flowchart is a good idea.
Florist shop flowchart
The florist shop example from API.AI has a detailed conversational flowchart:
Florist shop conversation flowchart using XMind
I have re-created a flowchart for the florist chatbot using XMind. There are some advantages of using XMind for creating the conversation flowcharts for your chatbot. For example by adding input and output contexts into the flowchart itself (but distinguishing them via a different shape), you can add a ton of detail to the conversation flowchart without making it too difficult to follow. I will write about conversation flowcharts in detail in a future article.
If you would like to get a copy of the mindmap file (.xmind format) – you can get it from the MBD Bonus Pack. It is under the folder [MM-Florist]. I have left out a couple of branches for clarity.
Florist shop Agent ZIP file
Once you are done importing the agent ZIP file, you can follow along with the rest of the guide. The next part talks about identifying the entities and intents from the flowchart.