Skip to main content

Build Child Nodes

Let's continue to follow the tree diagram to build the remaining child nodes and you are very close to completing your first chatbot!

Sample tree diagram
Sample tree diagram

Child Nodes are the nodes that come after the first node and they can be in the second layer, the third layer or even the layers after. Users cannot access any Child Node if they are not on the designated path.

In the above example, "Opening Hours message" is the Child Node of "Do you want to check out the opening hours or shop address?" and can only be triggered when user clicks "Opening Hours".

Expected Outcome

You will get a complete conversation tree graph on your workspace. There will be in total 5 general nodes and 4 global nodes.

Display menu
Display menu
Open menu in webview
Open menu in webview
Check opening hours & address
Check opening hours & address
A complete conversation tree
A complete conversation tree

You may also right click Save As to download a sample result chatbot here to cross check with your chatbot!


Build 2nd-Layer Child Node

Create Node: Check Menu

Enter your Bot Builder.
  1. Select your First Node User clicks Get Started and add a new chatbot node after it. Remember you must always select the Parent Node to create the child node that comes after.
Add Child Node
Add Child Node
  1. Go to "Node Inspector" and fill in the node details.
Fill in child node details
Fill in child node details
  1. Create a trigger that allows user to activate the check menu message. Remember the payload we set in Step 1.3? It's "CHECK_MENU".
Create trigger
Create trigger
  1. Create a response to display your restaurant menu. First, click "Add Platform" and select "Facebook".
Create new response
Create new response
  1. Select "Carousel" as the response type. Click "+ Carousel" to add a new carousel item.
Add a carousel item
Add a carousel item
  1. Select your preferred Image Aspect Ratio, then fill in text for Title and Subtitle.
Fill in carousel item details
Fill in carousel item details
  1. Select "Choose from Media Library" to add images to your carousel.
Fill in carousel item details
Fill in carousel item details
  1. A new window of Media Library will be opened. You can upload media files to be used on the chatbot here. Click "Upload a file".
Upload media files
Upload media files
  1. Another new window of Media Library Upload Window will be opened. Click the middle icon to select files and upload.
Select files to upload
Select files to upload
  1. Selected files will be displayed in a list view. Click "Upload" to upload all files at once.
Selected media files
Selected media files
  1. Select lunch-cover.jpg and click "Confirm".
Selected media files
Selected media files
  1. Once clicked confirm, the cover image will appear in the carousel item with the image URL.
Successfully added media
Successfully added media
  1. Now we are going to create a button. Click "+ Buttons".
Add Button
Add Button
  1. Fill in details for the button, including Button Type, Title and URL.
Add Button
Add Button
  1. To find the URL of your lunch menu, go back to the Media Library window. Click on sample-menu.jpg and scroll down to find the URL. Copy the URL and paste it back in the carousel item.
Find menu URL
Find menu URL
  1. Now, repeat step 5 to step 15 to add another carousel item.
Add Button
Add Button

In this example, the new carousel item has been created for the dinner menu.

Add Button
Add Button
  1. Remember to Save the response and the node.
Add Button
Add Button

Create Node: Shop Info

  1. Now you can follow the same steps and build your second child node: Shop Info.
Create second node
Create second node
  1. Create a trigger for "CHECK_SHOP_INFO".
Create CHECK_SHOP_INFO trigger
Create CHECK_SHOP_INFO trigger
  1. Create a new response. Click "Add Platform" and select Facebook as the platform.
Create New Response
Create New Response
  1. Select "Text" as the response type and enter the the content in the text field. After that, select "+ Quick Replies".
Create New Response
Create New Response
  1. Create a quick reply for opening hours.
Create Quick Reply
Create Quick Reply
  1. Create another quick reply for shop address. Remember to Save the response.
Create Quick Reply
Create Quick Reply
  1. You can Save the changes made to this node.
Save the Node
Save the Node

Build 3rd-Layer Child Node

Create Node: Opening Hours

  1. It's time to go on to the next layer. Repeat the same steps and build your third child node in the third layer: Opening Hours.
Create a third-layer node
Create a third-layer node
  1. Create a trigger for "OPENING_HOURS".
Create OPENING_HOURS trigger
Create OPENING_HOURS trigger
  1. Create a text response: "We are open from 8am to 11pm, 6 days in a week. We are closed on Wednesday."
Create Opening Hours text response
Create Opening Hours text response
  1. Click "Save" to save the third child node.

Create Node: Shop Address

  1. Similarly, repeat the same steps and build your third child node in the third layer: Opening Hours.
Create a third-layer node
Create a third-layer node
  1. Create a trigger for "SHOP_ADDRESS".
Create SHOP_ADDRESS trigger
Create SHOP_ADDRESS trigger
  1. Create a text response: "We are located at Kwun Tong, Hong Kong ๐Ÿ "
Create Shop Address text response
Create Shop Address text response
  1. Click "Save" to save the fourth child node.

Create Other Global Nodes

  1. Apart from adding payload trigger, you should also allow customers to type in certain keywords to trigger the relevant response. Let's do this by creating global nodes!

  2. Click "+ Global Node" to create a new global node for opening hours. Name is "Opening Hours Global".

Create Opening Hours global node
Create Opening Hours global node
  1. Create a keyword trigger for this global node. Under Keyword, put down "Opening Hours".
Create opening hours keyword trigger
Create opening hours keyword trigger
  1. Under Redirect, select the Opening Hours node. Click "Save" to save the global node.
Redirect to normal opening hours tree node
Redirect to normal opening hours tree node
  1. Repeat steps 30 to 33 to create another global child node: "Shop Address Global".
Create Shop Address Global node
Create Shop Address Global node
  1. Create a keyword trigger for this global node. Under Keyword, put down "address".
Create address keyword trigger
Create address keyword trigger
  1. Under Redirect, select the Shop Address node. Click "Save" to save the global node.
Redirect to normal shop address tree node
Redirect to normal shop address tree node

Add Tree to Channel

  1. Head to "Channels", click "Edit" to enter the Facebook channel.
Add global nodes into the testing channel
Add global nodes into the testing channel
  1. Head to "Chatbot Settings", add the chatbot and select all the global nodes. Remember to save the chatbot settings.
Add global nodes into the testing channel
Add global nodes into the testing channel