Build your first Flow
In this short guide you will create your first short conversational Flow.
1 Create a Lexicon

Our flow needs to understand variable user input. Therefore, let's create a Lexicon first.
Lexicons
By adding Tags and Synonyms to Keyphrases in a Lexicon and attaching the Lexicon to a Flow, different user inputs can be grouped and semantically linked.
- Click the
+
button in the Project Dashboard and click the Lexicon button. Enter a name, e.g.Food Lexicon
and hit enter.
Next, we'll add new Keyphrases to the Lexicon for our food options:
- Enter a new Keyphrase
pizza
in the text field in the toolbar and press enter.

Now we can expand our pizza
Keyphrase with Tags and Synonyms to make it more understandable for our Flow.
- Let's add
cake
as a Synonym. - Then, add
food
as a Tag.
2 Attach the Lexicon to your Flow

Now we want to use our Lexicon in a Flow.
Attached Lexicons
The Keyphrases defined in a Lexicon will only be used in a Flow if the Lexicon is attached to it.
- Back in the Project Dashboard, create a new Flow, let's call it
Pizza Flow
. - In the Flow Editor, click on Attached Lexicons in the left sidebar.
- Attach your
Food Lexicon
to the Flow by clicking on it.

3 Create Intents

Next, we need to create an Intent so that we can use it as a condition in our conversation.
- Click on Intents in the left sidebar.
- Click the lower right button and choose ML Intent.
- Enter
order_food
as name. - Add the example sentences listed below
- Save the Intent
- Train your intents by pressing
Train Intents
on the upper right
4 Building the Flow

Now let's use our Lexicon and Intent in our Flow.
- Go back to the Flow Chart in the Flow Editor. Click Flow Chart on the left sidebar.
- Let's set up the Flow to process different inputs. Use an If Node as follows:
Click on the button on your Start Node and selectCreate Node → Logic → If
. - Double click the If Node and either use the Rule Editor (write ci.intent on the left side, use
equals
as the operator and writeorder_food
on the right) or use the Advanced Editor and writeci.intent === "order_food"
into the condition field. This condition will now be true if our new Intentorder_food
is matched. Save the Node.
- Now we will add Say Nodes to our conditions to get the conversation going:
Click the button on the Else Node and selectCreate Node → Basic → Say
.
If Node Condition
Whenever the condition in the If Node isn't met, the Flow will go into the else branch attached to the If Node.
- Double click the new Say Node to add the text your Flow will say before the
order_food
Intent is met. Enter a greeting text, for exampleHello there, what can I do for you today?
. - Now add a Say Node to the Then Node. Click the button on the Then Node and select
Create Node → Basic → Say
. Double click it and enterGreat! I will deliver your food as soon as possible!
as text.
5 Test your Flow

You can now chat with your Flow in the Interaction Panel and see the results of the Flow you build.

Updated over 3 years ago