-
Notifications
You must be signed in to change notification settings - Fork 72
Add Dynamics 365 Advisor Declarative Agent #137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
2b15050
f95937c
21b997c
1784578
29bff00
fd8a830
0b54bdc
7be1085
03ea46a
7867bd2
ff013df
3648217
e3383f3
bac0cb5
cf05c6c
add5af3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # Sample environment file for Dynamics 365 Advisor Agent | ||
| # Copy this to .env.local and fill in your values | ||
| # DO NOT commit .env.local to git! | ||
|
|
||
| # Teams Toolkit Environment | ||
| TEAMSFX_ENV=dev | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The value here is dev, but the file is |
||
|
|
||
| # Microsoft 365 / Azure AD (if needed for future API integrations) | ||
| # TENANT_ID=your-tenant-id-here | ||
| # CLIENT_ID=your-client-id-here | ||
| # CLIENT_SECRET=your-client-secret-here | ||
|
|
||
| # Optional: Dynamics 365 API Configuration (for future enhancements) | ||
| # DYNAMICS_API_ENDPOINT=https://your-org.crm.dynamics.com | ||
| # DYNAMICS_CLIENT_ID=your-dynamics-app-id | ||
|
Comment on lines
+7
to
+15
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These are optional and not implemented in the agent, let's remove them. |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| # TeamsFx files | ||
| env/.env.*.user | ||
| env/.env.local | ||
| .env.local | ||
| .localConfigs | ||
| appPackage/build | ||
|
MrShahzadShafique marked this conversation as resolved.
|
||
|
|
||
| # dependencies | ||
| node_modules/ | ||
|
|
||
| # misc | ||
| .env | ||
| .deployment | ||
| .DS_Store | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's align the readme with other samples, use https://github.com/MrShahzadShafique/copilot-pro-dev-samples/blob/main/samples/da-ristorante-api/README.md as an example to follow. Remove sections that are not in the example. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,113 @@ | ||
| # Dynamics 365 Advisor Agent | ||
|
|
||
| ## Summary | ||
|
|
||
| An expert declarative agent for Microsoft 365 Copilot that provides guidance on Dynamics 365 CRM, Power Platform, and Copilot solutions. This agent helps users with CRM architecture decisions, entity design, security models, Power Automate workflows, and business process automation. | ||
|
|
||
|  | ||
|
|
||
| ## Tools and Frameworks | ||
|
|
||
|  | ||
|  | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| * [Microsoft 365 Developer Account](https://developer.microsoft.com/microsoft-365/dev-program) | ||
| * [Teams Toolkit for Visual Studio Code](https://learn.microsoft.com/microsoftteams/platform/toolkit/install-teams-toolkit?tabs=vscode) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Teams Toolkit is the old name, we should use Microsoft 365 Agents Toolkit instead. |
||
| * [Node.js LTS](https://nodejs.org/) | ||
| * [Visual Studio Code](https://code.visualstudio.com/) | ||
|
|
||
| ## Version history | ||
|
|
||
| Version|Date|Author|Comments | ||
| -------|----|----|-------- | ||
| 1.0.0|April 28, 2026|Muhammad Shahzad Shafique|Initial release | ||
|
|
||
| ## Disclaimer | ||
|
|
||
| **THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.** | ||
|
|
||
| --- | ||
|
|
||
| ## Minimal Path to Awesome | ||
|
|
||
| * Clone this repository (or [download this solution as a .ZIP file](https://pnp.github.io/download-partial/?url=https://github.com/pnp/copilot-pro-dev-samples/tree/main/samples/da-dynamics365-advisor) then unzip it) | ||
| * Open the `samples/da-dynamics365-advisor` folder in Visual Studio Code | ||
| * Select the Teams Toolkit icon on the left in the VS Code toolbar | ||
| * In the Account section, sign in with your [Microsoft 365 account](https://docs.microsoft.com/microsoftteams/platform/toolkit/accounts) if you haven't already | ||
| * Create the Teams app by selecting **Provision** in the "Lifecycle" section | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The env/.env.local file will not exist, so this will throw an error. Either add a line to create a copy of |
||
| * Select `Preview in Copilot (Edge)` or `Preview in Copilot (Chrome)` from the launch configuration dropdown | ||
| * Once the Copilot app is loaded in the browser, select the "..." menu and select **Copilot chats**. You will see the Dynamics 365 Advisor agent on the right rail | ||
| * Select the agent and start asking questions about Dynamics 365 CRM, Power Platform, or Copilot Studio | ||
|
|
||
|
MrShahzadShafique marked this conversation as resolved.
|
||
| ## Features | ||
|
|
||
| This agent provides expert guidance on: | ||
|
|
||
| * **CRM Architecture Guidance** - Dynamics 365 CRM design and implementation | ||
| * **Entity & Table Design** - Data model design in Dynamics 365 | ||
| * **Security Model Design** - Security roles, access levels, and multi-region deployment architecture | ||
| * **Power Automate Integration** - Workflow automation and business process recommendations | ||
| * **Copilot Studio Use Cases** - Customer service chatbot scenarios and implementations | ||
| * **Business Process Optimization** - Sales pipeline and customer service improvements | ||
| * **Plugin & Custom Code** - Custom development guidance and best practices | ||
|
|
||
| ## Conversation Starters | ||
|
|
||
| The agent includes several conversation starters: | ||
|
|
||
| * **CRM Design** - "Help me design a case management solution in Dynamics 365." | ||
| * **Power Automate** - "Suggest a Power Automate flow for lead qualification." | ||
| * **Copilot Studio** - "Give me chatbot use cases for customer service." | ||
| * **Security Model** - "How should I design security roles for a 3-country CRM deployment?" | ||
|
|
||
| ## File Structure | ||
|
|
||
| ``` | ||
| da-dynamics365-advisor/ | ||
| +-- appPackage/ | ||
| | +-- declarativeAgent.json # Agent configuration | ||
| | +-- instruction.txt # Agent instructions and behavior | ||
| | +-- manifest.json # Teams app manifest | ||
| | +-- color.png # App color icon | ||
| | +-- outline.png # App outline icon | ||
| +-- env/ | ||
| | +-- .env.dev # Environment variables for dev | ||
| +-- assets/ | ||
| | +-- screenshot.png # Demo screenshot | ||
| | +-- sample.json # Sample metadata | ||
| +-- .env.local.sample # Environment variables template | ||
| +-- .gitignore | ||
| +-- README.md | ||
| ``` | ||
|
|
||
| ## Setup Instructions | ||
|
|
||
| 1. **Open in VS Code** | ||
| - Open the `da-dynamics365-advisor` folder in Visual Studio Code | ||
| - Ensure Teams Toolkit extension is installed | ||
|
|
||
| 2. **Review the Configuration** | ||
| - Check `appPackage/declarativeAgent.json` for agent settings | ||
| - Review `appPackage/instruction.txt` for agent behavior | ||
|
|
||
| 3. **Run the Agent** | ||
| - Press F5 or use Teams Toolkit to start debugging | ||
| - Sign in with your Microsoft 365 account | ||
| - The agent will be deployed to your Copilot environment | ||
|
|
||
| 4. **Test the Agent** | ||
| - Open Microsoft 365 Copilot | ||
| - Find "Dynamics 365 Advisor" in your agents | ||
| - Try the conversation starters or ask your own questions about: | ||
| - Dynamics 365 CRM architecture | ||
| - Power Platform solutions | ||
| - Security and access control | ||
| - Business process automation | ||
|
|
||
| ## Author | ||
|
|
||
| * **Muhammad Shahzad Shafique** - [GitHub Profile](https://github.com/MrShahzadShafique) | ||
|
|
||
| <img src="https://m365-visitor-stats.azurewebsites.net/copilot-pro-dev-samples/samples/da-dynamics365-advisor" /> | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| { | ||
| "$schema": "https://developer.microsoft.com/json-schemas/copilot/declarative-agent/v1.3/schema.json", | ||
| "version": "v1.3", | ||
| "name": "Dynamics 365 Advisor", | ||
| "description": "Expert assistant for Dynamics 365 CRM, Power Platform, and Copilot solutions.", | ||
| "instructions": "$[file('instruction.txt')]", | ||
| "conversation_starters": [ | ||
| { | ||
| "title": "CRM Design", | ||
| "text": "Help me design a case management solution in Dynamics 365." | ||
| }, | ||
| { | ||
| "title": "Power Automate", | ||
| "text": "Suggest a Power Automate flow for lead qualification." | ||
| }, | ||
| { | ||
| "title": "Copilot Studio", | ||
| "text": "Give me chatbot use cases for customer service." | ||
| }, | ||
| { | ||
| "title": "Security Model", | ||
| "text": "How should I design security roles for a 3-country CRM deployment?" | ||
| } | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| You are a Microsoft Dynamics 365 CRM and Power Platform advisor. | ||
|
|
||
| Your role is to help users with: | ||
|
|
||
| - CRM architecture decisions | ||
| - Entity and table design | ||
| - Security roles and access model | ||
| - Power Automate workflows | ||
| - Plugin and custom code recommendations | ||
| - Copilot Studio chatbot use cases | ||
| - Customer Service process automation | ||
| - Sales pipeline optimization | ||
| - Business requirement documentation | ||
|
|
||
| Rules: | ||
|
|
||
| - Provide structured and professional responses | ||
| - Prefer Microsoft best practices | ||
| - Ask clarifying questions when needed | ||
| - Keep answers practical and implementation-ready | ||
| - Use bullet points and executive summaries |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| { | ||
| "$schema": "https://developer.microsoft.com/json-schemas/teams/v1.24/MicrosoftTeams.schema.json", | ||
| "manifestVersion": "1.24", | ||
| "version": "1.0.0", | ||
| "id": "${{TEAMS_APP_ID}}", | ||
| "name": { | ||
| "short": "Dynamics 365 Advisor", | ||
| "full": "Dynamics 365 Advisor for Microsoft 365 Copilot" | ||
| }, | ||
| "developer": { | ||
| "name": "Dynamics 365 Advisor", | ||
| "websiteUrl": "https://www.example.com", | ||
| "privacyUrl": "https://www.example.com/privacy", | ||
| "termsOfUseUrl": "https://www.example.com/termsofuse" | ||
| }, | ||
| "description": { | ||
| "short": "CRM & Power Platform advisory assistant", | ||
| "full": "Provides expert guidance for Dynamics 365 CRM, Power Platform, automation and Copilot." | ||
| }, | ||
| "icons": { | ||
| "outline": "outline.png", | ||
| "color": "color.png" | ||
| }, | ||
| "accentColor": "#FFFFFF", | ||
| "copilotAgents": { | ||
| "declarativeAgents": [ | ||
| { | ||
| "id": "declarativeAgent", | ||
| "file": "declarativeAgent.json" | ||
|
MrShahzadShafique marked this conversation as resolved.
|
||
| } | ||
| ] | ||
| }, | ||
| "permissions": [ | ||
| "identity" | ||
| ], | ||
| "validDomains": [] | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| [ | ||
| { | ||
| "name": "pnp-copilot-pro-dev-da-dynamics365-advisor", | ||
| "source": "pnp", | ||
| "title": "Dynamics 365 Advisor", | ||
| "shortDescription": "Expert declarative agent for Dynamics 365 CRM, Power Platform, and Copilot solutions guidance", | ||
| "url": "https://github.com/pnp/copilot-pro-dev-samples/tree/main/samples/da-dynamics365-advisor", | ||
| "downloadUrl": "https://pnp.github.io/download-partial/?url=https://github.com/pnp/copilot-pro-dev-samples/tree/main/samples/da-dynamics365-advisor", | ||
| "longDescription": [ | ||
| "A declarative agent that serves as an expert advisor for Dynamics 365 CRM and Power Platform solutions. Provides guidance on CRM architecture decisions, entity and table design, security models, Power Automate workflows, plugin development, Copilot Studio chatbot scenarios, and business process automation. Helps teams design scalable Dynamics 365 implementations with proper security role structures, optimized sales pipelines, and customer service automation." | ||
| ], | ||
| "creationDateTime": "2026-04-28", | ||
| "updateDateTime": "2026-04-28", | ||
| "products": [ | ||
| "Microsoft 365 Copilot", | ||
| "Dynamics 365", | ||
| "Power Platform" | ||
| ], | ||
| "metadata": [ | ||
| { | ||
| "key": "PLATFORM", | ||
| "value": "Copilot" | ||
| }, | ||
| { | ||
| "key": "LANGUAGE", | ||
| "value": "JSON" | ||
| }, | ||
| { | ||
| "key": "API-PLUGIN", | ||
| "value": "No" | ||
| }, | ||
| { | ||
| "key": "GRAPH-CONNECTOR", | ||
| "value": "No" | ||
| } | ||
| ], | ||
| "thumbnails": [ | ||
| { | ||
| "type": "image", | ||
| "order": 100, | ||
| "url": "https://raw.githubusercontent.com/pnp/copilot-pro-dev-samples/refs/heads/main/samples/da-dynamics365-advisor/assets/screenshot.png", | ||
| "alt": "Dynamics 365 Advisor Agent for Microsoft 365 Copilot" | ||
| } | ||
| ], | ||
| "authors": [ | ||
| { | ||
| "gitHubAccount": "MrShahzadShafique", | ||
| "pictureUrl": "https://github.com/MrShahzadShafique.png", | ||
| "name": "Muhammad Shahzad Shafique" | ||
| } | ||
| ], | ||
| "references": [ | ||
| { | ||
| "name": "Microsoft 365 Copilot extensibility", | ||
| "description": "Learn more about Microsoft 365 Copilot and how you can extend it.", | ||
| "url": "https://learn.microsoft.com/microsoft-365-copilot/extensibility/" | ||
| }, | ||
| { | ||
| "name": "Build declarative agents for Microsoft 365 Copilot", | ||
| "description": "Learn more about declarative agents for Microsoft 365 Copilot.", | ||
| "url": "https://learn.microsoft.com/microsoft-365-copilot/extensibility/overview-declarative-agent" | ||
| }, | ||
| { | ||
| "name": "Dynamics 365 documentation", | ||
| "description": "Official Dynamics 365 documentation and best practices.", | ||
| "url": "https://learn.microsoft.com/dynamics365/" | ||
| }, | ||
| { | ||
| "name": "Power Platform documentation", | ||
| "description": "Learn about Power Apps, Power Automate, and Copilot Studio.", | ||
| "url": "https://learn.microsoft.com/power-platform/" | ||
| } | ||
| ] | ||
| } | ||
| ] |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # This file includes environment variables that will be committed to git by default. | ||
|
|
||
| # Built-in environment variables | ||
| TEAMSFX_ENV=dev | ||
| APP_NAME_SUFFIX=dev | ||
| AGENT_SCOPE=shared | ||
|
|
||
| # Updating AZURE_SUBSCRIPTION_ID or AZURE_RESOURCE_GROUP_NAME after provision may also require an update to RESOURCE_SUFFIX, because some services require a globally unique name across subscriptions/resource groups. | ||
| AZURE_SUBSCRIPTION_ID= | ||
| AZURE_RESOURCE_GROUP_NAME= | ||
| RESOURCE_SUFFIX= | ||
|
|
||
| # Generated during provision, you can also add your own variables. | ||
| TEAMS_APP_ID= | ||
| M365_TITLE_ID= | ||
| M365_APP_ID= |
Uh oh!
There was an error while loading. Please reload this page.