In today’s interconnected business landscape, seamless collaboration across departments and systems is essential for delivering exceptional customer experiences and driving growth. However, when different business units operate within separate Dynamics 365 CE instances, achieving this level of collaboration can be challenging. This is one scenario where Microsoft Copilot comes into play, acting as a bridge that enhances communication and workflow between teams, ensuring that valuable customer insights are shared and utilized effectively.
In this article, we’ll explore how Copilot can act as a bridge between teams working in different Dynamics 365 CE instances to drive better collaboration and results.
Scenario
Contoso, a global leader in its industry, operates with two key business units: Service Management and Sales. The Service Management team focuses on delivering top-notch customer support, while the Sales team is dedicated to driving revenue growth through strategic client engagement. To cater to their unique needs, each unit operates within its own Dynamics 365 instance, tailored specifically for their functions.
Here’s how Copilot transforms collaboration at Contoso:
Imagine a service agent named Emma from the Service Management team. While handling a customer’s request, Emma uses Copilot to access a comprehensive view of the customer’s profile—including their purchase history, preferences, and prior interactions. Additionally, Emma receives opportunity insights related to the customer from the Sales instance of Dynamics 365. With this information at her fingertips, Emma not only resolves the issue efficiently but also identifies potential cross-sell and up-sell opportunities relevant to the customer.
Instead of these insights being confined to the Service Management instance, Copilot ensures that they are seamlessly shared with the Sales team operating in a separate Dynamics 365 instance. The Sales team can then follow up with tailored offers or engagement strategies, leveraging Emma’s insights to build stronger relationships and drive additional revenue.
This synergy between Service Management and Sales, powered by Copilot, not only enhances the customer experience but also aligns the efforts of both teams toward Contoso’s overarching business goals. The result? A collaborative ecosystem that turns customer interactions into growth opportunities.
Solution Architecture
Approach
The Customer Service Copilot plugin extension is used to consume data from Contoso Sales Dynamics 365 instance. The plugin utilizes a custom connector to invoke an Azure Function, which retrieves data from the Sales instance. An out-of-the-box opportunity summary plugin, msdyn_SalesOpportunitySummary, is invoked to summarize opportunity-related information based on the specified customer name. The opportunity summary is then returned as a response to the prompt in the Customer Service Workspace (CSW) Copilot pane.
Visuals of the cross-instance collaboration in Copilot

Implementation Steps
Step 1: Create the Azure Function
Follow the steps to create a sample Azure function.
Create a new Azure Functions project in Visual Studio 2022 with an HTTP trigger, version 4.0, and a .NET 8.0 isolated function worker.
- Install the Microsoft.Azure.WebJobs.Extensions.OpenApi.Core NuGet package in the project.
- Include Open API attributes in the function class to specify the operation, security, and input/output parameters.
- It's recommended to enable appropriate authentication mechanism for the function app.
- Fetch the opportunity record ID from the Contoso Sales environment by executing a query based on the parameter provided to the Azure Function. In this example, we have retrieved the top opportunity record for a specified customer.
- Invoke the out-of-the-box (OOB) “msdyn_SalesOpportunitySummary” action by providing the opportunity ID and obtain the summarized response. Below is the sample.
Step 2: Create a Custom Connector
Use the following steps to create a customer connector for the.

- Provide a name, for example, “Summarize Deal” and click on continue.

- Provide a meaningful description, as it will be used by Copilot to identify the plugin.
- Move to the “Security” page and choose the authentication type. For this sample, select "None". In an actual scenario, select from “Basic Authentication”, “API Key”, or “OAuth 2.0”.

- Create a new action. Provide a meaningful summary and description, then switch to the Swagger editor. Copy and paste the Swagger file content from Step 1. Here is the sample Swagger content used for this example:
- Input parameter: “customerName” (type string) and Output parameter: “summarizedResponse” (type string)
- Once you toggle back the “Swagger editor” you’ll notice a new action and request is created.
- Validate the response from the Azure function.
- Move to the “AI Plugin (preview)” page and provide a meaningful name and description.

- Click on “Plugin Actions” and check “Enable as copilot plugin operation”.
- Validate the request details.
- Click on “Update connector” to complete the creation of the connector. Once the process completes successfully, you will be able to see your connector listed as shown in the figure. In our example it is “Summarize Deal”.

Step 3: Verify and Publish the Custom Connector
Use the following steps to verify and publish the custom connector to the
- Go to the copilot studio (https://copilotstudio.microsoft.com). Choose the correct environment.
- Click on “Agents” from the left navigation and select “Copilot in Dynamics 365 Customer Service”.
- Use Copilot in Dynamics 365 Customer Service to create a Connector action.

- Select the custom connector created in Step 2 within the Dataverse environment and configure its actions and parameters.
- Verify the custom connector details, edit if required, and publish the changes.

Step 4: Configure the Custom Plugin
Use the following steps to configure the custom plugin to.
- Go to the Customer Service Admin app and click on “Manage Plugins for Generative AI (preview)” under Agent experience > Productivity.

- You will be able to see the plugin listed here. In our case “Summarize Deal” plugin. Next, turn on the plugin by following the 4 steps in the wizard:
- Select the authentication as “Admin” or “Agent”.
- Choose the access type as “All agents who have Copilot” or specific security roles.

- Click on “Save” to complete the configuration.
- Ensure the custom plugin status is turned on and published.

Step 5: Test the Plugin
Test the plugin by creating a prompt in Copilot and asking a question, such as "Get me details about deal for the <customer name>".
Conclusion
By following these steps, you can successfully implement cross-instance collaboration with Copilot in Dynamics 365, enhancing team collaboration and delivering a superior customer experience.
Contributors
Sourav Das Biswas and Sourajit Samanta
Senior FastTrack Solution Architect