Categories
Print

What are Action Blocks?

Action blocks are the building blocks for the bot. Consider them as an action that the bot performs, like sending a message, collecting an input, etc.


The Bot Builder has a collection of 21 action blocks that you can use to make your bot.


Trigger:


A chatbot always has to start with a trigger – something the visitor needs to start the conversation of the bot when the user invokes it. By default, the bot is triggered to appear without any condition defined.


There are 3 conditions that you can trigger the bot with,


  • * Date range – If you want the bot to trigger only on a specific date range
  • * Browser Language – If the browser language of the visitor meets the language you defined
  • * URL – If the bot is to be triggered on specific URLs. You can include/exclude a list of URLs


Send Message:


During a conversation, the bot may send informative messages to the user and does not expect a response back from them. These messages help build up the conversation rather than having a monotonous job of collecting input from the visitor.


With this action block, you can send a series of informative messages that can be either text or rich media (images, gifs).


You can reorder your messages in the send message by clicking on the reorder symbol and moving the block you want to reorder


Collect Input:


A conversation takes place only if both parties send and receive messages. With this action block, the bot will ask the visitor a question and only move forward with the conversation flow after it receives a response from the visitor.


To make the bot smarter in collecting responses from the visitor, you can use validations,


  • * Text – Simply text responses will be accepted by the bot
  • * Email – Valid email format is allowed as a response.
  • * Phone – Only numeric inputs are allowed. The bot will also display the country code of the visitor automatically using the IP location of the visitor.
  • * Custom – If you want to specify a custom validation for the input response, you can add the regex validation.


If the input does not match any of the above validations, then the bot shows the error message defined by the user. The conversation flow will only move forward with the flow if a valid input is provided by the user.


All responses captured by the bot can be stored on a variable. The response stored in this variable can be used again within the flow by invoking it using # in the text editor field.


As a good practice, always use distinct variable names to store the inputs, else the values may be overwritten.


Buttons:

The conversation flow can be branched out using intuitive buttons. The visitor can simply choose any button to go down its path. Each button can either have the same path or different paths moving from it.


Buttons can do one of two things,

  • * Branch – Move to a different path of the conversation flow
  • * URL – Open a web page and end the flow


The maximum buttons you can add are 10.

The buttons won’t disappear after they were clicked on so, the visitor can return to them at any moment during a conversation.

Options:


In channels like WhatsApp and SMS, where buttons are not compatible or permitted, we need to rely on only inputs to branch out the conversation flow. Each option is denoted with the number i.e. 1, 2, 3…


The experience is similar to an IVR call but in a chat-format. And in case an incorrect number or an invalid response is received an error message will be displayed.


To choose an option, you can type the number as a word like one, two… or write down the option name itself.


Carousel:


Have any items or products to show? Use carousels to show your items in a more eye-catchy format. The carousels are made up of,


  • * Cover image – An image for the card
  • * Title – the title of the card
  • * Subtitle – More details of the card
  • * CTA Buttons – Buttons to continue the conversation


The buttons won’t disappear after they were clicked on so, the visitor can return to them at any moment during a conversation.

The maximum numbers one can have is 10.


Image Carousel:


Similar to the carousel, if you just want to show a set of images in a carousel you use this action block.


The bot will show this carousel and move forward to the next action block, as it does not require any input.


You can click on any image to have a bigger view of the image pop-up.



Send Email:


To notify yourself about an event occurring within a conversation flow like lead generated, someone showing an interest in a product; you can use this block to send an email to the recipients.


You can configure the following in this action block,


  • * TO – Whom this email should be addressed to
  • * CC – Who should be copied to this email
  • * BCC – Whom you want to copy invisibly on this email
  • * Subject – The subject of this email
  • * Include chat transcript – Whether you want the chat history till this point of the conversation to be attached in the email
  • * Email Markup – The body of the email


Salesforce:


If you’re using Salesforce and want to create a lead on your account when a lead is generated, simply map the details of your Salesforce account along with the fields that you want to send. We achieve this using Salesforce’s web-to-lead API.


The contents of this action block are,


  • * Salesforce Organisation ID
  • * Environment – Sandbox or Production
  • * Salesforce fields with whom you wanted to map the variables


Human Handover:


Not always will a chatbot complete all the tasks that you want it to. You may want a human agent to jump into conversations at just the right time. When a conversation reaches this block, the chat will be transferred to a live chat agent in the ‘Unassigned’ tab.


