Power Virtual Agent with Power Automate

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hey everyone this is Daniel and this is a continuation of my power virtual agents videos that I'm doing so as you remember the last video was an introduction video I went through it I even introduced our virtual agents and we did a you know kind of a introduction to the power virtuals you know kind of a logic and even built one over there but what I'm gonna do is I'm gonna now kind of step up on that so if this is the first time you're watching this power what should be a gence weady of mine pause this one and go watch that one first because that actually really introduces you to the whole how PVA works where you go ahead and build your you know your first PVA and then after you're done watching that come back over here alright the link to that video is right below on this one alright so now that I've kind of you know already introduced power virtual agents in the previous video and you keep hearing me sing PVA because that's also parallel virtual agents I've already introduced or that in that one in this one we're going to actually talk a lot more about PVA or power to virtual agents with power automate and building actually a flow over there so let me actually give you a quick introduction on that and then we'll jump straight into building the demo so in power virtual agents like I already mentioned before it was all about you know empowering the people to go ahead and actually build your own conversational AI and in the last videos if you remember I talked about the power platform family right it was believed to be power bi power ups and power automate but then then power virtual agents came in and and I became the latest member of the family now you can go back into the previous video and add a little bit more introduction on that right at least wanted to kind of start off with this little you know introduction that now we've got PVA or power which agents as the new member of the family now in this one over here I'm gonna be focusing purely on these two power automated power virtual agents and you kind of understand why I am doing that because what the whole concept over here is if you feel remember in the previous one I've actually gone ahead and built everything into the PVA you know the questions and the response and everything was on in the PVA but now I'm going to go ahead and put the data on the common data services side and uncommon data service I've actually built an entity over there and the data and all the answers are actually coming from there the big reason for that is it makes it really easy for the end users to go ahead and update the information which the bot is referencing and that really makes it easier because then you don't have to go in to the bar into the logic over there you don't have to do any work over there that's already built that's already running but all the data fetching is only coming from the CVS entity types and the you know intermediate is power automated over there that's gonna be the big focus for this demo over here and then that way just to give you a quick understanding over here I'm gonna be you know basically focusing on sessions a great place for this bot is to actually help an end user to just get all the session and sessions information for a conference or a summit or whatever it is either a SharePoint Saturday over there so what I'm doing is I'm actually going to go ahead and make a bot system where in the body you can basically search and ask the broad questions based on the session name or you can go ahead and ask you know questions based on the speaker name and it'll get all that information on there for you the other thing is when you go ahead and enhance that bot so that it'll even filter out past sessions and I'll show you how we can go ahead and do all that right so now that you've got a good understanding on this let's just jump in and start working on our bar so what I'm gonna do is I'm gonna now get off this slide deck and we're gonna jump straight into our bot system over here as you remember this is the one that we built in the in the past video of event and build the services remember we talked about power-ups 9 1 1 my favorite Power Platform consulting company and we went in and build this one where they were able to you know build a bot system which basically just answers those basic questions that they had and these were the trigger ones over here so that's the one that we did last time now what I'm gonna do is I'm gonna build a new topic and in this new topic I'm going to go ahead and call that as sessions so here this sessions let me go ahead and save the topic and I'm gonna go ahead and start putting in some trigger phases or phrases something you know basically trigger a type of questions over there all right so that's important that we do that first before we go ahead and start authoring the canvas so the couple of hours that I already thought off I'm gonna go ahead and start typing those in or in fact mending a little copy and paste you know questions which just immediately the first thought that comes to your mind about these trigger questions go or phrases go ahead and put them over here because that's literally what I'm doing the first thought that comes to mind that's what I'm putting away here so I already have a list ready that's what I'm gonna do is when I come over here I says hey have any questions regarding the sessions how many you know have a question regarding the speakers also same type of questions but I'm playing them as separate triggers things such as have questions about the conference speakers same thing have questions about the conference sessions and all you have to do is input at least a try to give 5 to 10 so I was going the extreme side I'm at least trying to put in 10 over there so yes that's basically all I'm doing all right and you if you're following along this video of mine go ahead and do the same thing what should you know what you're seeing me do over here and you know you might already have these phrases that you have ahead up ahead of time go ahead and put those over here or you can go ahead and type them or you can do a lot of free no pausing and basically put mice the same stuff that I'm putting in over here whatever works for you my advice would be at least to kind of either stay in that 5 to 10 range of these phrases or if you're like me and then go ahead and put them in the max which is you know more than ten over here what else were impressing go put in speaker and put in session we're gonna put in sessions covered and I think that should be enough to start with all right we're going to click on save and now we will also go in its topic you're safe successfully good let's not go into the authoring of the canvas now like I said before in the intro I'm gonna build this kind of like a two-step process first one is it's just gonna answer the basic questions and then we need to go ahead and go to the bath you know run the power automate flow get us the questions we need and also come back over here but in the other place you can i enhance that a little bit more so I've already gone ahead and started building the pod thing but one thing I didn't pay attention to is you know what I need to put in that data on the end to entity side you know on the CD s entity somewhere it's gonna fetch the data so let's actually just keep this as it is and go work on the CD s entities over there so what I did is I am gonna go ahead and show you this excel spreadsheet that I have and what I did in this expect Excel spreadsheet is basically and I'll show that to you this is just something simple that I did for myself and you'll see minute virus so this was basically some examples that I got I walked I spoke at a Power Platform virtual summit which is in Atlanta in USA I so I went ahead and took all those information from there and I've combined it together and that's why you got some of the information just had to drop in power virtual agents over there but all this information all came from a conference a legitimate conference which actually happened over there and these are legitimate speakers that were over there obviously you can see my name you know took things such as the room went ahead and also took the data over there and the type over there the date I've intentionally put in these dates and times even though the conference is over but you will see you know if there is I work to this why I've done that over here all right so now as you can see my data I'm going to kind of take a break and I let me go into it's just go somewhere else in the power automate either way I just want to go and hit on the entities you don't have to do that we need to go and start putting data into the entity site so affect power apps would be a good one to go over there excuse me signing in and just to make sure I'm all in the correct place yeah I am okay so I'm and I'm the default one over here want to come to entities and in the entities I am going to not build a new entity and I'm gonna kind of give it the same name so I hear that it's sessions so I'm gonna give the entity name also the same just gonna call this a session yeah we'll leave that as it is save and then here are the fields that I'm gonna do I already have name which is the session name which is right here we want to leave that as it is next one I'm going to call that speaker that's good also the next one I'm gonna give it is room done and I'll also put in date obviously ID the date I can put in the full date and time and then the last one I had was type which is you know what session type is it is it a workshop or is it just a breakout session so this is all good yeah I'm actually good in the information now I'll stay on this page everything over here is good sessions episode let me close this one out save the entity entity is getting saved and then after that I'll show you a neat little trick which is to edit data in Excel because now that I've gone ahead and build all the entities in the fields over there I wanna start putting in data so this this is a little trick that's right now you'd realize well I actually had that Excel spreadsheet created because this is the way I'm gonna start dumping data in over here and if this is the first time that you notice it can be done this is just a great way for you to get this for me to introduce this way is to start putting data in c.d.s entities in bulk all right so now I've got all this over here it's the correct entity I'm going to click on edit data in Excel yeah that's fine I'll just save it on my desktop save that opens up I can open this app and it'll open up in my Excel a new Excel spreadsheet so this is what it does it first opens up this way and it says I'm gonna say yep I'm gonna enable editing usually the first time when it comes up over here this is kind of like the add-in that comes in and it may ask you to verify authentication which is exactly what it did for me so I'm going to open this up because I'm going to need that username and password I'm going to sign in and this authentication pop-up window comes up it's just perfect alright so I'm gonna click on that last one actually it's not the me double check yep that's the one over here let me go and put in the password and sign in looks taking the authentication and it slowly data so this connector is already built in if you actually already had entered some data whether it shows up on you know this table I really love the way I can go ahead and do some bulk entries over here so now let's start doing some copying and pasting I'm going to literally do a lot of copying and pasting from here again this is for me just to kind of show you that I've got some data in the c.d.s entities and you can in a side-by-side do this something similar get your own data you know and start filling it in information over here okay now the next thing i got it i got date so I'm gonna go ahead and grab the dates grabbing the date in my mind has date and time so the dad rooms I got rooms putting that information over here speaker putting that away here that's one two three four one two three four four columns now if you save this spreadsheet it's only saving the spreadsheet on the data locally on a machine it hasn't gone ahead and published the data up over there for that you got to come in this little place over here you got to get the club bit published and that's what it's doing is publishing the data and it says publish successful workbook updated so now when I come back over here it's the sessions I click on data as you can see the data being through and if I change the view to all fields all of them is over here so we've successfully got now data into my CD s entity SATA if they're not going to start you know I'll every inch a power automate to get data in for the power virtual agents but this makes sense because I think I've worked in very simple over here you know we created the CD s in the entity over there put in all the fields that we wanted and but then we use the Excel to put data at there in bulk so I'll kind of walk to that little story as slowly so that you can understand that okay let me just gonna close things that I don't need right now so I don't get confused that's fine let me close that and let's we'll keep this open as it is just in case now let's go back to our virtual agents over here okay so you remember we went ahead and just open the sub event and put the trigger of phrases and we came over here so far nothing has happened much but I'm gonna start working on this all right so follow along first thing I'm gonna ask you know just like I'm keeping the bots very informal that's the whole process of you know filling and filling the part over there so I'm gonna say that the bot this is as opposed what's telling mrs. hider little eraser so right there looks like you need some assistance to pick either a session or a speaker I can help all right on this wing and saving it away here so next thing I'm gonna ask is I'm gonna put it ask a question so I'm gonna say it asked a question and then the next thing when you notice when you ask the question a few things happen first thing is a variable that shows up so I personally before I forget assign an actual variable name over here so I'm gonna come in I'm gonna say selection type all right that's the best variable name I could come up with right now sorry I did selection type my question is I'm just going to say pick one now I intentionally just put that question as a pick one because I already went over here and I actually asked a question so kind of play around with that you know I put in a message the message was kind of half the question and then the question was just the remaining half so you're not kind of play around with the whole come to the message in question you could potentially even put your question this entire message over here but there's a reason why I didn't do that and you'll understand that at the end all right so again this is gonna be a multiple choice one so I'm gonna put one is I'm letting the user select based on a speaker and I'm also letting the user select based on the session because that's what you know I put up over here is I'm going to give two options the first the the person who's using the bot will say I'm gonna sub a search based on the speaker name and I'm gonna search based on the session name all right so we've got that over here and now let's just continue working on this you scroll down and so here for this condition I'm gonna now ask another question and I'm gonna say something in effect okay we also want to change the variable always remember to change the variable beeper and so the first thing I ask is okay so this is where the speaker says we can you give me the speakers first or last name and the reason for this is because the MER doing the search using power automate and you'll see on the power itemid side the search is so powerful over there it really doesn't care to see if it's the first name the first letter of the first name or the last name you just that's why I'm just saying that just give me something about the speaker you do the first thing or the last name and I'll go ahead pick that up now since I'm picking up a text over here change the identity from the multiple choices to the users entire text right and it's gonna go ahead and pick that up so I'm gonna pause over here let's go ahead and actually even switch over and switch or but do the same for even the site for that session sites I'm gonna ask a question and say any sessions in particular you're interested in same thing go ahead and change that to a user response and tell user response and over here I'm gonna call that as session variable done I'm gonna save it and I'm gonna pause over here for a minute I mean we Google+ right here on the power virtual agent site because now I'm gonna switch over to the power automate site alright okay so I'm the power automate let me you don't okay I'm gonna keep that as it is from here I'm going to now jump into right-click and go into the power automate and on power automate if you realize we're gonna create two one to search by the session name and then one to search by the speaker name so what I'm gonna do is we're gonna come to power automate away here make sure that it is in the same environment of yours and I'm gonna go to solutions and in solutions I'm gonna actually create a new solution so because this was just called events I'm gonna change this new one over here I'm gonna call it as event if you already had an event and you can just go ahead and use the existing one I'm gonna create this as a new event I'm going to create that and I'm in here once I'm in here you can do that it's just new and a new you can create a flow another neat cool feature it's actually just showed up it wasn't even there in my previous video is that when we go ahead and create the flows over here I'll show you the optional not through the flows through this in action over here in power watch Nagant you can directly go ahead and open up the flow over there you don't have to come in and you know find your flow rate directly opens assets that that's Whitney feature so knew that it wasn't in there my previous video it actually showed up over here but when it comes up alright so I'm right over here in you clicking on flow and we're here I'm gonna call that as our whoopsies restore our virtual agent session name and also here's a cool thing we just come up now is that the new triggers are there again in the previous video that trigger wasn't there but now this is neat because now I can come individually to power Bertram into power automate create my you know my solution go ahead and create the flow over there and then call that in into power virtual agents and it has its own trigger and it has its own end as well so here on the power of our agents and click on that click on that one and in here I'm gonna have one input the input is gonna be a text type and I'm just gonna say that as session I'm gonna make sure that it is actually a session that is received session in from the session name that wasn't received from Power virtual agent so I'm just gonna call it as session wreck for received you can put the whole thing in to see if it's completely up to you after that I'm gonna call a list of common data services because I want to go ahead and get a list of all that c.d.s that entity with all the sessions name that's what I'm gonna do is I'm gonna go over here the comments data services and I'm gonna go ahead and say I want to get a list of all the records from that entity so that's why I'm selecting that I just click that list records all right let's look that good so now here I can select entry selecting an environment I'm just use the current one and then over here we search for the one that we created and it was called something as event I just got events double checking that sessions it was actually called sessions and I checked those sessions all right go ahead and save that now in this case we're gonna do some filtering because what I want is I just want to get the session name that I've put in that I've told the power virtual agent so that's why over here I directly want all the queries to happen right here and I'm pulling the records over there this is very important when you do this kind of filtering because they're needing all the filtering on the CTS side you know like we call the server side filtering it's all happening on the serious side which means it's only gonna pull in limited number of data you want to do all the filtering directly this way because you don't want to go ahead and call all the data and then do a filter or a condition that's just gonna be too much more load on the flow set or the power automate side you want to do all the filtering over here so that's where you just do the old data filtering query right there and in that way the filtering the condition that I'm using is I'm calling it as contains and then contains I'm gonna say just get me the session name which matches or which is you know which contains the same text that the end the user is put in and this is where I always go ahead and keep that c.d.s entity available because I want to get that name so what we did was our session name was just called as name so it's right here primary fill field and that's what it is right because if you come to it and we actually go and see the data the field name has all the names so that's why I come over here I find the name the title actually what it is I even switch to ask what happened let me get back into the entities session name and I'm just gonna copy that from here you do the same come back into the flow and it contains you paste that in comma single coats not double coats a single coat and you put in the session name another coat to close it let's take a look at that all right all I'm doing is I'm gonna go ahead and do the contains that's something that you type in make sure you go ahead and get that field name copy that comma single coats get that trigger name from here another single coat and then close the brackets go and save that next we're gonna go ahead and do initialize a variable and so just type that is variable I'm gonna initialize a variable and this is important and initialize the variable I'll just call that a sessions variable I'm gonna call that as a string make sure you select that all right now here's a neat an important step goes what I'm gonna do is I'm gonna now do a append to back in the variable in the variable I'm gonna do a append to string variable to append to string variable and over here I'm gonna call that sessions 1 and in here just type in or select something so the first one I'm gonna start typing in is I'm gonna try to get three things I'm gonna get the session the name of the session the type of session is it and then also the speaker name of the session so at least start typing that end session here just the text I'm just typing in text outputs session : and then after that I'm gonna go ahead and just get the name yunying right here and when you do that it immediately goes ahead it does this for you that is okay because remember we are doing a filter over here based on contains so what's gonna be neat is that now how using this system with power our automate and its flow even if you give it a kind of a generic name that this is the session I'm not sure if that's Title II and contains this session in title name contains this text you just put in a text and that power I mean automates flow is going to be smart enough to search through Ramona doing this contains filter query it'll search through and I'll give you a bunch of session names and that's why this apply to each which happens automatically is really helpful over here so what I can do is I'm going to do change me and change that I just hit enter over there because remember I still have to put in the type but this is a workshop but it is a breakout session let me get that anyway here type again hit enter and then the speaker name and there it is speaker name and then after that we're going to go outside the apply to each you don't do it inside outside and over here just type in again our virtual agents or just power watch agents and get this one the return values okay and the return value I'm gonna call that session return ret and all I'm gonna get from here is this initialized variable one that's it this one right here so I can do that and right now they should only be bunch that's the sessions variable so put that in nope you know what I missed a step one of the things that it doesn't like is we want to go ahead and take this variable and dump it into a compose statement that is a very important one so I'm gonna do that pose get that into compose just a simple compose and then compose we basically drop that session variable so that works out well and then here you go ahead and pick in that compose outputs all right just do a flow check no headers and the warnings you're good save it there's no testing we can do right now because that's the only way this is gonna be there so time that in fact the process for the speaker name is almost the same but just so that you see a repetition I'm gonna make another one another flow but what happens is let me show you some things get done over here click OK in the solutions now when I go to event you will see that the the power automate flow that we created shows up over here in your solution so that's important we need that over here alright so let's go ahead and finish off the other one to is for we did the one for the session name let's go and do one for this the speaker name as well alright flow gonna call that the same thing power just make sure I've done in session name yet so power virtual agent speaker name there's already power virtual agent so here cause the flow will do that as a speaker and in my right over here I had done the session one I'll open that up so you can see that I've done the session requested or rec and well yeah I'm gonna do that speaker requested those right right from here I get the same process one go ahead to the common data service and when we list the records it's coming from the same entity area environment areas interesting others current and way here make sure I think it was just if sessions or events were worried I search policy there were sessions sessions you're gonna do another old data filter over here this one's old data filter is again same the name I'm gonna get is contains I gotta get that the name of the speaker column so it's speaker but I'm gonna grab this highlighted it did a control C coming back to my no that's this one here I type that in I mean at the control-v to paste it in comma single quotes and going ahead and getting that single quotes closing it safe now this is every once in a while I do see an error that shows up over here I'm not gonna talk about it because it may not happen but if it does and like exactly where that error is and I'll show you that so now I come back over here go ahead and grab that variable this is all kind of making sense cuz we just did this a few minutes ago I'm gonna go ahead and initialize a variable it's gonna be a string variable and I'm gonna call this one speaker variable keep that as it is come over here I'm going to again go to variable in the variable I'm going to now tend to the string variable and I start typing that in over here especially because this part of it is almost is the exact same session type speaker I'm over here get the session this shows up exactly as we need leave it as it as it is type and it's the session type it just was the type over here right correct yeah it was time speaker save oh it's something okay that's fine we'll pick that away here obviously next I'm gonna go ahead and create a compose compose in the compose I'm gonna drop that and then we're gonna return this back again let's just call that as power virtual agents our virtual agents will return it in my case I'm gonna call that a speaker that's what it is speaker 1 speaker ret for return and in here we're gonna drop that one okay both the flows this is kind of the first version of the flow I'm gonna come back and add some enhancements to it later but this is like the main chunk of it what we did that for the speaker one we went that ended that for the session one as well so let's go back into our virtual agents and we'll continue working over there and so this is the place where we stopped last time okay so we start by saying that the two questions are asked we got you know the question for the speaker name we got the question for the session name and over here now we're gonna start calling some actions I'll call an action and as you already guessed that action is the two flows we got so that's why it's easier there you go ahead and make all those names the same flow names over here the variable names that we can relate at all so the first one is for give me the speakers first name so it's gonna be power virtual agent speaker name okay that's the one that I'm doing over here and then in the speaker that's the one we did over here it's the speaker variable see that's why I kind of give those variable names all something that makes sense also this if you notice it's pretty slick because it picked up that variable the return variable from power automates flow and it dropped it over here see that's that's pretty neat because it's showing that it's taking care of all of that over there all right and so you went ahead and return that value and after that I'm just going to put in a message over here a message and it says and the message our bot is telling us here's what I found do that and the message is going to be from the speaker returned that's what it is and let me do that save over here let's do the exact same for the session as well so I'm going to come back over here call an action and this actually now is gonna be for the session name come in here it's gonna be the session variable do that drop in a message show message same thing here's what I found and over here I'm going to put in the session variable party the session return and that should actually be in a pretty good way here what I want to do is actually take it to the next level what I'm gonna say is that once this is all finishes over here I'm going to tell the you know the user using the parts going to ask is that hey you have another set in another question because most of the times they might be looking for a few speakers or a few sessions so the bot needs to give the end user that opportunity to say hey have you done or do you have another question so that's what I'm gonna do I'm gonna come over here and I'm just gonna ask another question and I'm you can randomly pick which one because I'm actually gonna just connect the two so here's what I'm doing I'm gonna come over here and I'm going to add a ask a question and the question is have another question you know maybe that is a multiple choice and what also never forget a variable the variable in this case I'm gonna say in a session continued just gonna say something like that choices by default the first time out goodness yes but the next one is no that is good so what I'm doing now is from here I'm gonna take that click on it key thing just click on it then you drag that and you've connected over here now if you run with the previous video I kind of said that you need to at least add you know a message over there from that time I actually learned that you don't have to do that anymore because if you do then that message from there just swings up to the top or that you don't have to do it anymore you just go ahead and do click on something and make sure that that plus changes into the circle clicking and then you can drag that over then it works works really well ok so go ahead and did that and over here I am going to say if it is yes then you go back and drag this back to because if they have another question I'm gonna come over here and say pick one if it's for a speaker or a session now do you understand why I did it this way because acting like I mentioned before if you remember I could have actually put this entire text as a question but I know that I'm gonna be you know pulling this information from the down to the bottom so I intentionally put half of the question in that message and then over here I went ahead and just put in that question now this is the part where it gets things a little interesting and you kind of have to you know play with it a few times because what I want to do is if it is yes I'm gonna take this and connect it up there if it is no then I can just go ahead and end the conversation you know I'll end it with a survey but here is where things get interesting so I'm gonna do that and sometimes sometimes you try it you click on that away here see that it becomes a little interesting so we here you can leave that as it is and then you can come back over here right up to the top select that and it works so you did that over here and make sure that it connected to the correct one see that's right the clicking is very important if if you do not clicked over here the next thing you gotta click is bear that loop is gonna start you can't go and click somewhere else I'm gonna give a little tidbit over here to is sometimes if that doesn't work go ahead and drop that message box over there sometimes that really helps you because then you know that there's a message box which means when I click over here that's the one that's not selected key key thing is takeaway is that you gotta remember if you've clicked on that that's the beginning of the loop the next place you click is it has to be the next place is that where the loop ends you can't go and click anywhere else because if you do that a whole loop and your logic is just gonna be thrown off right so can I keep that in mind over there so we've pretty much finished on the first side of this you just double check everything looks good mm-hmm okay so let's stop do some testing so I'm going to come over to the test the chat bar over here and I'm gonna straightaway jump into the the you know the testing session of this side over here so I'm gonna ask say sex interested in some session information now we didn't actually type this as a phrase all I did was interested in sessions let's see how well this thing picks it up okay smart enough really well right it went ahead and picked up everything and he not only did it realize that it's just a trigger one but it also realized that his he's already asking for a session which means I'm gonna skip this altogether and come straight jumping over that bad system is really smart that's what I love about that bad system over here all right say jump in straight to the section over there so it says yeah I am interested some sessions you know what for the sake of this one I need to come over here and actually see what are those sessions informations I put it alright so I came and let me get those session names data and let's do a little quick search I said something about session sessions and say so let's start something easy I'm just gonna say serious let's type insidious now it's sending a float it's actually communicating with flow know this is an error that I have also been getting you may also get it and I know exactly what the problem is so this is to delay the session one so let's go back to the session place here we will see that has failed come back to the edit and in the Edit here's where it fails it's in the filter one see if you remember we did type in that that single applying across a comma I mean a single code and then the the you know closing it but for some reason after I save it it goes away so I'm gonna do that over here come back away here click on the single quotes and save that again okay and since you're doing it for the session name let's go and do that for the speaker one as well because watch when you come back over here go ahead and edit it out there see it disappeared over here as well easy fix nothing to be too concerned about okay so let's come back over here I'm gonna just reset that we'll start all over again and I'm gonna start with ya that's not very nice conversation so hi there human agent okay so how can I help today this is let's just type in interested in sweet crystal and sessions and it's um hi that looks like you need some assistance to pick up you know just the way that we did over here pick one so I'm gonna do sessions that sessions any sessions that particular you're interested in what I should have done is also having the text is that you know any sessions you're particularly interested in type it in you know something like that which makes it more easy for the user to understand so kind of keep that in mind as well CDs and so here's what I found when dad and found one session the session name and I typed in common but we can fix that piece over here but it told me what the session name was the name and then also told me what who the speaker over here so I said do you have another questions is yes I'm gonna do that and now let's go ahead it jumps me straight up I'm gonna go out now to the speaker name and I want to show you this one little trick because it's gonna be a place where there's multiple information coming in and how that information comes in how that the format looks so here is also important so in what I'll do is I'll try to pick a speaker where there's multiple names over here and you can go all fields and let's intentionally do that so you've got in the speaker's Dan you know I'm speaking a few times so I'm gonna put my name over here can you give me the speaker's name I'll just type in Danielle so it's going ahead and searching and it's pulling in all the information now see how it comes in all this information over here session and speaker and everything it's kind of little messy so I'm gonna go on the flow side and I'm gonna do some cleaning up over there alright so let's come back over here speaker name let's go back in and this fix is so simple it's actually inside there apply to each string we need to see why it is doing that so the time we can actually change that to let's change the type let's put in I think room wasn't much more nicer rooms more nice now watch this I'm gonna come in and I'm right on the top of taking my clothes before session and I'm all hitting it's enter same thing here I come in to the speaker right to the end and I hit enter they had two gaps that she put one cap on the top and one cap on the bottom it's gonna make that data presents so much more nice and cleaner watch watch what I'm doing away okay let me do the same thing even on the session side come over here on the sessions I'm just making sure everything is good take up the type I'm gonna put in the room and come back here home put that up space over there space save it and go outside save go outside now let's try to do the same misses and in fact we said that I'm gonna do the same thing with the speaker name you know put my speaker name over here and now you'll see how that happens all right I'm gonna do hi there say hi session speaker four minutes to particular speaker in four please yep need some assistance gonna give me the speakers first and last name let's try my last name see what happens Christian searching the flow is running and here now I know that the session name came back a little weird the room name cleaned up over there nicely but you see how the format changed it looks a lot more nicer right now because you see it it's it's breaking it down into nice chunks and that chunks breaking down is all because of that little space to put on the top and then the little space to put on the bottom and it works it works really well the way right now something is up on the session name over there how I know what stuff were there it was I think because we didn't actually put in the name properly we'll try that one last time if it works great otherwise it's just a minor you know hiccup over there so it's not the session but it was actually the name save and I'm sure when you saw me build this you probably figured this out right from the beginning is that Daniel that's gonna be a problem and you're right it was a problem I just didn't realize it ahead but then this is how I become and troubleshoot so if you figure this out right from the get-go good job which means you already are familiar with the bit flows okay remember that gap on the tar from the gap on the bottom perfect one over here we'll see have another question yes I want to go back to the session one and I'll have us I should never send me the speaker one millets let's do a test on the session one as well since we here testing it let's randomly pick something what we got do we got let's do step by step step say let's do this step by step okay I'm not even putting the dash in just when you step by step let's see with the bot smart enough to pick that up here's what I found and it didn't find something else with it I'll show you the fix for that okay here speaker all right here you nice and clean session give me the session anything that had to do with Daniel Christian it went and pulled that up and it put over here flow on the back and the power automate power automates flow on the back end did all of this this was pretty sweet I really like the way this thing worked over here okay does it work space again when I was doing a search for the speaker it pulled that up and I did a search for the session title it went and pulled that up over here alright so at this point this is already too much information for you this would be a good place for you to stop but if you're interested has a little bit more that I want to show over here I'm gonna take that power automate to the next level and so let's continue with that okay what I'm gonna do is first things first is I'm going to come back to our power the CD s over there I'm gonna intentionally change the date so me come over here I'm going to go into that edit an Excel spreadsheet yeah we actually already have that well open that up spreadsheet enable editing and I'm gonna change that date because I'm gonna do two more things I'm gonna add a filter so that it doesn't pull the past dates the BART is smart enough should be smart enough to say I don't care about the past dates I just care about the ones which I'm moving and now I'm moving forward so I'm gonna make a little change away all right see this one I'm gonna change that to February 29th and do that to feel these everything was here I'm gonna change that soap our virtual agent I'll change a few of them because let's just remember that okay few 29th let's even change this one to 229 and see if it gives me the option to do that to publish save it but it didn't allow me to say that let me close that again let me edit an Excel open that up somebody's in it didn't anybody do that let me just try that one more time and he will editing did what I'll do is on the connector side will actually use that calendar widget that showed up over here so I'm gonna come back put a goal over there they'll go February I'm gonna pick on that 29th same thing here February 29th February 29th publishing yep seems to be working we got that over here if I just refresh the data the dates changed where they're perfect all right so now we've got some day some technically some events which have already been finished in the past so now let's go ahead and make our flow even a little bit more smarter come over here and for the speaker one here on the speaker one right now so I gotta add another condition in my query over there and this is going to be that condition because right now the only condition we have on the speaker name is that hey go ahead and just get me as a speaker name that matches that but in addition I'm gonna do a and the date and time needs to be greater than today or now so I come back to the data and time which was this one away here date let me get sure I get the correct field the field name is this one me here and this just paste that in and GT for greater than GE for greater than and then you go get the expression UTC now get it close it okay so this is gonna be smart enough now it will go ahead and actually only pull the future ones it's not going to go ahead and pull anything which is in the past because when the chat BOTS communicating with you and it the end user only wants to know which are still available they don't want to know the ones in the past so that that filtering really helps or that the other thing I want to do is I want to actually go ahead and now even see if there if the somebody is intentionally searching for something which is in the past there's no more speakers no more sessions available for that speakers because they were all done in the past so how does the bar tell you that I said hey maybe all the sessions are coming over there how how does you know the part communicate that with you because all the filtering is done everything is done over here we need a way for that bot to communicate with you now I tried doing that on the PVA side the power of watched agent side and was a little bit more confusing over there so in this case I'm gonna go ahead and just you know it was best to be do it on the power what should H I mean on the on the the the flow side which is the power automate side so what I'm gonna do is I'm gonna actually come in and I'm gonna put in a condition right after this apply to each ok I'm gonna put the condition and I'm gonna say make sure I've got everything correct yes right after here I'm going to drop a and an action and that action is basically going to be a condition and the condition is going to be if the speaker variable that I'm gonna leave it equal to if the speaker is blank then what I want you to do is I want to create if it is blank then let's create a compose and we'll call that as a empty compose so you know that empty compose and in that compose I'm gonna literally type in just empty which basically says that hey the data that's coming in is blank there is nothing in here so when I send this back to power virtual agents power virtual agent we'll see but there's no data there's no safe sessions left by the speaker or everything is done or in our sessions with this title so it's gonna send back empty over there which is great because then in file and power automate we can use that empty and do something with it so I'm gonna do that and then finally in this side here you go ahead and draw both of them so I'm gonna do now I should see both the empty one as well this one was the original one the video added over here but in this section away there we're going to go ahead and put the empty one as well it's the same thing let's go ahead and do that on the session name side can I do it once again so you'll understand what's going on we're going to right after this to another condition we're gonna drop a condition now when the condition basically says that if the session also is empty if it is empty I'm gonna drop here it can pose same thing it'll all make sense when she get it actually done well yeah I know the flow side is getting you know fitting with somebody who's new this this might get a little bit confusing but you know you understand that they just all the other magic has to happen on the flow side over here you know the power automate so did that and now we're done on the power automates flow away a red dot all the remaining work will be done only on the part of which late inside so I'm gonna reset that in here we're gonna do a little bit more work right so we're gonna do it both on the speaker side and we're gonna do it on the the session side as well so first things first is right after here what I want to do is I'm actually gonna put in a little condition because what I've gone over here and done is after the power virtual agent has you know gone ahead and say hey here's what I found [Music] I'm gonna put in a condition all right so there's a condition here that's not that and you've we said that I want you to discard any change see that's what happened when I clicked on it it's going ahead and doing something magic over here say I don't want to do that I want to do that he said dad and right now there is no way for me to do any of this so I can just click on something undo it but what I want to do is I'm gonna put in a condition so right after this thing goes over here I'm gonna make some change so here right after this I'm gonna put any condition and I'm gonna say add a condition and the condition is going to be whatever is the speaker is returning the speaker's returning if it is empty remember how I went ahead and got that empty from there if it is empty then go ahead and drop a text I mean just a message and message is basically going to be something very simple it's going to be hmm it's possible the speaker has no more session left to deliver just to be and just to be sure let's try this again so remember let's just pause for a second and see what we did over here we went ahead and put that empty over there because the empty if if there is no session information for that speaker or that session then flow is going to return that empty back over there you know that little trick that we just add over there if it is empty which means that either this their speaker is done with all the sessions or there literally was no session with that search that we put in over there but this is a part it's an it's very personal but with you so that's why we will we still want to go in and put this message their home it's possible that the speaker's no more sessions left to deliver but what I need to do is I need to be able to take this and return it back all the way right up over here so I'm going to take this back and start again add the question just asking the question right here's what you want to do it now this is where I can get a little tricky so I'm gonna try to make sure we do it correctly so did that and click on seat it from here so what I should have done first was come actually wait here and did it connect yeah it took it straight from here I went and connected straight all this you see what I did I wanted to make sure that we give this please one more shot and one more shot means that I says which is you know that I'm possible that I put in the speaker's name wrong or something so from here I'm gonna loop it back right up over there and saying giving the user the option to go ahead and do put that speaker name one more time so we took care of the speaker side you got to do the exact same thing for putting in the session name as well so in the session name now I'm gonna do the exact same way which is come right after the question over here I'm gonna do that and then up here I'm gonna add a condition and in the condition I'm going to already this is already connected loop OS that's great what I hear the session returned I'm gonna type that in as empty because if empty comes in make sure is there going to put a message in fact the message can be almost the same same hmm it's possible no more sessions remain on this topic just to be sure let's try this again you just save that I'm gonna go ahead and get click on that and then we drop the see something happened away to undo that because I want to take it from here we're gonna do that again and we're going to drop end right there let's see did that work sometimes it makes it a little bit more confusing no I did not want to undo that also when you work on something like that it's best that you hide that bad system over here all right so I wanted to kind of come from right here from this one and take it all the way up over here looks like it took it there's a good yep it did now you got to kind of pay close attention to how it is because I know this thing might then slide down so it can be a little bit more confusing but all in all this is really good okay this is good I know this was a lot more information in fact this entire videos been over one hour that's why I put it in chunks over there but this is kind of that added functionality now that the bot is smart enough not to search for anything that is for the past events you know that's why we went ahead and added that little extra condition over there and if it cannot find anything which is for that old ones it will come back and even you know make the bar a little bit more smarter so let's do the testing because that will make more sense and so I will come back to data over here and I want to find some good data for testing first thing is anything which is in the past it should not give us any of those results the filter should not pick any of them up so I'm gonna this when I do a search for power virtual agents it should take it about things it should not be able to find it because it's already in the past and it should actually even come back and say you know it's possible that the session is already over let's go and try that search again so let's do that test and this is a session name so I'm gonna come back right here to test our bot and I'm gonna do with hi this is gonna be like the final big search that we're doing right just to make sure everything is good how can I do so I'm gonna pipe in session anything in particular just to be on the safe side I'm gonna make sure that actually get the correct session name power virtual agent so I'm gonna say power virtual agent it's doing a search is doing a search is running it through the the flow and it comes back over here and it said here's what I found power virtual agent do you have another question now what happened was let's take a look maybe the date didn't work or something like that so let's keep testing it we'll see what happens our virtual agent it was in the past so let's actually could look at the flow okay it's quite possible that the date filtering did not work out really well figure it out list of records and the records that should come back with power virtual agents we did go ahead and pull that one the filtering did not work well yes let's take a look at what happened in the filter aha see it went ahead and wiped it off him and that would the filtering that I put over there it went ahead and wiped it out the same problem we had with that single coats and it probably took care of that all right I may not have just put it in for that one so I mean go ahead and put in the and and this was for the session name so let me go to the session name and the session name we have the date it's possible that I missed it let me go ahead and come back into a power automate and see R is greater than UTC now mmm-hmm let me just make sure that on the speaker name side that filter remains it's there over here probably I I it's possible I just completely skipped it over here because we were covering so much greater than UTC now alright so what we can do is let's try to recreate that same thing it says have another question still yes hopefully this time it'll still work pick one I'm gonna go with the session name and you see notice that when I'm typing it in I'm putting it all in the word case over here our virtual agent this time let's see what happens see that it's seven hmm it's possible no more sessions remain on this topic just to be sure let's try to get went up to the loop O'Day did that make sense to you because what happened is this session over there it is now in the past see it was we've changed the date for that session to something in the past the flow went down and filtered that in because it's only looking for everything which is UTC now now and and and you know forward over there but in the power automate we went there and put in that condition that if for some reason flow sense that empty back empty means you couldn't find anything then go ahead and put in that little text saying that hmm they couldn't find over there making that bot a little bit more user-friendly a little bit more human ish if I can say that like you know that's its word and it really helps over there and all of this could be done using the magic of the power automate and then also using you know the power virtual agent over there so just it was a quick recap what we did today was we first went ahead and use an example of a worth of you know sessions in an event we dumped all of that into CDs first and I showed you a quick TVA to do that in bulk you vendor and create an NT over there I call it events you know using Excel spreadsheet type of thing put all that information over there then after that the event and ID started building the Barton a little bit you know Bob art which means goes ahead and at least has all these great triggers you know puts in a little message or they remember how I kind of taught you that little trick is that in the message put it like half the question over there and then the remaining half would actually be a question because keeping in mind we're going to do this looping connection here from there we did the first question and from the questions were two types speaker and session the speaker one was going ahead and pulling information from the power virtual agents I'm sorry from the power automate over there so we created to power automates want to go ahead and pull the speaker name the other one to go in and for the session name over there and for each of them initially it just pulled information came back it was all great later on we went and did two more enhancements we first added a filter to Goods pull the information for future events you know it would not pull anything in the back future Deven was using that UTC now for both the speaker and the session but the other thing he also did was we did it as a test the event had changed the speaker name over there and you know we were able to test it but the final thing is that if it just could not find anything then the return value from the flow or the power or the power automate was just the text empty and in power virtual agent moment it sees empty then in its condition it goes ahead and puts his message to make it a little bit more you know user-friendly over there and then it loops it back over there just to make sure it all works so we I know we did a lot today we went and did a lot of looping we went ahead and did a lot of power automate fun stuff over there and you know going in and pulling all the information here but this truly is like an advanced it shows the power of this combination the power of all agents right so is fantastic the last video we did the whole thing oh that worked out so well but now and I was able to go ahead and you know loop in power automate and build a flow with that you could really see how we took this to the whole next level over there so hopefully this was helpful play around with it but this video is too big just do it in chunks the first one was just to go ahead and leverage the day data using flow from CVS and then after that you can go ahead and put in the extra loop thing which I showed you the second part of it so hopefully this was helpful and as always keep using the power platform
Info
Channel: Daniel Christian
Views: 9,415
Rating: 5 out of 5
Keywords: power platform, power virtual agent, power virtual agents, power automate, virtual agent, microsoft power virtual agent, power virtual agent with power automate, power virtual agent chatbot, power virtual agent flow, power virtual agent demo, power virtual agent microsoft, power virtual assistant, Power Virtual agent using Power Automate flow, power virtual agents step by step series, Power Virtual Agent step by step tutorial, Advanced PVA tutorial
Id: Vg0zbge6r0o
Channel Id: undefined
Length: 67min 35sec (4055 seconds)
Published: Mon Mar 02 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.