This repository contains example Adaptive Dialogs for Copilot in Sales (Dynamics 365 / Power Platform) showing common scenarios:
- Add a note to an Opportunity
- Create a Case from an Account
- Provide custom Copilot Sparks groups
Files
Quick overview of each example
- Add Note to Opportunity
- Trigger phrases: "add note to opportunity", "attach note to opportunity", etc.
- Flow:
- Asks for an Opportunity ID or name (see
Topic.OpportunityIdentifier). - Looks up the opportunity via the connector (
GetItemWithOrganization). - Prompts for note text (see
Topic.ContentNote). - Creates an annotation (note) attached to the opportunity and returns a link using
Topic.CreateRecordWithOrganization.annotationid.
- Asks for an Opportunity ID or name (see
- See implementation: AddNoteToOpportunity.yaml
- Create Case from Account
- Trigger phrases: "Create a case for this account", "Open a case for this customer", etc.
- Flow:
- Detects account context from page context or selected record (see
Topic.varAccountRecordIdand Global page context checks). - Collects case title and description (see
Topic.CaseTitleandTopic.CaseDescription). - Collects contact name fields (
Topic.FirstNameContact,Topic.LastNameContact). - Calls a sub-dialog/action and returns the created case id and number (
Topic.caseid,Topic.casenumber).
- Detects account context from page context or selected record (see
- See implementation: CreateCaseFromAccount.yaml
- Custom Sparks (Sparks catalog)
- Demonstrates adding custom Copilot Sparks groups surfaced to the UI.
- Defines
Global.MyCustomSparksGroupand merges it intoGlobal.PA_Copilot_Sparks.sparkGroups(seeGlobal.MyCustomSparksGroupandGlobal.PA_Copilot_Sparks.sparkGroups). - See implementation: CustomSalesParks.yaml
How to use these examples
- Open the YAML files in Visual Studio Code to review and adapt the dialogs:
- Trigger the dialogs in your Copilot in Sales environment using the example trigger phrases in each file.
- Inspect and adapt variables and connector references:
- Note/opportunity variables:
Topic.OpportunityIdentifier,Topic.ContentNote - Case variables:
Topic.varAccountRecordId,Topic.CaseTitle,Topic.CaseDescription,Topic.FirstNameContact,Topic.LastNameContact,Topic.caseid,Topic.casenumber - Sparks variables:
Global.MyCustomSparksGroup,Global.PA_Copilot_Sparks.sparkGroups
- Note/opportunity variables:
Notes and pointers
- These examples use connector actions (GetItemWithOrganization / CreateRecordWithOrganization) — adapt the connection reference and environment URLs to match your tenant.
- The Adaptive Dialogs use built-in Question/Condition/InvokeConnectorAction steps — reuse patterns when building new dialogs.