In order to create a chatbot, you need a running Flow Instance, a Bot Token and a flow logic.
When you create your first Flow App, TekosBot will suggest a Boilerplate template
The Boilerplate template is the default template to get you started fast into making your first bot. The template is composed of many nodes that are linked together to create a logic flow.
This Node is the main entry of each chat interaction in a Tekos Chat room.
When you talk to your bot, your message will be recieved by this node.
In the Boiletplate template, this node is already configured to recieive interactions.
Each interaction that need be sent to a Tekos Chat room should be linked to the Tekos Out node.
Messages are a great way to interact with you bot clients, the text node is used to send a plain text message to the bot user.
The out put of the message node should be linked to the Tekos out node.
Customize your bot name and avatar
To customize your bot name and avatar, you need the bot's id and access token, if you don't already have a bot, you can easily create your custom bot by clicking on the create bot button on the Tekos bot menu.
To Customize your bot name and avatar, double click on the Customize Bot Name & Avatar node
- Name: Your bot name, the name will be displayed instead of the bot id when customers communicate with your bot
- Avatar: The logo of your avatar, keep in mind that the node only takes mcx type URL as avatars, click here to learn more about mcx type files.
- Tekos Bot Id: the unique id of your bot
- Tekos Token : the generated string is the key to your bot, keep it safe.
- Base Url: the base URL of the Tekos messenger that you are using.
Onboarding and actions: The Switch node
The switch node is a useful node to have when dealing with user input, after the user type something to the bot, it passes through this onboarding switch node, you can then create your custom flow login depending on the user input
A menu node is a set of buttons that are used to create multiple event intereaction, a button can support website urls, a postback message to the user, or a post resquest to a REST endpoint.
the node interactions is used to classify messages by event, there are 5 main events :
1st output, first message in the room: this is the event where you welcome the user to his first interaction with your bot.
2nd output, @Bot direct message: whit the case of multiple users in one room, you need to address the bot with the @bot_name, in order to keep the bot from interrupting the conversation each time you send a message.
3rd output, direct messages: this is the main output when the room is composed of 1 user and a bot, interacting with the bot can be simply done by sending a message, which will be passing through the 3rd output in the interaction node.
4th output: file message: the user can interact with your bot through multiple ways, sending a file is one of them.
5th output: pending steps: click here to learn more about pending step
Function nodes comes handy if you want to manipulate your data or execute an operation inside the flow. You can create custom js functions , sort, split, merge your data , choose how to present it as a template html , json …
Double click on the function node de edit the code. When you drop a function node onto a flow , and go to edit you will see a single line of code that returns the msg object and a blank line above were you can start to enter your own code.