Categories
Print

Action Flow: Dialogflow

Dialogflow is a Natural Processing Language (NLP) engine that makes it easy to design and integrate a conversational user interface into your mobile application, web application, device, bot, interactive voice response system, & so on


Use-case scenario: 


Dialog Flow can be used by the user when 


  • * You want to connect your Dialogflow agent to i-genie
  • * You want a smart bot to parse the input of the visitor
  • * You want to create AI based bots


How do I integrate WotNot with Dialogflow? 


Integrating Dialogflow to i-genie is a two step process,


  1. 1. First, you get the JSON key for the agent that you want to connect to i-genie
  2. 2. Second, add this JSON key to the Dialogflow action block on the bot builder

To generate the JSON key for the agent that you want to connect to i-genie.


How do I use the Dialogflow action block in i-genie? 


In-order to integrate Dialogflow with i-genie, the user can follow the following steps


Step 1: Add collect input action block


Click on the “+” icon on the canvas and select the “Collect Input” action block


“Collect input” action block will allow the user to capture the question from the visitor and have the same stored in the variable define which later can be used in the Dialogflow action block


For instance, in the below screenshot; we are asking the visitor to type in the question & storing the same in the variable name “Query”



We at i-genie recommend the users to have the “Collect Input” action block placed ahead of the “Dialog Flow” action bloc




Step 2: Add dialogflow action block


Click on “+” icon on the canvas & select the ‘Dialogflow’ action block




Step 3: Map the variable


Select the variables in which the visitor’s inputs are stored. Just like to answer a question, you need a question; similarly, to parse input on Dialogflow, we send a sentence to them. And dialogflow reads this question, finds a matching answer and sends it to i-genie.




Step 4: Upload JSON file


Upload the JSON key that you downloaded in the earlier steps.



Step 5: Define next steps


Define the actions to be performed for SUCCESS and FAILURE scenarios. You will see two ports ‘+’ for success conditions and ‘+’ for failure conditions.


On SUCCESS, meaning when an intent is matched on Dialogflow and a success response is received from Dialogflow, we have the option to self-loop the block. 


  • * If enabled, the bot will not have any further actions defined in i-gnie’s bot builder, instead, the visitor will have an open input and can ask any query
  • * If disabled, the bot will move forward to the next action block attached to it


On FAILURE, you can define what should be the next step in the conversation flow, by adding an action block. Obviously, Dialogflow will not always give you an expected response, whenever it fails, you may try to request the input again and loop it back to the flow.