Extend D365 Customer Service Copilot with Prompt Plugins (preview)

The preview feature that I am writing about today is a feature that a lot of us have been waiting for! I am super excited that it’s finally here, and I think this will be a game changer for service organizations! If you are familiar with Dynamics 365 Customer Service, than you most likely have seen the Copilot for agents (this is what I call it) that lives inside of Dynamics 365 Customer Service. This Copilot helps agents resolve cases and answer questions when they are talking to customers. This customer communication could be via a chat, voice, etc. When answering questions, it looks at knowledge articles from Dynamics 365 customer service and for customer chats, you can also use a public URL as a knowledge source. I wrote an article about how exactly this works back in May of 2023, when this feature was released which you can read here. Up until now, we weren’t able to extend any functionality to the agent Copilot, but this will change with this new feature!

What does this mean?

You might wonder what I am referring to when I mention ‘extending’ the agent Copilot in Dynamics 365 Customer Service so let me explain. Maybe you want your agents to be able to ask Copilot targeted questions about other information stored in Dynamics 365 (other than just the knowledge articles). For example, maybe agents need to be able see a list of all cases for a specific product your company sells. Maybe agents need information on the asset a case is related to, or maybe they need to get warranty information from another system? All these things are examples of extending the functionality that is part of agent Copilot in Dynamics 365. There are different ways to extend the agent Copilot in Dynamics 365 Customer Service, but in this article I am going to focus on using Prompt plugins and I will explain how to create them and how to turn them on in Dynamics 365 Customer Service.

Create a Prompt Plugin in Copilot Studio

NOTE: When you try this out yourself, I would recommend doing this in a newly created sandbox. The reason for this is that we cannot delete these plugins during the preview. If you need to delete the plugin the only way is to restore or reset your environment.
First let me explain what I am going to do. I want agents to be able to ask Copilot to show all cases related to a specific product. In my scenario both cases and products live in Dynamics 365. I want Copilot to show the list of cases with a link to each case so the agent can open and review the case if needed. Below is an example of what this will look like once it’s configured.

I will need to create the prompt plugin in Copilot Studio. Once I open Copilot Studio I select Copilot in D365 Customer Service, as that’s where I want to create the plugin. Click ‘+Add action’ from the overview tab in Copilot in D365 Customer Service. The pop-up shows you can choose to create a connector or a prompt in this case we’re going to create a prompt, so I select ‘Prompt’. The first thing I want to do it enter an input. This will represent the data that will be entered by the agent. I will call this input ‘Product Name’. I also enter ‘Airpot’ in the sample data field below it. (For testing purposes this is where you enter the name of a product, this product needs to exist in your D365 customer service environment. You also need to make sure that you have a couple of cases with this product populated in the ‘Product’ field on the case form.)
Now I start writing my prompt. I write: ‘Show cases for ‘ after which I click the ‘+Insert’ button in the prompt window and choose the ‘Product Name’ input. Then I continue to type: ‘Show me a list of all related cases, including case number, case title and description.’ Now I need to add some data fields from Dataverse. In order to do that I first need to select the table I want Copilot to look for. On the right side of the screen click on ‘Data Used’ and click ‘+Add data’. Select the ‘Product’ table. Set ‘Name’ as the filter attribute, this represents the field we are using to filter the results on. Click on ‘+Add value’ next to Filter Value and select the ‘Product Name’ input. In order to add specific columns from the product table click on the ‘+Insert’ button again in the prompt window, then select ‘Product’. We will now find the relationship between the product table and the case table. Search for ‘Case’ and select ‘Product (Case)’. Then select the ‘Case Number’ field from the list. Follow the same steps for the ‘Case Title’ and ‘Description’ columns. When you’re done it should look like the screenshot below.

Click ‘Test Prompt’ on the Prompt Response window to see the results of the prompt. If it looks good, you can enter a name for the prompt (I called mine ‘Show Product Cases’) and click ‘Finalize Prompt’. This will take you to the next screen from where you can create the ‘Prompt Action’.

Enable Prompt Plugin in D365 Customer Service Admin Center

Before agents can start using the prompt we just built, it needs to be turned on, which we can do from the Customer Service Admin Center app. After you open the app, navigate to ‘Productivity’, which is below the ‘Agent Experience’ section on the left side of the screen. You’ll see ‘Plugins for generative AI (preview)’ in the list of features. Click ‘Manage’ to access them. You should see your newly created plugin in the list. Select the plugin and click the ‘Turn On’ button on the command bar. The ‘Manage User Access’ window opens, where you will have to select which agents should have access to the plugin. You can give access to all agents, or to agents that have specific security roles. In the ‘Define inputs screen’, you can define inputs to improve the answers agents get from Copilot. In the example in the image the ‘Product.20Name’ is the productname input that we created earlier in the prompt.

Entering data in the ‘Define Inputs’ screen is optional, however, by mapping this to a table (record type) and data field (column), we are telling Copilot what type of data we’re looking for. When this data is populated, it works like this: When an agent is asking Copilot to show the product cases from within the context of a case record (while a case is open on the screen) the agent doesn’t need to specify the product for which they want to views related cases. Copilot will automatically show related cases for the product that is populated in the product lookup in the case on the screen. If an agent prompts Copilot outside of the context of a case record, agents can still prompt copilot, but they will need to enter the product name. NOTE: If the ‘Define Inputs’ fields are not populated, agents will always need to specify the product name in the prompt, regardless if the prompt is from within a case record or not. I don’t know about you, but I am SUPER EXCITED about the ability to extend Copilot for agents! And ‘m even more excited about how easy it is to create these prompts! 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!


Share this!

Comments are Closed