How to Use Fulfillment in DialogFlow

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
with the fulfillment feature in dialogflow you can connect dialogflow to other systems such as your order management system but there's a drawback of fulfillment you need to code in order to use it and if you're like me you probably cannot code so there are two solutions for this the first solution is just to hire a developer and the second solution is to use an existing chatbot builder such as manychat or chatfuel and connect it to dialogflow you can use the chatbot builder to create your chatbot flows and you can use dialogflow to understand the intent of the user and if you want to integrate that chatbot builder with another system it is probably much easier if you want to do that i have some videos on how you can connect existing chatbot builders to dialogflow but if you want to use fulfillment this is the video that you need to watch in this video i will show you how you can use fulfillment and integrate dialogflow to other systems let's dive in so i'm currently in my dialogflow account and you will see that i have my pizzabot agent and i already have some intents that i created in my previous videos so if you want to enable fulfillment you just go to fulfillment and here you see the webhook section and an inline editor the webhook section if you click on enable you can create your own web hooks with dialogflow to other systems i'm not going to use that right now but that is possible you can also use the inline editor and the inline editor is powered by google cloud functions and that's the one i'm going to use in this tutorial so you can just click on enable and the first time you click on enable it will ask for billing it will ask for a billing account on your google cloud so you can just click on open cloud console and i have already set up a billing account so i can just select one of my billing accounts but in the case that you didn't set up any billing account with your google cloud you will just need to fill in uh such a form and then you can enable your credit card or a paypal account to do the billing for you so i would just select my billing account and then click on set account and that will do the trick so now if we go back to dialogflow and we click on enable it will work so later on in this video i will also talk a little bit about the pricing of these google cloud functions but that will be later on so here in the inline editor you will automatically see that there is already some code and the code is structured in a really normal way what it will do is you can call a certain function for example the function welcome and that will do something so that's written inside the function and you can set a function determined by the intent so for example in this case you will say when the default welcome intent is triggered we will trigger the welcome function which is defined over here and what this will do is it will just say a message back to the user so we will change this message and say this is fulfillment speaking then we can just click on deploy and then it will deploy this disco to google cloud functions and then you need to wait until it is deployed because otherwise we cannot use it with our intents so after the cloud function is deployed and it can take several minutes you can go to intense and enable fulfillment on one of your intent so in this case i will just use the default welcome intent and then if we scroll down we will remove all the text responses because the response will be handled by the fulfillment and then if you here at the fulfillment section you can click on enable webhook call for this intent then you click on save then the intent will be saved and automatically the bot will be trained again so now the bot training is completed and then we can just say hi to trigger the default welcome intent then if we say hi you will see that this is fulfillment speaking so it means that the fulfillment is working so what i'm going to show you now is how we can create a custom intent with a custom function in the inline editor so if you go to intense we will create a new intent and i will just call it weird pizza so if someone says weird pizza it will trigger this intent so we will add a user expression with pizza that's the only user expression just for the sake of an example and then we will enable a webhook call for this intent and save the intent so the next thing we need to do is go to fulfillment and add a function that will determine the response for this intent so we'll just create a function called weird pizza and use agent as a parameter and then you can just type in agent dot add i will just copy this and say do you want a weird pizza then at the bottom and that's the next thing you need to do is you need to set the intent map so here we can type in intent map dot set weird pizza and then the name of the function so this is the name of the intent and this is the name of the function so now we created the code then we can click on deploy again when the cloud function is deployed you need to go back to intents go to the weird pizza intent and then click on save and then if you type in where pizza it says do you want a weird pizza so this is how you set up your own intent and automatically run a function when it is triggered but this is just a really simple example connecting with another system is much harder and gladly google has also created their own videos on how you can create more advanced integrations with other platforms so i will add these videos in the description also if you want to use fulfillment and code yourself i've also added the quick start guide of dialogflow in the description that you can use to create your own functions so the last thing i want to talk to you about is the pricing of dialogflow fulfillment how much does fulfillment cost and if you go to the pricing of google cloud functions because dialogflow fulfillment is run on google cloud it is pretty cheap for the first 2 million invocations in a month so let's say the first 2 million requests you pay absolutely nothing and after those 2 million requests in a month you only pay 40 cents per a million requests so this is still really cheap thank you for watching this tutorial if you have any additional questions about how you can use fulfillment with dialogflow please leave a comment below if you want more videos on how you can use chat bots in your marketing please subscribe to my channel and if you haven't done this yet also click the like button below
Info
Channel: Chatimize
Views: 1,548
Rating: 4.826087 out of 5
Keywords: Chatbots, Agents, Dialogflow, Fulfillment, AI
Id: 9THX-z7C_ZA
Channel Id: undefined
Length: 7min 52sec (472 seconds)
Published: Fri Apr 09 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.