A Conversation is base unit that holds individual parts of the complete chat flow. Multiple conversations interconnect to form an automated flow of chat. As the chat flow of a bot develops over time, it can easily become complicated with multiple logical units and functionalities. Conversations are an effective way to modularize a complex chat flow into simpler units that can be connected to each other and re-used, if required. This architecture is similar to functions in a programming language that together form the complete logic.
Conversations can be created in Chat Flow > Conversations
Under ‘Chat Flow’, you get an option to choose the campaign where you want to create your conversations. A campaign is synonymous to the purpose the bot is serving. Lets take an example of a brand which is a Bank. The bank would have different set of questions for its Home Loans, Credit cards or opening an account. Hence each of these would have to be independent and segregated in the form of campaigns, so that there is no confusion. Campaigns serve as folders to keep conversations segregated from each other.
In the Conversations section, you will see a list of all the Conversations available in this account. You can edit an existing Conversation or create a new one. The Conversation design screen has the following key concepts.
Starting Rule: Defining how the conversation is triggered
Conversation Blocks: Functionality blocks to help design the conversation flow
Branching: To create conditional branches in a conversation flow.
Jump to a conversation: To trigger another conversation.
Once you have chosen a Campaign, you can go on to the Conversations tab to create your conversations. While creating a new conversation the first step is to decide the starting rule, that is, how a conversation will be triggered. There are two ways in which a particular conversation can be triggered:
A conversation can be triggered Manually through jump from other conversation
Or Automatically through some keywords or phrases
Triggering actions through some keywords can be a important way to provide relevant answers to users queries.You can set up the triggering actions at the top of each conversation module. You can also assign multiple keywords to the rules, simply press ENTER or comma after typing each keyword to add a new one.
There are 4 rules you can set up to activate a conversation automatically using keywords:
User message Is rule is a exact match- Conversation will only be triggered if the user's message matches exactly with the keywords/phrases added in the criteria. If there are any additional words, letters, or symbols, conversation will not be activated. The matching criteria is not case sensitive, hence the bot would recognise 'Subscribe', 'SUBSCRIBE' and 'subscribe' the same way.
User message Contains rule is a flexible match - This rule enables the bot to recognise the keyword in sentences or phrases. For example, if the Keyword is "Subscribe" and a user types "How can I subscribe to daily updates" - the automated message will still be triggered. If the user types two keywords in one message, the bot will fire the conversation only once.
User message Has Intent rule matches the intent of the user - This rule utilises Googles NLP to match the intent of the user's message with the triggering keywords. For example, if the Keyword is "Subscribe" and a user types "How can I get regular updates" - the automated message will still be triggered.
User message Matches Regex rule helps you map complex regex criteria - You can write complex regex rules to make matching more efficient. For example,(?!un)subscribe expression will match only if the user types 'subscribe'. The conversation will not trigger if the user types 'unsubscribe'
Various types of blocks are available to help you design a dynamic conversation. Each conversation block has different capabilities that make it easy to build an effective bot. A series of blocks together build the conversation. Blocks are executed back to back, from top to bottom whenever a conversation is triggered for a user.
Send messages in the form of text, image, video or a combination of both image and text as gallery.
Create your own code for building capabilities that are not already available
Branching in conversations helps you to send the users down different paths based on certain condition.
To add a branch conversation you can simply hover over the top of each conversation module or at the left bottom corner of each block and click on Branch Conversation button.
You can add multiple branches and provide a certain name to each branch. For each branch you need to add certain condition criteria. Once a condition is met, the corresponding path is triggered.
It is also possible to use system defined properties like Gender, Referral and others or even use customer property information as a condition.
Note : Each branch block has a default branch, which gets triggered in case none of the predefined criteria are met. Its always a good practise to define your default replies. In case you leave the default branch empty, then, in case of no matching criteria , the conversation blocks created after the branch block may get triggered, which may not always be the desired flow.
Jump to other conversations
Morph.ai platform provides you three ways to jump from one conversation to another.
Buttons and Quick responses - You can add Conversation type buttons and QRs in message blocks (Covered in Chapter 2.3 How to use buttons and Quick Responses), providing the user option to decide the flow. The user can simply click on any of the buttons and QRs and jump to other conversations.
Not applicable for WhatsApp
Triggering a conversation through Keywords - As already discussed above.
Jump Conversation Block - At the end of each conversation module or each branch in branching block, there is a Jump Conversation block that can be used to jump to other conversation.
Click on the 'Jump conversation' block choose the Campaign and the name of the conversation.