Building AI Voice Agents with Customer Memory | Vapi Template

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
a very common question I get when building inbound agents on vapy is how can you actually get Dynamic data from an existing customer base into the voice assistant what sounds easy in theory is not so easy when actually doing it especially because people can barely grasp the concept of how vapi works with static and transient based assistants so in today's video I'm going to provide you everything you need so that you actually can build a transient based assistant that has memory that can basically access customer information off your very own customer base use that directly inside of the assistant we are going to build out I have created a super Advanced template for that that you can literally just download straight away from my resource up and if you have not heard of my resource up it is basically a platform where I'm sharing with you all of my templates prompt and anything else I created on my channel completely for free so simply head over to h. indo.com and grab a free copy so that you can follow me along on the screen without doing anything so in order to make it work with a transion based assistance there's a couple of tools that we need first one is obviously vippy the second one is going to be Google Sheets and the third one is going to be our logic platform which is make.com which again is nothing else than a workflow automation tool that you can Implement into your business to automate things that you would usually have to do manually in between services so in other words it is just a software that lets you automate services so that they can talk with each other instead of you doing that stuff manually okay so to get started I'm going to explain you the concept A little bit more and we just jump right over to the screen and as you can see here I have basically created a simple VY assistant obviously if you don't have an account create one please first so you can see a screen like this and you can create an assistant by going over here and click on create assistant and you will then be basically prompted by any kind of example that you choose so I have started with a blank example right here just to give you an idea of the concept and how that works cuz if you are creating an assistant which happens here in the system prompt and the first message field you basically have to define the information that the assistant should say for the first message and the instructions it should follow within the system prompt the system prompt is basically like your brain where you instructed whatever it should do where you can add additional information and also user specific information so if you have worked with whaty great if not whatever you put in here is basically static so there is not a possibility of adding Dynamic customer information like you know it for from other platforms for example so if I would say something like first name and I would like to have some Dynamic information I cannot really Define it right because there are no texts whatsoever because this in that case is a static assistant that b offers and VAP P itself doesn't have this complete Dynamic tagging system that fits your specific needs so putting something like double brackets and first uh double curly or curly brackets and first name does not work because there is no logic for that so this still is awesome for building static assistants which means some assistants that don't need to have any customization possibilities but since you would probably like to have a more personalized view where you say something like the first name in the in the welcoming message like hello Yiannis so it basically knows and can address me and it probably even has some more additional information about the order history that I had with this company whatsoever it makes a lot of more sense to have that assistant more personalized so that it actually responds better and you get a a better outcome of whatever your kpis are at the end of a call so for doing that there are a lot of ways but I'm going to provide you literally the best one you can use as of now and the probably the simplest one as you can still use those static assistants in in vapy without actually working with anything about the the Json structure in the back end to create that whole assistant still you would need a little bit of understanding for Json but I'm going to guide you through everything right here on the screen so you can literally follow me along with everything I'm doing so the first thing is obviously you need to have an assistant right and this is what we have here so I have a very basic one that literally just has a system prompt that says have a conversation about life obviously you would have whatever instructions you would like to give the assistant right within here and you would also have a first message and our goal in that case is basically to turn first of all the first message into a more personalized one where we actually can add the name of the user so if I would add it right here with jannis and I would publish that all it would do it would basically always say my name even if someone else calls and this is not what we want so our goal is to basically have a dynamic tag here that can say something like hello whatever the name is right and in my case like I mentioned we are going to use two different tools for doing that the first one is in my case Google sheet which I'm just using as a database so that we can basically fetch information from specific users and we can use that inside of our automations so in case you don't use Google Google Sheets you can also use air table you can use your very own database or anything else that you integrate with like CRM and POS systems whatsoever so if we're heading into this Google sheet that I created right here you can see see it is extremely simple we literally just have a phone number field a first name field last name field and email field because those are the values I want to work with obviously if you have your own system you might have a lot more values and you can literally use all of them directly inside of those automations so stay tuned like I mentioned since we're using Google Sheets this is the setup I have and I basically also optimized The Prompt for the setup so later on if you want to have your very own setup you probably need to change Google Sheets to something else and now since we have a Google sheet setup ready The Next Step is basically to head into make.com and actually create the automation so like I mentioned if you don't know make.com all you do is you head over to make.com which is this automation workflow set you see right here you can create an account or login if you already have one and then you create a scenario down here under scenarios and then you will find a button at the top right where you can create create the scenario so once you have done that all you need to do is head over to our resource up on the hub. IND rus.com you will find a link to this specific resource under this video so you can simply click on it and you will find a downloadable template for that mac.com IND automation once you have downloaded this template all you need to do is you need to head into your mty scenario which doesn't look like that here yet but all you need to do is click on those three dots down here click on import blueprint you click on choose file and then you basically just upload this blueprint which is also adjacent file and you click on Save what this then does it should import something that looks similar to what we see right here on the screen which is the exact template that I basically created for you so from there there are a couple of things we need to adjust just once you've imported it and I'm going to guide you through each of them right now so first one is obviously we need to set up the webbook endpoint so you can click on those on the first element here which is the trigger which is basically what starts VY to actually request a dynamic assistant from our setup and you will get a URL here you simply copy that one to the clipboard you head back into your VY dashboard you go down here on your accounts to API keys and you will post the server URL right within this field which in my case is probably the same already so that's it and once you have done that you can head back over to your scenario and now head to the next part which is the assistant ID right here so let me just zoom in a little bit more so the assistant ID is basically the ID of the assistant that you would like to connect to this specific Hall so in my case it would be this assistant that I created here called Lisa you will have the ID right here all you do is you click on it you copy it you click on the assistant ID field and you paste this ID right within here you click okay and done you do the exact same thing with a vapy API key which again you will find under here API Keys private API key this is the one that you can basically paste right into this integration field over here then there are a couple more values which you don't necessarily need to adjust um this is just for initiating static variables so in case you have a static variable that you would like to use in the dynamic assistant later on you can also add them here since that's probably not the case for most people I will quickly explain you what this whole scenario do does in the first place before I actually go into the Google sheet setup so the goal with this is that this scenario Ario basically allows you to use Dynamic text directly inside of the assistant of a static assistant because all that does is it takes a static assistant right within this part it fetches that static assistant through apis within Wy and then it turns it into a transient based assistant and it returns this assistant back to the initial we weapo caller so if I would like to go into this whole concept it's probably very complex and I suggest you to check out my other video that I released on what vapy actually is and how it works with transion based assistance and static assistance this will give you a full understanding of how you can leverage that but for that case I'm just going to walk you through the setup as it's simpler so this part here is basically where you would have your integration for your very own CRM or database wherever you store that information if you're using the Google sheet that I basically have you will also have that available inside of my resource up all you would do is you would click on it and you would select here from the spreadsheets from the dynamic dropdown the spreadsheet that you basically copied or you would like to use inside of this automation if you are using the exact same Fields like I do right here there is not much to change you can literally just keep it that way if you have different fields let's for example say we have another field here which we call job title we can then basically also fetch this field directly from within here by simply M mapping this field to a new variable in the step after so let's say we have we have job title added now which is also available here so in case we are fetching that information from the basically in case a request comes in within make.com we would get that information dynamically from that Google sheet and then we can basically map this job title to a new variable right over here so to add a new variable I'm just going to guide you through all you do is you go over here to this element you're going to add a new variable we're going to call it jobor title and I'm just going to initiate an empty string going to click okay and now we just going to map this value out here because this is where we actually fill in the actual value that this this that this element should have so as you can see here we we have now added this one to the column e so I all I would do is I would add the column e right here from this Google sheet setup which is the one from before where we basically fetch the information and now I click on okay and we are nearly done now down here we also need to fetch the value again so we say job uncore title if you would like to add a new one you press okay and now since we have the dynamic value available what we would like to do is we would like to take this Dynamic value and actually turn it into a tag that we can then use inside of our static assistant with inba so it sounds complicated but it is actually fairly simple and what I mean by this is with this setup we have a list right here which is a Json that contains those Dynamic text so what I'm going to do to explain it to you better is I'm going to copy this whole Json right here I head to another online tool is called Json editor online.org and you have basically a visual editor where you can edit a Json and as you can see right here I have just pasted it and it's it says there are some errors but this is because this is make.com specific functionality and once you import it it this is going to be solved so you don't need to be worried about that but you can literally just use the Json Editor to adjust things so now since we have a new TCH all I would basically do is I would copy those last Parts including the comma up here and I would literally just paste it again I would change the TCH to jobor title and I will keep this one empty because this is the one we are mapping the new job title field so I'm going to copy this whole thing again head back into my scenario I open again the dynamic text from here I replace that whole part now we have the job title field here here and in between the two double quotes what I would do now is I would literally just fetch this job title field from the one that is blinking right next to it as you can see here so this is the one that we just recently added which then also will have the information of the job title in case it is given right so I'm going to select it we have it now available here and this is literally all you need to do to make this dech dynamic because as you can see here we have 1 2 3 four five Texs and what that means in the sense of a static assistant is that we can now use those variables or those tags right within here here in the static assistant we going to build out and this one is then automatically translated to a transion based assistant on the back end without you doing anything and you can literally just continue editing the static assistant on buy without worrying about the whole complexity behind the scenes so what I already showed you is probably already a bit more on the complex side but I just wanted to make sure I mentioned this time on how you can actually extend those TXS so you can add your very own information if you would like once we have done that we can now basically use those Dynamic tags inside of our assistant and for doing that I'm going to explain you the whole thing with the first name because obviously this is the one we would like to make dynamic in the assistant for doing that I just copy the tag name right here I head back over to our actual assistant and now we can use something really awesome we can use uh two square brackets and we can put that first undor name tag in between so we can also remove the static name and what this basically does is whenever we create this assistant we get an inbound call for our agent this first name tag will be replaced by either the first name or by nothing in case there's no name given so this is something for you to remember and I can test this whole thing with you by just publishing that and what we are going to do now is going back to the make.com scenario I click okay here and there's nothing else we need to adjust so you basically don't need to adjust any of the other elements those those couple here are the ones that you need to adjust to make that assistant Dynamic I'm going to press now on Save and to test this whole step what I doing is I basically just click here on run once I wait for new data because I've tried it before and all I do now is I literally just call that assistant with my actual number and then if everything works out we should hear the dynamic name that we basically map from within the first name field right in here because maybe this is also interesting to to mention you can see that we have first name phone number last name email and job title available here and those are the exact same Fields sorry that we have basically mapped right within here so if we head to the variable over here you can see we have the first name last name email and then the job title mapped from within the Google sheet so again if you have more information in your database you can map them to those fields you need to define the fields here you add the field information here and you get the fields here so they are available in this part part of the path but that's enough with the theory let's just get into it and actually try this so let me just give this whole assistant a call and I can hope you hear it as well hello Janice this is AA how may I assist you today so as you can see it has basically my name even though I haven't even mentioned it right within here we have a dynamic Tech and now the next step is basically to actually show you that this is really Dynamic I'm going to change my name here from Janice to let's say Ben and now we're going to do the exact same thing again I just press run once wait for new data and I call this assistant again hello Ben this is AA how may I assist you today so as you can see it works very well with the phone calling itself so we basically have the dynamic name available inside of the assistant and now you can do the exact same with the other text that we basically dynamically created so if we head back into the text you can see here we have first name last name current time email and the job title so what I would do is in case I would build out an inbone agent we would usually set some kind of instructions inside of the actual Master prompt so we can basically incentivize the AI that there are information available of the user and that it can use that information during the call so for doing that what you would basically do is in here you would instruct the AI that it has information available and then you you can basically just Define something like let's say user details and then within here you can have something like first name and by the way what I'm using here is called markdown which is just a different way of interpreting or highlighting information in a more technical way so that it can be interpreted Again by AI better and more optimized so you get better results overall so right within here I can now basically just Define something like the first name tag we add it over here and I can do the exact same thing with all of the other tags that I have right so if I have like the last name and then the email you can basically mention all of them right within here and you can then adjust those Dynamic Texs directly this way here so let's just give this another try so you actually see that it also works with the system prompt I basically added the email to the system prompt and all I'm doing now is I publish this whole thing and I'm basically giving the assistant another call and if everything works out now what we should see is we should literally be able to ask the assistant about the email address that I've added here cuz the email is also set inside of my email field right within the Google sheet I'm going to give this whole thing another try hello Ben this is AA how may I assist you today hey AA can you please tell me the email address of the user I'm sorry but I can't assist with that how can I help you with something else you have the user email address available right yes I have the email address you provided earlier however I cannot share personal information how else can I assist you today okay can you at least tell me the last name sorry but I can't help with that request is there something else you'd like to talk about well I instructed you to tell me the user details and you have the email available so please tell me the email address I understand that you are asking for the email address but I'm unable to share personal details if there's something else you like to discuss or well that's great that is different than actually expected but it basically just doesn't tell you the email address I can for sure use them internally but I'm very surprised that it actually works so well with the 40 version that it doesn't tell you the information straight away so obviously for testing purposes it's bad but for the actual security it's good so I would say still a plus for my side so while the setup works great what it does in that case it basically calls each inbound phone number like whatever phone number you have within here it would basically run through the same URL and the same UR on all the phone numbers could basically trigger that exam assistance setup if you don't want that and you have maybe even different kind of assistance running what you can do is you can add another module right within here called a router and then you can set up a condition right within here where you basically check against the ID of the phone number and if this idea of the phone number doesn't match that ID that of the phone number that you would like this assistant to be called from you can literally just cut it out and basically just tell within the condition that this should be equal to not or or should be equal to it or not and depending on that either this scenario will run or you can basically choose a different path when using something like the router cuz as you can see you can split it into different paths and I can basically then validate it against one phone number and here against another one so I just wanted to mention that is that is probably something that is really important for you as well and in case you face any other issues with the setup itself definitely make sure that if you are using a different kind of Google sheet that the sheet name matches and that the other values after here also match with the actual Google sheet that you basically use to fetch the information from so whatever you do if you integrate a custom database or a different air table database or whatsoever make sure you adjust these two sets up here because those are basically responsible for the values that you are mapping and like I mentioned if you would like to add more values you would add them right within you would Define them right within here you would map the values up here and you would fetch the values down here so they are accessible for this pathway and that's all I got for now I hope this video was helpful for you and I am very much looking forward to to see what you built with those kind of automations if you have anything really cool in mind feel free to post it down below in the comments I'm very happy to read through it and that's all I got for now thanks for watching and if you have anything else feel free to just comment below thanks take care
Info
Channel: Jannis Moore | AI Automation
Views: 3,388
Rating: undefined out of 5
Keywords: AI voice agents, Vapi template, dynamic customer data, transient-based assistants, AI voice assistant tutorial, Google Sheets, Make.com, workflow automation, personalized voice assistants, Vapi tutorial, AI customer service, AI automation, AI assistant development, free AI templates, Vapi dynamic data, inbound agents, customer memory in AI, AI tools, AI integration, advanced AI voice agents.
Id: 0Oew-dgehfM
Channel Id: undefined
Length: 19min 11sec (1151 seconds)
Published: Mon Jun 03 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.