Estimated reading time: 15 minutes
After understanding how to drag and drop blocks into Flow Editor to create a simple bot in part 2, in case you have a lot of products or services, how can you manage and update all of these products?
It may take a lot of time to change each product on Horizontal or Vertical List. Don't worry! Our CMS feature will help you. Using CMS (Content Management System), you can manage and update a list of products or services easily and effectively.
What is CMS?
CMS (Content Management System) is one of special features by BotStar. With CMS, you can create and manage your chatbot data easily. CMS by BotStar are made of Entity and Item:
Entity is a set of items that have the same attributes (fields).
Item is data object that has attributes (fields) defined and grouped by Entity.
Activity: In part 3 of mini course, you will learn to use CMS and Module to optimize your bot flow. Back to our example "My Happiness Restaurant" bot, in this lesson, you can manage a list of foods and drinks at the restaurant.
After this lesson, you'll:
Instead of adding text or image manually to create a list of products, you may use CMS feature to create and update the list of dishes easily. Here's the result after using CMS to manage a menu for "My Happiness Restaurant" dynamically:
How to create a list of CMS
These following steps will guide you to use our CMS feature:
Go to Build > CMS, create a new Entity
Click on New Entity, a pop-up Define New Entity will be displayed, enter the Entity Name and press Create button.
Update an Entity
Update or add many Fields for each Entity by selecting the button configuration nearby the Entity name in the list of Entities.
Next select tab Form Fields, you will see the two default fields of Entity, which are Name and Status. You could not be able to edit or delete these two fields. In order to add a new field, you need to fill in sufficient information:
Field Name: define the name of an Entity (eg. Photo, Price, Description, etc.)
Field Unique Name: value of this data can not be duplicated with Field Unique Name of other fields
Type: there are 7 types of field below
Text: This field is a text (including newline character)
Text (multiple values): This field is a set of paragraphs.
Single Option: This field is a value that was defined before.
Multiple Options: This field is a set of values that was defined before.
Photo: This field holds a value which is a photo URL from the Internet or a photo uploaded directly from your computer.
Date: Data in the form of date.
Entities Reference: This field could link to another Entity's item. It shows the relationship between the current Entity and referred Entity.
To illustrate for this step, back to "My Happiness Restaurant", you can create two entities (In case you want to use Entities Reference to link to another CMS Entity):
The first entity is "Category" (illustrating the list of Menu: Foods and Drinks)
The another entity is "Menu" (including many types of foods and drinks), so you can link "Menu" entity to "Category" entity to categorize foods or drinks.
Then click the button
+in the same line of each field to finish creating an Entity. You can also delete any field by selecting the button shaped the Trash.
Create CMS Items
Click on New Item button on the upper right corner of the screen to create a new item. Then fill in all the needed information about foods (name, photo, description, price and category) and click on Create button to create a new item or Update if you want to update an item.
How to use CMS to manage dynamic data
Load data into a block
Drag and drop a Horizontal List Block (or you can choose any block you want to insert CMS data) into Flow Editor, enable Use CMS Data, filter by "Entity", "Filters", "Query Limit", "Sort by", "Order by".
Keep in mind that Vertical List Block has a block-level button that can be used to load more items while Horizontal List Block does not. Therefore, if you have more than 10 items, you should use Vertical List Block. However, we do not recommend abusing this as chatbot users should be presented with quick, tailored options.
Map elements of a block with fields of CMS entity after setting up CMS data for a block
For text elements: Insert CMS data into text elements by using Insert Variables button in the bottom left corner of editing site. You can insert the title of foods and foods description
For image elements: Insert CMS data into image by selecting CMS in Image Sources, then select the field "photo" as you want, the food images will be displayed
Load data into Quick Reply
Select the block into which you want to insert CMS data to open the setting site and follow these steps below:
Choose CMS in Quick Reply to use CMS data
Click on Setup CMS quick replies and customize these fields (Entity, Filters, Sort By, Order By, Max Number of Items) in the setting site to get appropriate items for inserting data into Quick Reply. In this lesson, you can choose Entity "Category" to show Menu (includes two options: Foods and Drinks)
Note: For more information, please read our document CMS
Use Module to group related blocks
I will guide you to create a Module "Customer information" to collect customers'information, including Delivery date, Email address, Phone,...It helps you group related blocks to optimize your chatbot flow. To use a Module, you can follow these steps:
Drag and drop Module in Advanced Blocks into Flow Editor.
Click on View Module, you'll jump into a Module "Customer information". Then start designing a chatbot flow to collect user's information
Some useful tips for you:
You can enable Capture User Response and use Checkpoint to manage user data easily.
You can copy - paste a Module or a Block from a Module to another Module
If you copy a Block or Module to another Module, keep in mind that you can use tab Outline to locate a copied Block / Module
So we've finished part 3 of Mini Course, in the next lesson, I'll teach you how to capture user's response to manage the booking or ordering through using Checkpoint feature.