Microsoft Copilot Studio — Advanced Topics Guide
Generative AI · Knowledge Sources · Actions & Plugins · Autonomous Agents · Multi-Channel · ALM · Security · Scenarios · Cheat Sheet
Table of Contents
- Core Concepts — Advanced Positioning
- Generative AI & Knowledge Sources
- Actions, Plugins & Connectors
- Autonomous Agents & Orchestration
- Multi-Channel & Integration
- ALM, Security & Governance
- Scenario-Based Questions
- Cheat Sheet — Quick Reference
1. Core Concepts — Advanced Positioning
What is Microsoft Copilot Studio and how has it evolved?
Microsoft Copilot Studio (formerly Power Virtual Agents) is a low-code platform for building AI-powered conversational agents — chatbots, copilots, and autonomous agents — that can interact with users across multiple channels and take actions on their behalf.
Evolution:
- Power Virtual Agents (PVA) (2019–2023): rule-based topic-driven chatbot builder
- Copilot Studio (2023–present): expanded to include generative AI (GPT), knowledge sources, plugins, multi-agent orchestration, and autonomous agent capabilities
Key shift — from scripted to generative:
Traditional PVA (rule-based):
→ Rigid topic trees with defined trigger phrases
→ Every conversation path explicitly authored
→ Falls back to "I don't understand" for unrecognised inputs
→ Maintenance-heavy — add new trigger phrases constantly
Copilot Studio with Generative AI:
→ Generative answers from knowledge sources (no topic required)
→ Natural language understanding via LLM
→ Gracefully handles queries not covered by topics
→ Self-improving with connected knowledge sources
→ Autonomous task execution with minimal author guidance
What are the Copilot Studio agent types?
Copilot (classic chatbot + generative AI):
→ Topic-based conversation flows
→ Generative answers filling gaps between topics
→ Actions called within topic flows
→ Multi-channel deployment
→ Best for: customer service, HR helpdesk, IT support
Autonomous agent:
→ Goal-oriented — given a goal, determines steps to achieve it
→ Selects and chains actions automatically (no rigid topic flow)
→ Runs in background without continuous user interaction
→ Can be triggered by events (email received, record created)
→ Best for: complex workflows, multi-step business process automation
Copilot extension (plugin):
→ Extends Microsoft 365 Copilot with org-specific capabilities
→ Deployed as a declarative agent in M365 Copilot
→ Users interact via M365 Copilot in Teams, Outlook, etc.
→ Best for: extending M365 Copilot with business data
Key capability comparison:
Classic Generative Autonomous
Topic authoring: Required Optional Optional
Generative answers: No Yes Yes
Action execution: Manual Manual Automatic (AI-driven)
Proactive: No No Yes (event-triggered)
User interaction: Always Always Optional
What is the Copilot Studio topic architecture?
Topic components:
Trigger: what starts this topic
→ Trigger phrases (classic): "I need help", "track my order"
→ Events: conversationStart, conversationEnd, escalate
→ System topics: pre-built (greeting, escalate, end of conversation)
Nodes: the conversation flow steps
Message: send text/adaptive card to user
Question: ask user for input, store in variable
Condition: if/else branching based on variable values
Action: call Power Automate flow or plugin
Variable: set/get topic or global variables
Redirect: jump to another topic
End topic: end this topic (return to parent)
End conversation: close the conversation
Generative answers: search knowledge and generate response
Variables:
Topic variables: scoped to current topic (cleared when topic ends)
Global variables: persist across the entire conversation session
System variables: built-in (User.DisplayName, Activity.Text, etc.)
Environment variables: Power Platform env vars (config values)
System topics (always present):
Conversation Start → greeting when conversation begins
End of Conversation → closing message + satisfaction survey
Escalate → hand off to human agent
Fallback → when no topic matches (AI generative fallback)
Error → when an unexpected error occurs
Sign In → authentication flow
2. Generative AI & Knowledge Sources
What are Knowledge Sources in Copilot Studio and what types are supported?
Knowledge Sources are the data repositories that Copilot Studio searches to generate AI-powered answers when no specific topic matches a user query.
Supported knowledge source types:
Public websites:
→ Specify URLs — Copilot Studio crawls and indexes content
→ Supports: sitemap-based crawling, specific URL paths
→ Content indexed: text content of web pages
→ Best for: public documentation, FAQ pages, product info
SharePoint sites:
→ Connect to SharePoint Online sites or specific libraries
→ Content indexed: document text (Word, PDF, PowerPoint, text files)
→ Security: respects SharePoint permissions when using user authentication
→ Best for: internal knowledge bases, HR policies, IT documentation
Dataverse tables:
→ Search structured data in Dataverse (knowledge articles, products, FAQs)
→ Supports: Dataverse knowledge articles (publishedknowledgearticle table)
→ Best for: Dynamics 365 Customer Service KB, custom data tables
Files (uploaded):
→ Upload documents directly (PDF, Word, PowerPoint)
→ Indexed immediately — no external URL needed
→ Best for: static documents (product manuals, policy PDFs)
Custom data (Azure AI Search):
→ Connect to Azure AI Search index for enterprise search
→ Best for: large-scale document repositories, custom indexed content
Microsoft Copilot Studio knowledge store:
→ Q&A pairs authored directly in Copilot Studio
→ Alternative name: Question and Answer (Q&A) knowledge
→ Best for: specific FAQ content, controlled answers
How does Generative Answers work in Copilot Studio?
Generative Answers flow:
1. User sends message not matched by any topic trigger
2. Copilot Studio sends query to the Generative Answers AI model
3. AI searches configured knowledge sources
4. Relevant content retrieved from knowledge sources
5. GPT generates a natural language answer with citations
6. Answer returned to user with source references
Configuring Generative Answers:
At agent level:
→ Settings → AI → Enable "Generative AI features"
→ Add knowledge sources
→ Set content moderation level (Low / Medium / High)
At topic level:
→ Add "Generative answers" node in topic flow
→ Override knowledge sources for specific contexts
→ Input: topic variable containing search query
Generative answers node inputs:
Search query: {{ Activity.Text }} ← user's message
OR custom query built from variables
Content moderation levels:
Low: more creative, may include unverified information
Medium: balanced (default)
High: strict — only answers directly supported by source content
Citations:
→ Answers include source references (filename, URL)
→ User can click to view source document
→ Configure: show citations (default) or suppress citations
Fallback behaviour:
→ If no relevant content found: "I couldn't find information about that"
→ Customise fallback message in system Fallback topic
What is Generative Orchestration (AI-driven topic selection)?
Classic topic selection (keyword matching):
→ Topic triggers contain specific phrases
→ "track my order", "order status" → triggers Order Tracking topic
→ Requires extensive trigger phrase authoring
→ Misses paraphrased queries not in trigger list
Generative Orchestration (AI-driven):
→ LLM determines the most relevant topic for each user message
→ No need for exhaustive trigger phrase lists
→ Understands intent, not just keyword matching
→ Can select between topics, actions, AND knowledge sources
How it works:
User: "Where is my purchase?" (not in trigger phrases)
↓ LLM analysis
Determines intent: order tracking
↓ Selects best match
Executes: Order Tracking topic or calls Get Order Status action
Generative Orchestration with Multiple Agents:
→ A primary agent has access to multiple "skills" (sub-agents)
→ Orchestrator determines which skill/sub-agent handles each query
→ Routes to: Topic in current agent | Action | Sub-agent
→ Result returned and synthesised into coherent response
Enable Generative Orchestration:
Settings → AI → Generative AI features → Generative orchestration
(Note: uses more AI credits — balance capability vs cost)
What are Generative Actions (AI plugin calling)?
Generative Actions = AI-selected action execution within conversations
Classic action calling:
→ Author explicitly adds "Call an action" node in topic
→ Action always called at that specific point in the topic
→ Rigid — must anticipate every scenario
Generative Actions:
→ Register actions (Power Automate flows, plugins) with descriptions
→ LLM decides when to call which action based on user intent
→ No explicit "call action" node needed — AI selects at runtime
→ Parameters auto-extracted from conversation context
Example:
Actions registered:
→ "Get order status" — retrieves order by order number
→ "Cancel order" — cancels an order
→ "Create support case" — opens a new support ticket
User: "Can you cancel order 12345 for me?"
AI determines:
→ Intent: cancel order
→ Calls: "Cancel order" action with orderNumber = "12345"
→ Returns: "Order 12345 has been cancelled successfully"
No explicit topic needed — generative AI handles the flow end-to-end
Action description best practices:
→ Write clear, specific descriptions for each action
→ Include: what the action does, when it should be used
→ Include: what parameters it requires and their format
→ Bad: "Get order" ← too vague
→ Good: "Retrieve the current status and estimated delivery date
of a customer order. Use when the user asks about their
order status, shipping, or delivery. Requires: orderNumber (string)"
3. Actions, Plugins & Connectors
What are the types of Actions in Copilot Studio?
Action types:
1. Power Automate flows:
→ Call a Power Automate cloud flow from within a topic
→ Pass input variables to the flow, receive output variables
→ Most flexible — access 1,000+ connectors via Power Automate
→ Use for: data operations, external API calls, complex logic
2. HTTP connector (direct REST calls):
→ Call any REST API directly without Power Automate
→ Configure: URL, method, headers, authentication, body
→ Parse JSON response into Copilot Studio variables
→ Use for: simple GET/POST to known APIs
→ Lower latency than flow-based actions
3. AI Builder prompts (Prompt Actions):
→ Call an AI Builder GPT prompt from within a topic
→ Pass conversation context as input to the prompt
→ Use for: text generation, summarisation, classification within topics
4. Power Platform connectors:
→ Use connector actions directly (Dataverse, SharePoint, etc.)
→ Configure connection in Copilot Studio settings
→ Use for: direct CRUD operations on connected data sources
5. MCP (Model Context Protocol) tools:
→ Connect to MCP servers exposing tools
→ AI calls MCP tools via standardised protocol
→ Use for: integrating with GitHub Copilot ecosystem, dev tools
Flow action configuration:
In topic → "Call an action" node → select flow
Input: variable name → flow input parameter
Output: flow output parameter → variable name
Flow response in topic:
Set variable: varOrderStatus = {flow output: OrderStatus}
Message: "Your order status is {{ varOrderStatus }}"
What are Copilot Studio Plugins and how do they differ from Actions?
Actions vs Plugins:
Actions (internal to agent):
→ Called explicitly in topic nodes or via Generative Actions
→ Available only to the current agent
→ Defined within the agent
Plugins (shareable, reusable):
→ Reusable capability packages — share across multiple agents
→ Three plugin types in Copilot Studio:
1. Connector plugins:
→ Wrap a Power Platform connector action as a plugin
→ e.g., "Salesforce — Create Lead" as a reusable plugin
→ Callable from any agent that adds the connector plugin
2. Conversational plugins:
→ A complete topic packaged as a reusable component
→ Another agent can "call" this plugin as a skill
→ Multi-agent architecture: orchestrator delegates to skill agents
3. AI plugin (OpenAI-compatible):
→ Exposes agent capabilities as an OpenAI-format plugin
→ Callable from Microsoft 365 Copilot, Custom Copilots
→ Defined with: manifest URL, actions, parameters
Copilot Studio as a plugin for M365 Copilot:
→ Build a conversational plugin in Copilot Studio
→ Publish to Teams app catalogue
→ M365 Copilot can invoke the plugin when relevant
→ User in Teams Copilot: "Check my open support tickets"
→ M365 Copilot invokes the Copilot Studio plugin → returns data
How do you configure authentication for Actions in Copilot Studio?
Authentication options for actions/connectors:
No authentication (anonymous):
→ Calls unauthenticated public APIs
→ Use for: public data, weather, news APIs
Azure AD (OAuth):
→ User authenticates via Entra ID SSO
→ Action called with user's delegated token (on behalf of user)
→ Sees only data the user can access
→ Use for: Graph API calls, SharePoint data as the user
Service account (application credentials):
→ Store client ID + client secret in environment variables
→ Application-level access (all users share same identity)
→ Use for: backend services, non-user-specific operations
Managed Identity:
→ When Copilot Studio runs in Standard Logic Apps/Azure environment
→ No credential management
Key Vault:
→ Store API keys/secrets in Azure Key Vault
→ Reference from Copilot Studio action configuration
→ Never hardcode secrets in action configuration
OAuth generic:
→ For non-Entra ID OAuth 2.0 providers
→ Configure: authorize URL, token URL, client ID/secret, scopes
→ Use for: Salesforce, GitHub, Google APIs
4. Autonomous Agents & Orchestration
What are Autonomous Agents in Copilot Studio?
Autonomous agents = agents that execute multi-step tasks
without continuous human interaction, triggered by events
Key characteristics:
→ Event-triggered (not user message triggered)
→ Goal-oriented: given a goal, AI determines execution steps
→ Action-chaining: selects and chains multiple actions
→ Can run background tasks (no chat UI needed)
→ Observability: detailed run logs for monitoring
Autonomous agent triggers:
→ Power Automate trigger → start agent run
→ Dataverse record created/updated → start agent run
→ Schedule (via Power Automate recurrence trigger)
→ Teams message received
→ Email received (via Power Automate)
Autonomous agent lifecycle:
1. Trigger fires (e.g., new support case created in Dataverse)
2. Agent receives context (case title, description, customer ID)
3. AI determines steps to achieve the goal
"Resolve this case: find knowledge article, update case,
notify customer"
4. Executes actions:
→ Search knowledge base (Knowledge source action)
→ Update case status (Dataverse action)
→ Send email (Office 365 action)
5. Logs each step with result
6. Completion: mark task complete, notify if needed
Differences from classic agent:
Classic: user asks → agent responds (reactive, synchronous)
Autonomous: event fires → agent acts (proactive, asynchronous)
What is Multi-Agent Orchestration in Copilot Studio?
Multi-agent architecture:
One primary "orchestrator" agent coordinates multiple
"skill" agents, each specialising in a domain.
Architecture:
Orchestrator Agent (primary)
├── IT Support Agent (skill)
│ → hardware issues, software installation, VPN
├── HR Agent (skill)
│ → leave requests, payroll, benefits
├── Finance Agent (skill)
│ → expense claims, purchase orders, invoices
└── Knowledge Agent (skill)
→ company policies, procedures, documentation
How orchestration works:
1. User sends message to orchestrator
2. Orchestrator's AI evaluates: which skill agent handles this?
3. Delegates to appropriate skill agent
4. Skill agent processes and responds
5. Orchestrator synthesises or passes back to user
Benefits:
→ Separation of concerns: each agent has focused knowledge
→ Smaller agents = better accuracy, easier maintenance
→ Reusability: skill agents used by multiple orchestrators
→ Governance: different teams own different skill agents
Configuration:
In orchestrator agent → Add skill
→ Select another Copilot Studio agent as a skill
→ Provide description: "Use this skill for HR-related questions
about leave, payroll, and benefits"
→ Orchestrator AI uses description to route appropriately
Cross-tenant skills:
→ Skill agents can be in different environments (but same tenant)
→ Enterprise: central orchestrator + department-owned skill agents
What is the Copilot Studio Agent Framework and memory?
Agent memory types:
Conversation memory (session):
→ Persists within a single conversation session
→ Topic and global variables
→ Cleared when conversation ends (or session timeout)
→ Use for: tracking conversation state, user preferences in session
Long-term memory (cross-session):
→ NOT natively built into Copilot Studio
→ Implement via:
- Dataverse: save/load user preferences between sessions
- Azure Cosmos DB: external memory store via HTTP action
- Power Automate: read/write user context at conversation start
Memory pattern:
Conversation Start topic:
→ Call flow: Get User Profile (read from Dataverse)
→ Store in global variable: Global.UserName, Global.Preferences
→ Use throughout conversation
Conversation End topic:
→ Call flow: Save Session Summary (write to Dataverse)
→ Store: summary, preferences updated, unresolved issues
System variables (always available):
System.User.DisplayName → authenticated user's display name
System.User.Email → authenticated user's email
System.User.Id → authenticated user's Object ID
System.Activity.Text → user's most recent message
System.Conversation.Id → unique conversation session ID
System.Channel → channel name (Teams, WebChat, etc.)
System.Bot.Name → the agent's name
5. Multi-Channel & Integration
What channels does Copilot Studio support for deployment?
Native channels (built-in):
Microsoft Teams:
→ Most common enterprise channel
→ Personal app in Teams app bar
→ Channel/group chat integration
→ Teams admin approval required for org-wide deploy
→ Supports: adaptive cards, Teams SSO authentication
Demo website:
→ Auto-generated test URL for quick testing
→ Not for production use
Custom website (web chat):
→ Embed JavaScript snippet in any website
→ Copilot appears as chat widget
→ Full customisation: colours, position, greeting, avatar
→ Authentication: anonymous or custom token server
Mobile app:
→ Embed in native iOS/Android app via Direct Line API
→ Direct Line SDK for React Native, Swift, Kotlin
Microsoft 365 Copilot:
→ Deploy as a declarative agent or plugin in M365 Copilot
→ Available in Teams Copilot, Outlook, Microsoft 365 apps
→ High-value channel for enterprise internal copilots
Power Pages:
→ Embed in a Power Pages portal
→ External customer-facing web chat
→ Passes portal user authentication context to the agent
Direct Line (custom channels):
→ REST API for any custom integration
→ WhatsApp (via Azure Communication Services)
→ Facebook Messenger (via Azure Bot Service)
→ Slack, Telegram, custom mobile apps
Telephony / Voice:
→ Azure Communication Services integration
→ IVR (Interactive Voice Response) via Nuance or ACS
→ Voice-to-text and text-to-voice conversion
→ Use for: call centre automation
How does Copilot Studio integrate with D365 Customer Service (Omnichannel)?
Integration architecture:
Customer starts chat on website/Teams
↓
Copilot Studio bot handles initial conversation
→ Answers FAQs via knowledge sources
→ Collects customer details (name, account, issue type)
→ Attempts automated resolution via actions
↓ (if cannot resolve)
Escalates to D365 Customer Service Omnichannel
→ Context passed: customer details, conversation transcript,
bot-determined category, bot escalation reason
↓
D365 agent receives conversation with full context
→ No customer repetition
→ Pre-populated case fields
→ Routed to correct queue based on bot category
Configuration steps:
1. In D365 Customer Service Admin:
→ Create a workstream for chat
→ Set up bot: connect Copilot Studio bot to the workstream
→ Configure: bot handles first N minutes, then escalates
2. In Copilot Studio:
→ System topic "Escalate":
→ Set context variables before hand-off:
va_CustomerName = {{ System.User.DisplayName }}
va_IssueCategory = {{ Topic.Category }}
va_BotTranscript = {{ System.Conversation.Id }}
→ "Transfer conversation" node → hand off to agent
3. D365 receives:
→ All context variables surfaced in agent workspace
→ Full conversation transcript displayed
Benefits:
→ Deflection: bot resolves 20-40% of contacts
→ No repetition: customer experience improved
→ Context: agent knows issue before picking up conversation
→ Analytics: track deflection rate, escalation reasons
How do you implement user authentication in Copilot Studio?
Authentication modes:
No authentication (anonymous):
→ Bot does not know who the user is
→ Suitable for: public FAQ bots, product info bots
→ Cannot access user-specific data
Manual authentication (per-topic):
→ Author adds "Authenticate" node in specific topics
→ User prompted to sign in when they reach that node
→ After sign-in: System.User.* variables populated
→ Use for: bots where MOST queries are anonymous but
some require identity (e.g., "Check my account" topic)
Require sign-in for all users:
→ Bot requires authentication before any conversation starts
→ User must sign in via configured IdP before proceeding
→ Use for: enterprise internal bots (all users are employees)
Authentication providers:
→ Entra ID (recommended for internal bots)
→ Azure AD B2C (customer-facing bots with consumer identity)
→ Generic OAuth 2.0 (any OAuth-compatible provider)
Teams SSO (automatic):
→ When deployed to Microsoft Teams
→ User's Teams identity used automatically (no sign-in prompt)
→ Token passed via Teams SSO mechanism
→ Seamless experience — user never sees a login screen
After authentication, available variables:
System.User.DisplayName → "Alice Smith"
System.User.Email → "alice@contoso.com"
System.User.Id → Entra ID Object ID (GUID)
System.User.IsLoggedIn → true/false
AuthToken → OAuth access token (for API calls)
6. ALM, Security & Governance
How do you manage ALM for Copilot Studio agents?
Copilot Studio ALM approach:
1. Dataverse Solutions:
→ Copilot Studio agents are Dataverse solution components
→ Package in a solution for environment-to-environment promotion
→ Solution contains: bot definition, topics, variables, connections
→ Export as managed solution for target environments
2. Environment strategy:
Development → Test → UAT → Production
→ Each environment: separate Copilot Studio agent instance
→ Use environment variables for channel IDs, connection strings
3. Source control (Git):
→ pac copilot export — export agent definition to YAML files
→ Commit YAML to Git repository
→ PR review: review topic changes, variable additions
→ pac copilot import — import from YAML back to environment
4. CI/CD pipeline (GitHub Actions / Azure DevOps):
steps:
- pac auth create (service principal)
- pac solution export --name CopilotSolution
- pac solution import --path CopilotSolution_managed.zip
- Run automated test (via Test Framework or custom)
- Publish bot channels
5. Test Framework:
→ Copilot Studio Test Framework (preview)
→ Define test conversations: input → expected output
→ Run automated regression tests before promoting to prod
→ Assert: topic triggered, variable values, actions called
6. Connection references:
→ Connectors use connection references (not direct connections)
→ Each environment: connection reference points to env-specific connection
→ Prevents hard-coded connection IDs from breaking on import
What are the key security and governance controls for Copilot Studio?
Data Loss Prevention (DLP):
→ Power Platform DLP policies apply to Copilot Studio
→ Control which connectors can be used in agents
→ Prevent sensitive data exfiltration via connectors
→ Configure: Power Platform Admin Centre → DLP Policies
→ Copilot Studio connector classified: Premium, Business, Non-business
Content Moderation:
→ Configure AI content moderation level per agent (Low/Medium/High)
→ High: blocks inappropriate inputs and outputs
→ Filter: profanity, harmful content, personal information
→ Configure in agent Settings → AI → Content moderation
Authentication control:
→ Require sign-in: enforce identity before any conversation
→ Teams Only: restrict deployment to Teams channel only
→ IP restrictions: restrict agent access to specific IP ranges
Admin controls (Power Platform Admin Centre):
→ Enable/disable Copilot Studio for specific environments
→ Control who can create agents (maker policy)
→ Monitor: AI usage, capacity consumption, active agents
→ Copilot usage reports: sessions, escalations, resolution rates
Data residency:
→ Copilot Studio processes data in the same region as the environment
→ AI (LLM) calls: data sent to Azure OpenAI (regional compliance)
→ Configure: environment region selection at creation
→ EU Data Boundary: available for GDPR compliance
Generative AI governance:
→ Human review of AI-generated answers before enabling for users
→ Monitoring: flag conversations where AI generated incorrect answers
→ Feedback: thumbs up/down integrated into conversation
→ Review: Copilot Studio analytics → topic coverage and accuracy
What are Copilot Studio analytics and key metrics?
Built-in analytics dashboard:
Engagement metrics:
Total sessions: total conversation sessions in period
Engaged sessions: sessions where user sent ≥ 1 message
Engagement rate: engaged / total sessions
Resolution metrics:
Resolution rate: % sessions resolved without escalation/abandon
Escalation rate: % sessions transferred to human agent
Abandon rate: % sessions where user left without resolution
CSAT: satisfaction score from end-of-conversation survey
Topic metrics:
Top topics: most frequently triggered topics
Topic coverage: % sessions handled by a specific topic
Unrecognised phrases: queries that didn't match any topic
→ review these to improve topic coverage
Generative AI metrics:
Generative answer rate: % responses generated by AI (not topics)
Knowledge source hits: which sources are being cited
Low confidence answers: answers below confidence threshold
Channel breakdown:
Sessions per channel: Teams vs WebChat vs Direct Line vs other
Using analytics to improve:
1. Review "Unrecognised phrases" → create new topics or add to KB
2. Review high-abandon topics → identify confusing conversation flows
3. Review escalation topics → improve resolution with better actions
4. Review low-rated AI answers → improve knowledge source content
7. Scenario-Based Questions
Scenario: Design an enterprise IT helpdesk copilot for 10,000 employees.
Architecture:
-
Agent type: Copilot deployed in Microsoft Teams. All employees access via Teams app. Teams SSO — no sign-in prompt needed.
-
Knowledge sources:
- SharePoint site: IT documentation, software guides, network policies
- Dataverse: IT knowledge articles (from D365 Customer Service KB)
- Public Microsoft docs: linked for common M365 issues
-
Topics (explicit flows for high-volume issues):
- Password reset: authenticates user → calls Graph API → initiates reset
- VPN setup: device type question → provides correct guide link
- Software installation: collects software name → checks catalogue → raises request
- Raise IT ticket: multi-step form → creates Dataverse incident via Power Automate
-
Generative answers: fills gap for everything not covered by explicit topics. Sources: IT SharePoint KB.
-
Escalation to D365 Customer Service: when user says "speak to IT" or bot cannot resolve → transfers with context to D365 Omnichannel.
-
Multi-agent: orchestrator agent routes to skill agents:
- IT Hardware Agent: laptop issues, peripherals
- IT Software Agent: application issues, licences
- IT Network Agent: VPN, WiFi, connectivity
-
ALM: Dev → UAT → Prod via Dataverse solutions + GitHub Actions pipeline. pac CLI for source control.
-
Governance: DLP policy blocking non-business connectors. High content moderation. Admin monitoring dashboard.
Scenario: Build an autonomous agent that processes incoming vendor invoices.
Trigger: Email received in shared mailbox (vendor-invoices@contoso.com)
Agent goal: "Process this vendor invoice: extract data, validate, route for approval, and update ERP"
Autonomous actions:
- Extract invoice data: call AI Builder Invoice Processing model → extract vendor, amount, date, line items
- Validate: check vendor exists in Dataverse vendor table. Check duplicate invoice ID. Validate amount within tolerance.
- Route for approval: if amount > £10,000 → create approval request via Power Automate Approvals → wait for response. If ≤ £10,000 → auto-approve.
- Update ERP: call ERP REST API via HTTP action → create invoice record with extracted data.
- Notify: send Teams message to AP team with processing summary and any exceptions.
- Log: write processing record to Dataverse audit table.
Monitoring: each agent run logged with: trigger time, actions executed, results, any errors. Power BI dashboard on agent run logs.
Scenario: How do you improve a Copilot Studio agent with a 60% abandon rate?
Diagnose:
-
Analytics review: Copilot Studio analytics → identify topics with highest abandon rate. Check "Unrecognised phrases" — topics users ask for that the bot doesn't handle.
-
Conversation transcript review: review actual abandoned conversations — where did users drop off? What was the last bot message?
-
Common causes and fixes:
- No matching topic: user asks something bot doesn't cover → add new topic or add to knowledge source
- Poor escalation: users can't reach a human → review escalation topic, make it more discoverable
- Too many clarifying questions: bot asks for too much info → simplify forms, use defaults
- Long wait: bot calling slow Power Automate flow → optimise flow performance or show "thinking" indicator
- No answer from knowledge: knowledge source not indexed correctly → re-crawl, add content, improve source quality
- Confusing response: AI-generated answer is unclear → add explicit topic to override with clearer response
-
Improvements:
- Enable Generative Orchestration: handles paraphrased queries better
- Add more knowledge source content: fill gaps identified from unrecognised phrases
- Add proactive suggestions: after each answer, suggest related topics
- Improve escalation: make "Talk to a person" always discoverable
-
Measure impact: re-evaluate abandon rate after 2 weeks of changes.
Scenario: How do you extend Microsoft 365 Copilot with Copilot Studio for a sales team?
Requirement: Sales team uses M365 Copilot in Teams and Outlook. They want Copilot to help them check CRM data, create leads, and get deal status — without leaving the M365 Copilot interface.
Solution: Declarative Agent / Conversational Plugin
-
Build Copilot Studio agent with D365 Sales actions:
- Get opportunity status (by name or account)
- Create new lead (from natural language description)
- Get account summary (recent activities, open opps)
- Schedule follow-up task
-
Configure as M365 Copilot plugin:
- Copilot Studio → Channels → Microsoft 365 Copilot
- Plugin manifest: name, description, actions exposed
- Publish to Teams app catalogue
-
Deploy to sales team:
- Teams Admin Centre → approve the plugin
- Assign to "Sales" security group
- Sales team sees "Sales CRM Assistant" in M365 Copilot
-
Usage:
- User in Teams Copilot: "What's the status of the Contoso deal?"
- M365 Copilot invokes Sales CRM plugin → queries D365 Sales → returns current stage, value, next steps
- User: "Create a follow-up task for Alice for next Monday"
- Plugin creates task in D365 Sales linked to the opportunity
-
Security: Actions use user's Entra ID delegated token (on behalf of user) → user only sees their own pipeline data.
8. Cheat Sheet — Quick Reference
Copilot Studio Node Types
Message: send text, adaptive card, or image to user
Question: ask user for input → store in variable
Condition: if/else/else-if branching
Call an action: execute Power Automate flow or plugin
Redirect: jump to another topic (preserve context)
End topic: end current topic, return to parent
End conversation: close conversation session
Generative answers: AI search and respond from knowledge sources
Variable management: set / get / clear variables
Send adaptive card: rich card with buttons/inputs
Authentication: trigger sign-in flow
Transfer to agent: hand off to human in Omnichannel
Variable Types
Topic variables: scoped to current topic only (Topic.VarName)
Global variables: persist entire conversation (Global.VarName)
System variables: built-in read-only (System.User.Email, etc.)
Environment vars: Power Platform config (no secrets in topics)
Key system variables:
System.User.DisplayName → signed-in user's name
System.User.Email → signed-in user's email
System.User.Id → Entra ID Object ID
System.Activity.Text → user's latest message
System.Conversation.Id → session identifier
System.Channel → Teams / WebChat / DirectLine
System.User.IsLoggedIn → true / false
AuthToken → OAuth token for API calls
Knowledge Source Selection Guide
Use case → Knowledge Source
Public website content → Public website URL
SharePoint documents (internal) → SharePoint site/library
Dynamics 365 Knowledge Articles → Dataverse (KB table)
Small set of static PDFs → Uploaded files
Large enterprise document repository → Azure AI Search index
Specific Q&A pairs (controlled) → Q&A pairs in Copilot Studio
Analytics KPIs
Resolution rate: (Sessions resolved / Total sessions) × 100
Target: > 70% for well-configured agent
Escalation rate: (Escalated sessions / Total sessions) × 100
Target: < 20% for mature agent
CSAT: end-of-conversation satisfaction score
Target: > 4.0 / 5.0
Abandon rate: sessions where user left without resolution
Target: < 15%
Topic coverage: % sessions handled by defined topics
Generative rate: % responses from AI knowledge search
Unrecognised: queries matched to fallback — review these
ALM Commands (pac CLI)
# Authenticate to environment
pac auth create --url https://contoso.crm.dynamics.com
# Export solution containing agent
pac solution export --name CopilotSolution --path ./solutions
# Import solution to target environment
pac solution import --path ./solutions/CopilotSolution_managed.zip
# Export agent definition to YAML (source control)
pac copilot export --botId {botId} --path ./copilot-source
# Import agent from YAML
pac copilot import --path ./copilot-source
# Publish agent channels after import
pac copilot publish --botId {botId}
Top 10 Tips
-
Generative Answers fills the gaps between topics — you don't need a topic for every question. Configure knowledge sources and let the LLM handle queries not covered by explicit topics. This dramatically reduces authoring effort.
-
Generative Orchestration replaces keyword matching — AI determines topic intent instead of trigger phrases. More resilient to paraphrasing, fewer trigger phrase maintenance headaches. Know the trade-off: uses more AI credits.
-
Autonomous agents are event-triggered, not user-triggered — they run in the background, execute multi-step tasks, and don't require a chat UI. Know the difference from classic chatbots for any architecture question.
-
Action descriptions are prompt engineering — the quality of generative action descriptions determines whether the AI calls the right action at the right time. Treat descriptions as careful prompt engineering, not just documentation.
-
Multi-agent = separation of concerns — orchestrator routes, skill agents specialise. Each skill agent has focused knowledge, fewer topics, and better accuracy. Know this pattern for enterprise scale questions.
-
Teams SSO is seamless — when deployed to Teams, users are automatically authenticated via Teams SSO. No sign-in prompt needed. This is the preferred deployment for internal enterprise agents.
-
Bot-to-human handoff must pass context — set context variables before the Transfer node. D365 Omnichannel agent receives customer details, conversation transcript, and bot-determined category. "No customer repetition" is the key value.
-
DLP applies to Copilot Studio connectors — Power Platform DLP policies control which connectors agents can use. The Copilot Studio connector itself is subject to DLP classification. Know this for governance questions.
-
Unrecognised phrases = improvement backlog — review the analytics "Unrecognised phrases" report regularly. Each unrecognised query is an opportunity to create a new topic or add content to a knowledge source.
-
pac CLI for ALM —
pac copilot export/import+pac solution export/importare the production-grade deployment tools. Manual export from the UI is for development only. Always use pac CLI in CI/CD pipelines.
No comments:
Post a Comment