Using Power Virtual Agents in Dynamics 365 Sales (Video)
Watch this recorded webinar to learn how to create and deploy Power Virtual Agents in Dynamics 365 Sales. We walk you through how to try Power Virtual Agents for free and build a powerful conversation bot and automate processes using Power Automate.
Transcript below:
Melissa: Hi there, everyone. Thanks for joining us today. My name is Melissa. I’m a marketing specialist here at Encore, and today we’ve got Ziad Paracha and Pierre Manaigre to talk about the Power Platform using Power Virtual Agent in Dynamics 365 for Sales. If you have any questions, just put them in the question pane and we’ll address those at the end.
Ziad: Thank you, Melissa. And welcome, everybody, to our next webinar around Power Virtual Agents in Dynamics 365 Sales. We’re going to talk a little bit about Power Virtual Agent, what it is to set the right tone and towards our demo, and Pierre will kind of conduct the demo near the end to kind of show you some of the technical capabilities of the solution and how it integrates really well with Dynamics 365 Sales. The overall context of where you know, our market is in terms of data, in terms of how we constantly see organizations looking for effective ways to deliver customer-related or customer service solutions and being able to, you know, perceive some sort of self-service support options at a fairly, you know, cost-effective way is substantially high. And so, you know, we get customer service requests all the time in terms of you know, what are solutions that exist in the market that can be leveraged and integrated with the Microsoft family of products with our existing systems that you may have and how can we instill a better customer experience and a sustainable customer experience for their clients?
And the solution really falls under the Microsoft Power Platform family of things. You know, we’ve done webinars and articles on our website around Power BI, Power Apps, and Power Automate, so feel free to take a look at those. But today, we’ll be focusing on Power Virtual Agents and how that connects together with all of the other existing platform applications, but also how it integrates with Dynamics Sales, right? And so, we’ll work through what Power Virtual Agent is. Power Virtual Agent is the ability for you to you know, rapidly get and seek responses from your customers and/or internally for your employees by using these chatbots that are built you know, with very little code and all of them you can kind of have integrated with your existing solutions, and as well build custom workflows, whether it’s through Power Automate or through virtual agent being able to connect that bot experience to another system. So, that’s what we’re doing. There’s already some pre-built connectors that you can utilize, but there’s also others that you can you know, custom-create and we can kind of help with that as well.
So, what are some ways we can kind of utilize Power Virtual Agent? You know, there are tons and tons of real-life examples, as well as use cases that used whether it’s task automation to be able to get follow-up tasks from Power Virtual Agents, being able to create, you know, more AI powered chats to resolve issues that maybe your customers are having, or you know, a front door for your customers to kind of reach out to you at. And all these other ways that you can do it. You’ll see in the demo a screenshot of something similar to this. So, I want to talk to you more about what each of these boxes kind of mean to you in terms of the technology and the terminology of the technology for Power Virtual Agent. Three common terms you’ll hear throughout the demo is one is topics, and topics can be defined, you know, in many different ways. For example, a topic could be, you know, open hours, right? So, maybe you search an open hours and the AI matches that to you know, the client’s response to, you know, maybe they want to check out store hours, right? So, topics are really conversation starters, right? They are what your customers are interested in. What your, you know, user who’s inputting the text into the chat is looking for. And so, there are templated out of the box type of topics that you can use. You can also create and define those chatbot topics as well.
Then you create entities. And entities are a major part of the chatbot conversations in Power Virtual Agent, because it’s the natural you know, understanding of that language and the ability for the AI that’s put in partial into this Power Virtual Agent component to understand what the user’s intending to say. So, you can have phone numbers or zip and postal codes as examples of those entities that basically help to be able to create subject for that dialogue. The last part here is the actions, and actions are basically you know, what do you want the Power Automate or the chatbot to action, right? So, can we create these workflows so someone’s looking for store hours, do we send them a link to our webpage? And, you know, they’re looking for store hours, do we just you know, extract data from elsewhere?
And, of course, these Power Virtual Agents, once you’ve created them, you can publish and share them and be able to, you know, analyze those reports within your environment as well, and how it connects with Dynamics Sales in terms of your customers reaching out to you, or you know, if you’ve got you know, different data that needs to go back and forth from that system that can have that integrated experience. And so, I’m going to pass it over to Pierre to kind of talk about that integrated experience for customer interaction and how it interacts together with that you know, personalized view for your customers in Dynamics sales through Power Virtual Agents. So, over to you, my friend.
Pierre: Thank you, Ziad, and good day, everyone, and welcome to our demonstration today on the Power Virtual Agents. So, I’m going to run through the Power Virtual Agent that I set up here just so that you can see the flow of what it’s providing in terms of information, and then we’re going to dive into how that virtual agent was created and hopefully that will provide a little bit of insight into what’s required. So, as Ziad mentioned, there’s topics, which are the key phrases to activate the sales bot in this case. And so, I have the bot just on the Sales Activity Social Dashboard, which is whenever I click on Home in Dynamics 365, it brings me here. And what I want to do is reduce the number of clicks to get to different parts of the system.
So, I’m going to start by just saying, hi, which is a typical, I think key phrase that a lot of users would use just to activate the bot. And then afterwards, I created a number of other custom phrases. So, I’m just going to say that I want help or I need help with sales. And now, it’s going to present me with a multiple choice of Account or Opportunity. And so, in this case, I’m going to click on Account and it’s going to ask me for the account name. Now, you’ll see later on I just put it as a contains formula as opposed to an equals formula. And the reason for that is because if you’ve noticed here, I typed datum but then if you were to have an equals formula for the return on this account, then you would have to type this out exactly. And so, obviously, you want your users to be able to just select or rather type in just a portion of the account name or get the account name slightly incorrect, and then still have it return a value to your user.
Now, here I’ve got just the link to the account name. And so, I’m just gonna right-click and open that in a new window. So, you’ll see that it takes me right to this account. Now, I wanted to set this up with you know, basically a nice, clean hyperlink for you to click on, where the account name is a hyperlink. There’s a small limitation in the system at this time where that’s not possible. So, I did come up with this workaround, and it’s always evolving. So, definitely what you can’t do in the cloud today doesn’t necessarily mean you can’t do it tomorrow. So, we’ll see when this comes online, but it’s definitely gonna be a nice-to-have to make a bit of a cleaner dialog box. And as you can see, it returned the value that the account is managed by me.
Here’s my email address. And, of course, if I click on this hyperlink for my email address, it’s going to launch Microsoft Outlook so that I can email the account owner. And you could also highlight this phone number and then copy it. And then if you use Microsoft Teams as your telephone system, you just have to paste it in that section of Microsoft Teams. And so, I’m going to say, I don’t need help with anything else, and it did answer my question. And it finishes with a survey because you want to basically provide analytics to say you know, the user experience for your bot and just so you can manage some of that and you know, just basically make your bot much better based on the feedback that you’re getting from your users. And I don’t want it to help with anything else, so I’m just going to say, “No, thanks” at that point.
So, you have a very high-level overview of what the bot has returned for values, and now we’re going to dive into how that bot is created. And so, what I’m going to do first is just quickly go to Topics. So, you would go ahead and create a New topic. So, I’ve created Sales Topic 1, and we’re just going to dive into that. But when you or…pardon me, before you even get started, when you navigate to powerva.microsoft.com, you’re going to be prompted to start a free trial. So, go ahead and do that, and then it’ll basically give you a trial for 30 days in order for you to try this bot. And so, now once you’ve done that and you click on New topic, you create your Sales Topic, and then you just put your trigger phrases.
So, I have hello, hey, and hi. These default topics are actually included as a default for the bot to respond. So, it’s not going to tie directly into your sales bot. So, we’re just going to ignore those for now. So, if somebody says, hi, it will initiate the bot as you saw in that previous example, but it’s not going to be the sales bot response that we need. So, if you see here, I say, “Hi,” and it’s a default, “Hi! I’m a virtual agent. I can help you with account questions,” etc. So, what I wrote was, “I need help with sales.” And so these are the topics that are going to dive into that sales bot category or rather function and flow.
So, we’re going to just quickly dive into the authoring canvas right now, and I’m going to zoom in a little bit just to make it a little easier for everybody to see. So, here we have our trigger phrases. And so, there’s eight of them that are all captured here. And what you want to do first is add a message. And so, when you click on Show a message, you just basically type in text. So, you can make it bulleted or all kinds of things, but it’s just basically a free form text area for you to create your conversation. So, here I say, “I am the sales bot,” and then we have the next step is to ask a question. So, here, if we click that, now we say, “Ask a question.” And then again, you just ask your question, you just type it in. So, it’s very easy to go ahead and navigate. And in this case, I chose multiple choice. So, the options that I created were both Account and Opportunity. So, I’m just going to delete that. So you see that as we ask the question, there’s different conditions that get applied. So, here is condition one, pardon me? It’s gone a little too far down. Okay. I see. We’ll just quickly reset this and start again. Apologies there. Okay.
So, ask a question. So, here we have Account and Opportunity, and then it creates the condition branches. So, here I say that we are going to receive a text response from the bot, and if it’s equal to Account, which they would have pushed in this button here or equal to Opportunity. Now, the Opportunity branch isn’t complete yet. So, we’ll just go ahead and ignore that and focus on the Account branch. And so, once they click on Account, now we’re asking them, “What is the account name?” And so, if you recall, I typed datum. And so, we’re telling it to capture the user’s entire response and save it as an account name text variable.
So, once that happens, we call an action. And so, when you select to Call an action, it gives you the option to create a flow. This is my flow’s name but that won’t be here when you try this. So, what you would do is you would say Create a flow, and then it’s going to automatically launch the Power Automate authoring canvas. So, it’s going to bring you right to Microsoft Flow, where you can start creating your flow. And so, I’m going to go ahead and just click on Edit. So, when you start out in Microsoft Flow, what you will see is two items. It’s going to be the Power Virtual Agents and then the Return value(s) to Power Virtual Agents. All this in between is what you’re going to have to create to make your bot work.
So, here, what we do is we have an Input and we just name it the Account input from Power VA. And the reason that I name it this is because if you recall, the user at this point has clicked on Account. And so, by clicking on Account, it’s branched out to this area here in this condition. And we asked what the account name is, and they’ve given us a value of data. So, as I typed in before D-A-T-U-M for the account name, and so now, it’s sending this input to Microsoft Flow. So, datum is now being passed here. And what we have to do is Add an action, and this action is going to be done on the Microsoft Dataverse. And so, here, we want to list rows.
And as I mentioned, the cloud is constantly evolving, so Microsoft is changing things. It was called something else before List records, now it’s called List rows and the icon is green instead of blue. But I’m sure this is no problem. You’ll be able to follow along. So, what we want to do is List records. And here I’m going to choose my environment. So, you would have whatever your environment for Dynamics 365 is, and we’re dealing with the account table. And the way that you discover what the table name is, is when you go to make.powerapps.com, and then you click on Data and Tables. And right now, it’s already selected to All. So that’s great. Yours might say Default, so you’ll need to change this filter to All so that you can see all your Tables.
And here I have the Account Table from Dynamics 365 CE. And then when [inaudible 00:16:03] I’m looking for this is the unique identifier. So, here it says accountid. And so, this is important because now that we’ve chosen the Accounts Table, you need to create a filter because when you list your records, you obviously want to filter based on the input that the user has provided. So, in my case, when I typed D-A-T-U-M in the previous steps. So, here we want a state code that is equal to zero. And what that is is a Dynamics 365 active account state. And here I have, but it also and contains(name, ‘Input’) And so, here is where you go ahead and you would just type this in, and you can browse these formulas on the internet or you can also engage with Encore if you need some assistance with creating these formulas for your Power Virtual Agent.
Now, this input is a Dynamic content. So, I don’t type that in, I type all of this in, but when I get to this part, I just click on this item here. And so, if I do it now, it’s going to insert it outside of the formula. So we don’t want to do that. But I just wanted to show you how you place that in this field so that you can get the proper List records, command showing for your account. And here, you can also Rename these steps as well. And I highly recommend that. So, here I would say, List records-Account. And then I just click outside of the box. So, now I’ve renamed it. So, instead of it being a generic you know, List records operation, you’re getting more detail as to what it is actually doing for you.
And the next part is we need to compose the account formula. And again, here’s where Encore may assist you with these types of engagements. And now, we need to create an Expression. So, the code here is body, and we want to List records with a value of zero. And I’m just going to scroll a little bit further and with the account ID input, and the reason that we’re doing this is so that it can give us the accountid value when we go to go ahead and we output that to the bot. So now the bot has the unique identifier for the Account, and it allows us to then proceed to the next step. And I can appreciate this is probably a little bit confusing as well, but it definitely becomes clearer as you play with it. And the other thing I want to stress is you definitely want to list and filter your accounts first. If you just tell it to go and get the account records, then what’s going to happen is it’s going to apply conditions to each item that is returned. And you don’t want that. You basically want it to return a specific value in your account, the one account that you’re asking for, and then you want it to get that and provide the output to the bot.
So, because there is no hyperlink available for this account, I want to go and create what’s called a variable. So, here I create an ‘Account Link’ variable, and I just type this in. So, I’ll show you if I can click on that. Okay. Let’s reduce this. All right. So, here… Oh, it’s not letting me click now. All right. Let’s just quickly refresh. Now, you’re not going to want to refresh when you’re working on these because if you don’t hit Save, you’re going to basically lose all your changes. The only reason I’m clicking refresh is because I just want to return the functionality of the window. So, here, if I click on the plus sign and I Add an action, then I’m just going to search for variable. And so, the first thing we want to do is we want to initialize the variable and what that does is it says, hey, I want to create a variable. And so, that’s why I said Create ‘Account Link’ variable. If I insert this step, it would say initialize variable. So, remember we talked about renaming that area just so that you can get more descriptions in your code. And so, I typed Account Link. You can name it whatever you want. You can make it so there’s no spaces, etc. And I want a string because what I’m trying to do here, I’m trying to build that account hyperlink that you saw. If we go back to this bot and I scroll down, pardon me, this is what this variable is going to create.
Now, what I’ll do is if I go ahead and click this Account, so now this entire web address is what we want to copy and paste. So, I’m going to go ahead and open up notepad and I’m going to paste it. And the reason we’re doing this is I need to capture a certain part to build this variable. So, the part that never changes is going to be this entire part here. So, if you follow it, it’s HTTPS with my company’s names .crm3.dynamics.com. Then there’s a whole bunch of code here that has to do with your tenant ID and app ID, etc. And we want it to retrieve the accountid equals. So, all that part of that hyperlink is what’s going to be static no matter what when you’re searching for an accountid to create this link.
So, if you right-click and copy that, then what you do is we go back into…pardon me, go back right here. And this is where you would paste this in this area here. Now, what’s important is now you need to add the dynamic content, which is the account, and I’ll show you why. So, here, if you look, it says Unique identifier for the account. And if we go back to the Power Apps Account, accountid, Unique Identifier. So, this is a view of the Microsoft Dataverse table for your Dynamics 365. So, you see that you’re pulling the right table and field in order to create this link.
Now, if you had a space here after the equal sign, and then you inserted this Account variable, then this link is going to be broken. It’s not going to work. So, that’s why you want to make sure there’s no space after the equal sign and that you insert this Dynamic content right after. So, now that you’ve created all of these things, the next thing that we need to do for the purpose of our bot, pardon me, is you’ll see it’s getting the managed by. So it has my name, my email address, and my phone number. So, the next portion is we need to get the owner record. Now, this is not going to be stored in the Account Table. This is going to be stored in the Users Table. And the Item identifier for that is Owner.
So, again, if we return back to our make.powerapps.com website, and… Oh, pardon me, I’m just going to do a search because it’ll be a lot faster. And I’m still in the Account Table. Yeah. So, I’m going to search for user and here we have the User Table. So, again, I can click on the User Table and then it’s going to just return that in a moment. And so, now I can see all kinds of fields here such as address and…well, I’ll filter it again, but if I search for email. So we have two email address, primary email. So, this is the primary email that we want to retrieve. So, this is internal email address. So, it gives you an idea of what that field contains. And we’ll show you in just a moment here now that we’ve done the Get record for the User Table.
And again, just switching back here, the reason we don’t need a List records for the User Table before the Get record is because the List records for the account has filtered the account. Then we retrieved the account record up here for what’s been filtered. So, now when I get the user further down from the table, it’s going to only return that owner for that accountid. It’s not going to return all the users within your organization. So, now we’ve got those tables selected. So, then when we Return value(s) to the Microsoft Power Agent, these are items you just go ahead and Add an output, and it’s just a text box.
So, here, I’m just going to put Test. And then it’s going to go ahead and allow you to retrieve rows for what you want to do. So, if I type, email, for example, then we can go ahead and find a Primary Email. Or if I type main phone, then we have Main Phone and you see how it says it’s from the Owner Table and so on and so on. So, I’m just going to quickly hide that. So, now you see how the dialog box is created and it’s basically Account. And so, I’ll just show you again. I’ll just close this window. So, again, A. Datum Corporation, click this link to jump to Account. Here’s the hyperlink managed by Pierre Manaigre with my email address and my phone number. And if we quickly go back here, we see Account Name.
So, that’s a dynamic item that I selected from this window. Then I just type this text in with the proper amount of spaces that I want, and then add the Account Link variable. And that gives us the first part of the dialog box. Then the Owner is my full name and a Phone Number is the main phone number. And again, we’re just picking these values out of here and then email and then primary email. And then what we’re doing for next steps is we’re returning these values to Power Virtual Agent. So, I’m going to go and close this window because I don’t want to save what we’ve done. And then now that Power Virtual Agent Flow has completed, it goes and it puts all the outputs here into the dialog box. And then afterwards, we provide the Message. So, this, again, you would add the Message and just type these things in and add the outputs that you’ve received from that Microsoft Flow. Now, we want to continue and make sure that the bot will terminate properly. So, we ask a question, “Can I help you with anything else?” And do another multiple choice of yes or no? And then again, it’s going to branch off with a Condition.
So, if the answer is no, then you see that we want to End the conversation. And then if you answer yes, then you have these little pointers that you can drag. So, this little ball here, I’m not going to do it now, but if I were to click my mouse on it, this will allow me to drag this so I can link next steps. So, I’m just going to zoom out because if the user says, yes, I have more questions, then what I did is I clicked the little circle and then I dragged the step all the way back up, and then…I’ll just zoom in again, I rejoined it up here to just ask again, “How can I help you?” And then start that process all over again. Now that we’ve done the most complicated part, which is the bot, I’ll show you how you go ahead and you add that bot to the Sales Activity Dashboard.
And so, what we do next is you have to go into…well, the first thing we need to do actually is once your bot is complete, then we’re going to go back to the main canvas here. So, obviously, it’s important that you save your bot and your topics. Now, you need to go to Publish and you want to publish the bot. Let’s zoom out a little bit. So, you want to publish the bot and then once that’s done, then you need a URL in order to connect your bot to Microsoft Dynamics 365. So if you go under Manage and Channels, then go to Custom website. What we’re going to do is insert it as an Iframe. You can also embed it into a website in which case you would need to copy this entire body here, but because we’re going to be using Iframe you see the word iframesrc=, so what we want to do is just copy what’s inside this area here.
And so, I’m going to right-click and choose Copy. Now that I’ve got that, then I can go to Dynamics 365 and then click on Settings and Advanced Settings. Now, you need to have administrator access to do this. And we’re going to Customizations and we want to Customize the system because the Social Activity dashboard is a system dashboard in Dynamics 365. Once we’re there, we’re going to click on dashboards and then…oops, I’ll expand this a little bit. So then we’re going to go and choose the Sales Activity Social Dashboard. So, I’m going to double-click it and it’s going to open in a new window.
So, then when I click on insert Iframe, you could just call this, you know, sales bot and then post the URL. And what’s important here is this check box needs to be unchecked. So, this restrict cross-frame scripting. And the reason for that is if you’ll notice, this environment here has this domain name, but then if we go to the bot or actually I could even just show you in the link itself. So the bot is powerva.microsoft.com. So, those are two different domains. So, internet security is going to have a problem if you don’t uncheck this box. So, if you get an error message that it’s unable to work, then that box is likely the reason that it’s failing.
And so, the Iframe is probably going to get inserted somewhere down here. You can just click it and then drag it up the way I did as well. And then you would click on Save and then close. Now, you’re not done, the final step in getting your bot activated in the Sales Activity Dashboard is when you have this checked. You would just go ahead and click on Publish All Customizations. And then once that’s done, you close the window and then your bot is going to be alive and ready for you and your organization. So, hopefully, that wasn’t too confusing and I am welcome to any questions you may have.
Melissa: Great. Thanks, Pierre. Just having a look at the question pane here, I don’t see anything that has come in and I think we’re right at our time right now. But, of course, if anyone has any questions, please feel free to contact us on our contact page or at Ziad and Pierre’s email address is going to be up on our website as a recording and everyone will receive the recording in an email. So, thanks very much, everyone, and have a good afternoon.
Ziad: Thanks, guys. Thank you.
Pierre: Thanks.
What are the steps in a CRM implementation? What are the biggest causes of failure? How long will it take?