What are Flows?
A Flow is a conversation package that has been defined by you to structure the interaction between the project (chatbot) and the end-user. With Intents alone, you can create a number of interactions. But with Flow, you can build on that interaction by flipping the conversation from 'end-user asks, assistant responds', to 'assistant asks, end-user responds' in order to collect information, and head down different paths depending on the information collected. Flows are often used to result in an action being performed for an end-user, such as supplying data to and receiving data from an outside service/API.
Flows are made by building a sequence of Modules.
When do I use Flows?
Flows allow you to create scripted or controlled conversations. If you need to collect information from the end user in order to process a request, or you need the user to make a number of choices to reach a conclusion, then Flow is the ideal tool.
How is a Flow initiated?
You can create as many Flows as you like, but they are only initiated when they are connected to an Intent. When you create an Intent you select what type of response you want to create and, by selecting Flow Type you can then choose which of your Flows you wish to trigger.
What are Modules?
A Module is a part of a Flow that performs an action and is represented as a box in the Flow Editor. A sequence of Modules can, for instance, ask the end-user a series of questions and gather the data given in order to fulfil their intent.
Different types of Modules allow you to perform different actions -
Response modules allow you to send a response to the end-user. You can use a combination of free text, entities, and variables if needed.
Set Variables modules can set the content of one or more unassigned variables.
Integration modules allow you to initiate an Integration that references an outside service, such as an API call.
Jump To modules let you jump the conversation to another Module or Condition within the same Flow, or to the start of another external Flow.
Component modules will jump the conversation to a Component. You can create new Components from this module type, or from the Flow page.
What are Conditions?
Using only the Modules described above, you can build simple, linear conversations. If you need to build a Flow that could head off down different paths then you need to use Conditions.
Conditions allow you to add logic using comparators (e.g. Equals To, Exists, Not Contains etc.) so that you can branch the Flow depending on end-users' answers, data passed back from external APIs or from within your own service.
What are Related Intents?
The purpose of a Flow is to flip the usual 'End-user asks, chatbot answers' conversation format to a more structured 'Chatbot asks, end-user answers' format. What happens when you need more flexibility though? Perhaps the end-user cannot answer your question and needs to ask a clarifying question in response, for instance.
Related Intents allow you to add intents to a Flow, or even to a specific Gather module in a Flow, to allow an end-user to ask clarifying questions. This is useful to offer information that will help them continue the conversation.
What are Components?
Components are partial conversations (made up of a number of Modules) that you may want to re-use for different purposes. Think of them as unfinished, mini-Flows. For example, if you wanted to capture some information about a user and email a member of the support team afterwards, you could build an 'Email Support' Component and re-use that, calling it from multiple Flows. At the end of a number of different problem diagnosis Flows the end-user is asked if their problem is resolved. If not, they are sent to the Flow Component to email customer support.
You can jump a Flow's conversation to a Component using a Component module. When the conversation reaches the end of a Component it will return to the original point of origin in the Flow where it was called from.