-
Notifications
You must be signed in to change notification settings - Fork 71
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
Open
MrShahzadShafique
wants to merge
16
commits into
pnp:main
Choose a base branch
from
MrShahzadShafique:da-dynamics365-advisor
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 15 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
2b15050
feat: add da-dynamics365-advisor declarative agent sample
f95937c
docs: add screenshot for da-dynamics365-advisor sample
21b997c
Update documentation to remove generic template language and correct …
1784578
Update dates to April 28, 2026
29bff00
Address Copilot PR review comments
fd8a830
Move declarativeAgent.json and instruction.txt to appPackage/ and upd…
0b54bdc
Fix root README.md encoding corruption and restore sample entry
7be1085
Remove UTF-8 BOM from env/.env.dev
03ea46a
Remove UTF-8 BOM from .env.local.sample
7867bd2
Remove literal backslash-r characters from file structure code block …
ff013df
Replace contoso.com with standard example.com placeholders in manifes…
3648217
Add dash separator in app name suffix to avoid Dynamics 365 Advisordev
e3383f3
Align manifest version and README version history to 1.0.0
bac0cb5
Update Minimal Path to Awesome to use Teams Toolkit Provision flow in…
cf05c6c
Potential fix for pull request finding
MrShahzadShafique add5af3
Potential fix for pull request finding
MrShahzadShafique File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
|
|
||
| # 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 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) | ||
| * [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 | ||
| * 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" /> | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions
25
samples/da-dynamics365-advisor/appPackage/declarativeAgent.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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?" | ||
| } | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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": "declarative-agent", | ||
|
MrShahzadShafique marked this conversation as resolved.
Outdated
MrShahzadShafique marked this conversation as resolved.
Outdated
MrShahzadShafique marked this conversation as resolved.
Outdated
|
||
| "file": "declarativeAgent.json" | ||
|
MrShahzadShafique marked this conversation as resolved.
|
||
| } | ||
| ] | ||
| }, | ||
| "permissions": [ | ||
| "identity" | ||
|
MrShahzadShafique marked this conversation as resolved.
|
||
| ], | ||
| "validDomains": [] | ||
| } | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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/" | ||
| } | ||
| ] | ||
| } | ||
| ] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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= | ||
|
|
||
|
MrShahzadShafique marked this conversation as resolved.
|
||
| # Generated during provision, you can also add your own variables. | ||
| TEAMS_APP_ID= | ||
| M365_TITLE_ID= | ||
| M365_APP_ID= | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.