Terminology

There are some keywords that you must know to help you understand things easily during the course of the documentation. You might already be familiar with some of them.

Bot: You may already be familiar with this word, but for the sake of the platform, we'll give it a more specific definition, which is not far from what you already know. A bot on the platform is basically what the user sees when they interact with what you create. Think of a bot as the human body.

Flow: the brain of the bot. This is what will be used to make your bots perform tasks. So you can think of it this way, the bot been just a human body, the flow would be the brain that controls the body (Bot) and it's actions.

Flow Step: a single action in a flow. For instance, asking a question, sending email, sending text etc. Flow steps collectively make up a single flow, (or the brain, in reference to the analogy given earlier).

Fields: are used to store & retrieve data, which can then be used in a flow step. For instance, you store a user's name in the name field and retrieve it when you want to refer to them.
An example: Thank you {username}, I have sent you an email receipt will send a message to the user, and replace the {username} tag with the user's name. There are several fields available currently, and we'll go over them as this documentation progresses.


Triggers: are used to activate other flow steps based on users input.

Column name: are used when saving responses from users into a database. This must be meaningful to help you easily recognize what the data is. For instance, if you save a user's name, you will make the column name "Name"

End of flow: must be selected as the Next flow step if a flow step doesn't need to run any other flow step after it's execution. The Question flow step doesn't really need this as it waits for the user's response.






Bots

This section will go over how to create & update bots, and in so doing explain what a Bot card is in the user dashboard. As mentioned earlier, a bot is only like the "human body", and wouldn't do much without a brain. So, after we create our body, we'll later create the brains (Flow) and connect them 😜

Creating Bots
1. Click on the "New Bot" button



2. Fill in the details of your bot and click "Save Bot"


That's it!🤓 You have created your first bot!! Now, since it's not connected to any brain (Flow), it's pretty much useless and would only send the "Welcome message" if you try to use it.


Bot Cards
A bot card simply represents each bot you have on your account. It allows you to easily access data and perform actions for a particular bot. The image below shows what a bot card looks like. It has the image of the bot, the name, and 6 buttons below used to perform various actions.


Button 1 - The first button from the left (pencil shape) is the edit button. You'll click this button each time you want to change something (Name,Image, Welcome Messgage, and Default Flow) about the bot.

Button 2 - The second button from the left is the code access button. You'll click this button to get the embedding code for your bot. You'll need this if you're adding your bot to a website. You may also get the link of your bot page by clicking this button

Button 3 - The third button from the left is used to view chat data of the bot. When you click this button, you'll be able to view a history of chat messages, saved responses, and files uploaded by users.

Button 4- The fourth button from the left allows you to view all the user inputs the bot couldn't understand in a conversation. This allows you to continue to train your bot to be more responsive.

Button 5- The fifth button from the left (bin shape) is used to delete the bot

Button 6 - The sixth button is used to open the bot page. This is useful when you're testing your bot.





Flow Steps
This section touches on Flow Steps, the different types and how to create them. Flow steps are basically the actions in a Flow. These are actually what makes your bots do something! Depending on what you're creating, you can connect the flow steps and so forth. There are currently 15 different types of Flow Step action, and we'll be adding more as time goes by.


Flow Step Action Types

Send a Message - This is quite self-explanatory, as you can use it to send text messages to a user during the course of the conversation,

Ask a Question - This flow step type is used if a response from the user is required, either to be saved or to trigger other flow steps, based on the user's input. Note that this doesn't necessarily have to take the form of a question.

Send an Image - This is used to send an image to the user during the conversation.

Send Email - This is used to send emails (to yourself or the user) in the background during the conversation.

Collect Payment - This is used to collect payments from a user during the conversation.

Send Video - This is used to send a Youtube or Vimeo video to the user.

Send Card - This is used to send an object card to the user. The card will have an image, title, description, and a button to activiate other flow steps.

Initiate Live Chat - This step action is used to initiate the live chat feature during a conversation. When this is triggered, it sends a text notification to your phone(Limit of 50 per day currently. Will vary after beta) & account email (unlimited), letting you know that a user wants to chat with you.

End Live Chat - This step action is used to end the live chat session, and make the bot fully functional again.

MAKE HTTP POST - This step action is used to make an HTTP POST request.

OPEN WEB VIEWER - This step action allows you to open a website in a pop-up window.

SWITCH FLOW - This step action is used to switch the conversation flow from the Bot's default to any Chat Flow on your account.

