Link Search Menu Expand Document

Dialog Flow

Create a dialog flow

Click Flows in the left navigation pane to add a dialog new flow. Enter the flow name and description in the pop-up dialog box.

flow_create.jpg

Add a user utterance node

After creating a new dialog flow, it will display the flow window. Click the root node of the flow and here we click Add User Node.

flow_add_user_node.jpg

Edit a user utterance node

Click the user utterance; the editing pane will pop up on the right. It is expected that multiple utterances are needed so that the user intent can be classified correctly.

flow_edit_user_node.jpg

The followings are a few options you can make for user utterance.

NameUsage
Expect User UtteranceThe expected user utterance in this node
Select from intent listSelect from an intent template
Save to intent listSave the current intent as an intent template
Are slots expected?Are we going to extract a slot value(s) from the user utterance?
DescriptionSome comments about this intent (optional)
After the user message arrivesIf needed, reset slot value based on the user utterance

Add a bot response node

Continue to the user utterance node and select Add Bot Node from the pop-up menu.

flow_edit_bot_node.jpg

The followings are a few options you can make for bot reply.

NameUsage
Bot ReplyWhat the bot will say
Select from responsesSelect a response from response template
Save to responsesSave the response as response template
Bot ReplyFive different kinds of replies the bot can make. Please choose one.
Before the bot repliesThe reply condition that needs to be met before the bot replies.
After the user message arrivesIf needed, reset slot value
Conditional ResponseGive different responses according to conditions

There are five different kinds of replies a bot can make:

  • Text : Send a text message to the user
  • Image : Send a text message with images
  • Attachment : Append an attachment
  • Webhook : Call a webhook
  • Action : Run an action Python code

Multiple responses

We can add multiple lines of texts to the bot response node or add another bot response node after the current one.

  • The bot response node adds multiple text responses, as shown in the figure.

    flow_edit_bot_node_mutilp.jpg

  • The implementation method of adding another bot response node after the current one is shown in the figure.

    flow_edit_bot_node_mutilp2.jpg

The dialogue effect is shown below where the file will be displayed in conversation. You can directly click the file name to download it:

flow_dialog_result.jpg

Done

So far, a simple dialog flow diagram was completed.