Add Dataverse knowledge to a Custom Copilot using Copilot Studio
Not too long ago we saw a complete user interface refresh in Copilot Studio, and a lot of new features that were announced during Microsoft’s Build event. One of the things that was announced, was the ability to add knowledge sources to a custom Copilot. We already had some of this functionality, but it was very limited. For example we were able to add one or multiple links to public websites as a source, (which means that Copilot will use the content on those websites as a source to answer questions) upload documents, and/or use SharePoint as a knowledge source. With Copilot Studio’s UI refresh also come a lot more options when it comes to configuring knowledge sources. This functionality allows businesses to connect Copilot to their enterprise data fairly easily, making it a lot quicker to get to the data without having to log into another system. Keep in mind that parts of this feature are still in preview, for example, connecting your Copilot to enterprise applications and data sources like Azure SQL, SAP, ServiceNow Knowledge, and more. In this article I will show you how to use Dataverse (preview) as a knowledge source, which is something I’ve heard a lot of people ask about.
Scenario
For this example I am going to keep it simple. I am going to create a new custom Copilot that will be able to answer questions about Accounts in Dynamics 365/Dataverse. On top of that I also want this Copilot to be able to answer questions about records (rows) that are related to an account, so for this example I will use the customer asset table that is part of Field Service for that. Of course, you can use other related tables (even custom tables) for this as well. If you are not familiar with the customer asset table, this table represents serviceable items at a location (an account). Customer assets can be installed by a field service organization and have several important data points like serial number, model number, etc.
Create your Copilot
I am going to create a brand-new custom copilot in Copilot Studio. To do this, I navigate to copilotstudio.microsoft.com, from which you’ll see the new and refreshed user interface. To create a Copilot, you can simply click on the ‘+Create’ button on the left side of the screen. This will open a window that shows the ability to create a new copilot (left side) or to create a new Microsoft Copilot action. Clicking this button allows you to extend Copilot for Microsoft 365, Copilot for Sales or Copilot for Dynamics 365 Customer Service. For this example we are going to create a new copilot, therefore choosing the far-left option on the screen. The process of creating Copilots have slightly changed, as this experience will ask you questions on how you want to configure this custom copilot. If you don’t want to answer the questions, you can simply skip this process by clicking the ‘Skip to Configure’ button on the top right. This will take you to a window where you can enter the name of your copilot, a description, and instructions for your copilot. For the name of the Copilot, I entered ‘Account Asset Copilot.’. The description is as follows: ‘You are a friendly copilot that helps users get information about accounts and their related customer assets.’. The instructions are: ‘Assist users that need any information about accounts or customer assets. When showing multiple records, you will format your response in a list format.’ Click ‘Create’ in the top right corner to create your custom Copilot. Once this is done, you’ll have to wait a few seconds for the Copilot to be created.
Once the new Copilot is created, you’ll see it loaded on the screen. From here we’re going to add the Dataverse knowledge source to the Copilot. You can do this by clicking the ‘+Add knowledge’ button on the middle of the screen, or you can click on the ‘Knowledge’ tab on the top of the screen and click ‘+Add knowledge’ from there. When the ‘Add knowledge’ screen pops open you’ll see all the ways you can add knowledge to your custom Copilot. For this example I choose the Dataverse (preview) knowledge source. In the first screen you’ll need to find the table(s) you want users to ask questions about. In my case this is the account table and the customer asset table. You can search for tables by entering a search term in the search box on the top of the window. I search for ‘Account’ and when it shows in the list, I click on the table from the list. (If there are multiple tables you want to add here, you can keep searching and clicking on tables to add them.) I then click the ‘Next’ button on the bottom right of the screen. This will take you to the ‘Preview Data’ step, but there is nothing you need to do here. Click ‘Next’ again to ‘Review and Finish’ your configuration. This is where you can edit the knowledge name and the description. I entered ‘Accounts and Assets’ for the knowledge name and ‘This knowledge source answers questions found in the following Dataverse tables: ‘Account and customer asset’ as the description. From here you can also add synonyms and explanations to columns in the table and you can add glossary terms. I also didn’t configure anything here. When you’re done you can click ‘Add’. Since I also want to give users access to the Customer Asset (msdyn_customerasset) table, I click on the ‘Knowledge’ tab in my Copilot. I see the ‘Accounts and Assets’ dataverse knowledge I just created and click on ellipse that appears on the left side of the type (in this case Dataverse). This allows you to edit or delete the knowledge that was created earlier. I click ‘edit’ and then click ‘Edit Tables’ on the middle of the screen. From here you’ll notice the same screen open where you can select another table. NOTE: I could’ve added the ‘Customer Asset’ table earlier, but wanted to show that you can add additional tables at a later time. I select ‘Customer Asset’ and click the ‘Finish’ button.
When the window closes you should see both the account and customer asset table listed under ‘Dataverse tables’. Click any of the tables to remove them. To edit the settings of the account or customer asset tables, you can click on any of the tabs on the left side of the ‘Details’ tab. As you can see on the image above, the table picker allows us to switch between tables to make table specific configuration changes like adding synonyms and/or glossaries. NOTE: If you need to remove any of the selected tables, you can do this by clicking the ‘Edit tables’ button on the ‘Details’ tab. When the ‘Select Tables’ screen loads, you’ll see the ‘Selected’ tab, that shows the total number of tables that have been selected for this knowledge record.
Test your Copilot!
You can test your copilot directly by clicking the ‘Test’ icon on the right top of the screen, which will open the ‘Test your copilot’ side pane. Before you do this, make sure you have some sample data in Dynamics 365 that you can ask questions about. I would suggest installing the sample data, and adding additional data for Customer assets if you don’t have any. Here are the questions I asked copilot while testing, and it worked perfectly!
- Give me the account details for Fabrikam, Inc.
- What is the name of the account with account number 123456789?
- Show me the customer assets including their serial numbers for this account
- What is the model number of customer asset with serial 156486458?
Things to consider
Keep in mind you can add a total of 2 Dataverse knowledge sources to a custom copilot, with a total of 15 tables per knowledge source. Another thing to note here is that when you use Dataverse knowledge the authentication of the Copilot needs to be set to ‘Authenticate with Microsoft‘. (When I created my new Copilot this was done automatically.) This means that when a specific user asks Copilot a question, only content that user has access to will be shown. The downside to this is that there are limitations to the channels you can publish your Copilot to. Since this type of authentication uses the user’s Microsoft Entra ID Authentication, the Copilot can only be published on a Teams channel. It seems that Dataverse knowledge is mainly designed for situations where Copilots answer internal users’ questions. Examples of this are custom Copilot’s embedded in Microsoft Teams, or an agent Copilot created in Copilot for service, which can be embedded in other applications as an agent console. Take a look at this article to learn more about this. I hope you enjoyed this article! Be sure to check in again next week for a new article or subscribe here to never miss another post!
Comments are Closed