CREATE A ZENDESK TICKET - This step action allows you to use Zendesk's Support addresses to create new tickets via email. It is just like the EMAIL flow step. You must have user's name and email in the username & useremail fields, respectively. These will be used in the 'Requester' & 'user email' field in Zendesk's ticket object

CREATE A TODOIST TASK - This step action allows you to create new Todoist tasks. It's pretty simple to implement, as you'll only need your API Token from Todoist and a short description of the task. You may use fields in the task's description, to make it more dynamic.

DEFAULT FALLBACK RESPONSE - This step action allows you to set the default fallback or error response for a given flow, in general. It will be triggered/sent, each time the bot doesn't find an answer to/understand what a user says.
This is mostly used in FAQ Chat Flows. So, whenever a user asks a question that's not understood by the bot, the Default Fallback message is sent.



Creating Flow Steps
To create a flow step, you must be in the flow step view. As mentioned earlier, you can do this by clicking the first button on the flow card.


Send a Message

1. Click the add button


2. Give the Flow Step a name, and select "SEND A MESSAGE" from the option list. Check "Allow step to be triggered at anytime" if you'd like the step to be triggered anytime the user enters something that matches some keywords/phrases. Then enter the message you want to send the user and hit the "Save Step" button.
The "Allow auto assign" box must only be checked if you want to automatically assign the the current step you're creating as the next step action for the last one you had added.
Note that the "Allow step to be triggered at anytime" and "Allow auto assign" applies to the other flow step types






Ask a Question

1. Click the add button

2. Give the Flow Step a name, select "ASK A QUESTION" from the option list


First Checkbox - Check this if you'd like to save the user's response to the question. After checking this, you can set the column name, enable answer to be analyzed in survey reports and also provide option buttons if needed

Second Checkbox - Check this if you'd like to trigger other flow steps based on the user's response. This will allow you to add trigger keywords/phrases and option buttons to that flow step.

Dropdown Menu - Use the drop-down menu to select which field you'd want to save user's response to. Leave it on the first option if you don't want to save it in any field.

Third Checkbox - Check this if you want to automatically assign the the current step you're creating as the next step action for the last one you had added.






Send Image

1. Click the add button

2. Give the Flow Step a name, select "SEND AN IMAGE" from the option list, paste the URL of the image and hit the "Save Step" button





Send Email

1. Click the add button

2. Give the Flow Step a name, select "SEND EMAIL" from the option list, then enter the recipients of the email, subject and body. You can use field tags in the "To", "Subject" and "Body" and hit the "Save Step" button .






Collect Payment

1. Click the add button

2. Give the Flow Step a name, select "COLLECT PAYMENT" from the option list, then enter the payment amount. Enter 0 if you'd like the user to enter their own payment amount and hit the "Save Step" button





Send Video

1. Click the add button

2. Give the Flow Step a name, select "SEND VIDEO" from the option list, then paste the video's URL into the box and hit "Save Step".



Send Card

1. Click the add button

a. Give the Flow Step a name, select "SEND A CARD" from the option list

b. Paste an image url into the cover image box

c. Give your card a title, enter button text

d. Provide a brief description

e. Select the flow step to trigger if the card's button is clicked

f. Hit "Save Step".





Initiate Live Chat

1. Click the add button

2. Give the Flow Step a name, select "INITIATE LIVE CHAT" from the option list, and then enter a phone number you'd like the bot to send a text notification to. The phone number must contain the country code.




End Live Chat

1. Click the add button

2. Give the Flow Step a name, select "END LIVE CHAT" from the option list, then select the next flow step to trigger after the live chat has ended



Make HTTP POST

1. Click the add button

2. Give the Flow Step a name, select "MAKE HTTP POST" from the option list, and then enter the url (base url + parameters) you want to post to. Please note that you can use fields to pull data you've collected from users and use them in the query strings parameters





OPEN WEB VIEWER

1. Click the add button

2. Give the Flow Step a name, select "OPEN WEB VIEWER" from the option list, and then enter the url (with any desired query strings) you want open. Please note that you can use fields to pull data you've collected from users and use them in the query strings parameters





SWITCH FLOW

1. Click the add button

2. Give the Flow Step a name, select "SWITCH FLOW" from the option list, and then select the Chat Flow you'd like to switch to.





CREATE A TODOIST TASK

1. Click the add button

