0:00
So, I also want to welcome everyone from all around the world to C Sharp Corner and specifically
0:10
to my session where I'm going to be talking about how you can use Power Virtual Agents
0:15
to boost Microsoft Teams adoption. First, let me start by introducing myself
0:21
I'm Carmen. Don't worry if you can't pronounce the last name. Even people in Belgium have difficulty with it
0:28
I'm a senior power platform developer, an advanced citizen developer based in Belgium, as I mentioned
0:35
I'm also a serial learner, so I like to learn new things all the time
0:39
And I blog about the things that I learn on digipersonal.com. And you can also find me on Twitter at Carmen Ezeven, where I am active, let's say, sometimes
0:52
I'm not extremely active, but I do tweet about some things that I learn and about all of the sessions that I do, that I present
1:03
And then let's jump straight into the session. First, I want to talk a bit about why I'm giving this session
1:10
What's in the name? So I found from my experience that adoption is very important in any project where you are introducing a new tool
1:19
for example, Microsoft Teams, into an organization. So it's essential in making sure that the people start using the tool
1:29
Why is that? Because if people need to start using a new tool
1:34
that means that they need to change. And that change is difficult because we as human beings
1:41
we don't like change. We like to keep doing the same things, which sounds strange
1:47
but think about it. We're creatures of habit. When we have a certain way of doing things
1:52
we prefer to keep doing them the same way. And even when introducing a new tool
1:57
that might be a big change, like just like completely transforming your processes
2:03
or it could be a small change that you just have to find a link in a new location
2:09
Both of these changes are hard because it means that we need to think about
2:13
we don't do this the same way that we used to anymore. We're doing it a different way
2:18
And because adoption and change go hand in hand and change is difficult, that means that adoption can be difficult as well
2:25
Both from the perspective of the people that have to go through that change, that need to change the way that they work, as from the perspective of the people that are leading that change initiative
2:35
From the people that are introducing that new tool, it can be difficult to get our users to start using it
2:40
And even with a tool that is quite intuitive like Microsoft Teams, it can still be quite difficult to know all of the ins and outs, the do's and the don'ts and the best practices
2:52
I believe that Power Virtual Agents can make that adoption easier because it allows you to bring the right information to the right people at the right time
3:02
So traditionally we have a place somewhere on the intranet or even on the global internet where you can find a lot of information
3:15
But that information is often difficult to reach. It's not easily searchable
3:21
Or we send communications where we push certain pieces of information to our users at a time that we decide is a good time
3:29
However, a user can have a question at a completely different time where they then need to go find that information in a large knowledge database
3:39
Maybe that can be difficult to find. And Power Virtual Agents can help there in providing an interface for the user to ask a question to a chatbot and a chatbot answering the question and thus giving them the information that they need in the moment that they need it
3:56
And it's very easy to just ask a chatbot a question and then get an answer
4:01
It can be a lot easier than putting a search query into, for example, a SharePoint site and then having to go through all of the links that come up, see if the title matches
4:11
That takes more effort than asking a question and getting an answer
4:17
So what should a Teams adoption bot do? Let's say that we create a Power Virtual Agent to help in Teams adoption
4:25
what should it do? It should do three things. It should first help users by solving common
4:31
questions or answering common questions and solving common problems that they have that
4:35
they might face. For example, when they first start using Teams, they might want to know how
4:42
to create a new team. Or they might want to know how to add colleagues to their team or how to
4:48
start or how to organize an online meeting, how to start a channel meeting, those kinds of things
4:53
And not only should the adoption bot answer those questions, but it can immediately share the right way to do things
5:02
Because in one organization, they could just use the out of the box teams creation process that is provided by Microsoft, where they can just create a team and get started very easily
5:15
But in another organization, they might have a provisioning process where you gather metadata, where you gather some information about the team before it can be created
5:26
Maybe it's even has an approval process behind it. So if that is the case, then the bot should not only answer the question, you can create a team by going to this link, but it can also share why that is the case and why it is important that they do it that way so that we get that information
5:45
And of course, a chatbot is not all-knowing. If it doesn't know the answer to a question, it should be able to refer the user to support with all of the information that it has gathered so far about their request so that service desk or any other support infrastructure that you have available can easily answer those questions
6:08
And in that way, we can make sure that the user always gets help in the best way possible
6:13
Now, I'm not going to talk on slides a lot more, but I'm going to give you three demos where we are going to build a Power Virtual Agent, and I'm going to do three scenarios in that demo
6:28
First, I'm going to show you how you can build a Power Virtual Agent to answer users' questions
6:35
Secondly, we're going to look at how the agent can actually take action on behalf of the user, so taking that to a next level
6:42
And then finally, I'm going to show you how we can find information that is somewhere in our tenant in a structured way and how we can bring that information or the relevant information to the user
6:54
So let's jump to the demo. I have I have created already a Power Virtual Agent, just the basics inside Teams
7:04
So I'm going to use Power Virtual Agents inside Microsoft Teams. So, I'm doing everything in the Teams application that we are also going to help our users adopt
7:17
And if I go to the topics then we can see that we have the default topics and I have already added one additional topic to my virtual agent which is on how to add a member If I open the topic then we see that the name is add a member I have added four trigger phrases So of course
7:39
add a member to a team, but then also what if a person asks for a new team member, or they will
7:44
have a new colleague in their team, a new collaborator on a project. All of these trigger
7:49
phrases or when they are used in a sentence will lead the user to this topic. If I then go to the
7:57
author in Canvas, then you see that this is a very simple topic and this is exactly how you can build
8:05
a Power Virtual Agent, how you can create topics to answer questions. Next or after my trigger
8:12
phrases, I just have a message where I like to rephrase the question so that the user knows which
8:18
question they get an answer to because they might not have exactly asked how can I add a member to
8:23
a team. So I'm going to rephrase it so that they know which question they get an answer to
8:29
So it sounds like you want to add a member to one of your teams and then I provide them a link
8:34
to a documentation page that I have on SharePoint where they can find the information
8:41
So where is this link leading to? It's to a team's help site, add a member to a team, which now just contains some placeholder text
8:52
But I am not giving the answer inside the virtual agent for a couple of reasons
8:57
First of all, if I have to give a lot of information, maybe some screenshots and click here, then click there
9:05
inside the Power Virtual Agent, that will become a very long conversation, which can be
9:11
quite difficult for a user to read and they have to scroll up and down. So it's easier to keep it
9:18
in a separate page. Secondly, if we have it in a separate page, we can actually link to this resource
9:25
from different locations. So this page is on a SharePoint site. So let's say that a user prefers
9:31
searching for their information, they can simply search the site and that same information will
9:36
surface. And we also only have to maintain one piece of information, and that's this page
9:43
If something changes on how a user can add a member to a team, we just change this page and
9:50
all of our other places where we are referencing this information, that will be corrected or
9:57
updated automatically as well because it's just a link to this page which we have updated. So it's
10:03
good for many reasons. And then after we provide them the information we just end the conversation
10:10
with a survey of course to see if it was the right answer. So let's create a second of this
10:17
type of topic. So let's create a new topic and the topic that we will answer now or the question
10:25
that we will answer now is how a user can create a new team
10:30
So I'm giving the topic a name, and then I am entering some trigger phrases
10:38
Create a team, new team, new project, maybe, new collaboration. And so forth, you can add as many trigger phrases as you like
10:51
And then if we go to the author in Canvas, our virtual agents will automatically save the topic
10:56
And then we have an empty canvas where we have the trigger phrases, then a message where I'm going to rephrase the question again
11:05
So it sounds like you want to create a new team. And then I'm going to add a second message
11:14
because that will be easier later on when I expand this topic
11:18
You can find out how to do that here. And then I'm going to add a link again to the second page that I have on my SharePoint site on creating a new team
11:31
So I'm simply copying this URL and then pasting it here. And then just the same as I had before, I'm going to end the topic with a survey if the after this message has been displayed
11:50
If I then save the bot, I can test it immediately here to the left
11:56
So I'm going to say I want to create a new theme
12:03
And then on the right, we see that the right topic was triggered and that the two messages have been displayed
12:09
We see it here as well. If I click this link, that will take me to that page that I have just copied the link to, of course
12:16
And then we see that afterwards, the conversation is ended with a survey, just to check that the agent actually answered the correct question
12:31
So these two topics, the first one that we looked at and this one that I just created, are examples of simple topics that you can create to answer questions that users may have
12:42
And in this way, you can immediately actually translate your entire knowledge base that you may have already to a Power Virtual Agent where your users can simply ask a question and then the agent figures out which question that they need an answer to and provides them the information that they need
13:03
But let's say that we want to take this a step further. Instead of just giving them the information, which is already a great start, we can actually build the agent in such a way that it creates the team, in this case, for the user
13:17
So instead of just saying that they want to create a new team and pointing them to the information, I'm going to extend this topic so that the bot asks the information that we need to create a new team and then that the bot actually goes and does that
13:34
So what information do we need to create a new team? We need two things
13:38
Firstly, we need the name of the team. Secondly, we need to know the description of the team
13:43
And then we can create a team in the background for the user. So I'm going to expand this topic to incorporate those actions
13:54
So firstly, I'm still going to keep my rephrasing of the question
13:58
Sounds like you want to create a new team. and then I'm going to check whether the user wants me to help or wants the bot to help
14:06
creating the team or they just want to get the information. So I'm going to ask a question in between my two messages that I already have
14:17
And then the question that I'm going to ask is, would you like some help with that
14:25
Or would you like me to help with that? and I'm going to have multiple choice options for the answer
14:34
The first option will be yes, please. And then the second option will be no
14:44
Just give me the information how to do it. And then I going to save the response in a variable scenes creation And then after that question I have a condition automatically added
15:08
But I only need two branches. I either need the yes or the no branch
15:13
So I'm going to, or I need the yes and the default branch. So I'm going to delete this middle one
15:18
because if the user says no, then I just want to give them the information
15:25
so I can keep all of this that we have added before. If the user says yes, please help me, then I'm going to ask two additional questions
15:37
I'm going to ask what the name and the description of the team should be
15:41
So the first question will be, what should be the name of the team
15:53
And instead of having multiple choice options, because of course the team name can be a lot of different things
15:59
I'm going to extract the user's entire response as the result of this question
16:06
And I'm going to rename this variable to team name. And then I'm going to ask a second question. And what about the description? And here I'm going to extract the user's entire response as the result of this question as well, because a description can be various things. You cannot narrow it down to multiple choice options
16:35
And then after I have asked these two questions, I can actually create the team
16:44
Save. Not sure what the error could be. We'll see if it fails
16:53
I had this before as well, but it wasn't actually an error. So how are we going to create that team
17:00
I'm going to call an action to create that team. And what I'm going to do when I call an action is actually call a power automate flow
17:11
Now I already have flows created here, but I'm going to recreate that flow to create a team so that we also see what that looks like
17:21
And if I create a new flow, I can first choose the template that I want to use
17:27
So in this case, I'm going to use the basic Power Virtual Agents template
17:30
and I'm going to rename this to C sharp corner create a theme so that I know which flow to
17:40
choose later on. For my Power Virtual Agent to create a theme I need two inputs and those will
17:48
be two text inputs. First of all, the team name, and secondly, the team description
17:58
There we go. And then all I need to do is I need to add an action, and I'm going to use
18:07
one of the Microsoft Teams actions to create a team. And I'm going to add my two inputs that I
18:15
get from the Power Virtual Agent, the name for the name and the description for the description
18:19
sounds about right. And then this could be enough to create my team. However, I want to make sure
18:29
that if somehow this action fails for whatever reason, I can give that feedback back to my user
18:37
So to do that, I'm going to build in a bit of, well, not error handling, but at least error
18:43
signaling where I'm going to start by initializing a variable in the beginning of my flow
18:55
And I'm going to call this output, which will be a string
19:00
And then after the create a team action, I am going to add an action where I set that variable
19:09
to success. By default, this will be successful. And then I am going to add an output to my return
19:22
value, which will be the output variable. However, in case my create a team action was not successful
19:35
I'm going to add a parallel branch, where I'm also going to add a set variable action
19:46
But instead, I'm going to set my output variable to failed. And I'm going to configure the run after of my second action to whenever create a theme has failed or is skipped
20:02
and then again i need to return the i need to return a value to my power virtual agent
20:12
so i'm going to add a second return value action which does not give any issue having to
20:22
having to return value actions in your flow i've noticed as long as the output values are the same
20:30
So in both branches, I name them outputs. And in this way, whenever this action fails
20:38
I will give fail back as a result to my Power Virtual Agent
20:42
And if it's successful, I will give success back to my Power Virtual Agent
20:49
If I then save this flow and close it... ..
21:00
this will take me back to my Power Virtual Agent Canvas. And so now here below my two questions
21:11
I can ask or I can call that flow that we have just created
21:15
as an action where I'm going to give two inputs, the name and the description
21:24
And then if this action is called, that flow will create the team
21:29
and give back an output to my bot. And then depending on the output of this action
21:37
I should either tell the user that, if it is success, I should either tell the user that the theme has been created
21:46
or if it's not been created, ask them if I want to try again
21:51
or just give them the information. So let's first complete the first launch
21:56
When my output is equal to success, I am going to show a message
22:03
The team and then inserting the team name has been created. You will find it in the team's overview
22:17
And then I'm going to end the conversation with the survey. If my team creation was not successful I going to ask another question of the user So I going to say looks like something went wrong
22:35
which is not enough for a user, so I'm going to offer them a solution as well
22:40
Would you like me to try again? And then again, multiple choice options
22:47
Yes, please. Or no, just give me the information. And then I'm going to save that variable as try again response
23:00
and then in case that the answer is equal to yes please I can just loop back to see there we go yes
23:13
I can loop back to right before I call that action or to the beginning of that action because I still
23:20
have all of the information available to try a second time to create the team if the user says
23:27
no, just give me the information. I also already have that available. In this case, I can just
23:33
loop back to right before I send them the message how they can create the team
23:42
And now this will be added at the bottom of my topic. And then if I give them the information
23:50
I'm also ending the conversation. So in this topic now, there will always be a resolution or an end to the conversation when the user asks to create their team
24:06
So if I am going to check what the error is, user response is empty
24:12
Not sure. I think it was the same error before and it didn't give an issue. So let's test it
24:17
create a team and then we'll see on the right that the um that the right topic is triggered
24:28
and now instead of just getting the information the bot asks me the question i'm going to say
24:33
that i want some help um with creating the team the name of the team should should be um c sharp
24:40
corner team and the description virtual events are exactly what we need today
24:49
because we don't have any real life events. Now the bot in the background will be calling that
24:59
power automate flow to create that team and let's see whether it was successful or not
25:05
So we can see that it is thinking because it's waiting for that Power Automate flow to complete
25:12
And my team has been created. I can find it in the Teams overview
25:16
Let's see whether that is true. And indeed, my team has now been created
25:23
We can see it here. So makes it very easy to to create a team
25:29
And you see that it only took me about five to ten minutes to set up this flow
25:34
and the topic. So now we already have covered two of the scenarios that I wanted to cover
25:43
The first one just answering simple questions and the second one taking action on behalf of the user
25:50
The final scenario that I want to cover is one where I want to find information for the user
25:57
So in a lot of adoption projects, we have a champion or an ambassador program in place
26:06
And I do too. And I have created a list with the champions for Microsoft Teams
26:13
So I have already identified a couple of champions in the organization that will really promote Microsoft Teams towards their colleagues inside the organization and who have a lot of knowledge because they have been trained
26:29
And I want to make sure that the people in the organization that need help find the champion that they need to turn to
26:37
So I have information inside a SharePoint list on that same site called Teams Champions, where I have identified two pieces of information that a user can use to find their champion
26:52
First of all, the country, which was actually the title column that I have renamed to country
26:58
And then secondly, the department, which is a newly created lookup column or multiple choice column, where I have a couple of options for the department
27:09
And every combination of country and department will have one champion. Not all possible combinations are available here yet, but for now I have four in my list
27:21
And I can use this information to get or to show or to provide the user with the name of their champion for their country and their department
27:32
So if I go back to my virtual agent, I am going to create a new topic to find the champion of the user
27:42
Find my champion. So a couple of trigger phrases. Who is my champion
27:49
I'm my champion, of course. Also, who is my ambassador? Because maybe our users have heard
27:58
in another company that they have an ambassador program instead of a champion program
28:03
The two might be interchangeable and so forth. If I then go to the authoring canvas
28:10
Power Virtual Agents will auto save my topic. And then I can start with the first message again
28:16
which, just as before, will be that I'm rephrasing the question that the user has asked
28:24
It sounds like you want to find your champion. And then I'm going to do the same as before
28:33
I'm going to ask a question whether they want help or they just want the list
28:39
Would you like me to find them for you or just give you the list
28:46
multiple choice options is what we need here. And then the two options will be find them for me
28:56
And then the second option will be give me the list. And again, I'm going to rename this variable to champion find choice
29:10
And I get two branches after that question again. In the first case, I'm going to start with the right branch actually because that's going to be quicker
29:21
If the user says give me the list, all I need to do is exactly the same as before where I copy the URL to my SharePoint list
29:31
And then I'm going to display that in a message. You can find the complete list of champions here
29:38
here, and then in here I'm going to insert that link that we copied in the message and then ending with a survey
29:50
So the right branch is already completed. Now let's see in the left branch. As we know, we need two types of information to
29:59
find the champion for the user. We need to know the country that the user works in
30:04
and the department that they work for. So I'm going to ask those two questions
30:10
starting with what country do you work in? And here we have a couple of options actually
30:19
to get the information back from the user. We could add multiple choice options
30:24
for all of the countries that we are active in. However, if we then add a new country
30:29
we need to remember that we need to add that country into the options for the virtual agent
30:35
So that might not be the best option. We could also have extract the user's entire response
30:41
as the result. But then what happens when the user types the name
30:48
of the country in a slightly different way? For example, United Kingdom
30:52
we can, they can type United Kingdom. They could also type UK
30:57
or they could type the United Kingdom, they could even type England
31:04
Those are all possibilities, and that's also not what we need. Luckily, Power Virtual Agents has a built-in entity
31:14
country or region, which will make sure that all of the variations of the results
31:20
that the user gives us, whether they type UK, United Kingdom or the United Kingdom
31:25
That will all resolve to the same country output that we can get
31:32
So I'm going to rename this variable to country. And then I'm going to ask the second question
31:41
What department do you work for? Because that's the second piece of information that we need
31:48
And here I do want to give multiple choice options. And the options will be finance
31:55
Marketing, Marketing, Sales, Engineering, and then finally HR
32:11
And I'm going to save this variable as Department. Now I get five conditions below my question, but I don't actually need those conditions
32:25
because I'm going to, again, create a Power Automate flow to find the information from the
32:33
list. So I'm going to delete my conditions. I'm not going to do anything with them at this point
32:38
in the Power Virtual Agent. And instead, I'm going to first save my topic
32:49
And then I am going to create a second flow to find the champion to get information from the list So I taking the same basic template and then renaming my flow to C sharp corner find champion
33:12
Taking two text inputs like before, but this time it's going to be country and department
33:18
instead of team name and team description. And then I am going to add an action to find information in the list
33:30
And that is going to be the get items action from the SharePoint connector
33:44
Which is quite some time. So let's go SharePoint. um, yes, get items from the SharePoint connector. Um, and I am choosing this action because this
33:57
allows me to specify an OData filter query where I can specify the department and the country
34:04
to find that one champion. So I'm going to specify the address, which is going to be
34:10
the address of my site. The list is teams champions. I'm only going to return one value
34:18
It will still be an array, but at least I know that it will only be one value that I am returning
34:25
And then I'm going to specify my filter query, which will be, and I am
34:31
um, um, taking a look at my cheat sheet here, um, title equals, and then in between singular
34:40
quotes, um, country, because remember I mentioned that, um, I renamed the title column to country
34:46
So for the query, I still need to use the first name and, um, uh, and department equals, um
34:55
the department that I have specified. So this is the query that I need to find information in this
35:03
list because I just have two columns that I can simply specify in the filter query
35:09
Now what I want to do, I want to create a variable again and I need to do that before
35:17
I'm going to do that before my action, initialize variable, which will again be named output
35:26
because it's going to be the output of my flow. And then after I get that champion, I am going to add a set variable action
35:41
I'm going to set output to the display name of my champion
35:46
Now this will add a loop around my action because the get items always returns an array Even if I only specify that I want to get or if I specify that I only want to get back one result this will always be an array
36:01
I could also use the first function, but for, to make it a bit easier, I'm just going to let the
36:10
apply to each be added, and then I'm going to add my champion display name into my output variable
36:18
Now let's say that I give a combination to the flow that does not give a result back. In that case
36:26
my result will be empty, so my output variable will also be empty. So I can use that information
36:35
to determine whether or not I actually got back a result. So I'm going to add a condition
36:41
where I'm going to check that the length of my output variable is equal to zero
36:54
Because if that is the case, I know that I actually didn't get back a result from my get items action
36:59
so a champion for that combination of country and department could not be found
37:03
In this case, I'm going to update my output variable to not found so that I can also, again, use this information in the Power Virtual Agent to help the user in a better way
37:20
And then all that's left to do in the end is return my output variable as an output to the Power Virtual Agent
37:30
And so now I have a complete flow where whether or not I found the champion, I will give back a meaningful result to the user
37:41
So I'm going to save this flow and then afterwards close it, which will again take me back to my Power Virtual Agent authoring canvas
37:56
And so I'm going to save this flow. And then close it
38:09
And all that remains here is to insert that action into my Power Virtual Agent
38:19
Find champion. Give my country and my department as input variables. add a condition on the output where if it is equal to not found
38:34
I am going to show a message. I couldn find a champion for your department in your country that you added before And then I going to automatically loop back to give them the complete list
38:56
so that they can see if they have another champion in their country or in their department in another country
39:03
and they have the information that they need. In the other case, I'm going to show a message
39:11
Your champion is... and then adding the output of my automate flow
39:20
which will be the display name of the champion, and then afterwards ending with the survey as well
39:27
If I now save this, I can test it right here. Find my champion
39:43
I'm going to ask to find it for me and I'm going to say that I work in Belgium and I work in engineering
39:58
And then the flow or the power virtual agent tells me that my champion is John Smith, which is correct
40:05
Now let's try or let's see what happens if no result was found
40:11
So let's try a combination that doesn't work, which will be Belgium and sales
40:21
And then indeed, the Power Virtual Agent tells me that it couldn't find a champion for sales in Belgium
40:28
And then I can find a complete list of champions here. So this always gives a satisfying result to the user
40:34
Instead of just saying, oops, something went wrong or I couldn't find a champion, they will still try to offer a solution
40:41
Now, going back to the presentation, what happens after we have completed or what happens after we have built our Power Virtual Agent
40:53
It's not finished. After you have built it, you can review the ytics to see whether the resolutions that you give or the solutions that you give actually are what the user needed
41:06
You can review those ytics and you can use those to fine tune your topics, to fine tune the flow of the conversation and also add new topics
41:16
So that way you can always make sure that your Power Virtual Agent stays up to date
41:22
That's it. Thank you for attending my session. And I believe that you can now have all of the information that you need to start using Power Virtual Agents to boost Microsoft Teams in your organization