If auto-assign is enabled for the account, the chat will automatically be transferred to any available human agent.


Before the human handover is triggered, the bot will send a success or a failure message. Failure messages can occur in 3 ways,


  • * When human handover is disabled
  • * When no agent is available
  • * When human handover occurs beyond operational hours


On success, the conversation flow in the bot ends and its up to the human to take forward the conversation. Well, that’s why you transferred the conversation to them, right?


Calendar:


Booking an appointment? Great, use this block to collect dates the right way.


The calendar action block has two main sections,


  • * Date Selection
    • You define the question and store the response in a variable
    • Nature of date selection – Single Date/Date Range
    • Show past dates – Whether you want to show the past dates
  • * Exclude Dates
    • Excluding days – Like weekends i.e. Saturday, Sunday.
    • Excluding specific dates – Public holidays like Diwali, Christmas, etc 


File Upload:


In order to collect files from the visitor, you can use the file upload dialog type. With this you can define which type of files are to be accepted like pdf, CSV, etc. Or also specify the permissible number of files and size of file.


The files collected are stored securely on i-genie’s cloud server – Google Cloud Platform


Delay: 


Between each action block, i-genie will smartly give a dynamic delay (based on the time it would take to read the number of words). If you want to add an additional delay on top of what i-genie adds, you can use this action block.


Service Call:


We may not have an integration to the tool that you are using, yet. But in order to be able to send or receives data from your system using APIs, you can use this action block.


If you are a developer, you will feel at home with the contents of this action block.


In this action block, there are 2 scenarios that can occur i.e. SUCCESS or FAILURE. To branch out these paths we have 2 separate nodes each denoted by Green or Red.


If you want to receive multiple responses from this service call, then this variable can be referenced anywhere in the flow to branch the conversation based on the type of response received from the service call.


Slider:


Slider is another unique way of capturing input. Here, in this case, we make use of a slider where the visitor can slide and choose their value.


The contents of this block are,

  • * Question – The question for asking this input
  • * Min & Max – The range of values in this slider
  • * Variable – Storing the response on this variable
  • * Enable movement using step count – If active, every movement of the slider will be based on the step count. Else, it will be a dynamic slider where you can move the slider freely.
  • * Unit – The slider values can have a unit i.e. $, ‎€, ₹, £, °C
  • * Count of steps – How many steps are to be displayed in the slider scale


Form:


The visitor’s attention in any chat is only for a short period of time. To make the most of it, instead of asking inputs separately, you can ask for all of them at once using a form.


With this form, you can ask for a maximum of 5 inputs at once. And each input can have its own validation similar to Collect Input.


Some fields can also be marked ‘Optional’.


Dialogflow:


If you want to invoke your Dialogflow agent at any point in the conversation, you can connect your Dialogflow agent using this action block.


To invoke your Dialogflow agent, you need to send some query like ‘What is your name?’. Enter the variable in which that query was received and this Dialogflow agent will be invoked. Else, Dialogflow will not know what to respond back with.


To upload your JSON file, all you need to do is follow the steps mentioned in this URL to generate the Service Account key of your Dialogflow agent.


In this action block, there are 2 scenarios that can occur

  • * SUCCESS – If the intent is matched and a response is received from Dialogflow
  • * FAILURE – The failure message to be shown to the visitor


Each of these scenarios is represented with a node. Green for Success and Red for Failure.


The success node can be self-looped so that whatever input or output exchanged remains comes from Dialogflow.



FAQ:


i-genie provides a FAQ Builder where you can create a knowledge base of questions and answers. Using this action block, similar to Dialogflow, we will use the question asked and search for the matching answer from the knowledge base we have imparted on it.

To upload your JSON file, all you need to do is follow the steps mentioned in this URL to generate the Service Account key of your Dialogflow agent.


In this action block, there are 2 scenarios that can occur

  • * SUCCESS – If the intent is matched and a response is received from FAQ Builder
  • * FAILURE – The failure message to be shown to the visitor


Each of these scenarios is represented with a node. Green for Success and Red for Failure.


The success node can be self-looped so that whatever input or output exchanged remains comes from the FAQ Builder.


You can enable the ‘Ask for feedback’ toggle to collect the response from the visitor i.e. a like or dislike to denote whether our answer was relevant to what the visitor was looking for.


Codeblock:


This block is only for internal use by Team i-genie


A special action block, which can be used to call functions made for a specific purpose by Team i-genie.