2. Give the Flow Step a name, select "CREATE A TODOIST TASK " from the option list, and then enter your API Token & the tasks description (You may use fields in the description) and hit the "Save Step" button .





DEFAULT FALLBACK RESPONSE

1. Click the add button

2. Give the Flow Step a name, select "DEFAULT FALLBACK RESPONSE " from the option list, and then enter the message you'd like to send as the fallback response (You may select any flow step to trigger next, after the fallback message) and hit the "Save Step" button .





Response triggers & Option Buttons
Response triggers are used to activate/call other flow steps based on the user's input.

This is what a flow step with enabled response triggers look like. Clicking the middle button, at the bottom of the card allows you add and update the triggers for the flow step



Adding triggers
To add triggers to a flow step, click the response trigger button in the middle of the flow step card. It will bring up a dialog like the one below. Simply enter all the possible responses (keywords or phrases) you want to listen to and then select the corresponding flow step you want to trigger if the user's response matches any of those keywords/phrases. Multiple responses should be separated by commas (,)
(Try not to use common words like "I, My, We etc" without combining them with specific keywords)
You can add as many triggers as you like, depending on what you're making.



Adding Option Buttons - To response triggers
To add an option button, simply check the "Provide an option Button for trigger" box. This will allow you to enter the details for the button. Enter the text you want on the button, and the value (or response) to send when clicked.
Note: The button's value must contain a keyword from the response triggers keywords




Fields
As mentioned in the Terminology section, Fields are used to store & retrieve data and then used in flow steps to give the conversation a more dynamic feeling.


Types of Fields

{firstname} : Retrieve user's first name that you have saved.

{lastname} : Retrieve user's last name that you have saved.

{username} : Retrieve user's full name that you have saved in the username field

{useremail} : Retrieve user's email that you have saved.

{phone} : Retrieve user's phone that you have saved.

{paymentamount} : Retrieve amount that was paid (Useful for receipts)

{fileuploadlink} : Retrieve the link to file upload page.

{trackeddate} : Retrieve date (Used only in emailing, and HTTP POST & WEB VIEWER url)

{trackedtime} : Retrieve time (Used only in emailing, and HTTP POST & WEB VIEWER url)

{trackedip} : Retrieve user's IP address (Used only in emailing, and HTTP POST & WEB VIEWER url)

{accountemail} : This is used to retreive your account's email (Can only be used in the recipient field in when sending an email)

{field1} | {field2} | {field3} | {field4} | {field5}
Any of these fields from 1-5 can be used to save and retrieve any data you collect from users



Using Fields

Accessing and using field values are pretty straight forward, as you only have to replace the value you want to see with field's tag. Some of the fields only work in specific flow types, while others can be used almost everywhere that makes sense.

{username}
This field can be used in the Message, Question, and Email (Subject & Body) Flow Steps.

If the name field value is James Bond

Format Thank you {username}, I have sent you an email receipt

Result Thank you James Bond, I have sent you an email receipt


{useremail}
This field can be used in the Message, Question, and Email (To, Subject & Body) Flow Steps.

If the email field value is jamesbond@heycoren.com

Recipient Format {useremail}

Result An email will be sent to jamesbond@heycoren.com


{paymentamount}
This field can be used in the Message, Question, and Email (Subject & Body) Flow Steps.

If the amount field value is $20

Format Thank you for donating {paymentamount} to us!

Result Thank you for donating $20 to us!


{fileuploadlink}
This field can only be used in the Message & Question Flow Steps.

Enter {fileuploadlink} into the URL when you are inserting a hyperlink

Result Opens the file upload page for the bot


{trackeddate}
This field can only be used in the Email (Subject & Body) Flow Steps.

If the tracked date was Jul 11, 2017

Format We received your request on {trackeddate}

Result We received your request on Jul 11, 2017


{trackedtime}
This field can only be used in the Email (Subject & Body) Flow Steps.

If the tracked time was 16:46:00

Format We received your request at {trackedtime}

Result We received your request at 16:46:00 (CT)


{trackedtime}
This field can only be used in the Email (Subject & Body) Flow Steps.

If the tracked IP address was 192.168.2.1

Format Payment was issued at the IP: {trackedip}

Result Payment was issued at the IP: 192.168.2.1


Using fields doesn't have to be as limited as the examples given. You can get more creative, by combining them, and so forth. The only requirements are, they have to match the Field tag (they are sensitive) and must be eligible for the flow step.