<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Fusion Dev Insights</title>
        <description>Practical Microsoft Intelligent Automation insights from Fusion Dev Consulting covering RPA migration, Power Platform, AI and Copilot, .NET, and enterprise integration.</description>
        <link>https://www.fusiondevblogs.com/</link>
        <atom:link href="https://www.fusiondevblogs.com/feed.xml" rel="self" type="application/rss+xml"/>
        <pubDate>Mon, 22 Jun 2026 15:27:44 +0530</pubDate>
        <lastBuildDate>Mon, 22 Jun 2026 15:27:44 +0530</lastBuildDate>
        <generator>Jekyll v4.3.3</generator>
        
            <item>
                <title>Material Procurement Copilot Agent built using Anthropic Claude &amp; Dataverse</title>
                <description>&lt;h2 class=&quot;no_toc&quot; id=&quot;table-of-contents&quot;&gt;Table of Contents&lt;/h2&gt;

&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#introduction&quot; id=&quot;markdown-toc-introduction&quot;&gt;Introduction&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#technologies-involved&quot; id=&quot;markdown-toc-technologies-involved&quot;&gt;Technologies Involved&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#overall-flow&quot; id=&quot;markdown-toc-overall-flow&quot;&gt;Overall Flow&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#step-1-get-the-anthropic-claude-keys&quot; id=&quot;markdown-toc-step-1-get-the-anthropic-claude-keys&quot;&gt;Step 1: Get the Anthropic Claude Keys&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#step-2-create-a-custom-connector-for-anthropic-claude&quot; id=&quot;markdown-toc-step-2-create-a-custom-connector-for-anthropic-claude&quot;&gt;Step 2: Create a Custom Connector for Anthropic Claude&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#step-3-create-and-populate-the-dataverse-table&quot; id=&quot;markdown-toc-step-3-create-and-populate-the-dataverse-table&quot;&gt;Step 3: Create and Populate the Dataverse Table&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#step-4-creating-the-agent-in-copilot-studio&quot; id=&quot;markdown-toc-step-4-creating-the-agent-in-copilot-studio&quot;&gt;Step 4: Creating the Agent in Copilot Studio&lt;/a&gt;    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;#enable-generative-selection-of-topics&quot; id=&quot;markdown-toc-enable-generative-selection-of-topics&quot;&gt;Enable Generative Selection of Topics&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#step-5-create-topics&quot; id=&quot;markdown-toc-step-5-create-topics&quot;&gt;Step 5: Create Topics&lt;/a&gt;    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;#adding-material-selection-card&quot; id=&quot;markdown-toc-adding-material-selection-card&quot;&gt;Adding Material Selection Card&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#adding-dataverse-data-retrieval&quot; id=&quot;markdown-toc-adding-dataverse-data-retrieval&quot;&gt;Adding Dataverse Data Retrieval&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#formatting-data-for-analysis&quot; id=&quot;markdown-toc-formatting-data-for-analysis&quot;&gt;Formatting Data for Analysis&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#adding-the-anthropic-claude-connector&quot; id=&quot;markdown-toc-adding-the-anthropic-claude-connector&quot;&gt;Adding the Anthropic Claude Connector&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#testing-the-agent&quot; id=&quot;markdown-toc-testing-the-agent&quot;&gt;Testing the Agent&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#conclusion&quot; id=&quot;markdown-toc-conclusion&quot;&gt;Conclusion&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;

&lt;p&gt;In manufacturing and supply chain environments, maintaining optimal stock levels is critical. To address this, we’ll explore building a &lt;strong&gt;Material Procurement Agent&lt;/strong&gt; that leverages &lt;strong&gt;Anthropic Claude&lt;/strong&gt; to assess real-time inventory data from &lt;strong&gt;Dataverse&lt;/strong&gt;. This Agent will analyze stock levels and reorder thresholds, providing actionable insights to help identify materials that need timely procurement.&lt;/p&gt;

&lt;h2 id=&quot;technologies-involved&quot;&gt;Technologies Involved&lt;/h2&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;Microsoft Copilot Studio&lt;/strong&gt;: The platform to design and manage the conversational flow, adaptive card interface, and data retrieval from Dataverse.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Anthropic Claude&lt;/strong&gt;: Claude will process and analyze selected material data from Dataverse, generating recommendations for procurement.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Dataverse&lt;/strong&gt;: Stores the inventory data, including &lt;strong&gt;Material Name&lt;/strong&gt;, &lt;strong&gt;Current Stocks&lt;/strong&gt;, and &lt;strong&gt;Reorder Levels&lt;/strong&gt;, serving as the central data source for material status and procurement needs.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;overall-flow&quot;&gt;Overall Flow&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;User Selects Materials&lt;/strong&gt;: The process begins when the user initiates the Agent. An adaptive card is displayed, allowing the user to select materials from a list.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Data Retrieval from Dataverse&lt;/strong&gt;: Based on the selected materials, the Agent fetches data from Dataverse, specifically the &lt;strong&gt;Material Name&lt;/strong&gt;, &lt;strong&gt;Current Stocks&lt;/strong&gt;, and &lt;strong&gt;Reorder Levels&lt;/strong&gt; fields.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Claude Analysis&lt;/strong&gt;: Using &lt;strong&gt;Anthropic Claude&lt;/strong&gt;, the Agent analyzes the material data. The model reviews current stock levels against reorder thresholds to determine if procurement is necessary.&lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;strong&gt;Results Displayed&lt;/strong&gt;: The Agent displays a list of materials that need replenishment. Users receive clear recommendations on which items to prioritize for procurement.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\22_AnthropicProcurement\0_0.gif&quot; alt=&quot;Message Node&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;step-1-get-the-anthropic-claude-keys&quot;&gt;Step 1: Get the Anthropic Claude Keys&lt;/h2&gt;

&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;Head over to &lt;a href=&quot;https://console.anthropic.com/settings/keys&quot;&gt;Anthropic Console - Keys&lt;/a&gt; and &lt;strong&gt;Click on Create Key&lt;/strong&gt;.
&lt;img src=&quot;\images\22_AnthropicProcurement\1.png&quot; alt=&quot;Create Key&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;strong&gt;Save the key&lt;/strong&gt; as we will use it to create the connection from Agent.
&lt;img src=&quot;\images\22_AnthropicProcurement\2.png&quot; alt=&quot;Save Key&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;step-2-create-a-custom-connector-for-anthropic-claude&quot;&gt;Step 2: Create a Custom Connector for Anthropic Claude&lt;/h2&gt;

&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;Go to &lt;a href=&quot;https://make.powerautomate.com/&quot;&gt;Power Automate&lt;/a&gt; and select &lt;strong&gt;Custom Connector&lt;/strong&gt; to create a connector that will issue &lt;strong&gt;POST requests&lt;/strong&gt; to Anthropic Claude.
&lt;img src=&quot;\images\22_AnthropicProcurement\3.png&quot; alt=&quot;Custom Connector&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;strong&gt;Select New Connector&lt;/strong&gt; and &lt;strong&gt;Create from Blank&lt;/strong&gt;.
&lt;img src=&quot;\images\22_AnthropicProcurement\4.png&quot; alt=&quot;Create from Blank&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;strong&gt;Specify the connector name&lt;/strong&gt; and click on &lt;strong&gt;Continue&lt;/strong&gt;.
&lt;img src=&quot;\images\22_AnthropicProcurement\5.png&quot; alt=&quot;Specify Name&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;strong&gt;Click on Swagger editor&lt;/strong&gt; and paste the below swagger definition on the left pane. Then &lt;strong&gt;Click on Create Connector&lt;/strong&gt;.&lt;/p&gt;
    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;swagger: &apos;2.0&apos;
info:
  title: Anthropic Claude Messages API
  description: &amp;gt;-
 Claude is a large language model (LLM) built by Anthropic. It&apos;s trained to
 be a helpful assistant in a conversational tone.
  version: 1.0.0
host: api.anthropic.com
basePath: /v1
schemes:
  - https
consumes:
  - application/json
produces:
  - application/json
paths:
  /messages:
 post:
   summary: Send Messages to Claude
   description: &amp;gt;-
     Send a structured list of input messages, and the model will generate
     the next message in the conversation.
   operationId: ClaudeMessagesPost
   parameters:
     - name: anthropic-version
       in: header
       required: true
       type: string
       description: The version of the Anthropic API to use.
       default: &apos;2023-06-01&apos;
     - name: body
       in: body
       required: true
       schema:
         type: object
         properties:
           model:
             type: string
             description: The model that will complete your prompt.
             default: claude-3-5-sonnet-20240620
             enum:
               - claude-3-5-sonnet-20240620
           messages:
             type: array
             items:
               type: object
               properties:
                 role:
                   type: string
                   description: The role of the message sender (user or assistant).
                   enum:
                     - user
                     - assistant
                 content:
                   type: string
                   description: The text content of the message.
               required:
                 - role
                 - content
             description: List of input messages for the conversation.
           max_tokens:
             type: integer
             format: int32
             description: The maximum number of tokens to generate.
             default: 1024
           temperature:
             type: number
             description: &amp;gt;-
               Controls randomness in the response, with values ranging from
               0.0 (deterministic) to 1.0 (highly random).
             default: 1
           stop_sequences:
             type: array
             items:
               type: string
             description: Custom sequences that will cause the model to stop generating.
           system:
             type: string
             description: A system prompt providing context and instructions to Claude.
           stream:
             type: boolean
             description: &amp;gt;-
               Whether to stream the response incrementally using server-sent
               events.
   responses:
     &apos;200&apos;:
       description: Successful text generation
       schema:
         type: object
         properties:
           id:
             type: string
             description: Unique identifier for the message.
           content:
             type: array
             items:
               type: object
               properties:
                 type:
                   type: string
                   description: The type of content generated (e.g., text).
                 text:
                   type: string
                   description: The text generated by the model.
             description: The content generated by the model.
           model:
             type: string
             description: The model used for text generation.
           stop_reason:
             type: string
             description: The reason the model stopped generating.
             enum:
               - end_turn
               - max_tokens
               - stop_sequence
               - tool_use
           stop_sequence:
             type: string
             description: The stop sequence that was triggered, if any.
           usage:
             type: object
             properties:
               input_tokens:
                 type: integer
                 format: int32
                 description: Number of input tokens used.
               output_tokens:
                 type: integer
                 format: int32
                 description: Number of output tokens generated.
             description: Token usage information.
securityDefinitions:
  apiKeyHeader:
 type: apiKey
 in: header
 name: x-api-key
security:
  - apiKeyHeader: []

   
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
    &lt;p&gt;&lt;img src=&quot;\images\22_AnthropicProcurement\6.png&quot; alt=&quot;Swagger Editor&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;step-3-create-and-populate-the-dataverse-table&quot;&gt;Step 3: Create and Populate the Dataverse Table&lt;/h2&gt;

&lt;ol&gt;
  &lt;li&gt;Create the table &lt;strong&gt;Raw Material Stocks&lt;/strong&gt; in Dataverse and add fields for &lt;strong&gt;Material Name&lt;/strong&gt;, &lt;strong&gt;Current Stocks&lt;/strong&gt;, and &lt;strong&gt;Reorder Levels&lt;/strong&gt;.
&lt;img src=&quot;\images\22_AnthropicProcurement\7.png&quot; alt=&quot;Dataverse Table&quot; /&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;step-4-creating-the-agent-in-copilot-studio&quot;&gt;Step 4: Creating the Agent in Copilot Studio&lt;/h2&gt;

&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;Go to &lt;a href=&quot;https://copilotstudio.microsoft.com/&quot;&gt;Copilot Studio&lt;/a&gt; and &lt;strong&gt;Click on Create&lt;/strong&gt;. Select &lt;strong&gt;New Agent&lt;/strong&gt; to create one from scratch.
&lt;img src=&quot;\images\22_AnthropicProcurement\8.png&quot; alt=&quot;Create Copilot&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;strong&gt;Describe the Agent functionality&lt;/strong&gt; and provide any specific instructions, then &lt;strong&gt;Click on Create&lt;/strong&gt; to provision the Agent.
&lt;img src=&quot;\images\22_AnthropicProcurement\9.png&quot; alt=&quot;New Copilot&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;enable-generative-selection-of-topics&quot;&gt;Enable Generative Selection of Topics&lt;/h3&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;Click on Edit&lt;/strong&gt; to update the Agent details like &lt;strong&gt;name&lt;/strong&gt;, &lt;strong&gt;icon&lt;/strong&gt;, and &lt;strong&gt;description&lt;/strong&gt;. Then &lt;strong&gt;Click on Settings&lt;/strong&gt;, to enable &lt;strong&gt;Generative selection of topics&lt;/strong&gt;
&lt;img src=&quot;\images\22_AnthropicProcurement\10.png&quot; alt=&quot;Generative Settings&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;Choose &lt;strong&gt;High - More precise&lt;/strong&gt; for &lt;strong&gt;Content moderation&lt;/strong&gt;.&lt;strong&gt;Save&lt;/strong&gt; the settings and &lt;strong&gt;Close&lt;/strong&gt; to return to the Agent’s main page.
&lt;img src=&quot;\images\22_AnthropicProcurement\11.png&quot; alt=&quot;Close Settings&quot; /&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;step-5-create-topics&quot;&gt;Step 5: Create Topics&lt;/h2&gt;

&lt;ol&gt;
  &lt;li&gt;Go to the &lt;strong&gt;Topics&lt;/strong&gt; section in the navigation menu.&lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;strong&gt;Click on Add a Topic&lt;/strong&gt; and choose &lt;strong&gt;Create from description with Copilot&lt;/strong&gt;.
&lt;img src=&quot;\images\22_AnthropicProcurement\12.png&quot; alt=&quot;Add Topic&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;Provide the topic description, then &lt;strong&gt;Click on Create&lt;/strong&gt; to provision the topic.
&lt;img src=&quot;\images\22_AnthropicProcurement\13.png&quot; alt=&quot;Create Topic&quot; /&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;adding-material-selection-card&quot;&gt;Adding Material Selection Card&lt;/h3&gt;

&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;In the &lt;strong&gt;Procurement Analysis&lt;/strong&gt; topic, &lt;strong&gt;add an adaptive card&lt;/strong&gt; asking which materials to analyze for procurement.
&lt;img src=&quot;\images\22_AnthropicProcurement\14.png&quot; alt=&quot;Adaptive Card&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Add the below adaptive card schema&lt;/strong&gt; in the node properties.
    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;{
 &quot;type&quot;: &quot;AdaptiveCard&quot;,
 &quot;version&quot;: &quot;1.4&quot;,
 &quot;backgroundImage&quot;: {
     &quot;url&quot;: &quot;https://copilotai29.blob.core.windows.net/copilot/bg.jpg&quot;
 },
 &quot;body&quot;: [
     {
         &quot;type&quot;: &quot;Image&quot;,
         &quot;url&quot;: &quot;https://copilotai29.blob.core.windows.net/copilot/in-stock.png&quot;,
         &quot;size&quot;: &quot;Small&quot;,
         &quot;horizontalAlignment&quot;: &quot;Center&quot;
     },
     {
         &quot;type&quot;: &quot;TextBlock&quot;,
         &quot;text&quot;: &quot;Material Stock Check&quot;,
         &quot;weight&quot;: &quot;Bolder&quot;,
         &quot;size&quot;: &quot;extraLarge&quot;,
         &quot;color&quot;: &quot;Warning&quot;,
         &quot;horizontalAlignment&quot;: &quot;Center&quot;
     },
     {
         &quot;type&quot;: &quot;TextBlock&quot;,
         &quot;text&quot;: &quot;Select the materials you want to check the stock levels for:&quot;,
         &quot;wrap&quot;: true,
         &quot;weight&quot;:&quot;Bolder&quot;,
         &quot;spacing&quot;: &quot;Small&quot;,
         &quot;color&quot;: &quot;Good&quot;,
         &quot;horizontalAlignment&quot;: &quot;Center&quot;
     },
     {
         &quot;type&quot;: &quot;Input.ChoiceSet&quot;,
         &quot;id&quot;: &quot;selectedMaterials&quot;,
         &quot;style&quot;: &quot;expanded&quot;,
         &quot;isMultiSelect&quot;: true,
         &quot;choices&quot;: [
             {
                 &quot;title&quot;: &quot;Aluminium Sheets&quot;,
                 &quot;value&quot;: &quot;AluminiumSheets&quot;
             },
             {
                 &quot;title&quot;: &quot;Copper Wires&quot;,
                 &quot;value&quot;: &quot;CopperWires&quot;
             },
             {
                 &quot;title&quot;: &quot;Silica Beading&quot;,
                 &quot;value&quot;: &quot;SilicaBeading&quot;
             },
             {
                 &quot;title&quot;: &quot;Zinc Plates&quot;,
                 &quot;value&quot;: &quot;ZincPlates&quot;
             }
         ]
     }
 ],
 &quot;actions&quot;: [
     {
         &quot;type&quot;: &quot;Action.Submit&quot;,
         &quot;title&quot;: &quot;Check Stock Levels&quot;,
         &quot;style&quot;: &quot;positive&quot;,
         &quot;data&quot;: {
             &quot;action&quot;: &quot;checkStock&quot;
         }
     }
 ],
 &quot;minHeight&quot;: &quot;200px&quot;,
 &quot;verticalContentAlignment&quot;: &quot;Center&quot;
}

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
    &lt;p&gt;&lt;img src=&quot;\images\22_AnthropicProcurement\15.png&quot; alt=&quot;Adaptive Card Schema&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;Set the output variable as &lt;strong&gt;selectedMaterials&lt;/strong&gt; to store user-selected materials.
&lt;img src=&quot;\images\22_AnthropicProcurement\16.png&quot; alt=&quot;Output Variable&quot; /&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;adding-dataverse-data-retrieval&quot;&gt;Adding Dataverse Data Retrieval&lt;/h3&gt;

&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;Add the &lt;strong&gt;Dataverse connector action&lt;/strong&gt; to retrieve records from the &lt;strong&gt;Raw Materials&lt;/strong&gt; Dataverse table.
&lt;img src=&quot;\images\22_AnthropicProcurement\17.png&quot; alt=&quot;Dataverse Connector&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;strong&gt;Configure the connector&lt;/strong&gt; by specifying the &lt;strong&gt;Environment&lt;/strong&gt;, &lt;strong&gt;Table name&lt;/strong&gt;, and required table columns.
&lt;img src=&quot;\images\22_AnthropicProcurement\18.png&quot; alt=&quot;Connector Configuration&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Store the fetched data in the &lt;strong&gt;rawMaterials&lt;/strong&gt; variable for further processing.
&lt;img src=&quot;\images\22_AnthropicProcurement\19.png&quot; alt=&quot;Stored Data&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;The returned data from dataverse will contain additional system columns. Lets &lt;strong&gt;Initialize a variable (filteredStockDetails)&lt;/strong&gt; to hold filtered data with only necessary columns. For this we will use the below Power Fx expression to loop through the Dataverse returned data and filter it.
    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;ForAll(
 Topic.rawMaterials.value,
 {
     MaterialName: ThisRecord.crd69_materialname,
     CurrentStockLevels: ThisRecord.crd69_currentstockkg,
     ReorderLevels: ThisRecord.crd69_reorderlevelskg
 }
)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
    &lt;p&gt;&lt;img src=&quot;\images\22_AnthropicProcurement\20.png&quot; alt=&quot;Filtered Data&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;We will &lt;strong&gt;Test the filteredStockDetails variable&lt;/strong&gt; to verify that only relevant information is retrieved by outputting in a message node. 
&lt;img src=&quot;\images\22_AnthropicProcurement\21.png&quot; alt=&quot;Test Variable&quot; /&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;formatting-data-for-analysis&quot;&gt;Formatting Data for Analysis&lt;/h3&gt;

&lt;ol&gt;
  &lt;li&gt;We will further format the above JSON output of the &lt;strong&gt;filteredStockDetails&lt;/strong&gt; variable for better understanding by the Claude model by formatting it as &lt;strong&gt;&amp;lt; Material Name &amp;gt; : &amp;lt; Current Stock Levels &amp;gt; : &amp;lt; Reorder Levels &amp;gt;&lt;/strong&gt;.
    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Concat(Topic.filteredStockDetails, &quot;Material Name : &quot;&amp;amp;MaterialName &amp;amp; &quot; - &quot; &amp;amp; &quot; Current Stock Levels : &quot; &amp;amp; CurrentStockLevels &amp;amp; &quot;-&quot; &amp;amp; &quot;Reorder Levels : &quot;&amp;amp;ReorderLevels,&quot; , &quot; )
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
    &lt;p&gt;&lt;img src=&quot;\images\22_AnthropicProcurement\22.png&quot; alt=&quot;Formatted Data&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;adding-the-anthropic-claude-connector&quot;&gt;Adding the Anthropic Claude Connector&lt;/h3&gt;

&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;Now lets add the &lt;strong&gt;Anthropic Claude custom connector&lt;/strong&gt; to the copilot canvas using the &lt;strong&gt;Call an action&lt;/strong&gt; option. Select the &lt;strong&gt;Anthropic Claude Custom Connector&lt;/strong&gt; that we had previously created.
&lt;img src=&quot;\images\22_AnthropicProcurement\24.png&quot; alt=&quot;Add Claude Connector&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Provide the &lt;strong&gt;API key&lt;/strong&gt; saved earlier for authentication.
&lt;img src=&quot;\images\22_AnthropicProcurement\25.png&quot; alt=&quot;API Key&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;Configure the connector fields with the below parameters:
    &lt;ul&gt;
      &lt;li&gt;&lt;strong&gt;Anthropic-version&lt;/strong&gt;: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;2023-06-01&lt;/code&gt;&lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;Model&lt;/strong&gt;: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;claude-3-5-sonnet-20240620&lt;/code&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;In the &lt;strong&gt;message field&lt;/strong&gt;, add the prompt formula to be sent to Claude. Here we sent the dataverse data as well as the instruction to identify low stock from the data.
    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Table(
 {
     role: &quot;user&quot;,
     content: Concatenate(
         &quot;Analyze the given stock levels and determine whether procurement is needed based if the current stock levels is less than the reorder levels. \n\n&quot;,
         &quot;**Stock Details**\n&quot;,
         Topic.serializedStockDetails,
         &quot;\n\n**User Input:** - The user has selected the following materials for stock check: &quot;,
         Concat(Topic.selectedMaterials, Value, &quot;, &quot;),
         &quot;. Based on the current stock levels and reorder levels for each material asked by the user, identify which materials need to be reordered by checking if the current stock level is less than the reorder level. Ensure that this calculation is accurate. Provide a list of only the materials that need procurement and the reason for each in a bulleted format in less than 100 words.Strictly follow the Bulleted format   Material Name :Current Stock Level : Reorder Level : Procurement Needed ? : &quot;
     )
 }
)

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
    &lt;p&gt;&lt;img src=&quot;\images\22_AnthropicProcurement\25_1.png&quot; alt=&quot;Prompt Formula&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;Store the output response from &lt;strong&gt;Anthropic Claude&lt;/strong&gt; in the variable &lt;strong&gt;OutputResponse&lt;/strong&gt; and configure a &lt;strong&gt;Message node&lt;/strong&gt; to display the response back to the user using the below formula.
    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;First(Topic.OutputResponse.content).text
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
    &lt;p&gt;&lt;img src=&quot;\images\22_AnthropicProcurement\26.png&quot; alt=&quot;Message Node&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;testing-the-agent&quot;&gt;Testing the Agent&lt;/h2&gt;

&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;strong&gt;Initiate the conversation&lt;/strong&gt; and select materials to analyze from the adaptive card.
&lt;img src=&quot;\images\22_AnthropicProcurement\27.png&quot; alt=&quot;Material Selection&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;strong&gt;Click on Check Stock Levels&lt;/strong&gt;. This action invokes &lt;strong&gt;Anthropic Claude&lt;/strong&gt; to analyze the data and provide recommendations.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\22_AnthropicProcurement\28.png&quot; alt=&quot;Material Selection Output&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;We have successfully created the &lt;strong&gt;Procurement Analyzer Agent&lt;/strong&gt;, which leverages &lt;strong&gt;Anthropic Claude&lt;/strong&gt; and &lt;strong&gt;Microsoft Copilot Studio&lt;/strong&gt; to simplify inventory management. By analyzing Dataverse data, this Agent allows users to make data-driven procurement decisions in real-time, ensuring inventory remains optimized and responsive to changing needs.&lt;/p&gt;
</description>
                <pubDate>Wed, 05 Nov 2025 14:30:00 +0530</pubDate>
                <link>https://www.fusiondevblogs.com/Copilot-Anthropic-Claude-Procurement/</link>
                <guid isPermaLink="true">https://www.fusiondevblogs.com/Copilot-Anthropic-Claude-Procurement/</guid>
                
                <category>copilot</category>
                
                
            </item>
        
            <item>
                <title>PII Detection Copilot powered with AI Prompt Action</title>
                <description>&lt;h2 class=&quot;no_toc&quot; id=&quot;table-of-contents&quot;&gt;Table of Contents&lt;/h2&gt;

&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#introduction&quot; id=&quot;markdown-toc-introduction&quot;&gt;Introduction&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#overview-&quot; id=&quot;markdown-toc-overview-&quot;&gt;Overview &lt;a name=&quot;overview&quot;&gt;&lt;/a&gt;&lt;/a&gt;    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;#features&quot; id=&quot;markdown-toc-features&quot;&gt;Features:&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#step-by-step-guide-to-building-the-supply-chain-copilot-&quot; id=&quot;markdown-toc-step-by-step-guide-to-building-the-supply-chain-copilot-&quot;&gt;Step-by-Step Guide to Building the Supply Chain Copilot &lt;a name=&quot;step-by-step-guide&quot;&gt;&lt;/a&gt;&lt;/a&gt;    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;#step-1-set-up-dataverse-for-customer-registration-data-&quot; id=&quot;markdown-toc-step-1-set-up-dataverse-for-customer-registration-data-&quot;&gt;Step 1: Set Up Dataverse for Customer Registration Data &lt;a name=&quot;step-1&quot;&gt;&lt;/a&gt;&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#step-2-populate-the-dataverse-table-&quot; id=&quot;markdown-toc-step-2-populate-the-dataverse-table-&quot;&gt;Step 2: Populate the Dataverse Table &lt;a name=&quot;step-2&quot;&gt;&lt;/a&gt;&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#step-3-creating-the-copilot-in-copilot-studio-&quot; id=&quot;markdown-toc-step-3-creating-the-copilot-in-copilot-studio-&quot;&gt;Step 3: Creating the Copilot in Copilot Studio &lt;a name=&quot;step-3&quot;&gt;&lt;/a&gt;&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#step-4-enable-generative-selection-of-topics-&quot; id=&quot;markdown-toc-step-4-enable-generative-selection-of-topics-&quot;&gt;Step 4: Enable Generative Selection of Topics &lt;a name=&quot;step-4&quot;&gt;&lt;/a&gt;&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#step-5-create-topics-&quot; id=&quot;markdown-toc-step-5-create-topics-&quot;&gt;Step 5: Create Topics &lt;a name=&quot;step-5&quot;&gt;&lt;/a&gt;&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#step-6-fetching-customer-details-from-dataverse-&quot; id=&quot;markdown-toc-step-6-fetching-customer-details-from-dataverse-&quot;&gt;Step 6: Fetching Customer Details from Dataverse &lt;a name=&quot;step-6&quot;&gt;&lt;/a&gt;&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#step-7-adding-ai-prompt-for-pii-detection-&quot; id=&quot;markdown-toc-step-7-adding-ai-prompt-for-pii-detection-&quot;&gt;Step 7: Adding AI-Prompt for PII Detection &lt;a name=&quot;step-7&quot;&gt;&lt;/a&gt;&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#test-the-copilot&quot; id=&quot;markdown-toc-test-the-copilot&quot;&gt;Test the Copilot&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#conclusion-&quot; id=&quot;markdown-toc-conclusion-&quot;&gt;Conclusion &lt;a name=&quot;conclusion&quot;&gt;&lt;/a&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;

&lt;p&gt;Businesses can now automatically scan and detect sensitive PII within their customer registration Dataverse tables.This capability empowers organizations to flag records containing personal information and take appropriate actions, such as masking sensitive fields, notifying compliance teams.&lt;/p&gt;

&lt;h2 id=&quot;overview-&quot;&gt;Overview &lt;a name=&quot;overview&quot;&gt;&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;PII Detection Copilot&lt;/strong&gt; helps businesses identify and take actions on personally identifiable information (PII) within their customer registration data.&lt;/p&gt;

&lt;h3 id=&quot;features&quot;&gt;Features:&lt;/h3&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Fetch Data&lt;/strong&gt;: Retrieves customer registration data from Dataverse.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;AI-Powered PII Identification&lt;/strong&gt;: Detects PII using &lt;strong&gt;Azure OpenAI&lt;/strong&gt; prompt actions, including sensitive data like names, SSNs, credit card details, and medical information.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;\images\18_CopilotPII\0_0.gif&quot; alt=&quot;Step 3 - Image 1&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;step-by-step-guide-to-building-the-supply-chain-copilot-&quot;&gt;Step-by-Step Guide to Building the Supply Chain Copilot &lt;a name=&quot;step-by-step-guide&quot;&gt;&lt;/a&gt;&lt;/h2&gt;

&lt;h3 id=&quot;step-1-set-up-dataverse-for-customer-registration-data-&quot;&gt;Step 1: Set Up Dataverse for Customer Registration Data &lt;a name=&quot;step-1&quot;&gt;&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;To begin, we need to organize our customer details in Dataverse. Create a table named &lt;strong&gt;Customer Registration&lt;/strong&gt; with the following columns:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Name&lt;/li&gt;
  &lt;li&gt;MedicalID&lt;/li&gt;
  &lt;li&gt;Preexisting Conditions&lt;/li&gt;
  &lt;li&gt;Additional Details&lt;/li&gt;
  &lt;li&gt;And any other needed fields.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;step-2-populate-the-dataverse-table-&quot;&gt;Step 2: Populate the Dataverse Table &lt;a name=&quot;step-2&quot;&gt;&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;Enter the customer details into the Dataverse table. We have the below data for the demo.
&lt;img src=&quot;\images\18_CopilotPII\0.png&quot; alt=&quot;Step 3 - Image 1&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;step-3-creating-the-copilot-in-copilot-studio-&quot;&gt;Step 3: Creating the Copilot in Copilot Studio &lt;a name=&quot;step-3&quot;&gt;&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;Head over to https://copilotstudio.microsoft.com/ and click on &lt;strong&gt;Create&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This will provide us the option to create a copilot based on an existing template or create a blank copilot from scratch. Let’s select &lt;strong&gt;New copilot&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\18_CopilotPII\1.png&quot; alt=&quot;Step 3 - Image 1&quot; /&gt;&lt;/p&gt;

&lt;p&gt;This will take us to the page where we can:&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;Describe&lt;/strong&gt; the copilot functionality and provide any specific instructions to the copilot.&lt;/li&gt;
  &lt;li&gt;Once done, &lt;strong&gt;click&lt;/strong&gt; on &lt;strong&gt;Create&lt;/strong&gt; to provision the copilot.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img src=&quot;\images\18_CopilotPII\2.png&quot; alt=&quot;Step 3 - Image 2&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;step-4-enable-generative-selection-of-topics-&quot;&gt;Step 4: Enable Generative Selection of Topics &lt;a name=&quot;step-4&quot;&gt;&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;The copilot is now created. We can then make the needed configuration changes.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;Click&lt;/strong&gt; on &lt;strong&gt;Edit&lt;/strong&gt;, edit the copilot details like name, icon, and description.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Click&lt;/strong&gt; on &lt;strong&gt;Settings&lt;/strong&gt; to enable the &lt;strong&gt;Generative selection of topics&lt;/strong&gt; so that without relying on triggers, the topics will be auto-selected based on user conversation resulting in a much smoother user experience.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img src=&quot;\images\18_CopilotPII\3.png&quot; alt=&quot;Step 4 - Image 1&quot; /&gt;&lt;/p&gt;

&lt;p&gt;To enable the automatic detection of topics from user interaction:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;Click&lt;/strong&gt; on &lt;strong&gt;Generative AI&lt;/strong&gt;.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Select&lt;/strong&gt; &lt;strong&gt;Generative (preview)&lt;/strong&gt;.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Select&lt;/strong&gt; &lt;strong&gt;High – More precise&lt;/strong&gt; for content moderation.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Click&lt;/strong&gt; on &lt;strong&gt;Save&lt;/strong&gt; to update the settings.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Click&lt;/strong&gt; on the &lt;strong&gt;Close&lt;/strong&gt; icon to go back to the homepage of this custom copilot.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img src=&quot;\images\18_CopilotPII\4.png&quot; alt=&quot;Step 4 - Image 2&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;step-5-create-topics-&quot;&gt;Step 5: Create Topics &lt;a name=&quot;step-5&quot;&gt;&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;Now let’s go ahead and create the topics that will automatically redirect the conversation flow to appropriate topics based on the question user posts.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;Click&lt;/strong&gt; on &lt;strong&gt;Topics&lt;/strong&gt; from the navigation menu.&lt;/li&gt;
  &lt;li&gt;To add the topic, we can either go with the option to create a blank topic or use Copilot to create the topic with an initial set of prepopulated conversation nodes based on the topic description that we provide.&lt;/li&gt;
  &lt;li&gt;Let’s &lt;strong&gt;click&lt;/strong&gt; on &lt;strong&gt;Add a Topic&lt;/strong&gt;.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Select&lt;/strong&gt; &lt;strong&gt;Create from description with Copilot&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img src=&quot;\images\18_CopilotPII\5.png&quot; alt=&quot;Step 5 - Image 1&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Let’s provide the below topic description details in the pop-up that opened when we clicked the &lt;strong&gt;Add topic&lt;/strong&gt; button previously. Then, &lt;strong&gt;click&lt;/strong&gt; on &lt;strong&gt;Create&lt;/strong&gt;, which will provision the topic skeleton based on the provided description.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\18_CopilotPII\6.png&quot; alt=&quot;Step 5 - Image 2&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Thus, we have the basic topic created with an automatic trigger as well as a question to the user which is generated using the description provided. We can now add more conversation nodes.&lt;/p&gt;

&lt;p&gt;As the first step, let’s add an &lt;strong&gt;adaptive card&lt;/strong&gt; to accept details from the user.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\18_CopilotPII\7.png&quot; alt=&quot;Step 5 - Image 3&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Add the below adaptive card schema to the node properties so that it will provide the user with the option to enter the medical ID that we need to search for and also the specific PII information to search for.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;{
    &quot;type&quot;: &quot;AdaptiveCard&quot;,
    &quot;version&quot;: &quot;1.4&quot;,
    &quot;backgroundImage&quot;: {
        &quot;url&quot;: &quot;https://adaptivecardsbot.blob.core.windows.net/imagestore/GDPRBG.jpg&quot;
    },
    &quot;body&quot;: [
        {
            &quot;type&quot;: &quot;Image&quot;,
            &quot;url&quot;: &quot;https://adaptivecardsbot.blob.core.windows.net/imagestore/GDPR.png&quot;,
            &quot;size&quot;: &quot;Medium&quot;,
            &quot;horizontalAlignment&quot;: &quot;Center&quot;
        },
        {
            &quot;type&quot;: &quot;TextBlock&quot;,
            &quot;text&quot;: &quot;GDPR PII Checker&quot;,
            &quot;weight&quot;: &quot;Bolder&quot;,
            &quot;size&quot;: &quot;Large&quot;,
            &quot;color&quot;: &quot;Accent&quot;,
            &quot;spacing&quot;: &quot;Medium&quot;,
            &quot;horizontalAlignment&quot;: &quot;Center&quot;
        },
        {
            &quot;type&quot;: &quot;TextBlock&quot;,
            &quot;text&quot;: &quot;Enter the Medical ID and select the personal information you want to check for.&quot;,
            &quot;wrap&quot;: true,
            &quot;spacing&quot;: &quot;Small&quot;,
            &quot;size&quot;: &quot;Medium&quot;,
            &quot;horizontalAlignment&quot;: &quot;Center&quot;,
            &quot;weight&quot;: &quot;Default&quot;
        },
        {
            &quot;type&quot;: &quot;TextBlock&quot;,
            &quot;text&quot;: &quot;Medical ID&quot;,
            &quot;weight&quot;: &quot;Bolder&quot;,
            &quot;size&quot;: &quot;Medium&quot;,
            &quot;color&quot;: &quot;Good&quot;,
            &quot;spacing&quot;: &quot;Medium&quot;
        },
        {
            &quot;type&quot;: &quot;Input.Text&quot;,
            &quot;id&quot;: &quot;medicalId&quot;,
            &quot;placeholder&quot;: &quot;Enter Medical ID&quot;,
            &quot;style&quot;: &quot;text&quot;,
            &quot;spacing&quot;: &quot;Small&quot;
        },
        {
            &quot;type&quot;: &quot;TextBlock&quot;,
            &quot;text&quot;: &quot;Select Information to Check&quot;,
            &quot;weight&quot;: &quot;Bolder&quot;,
            &quot;size&quot;: &quot;Medium&quot;,
            &quot;color&quot;: &quot;Good&quot;,
            &quot;spacing&quot;: &quot;Medium&quot;
        },
        {
            &quot;type&quot;: &quot;Input.Toggle&quot;,
            &quot;id&quot;: &quot;checkName&quot;,
            &quot;title&quot;: &quot;Name&quot;,
            &quot;valueOn&quot;: &quot;true&quot;,
            &quot;valueOff&quot;: &quot;false&quot;,
            &quot;wrap&quot;: true,
            &quot;spacing&quot;: &quot;Small&quot;,
            &quot;weight&quot;: &quot;Default&quot;,
            &quot;size&quot;: &quot;Medium&quot;
        },
        {
            &quot;type&quot;: &quot;Input.Toggle&quot;,
            &quot;id&quot;: &quot;checkCreditCard&quot;,
            &quot;title&quot;: &quot;Credit Card&quot;,
            &quot;valueOn&quot;: &quot;true&quot;,
            &quot;valueOff&quot;: &quot;false&quot;,
            &quot;wrap&quot;: true,
            &quot;spacing&quot;: &quot;Small&quot;,
            &quot;weight&quot;: &quot;Default&quot;,
            &quot;size&quot;: &quot;Medium&quot;
        },
        {
            &quot;type&quot;: &quot;Input.Toggle&quot;,
            &quot;id&quot;: &quot;checkSSN&quot;,
            &quot;title&quot;: &quot;Social Security Number (SSN)&quot;,
            &quot;valueOn&quot;: &quot;true&quot;,
            &quot;valueOff&quot;: &quot;false&quot;,
            &quot;wrap&quot;: true,
            &quot;spacing&quot;: &quot;Small&quot;,
            &quot;weight&quot;: &quot;Default&quot;,
            &quot;size&quot;: &quot;Medium&quot;
        },
        {
            &quot;type&quot;: &quot;Input.Toggle&quot;,
            &quot;id&quot;: &quot;checkConditions&quot;,
            &quot;title&quot;: &quot;Preexisting Conditions&quot;,
            &quot;valueOn&quot;: &quot;true&quot;,
            &quot;valueOff&quot;: &quot;false&quot;,
            &quot;wrap&quot;: true,
            &quot;spacing&quot;: &quot;Small&quot;,
            &quot;weight&quot;: &quot;Default&quot;,
            &quot;size&quot;: &quot;Medium&quot;
        }
    ],
    &quot;actions&quot;: [
        {
            &quot;type&quot;: &quot;Action.Submit&quot;,
            &quot;title&quot;: &quot;Check GDPR Compliance&quot;,
            &quot;style&quot;: &quot;positive&quot;,
            &quot;spacing&quot;: &quot;Medium&quot;
        }
    ]
}

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;img src=&quot;\images\18_CopilotPII\8.png&quot; alt=&quot;Step 5 - Image 4&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The user input details can be found in the output variables of the adaptive card, which we will be using down the line.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\18_CopilotPII\9.png&quot; alt=&quot;Step 6 - Image 1&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;step-6-fetching-customer-details-from-dataverse-&quot;&gt;Step 6: Fetching Customer Details from Dataverse &lt;a name=&quot;step-6&quot;&gt;&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;We now need to fetch the customer details from the Dataverse table for which we will add the &lt;strong&gt;Dataverse connector action&lt;/strong&gt; by:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;Select&lt;/strong&gt; &lt;strong&gt;Call an action&lt;/strong&gt;.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Select&lt;/strong&gt; the &lt;strong&gt;Connector&lt;/strong&gt; tab and &lt;strong&gt;search&lt;/strong&gt; for &lt;strong&gt;Dataverse&lt;/strong&gt;.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Click&lt;/strong&gt; on &lt;strong&gt;List rows from selected environment&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img src=&quot;\images\18_CopilotPII\10.png&quot; alt=&quot;Step 6 - Image 1&quot; /&gt;&lt;/p&gt;

&lt;p&gt;This will add the &lt;strong&gt;Dataverse connector action&lt;/strong&gt; to the Copilot canvas, and let’s configure the inputs for this action by:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Mentioning the &lt;strong&gt;Environment&lt;/strong&gt; and &lt;strong&gt;Table name&lt;/strong&gt; where the &lt;strong&gt;Customer Registration Details Table&lt;/strong&gt; is present.&lt;/li&gt;
  &lt;li&gt;Specify the column names from the table that should be returned in the results .
    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt; cr026_medicalid,cr026_name,cr026_preexistingconditions,cr026_additionaldetails
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;Using the &lt;strong&gt;Filter rows&lt;/strong&gt; field, mention the specific &lt;strong&gt;MedicalID&lt;/strong&gt; that the user had input in the adaptive card to fetch the specific table record .
    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Concatenate(&quot;cr026_medicalid eq &apos;&quot;, Topic.medicalId,&quot;&apos;&quot;)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img src=&quot;\images\18_CopilotPII\11.png&quot; alt=&quot;Step 6 - Image 2&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The output of the &lt;strong&gt;Dataverse connector&lt;/strong&gt; will be stored in the &lt;strong&gt;varCustomerDetails&lt;/strong&gt; variable, which we will use for further processing in the subsequent steps.
&lt;img src=&quot;\images\18_CopilotPII\12.png&quot; alt=&quot;Step 6 - Image 2&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;step-7-adding-ai-prompt-for-pii-detection-&quot;&gt;Step 7: Adding AI-Prompt for PII Detection &lt;a name=&quot;step-7&quot;&gt;&lt;/a&gt;&lt;/h3&gt;

&lt;p&gt;The output of the &lt;strong&gt;Dataverse Table Connector&lt;/strong&gt; (&lt;strong&gt;varCustomerDetails&lt;/strong&gt;) will contain lots of system columns as well. We will need to format the table to filter and ensure only the needed columns are present.&lt;/p&gt;

&lt;p&gt;To do this, let’s initialize a variable (&lt;strong&gt;varFilteredTable&lt;/strong&gt;) to hold the filtered output of the &lt;strong&gt;Dataverse connector&lt;/strong&gt; .&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;ForAll(
    Topic.varCustomerDetails.value,
    {
        Name: ThisRecord.cr026_name,
        MedicalID: ThisRecord.cr026_medicalid,
        PreExistingConditions: ThisRecord.cr026_preexistingconditions,
        AdditionalDetails: ThisRecord.cr026_additionaldetails
    }
)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;img src=&quot;\images\18_CopilotPII\13.png&quot; alt=&quot;Step 7 - Image 1&quot; /&gt;&lt;/p&gt;

&lt;p&gt;If we were to test and output this variable value in the test pane, we will get the output as :&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;[{“AdditionalDetails”:“Credit Card: 1234-5678-9101-1121”,“MedicalID”:“15”,“Name”:“Graham Maynard”,“PreExistingConditions”:“Fatty Liver”}]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Since the table cannot be used as input to the &lt;strong&gt;Prompt action&lt;/strong&gt;, we will do one more formatting of this output to serialize this JSON into a readable format: &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;Name&amp;gt;: &amp;lt;MedicalID&amp;gt;: &amp;lt;Pre Existing Conditions&amp;gt;: &amp;lt;Additional Details&amp;gt;&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;To do this, let’s add another variable and set its formula as below :&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Concat(Topic.varFilteredTable, Name &amp;amp; &quot;: &quot; &amp;amp; MedicalID &amp;amp; &quot;:&quot; &amp;amp; PreExistingConditions &amp;amp; &quot; :&quot; &amp;amp; AdditionalDetails)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This way, from the previous filtered table, we will concatenate the customer information in a readable format, which can be shared as an input to the AI Prompt.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\18_CopilotPII\14.png&quot; alt=&quot;Step 7 - Image 2&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Now, let’s add the &lt;strong&gt;AI prompt&lt;/strong&gt; using which we can check for the PII of a customer. To do this:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;Select&lt;/strong&gt; &lt;strong&gt;Call an action&lt;/strong&gt;.&lt;/li&gt;
  &lt;li&gt;From &lt;strong&gt;Basic Actions&lt;/strong&gt;, select &lt;strong&gt;Create a prompt&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img src=&quot;\images\18_CopilotPII\15.png&quot; alt=&quot;Step 7 - Image 3&quot; /&gt;&lt;/p&gt;

&lt;p&gt;This will open up the &lt;strong&gt;Prompt window&lt;/strong&gt; where we can name the prompt and also:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Define the variables that will be used in the prompt, which will be dynamically added from the copilot during runtime.&lt;/li&gt;
  &lt;li&gt;Create the prompt that will be used to identify PII from the &lt;strong&gt;Dataverse returned data&lt;/strong&gt; and also mask them as needed.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Save&lt;/strong&gt; the prompt, which will make it available for use within the Copilot canvas.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img src=&quot;\images\18_CopilotPII\16.png&quot; alt=&quot;Step 7 - Image 4&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Now that the &lt;strong&gt;Prompt action&lt;/strong&gt; is added, populate the:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Adaptive Card outputs into the respective &lt;strong&gt;Prompt action input fields&lt;/strong&gt;.&lt;/li&gt;
  &lt;li&gt;Pass the serialized &lt;strong&gt;Dataverse returned data&lt;/strong&gt; into the &lt;strong&gt;Prompt action&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img src=&quot;\images\18_CopilotPII\17.png&quot; alt=&quot;Step 7 - Image 5&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The output of the &lt;strong&gt;Prompt action&lt;/strong&gt; will be stored in the &lt;strong&gt;varPrediction&lt;/strong&gt; variable, which we will be using for displaying the final output.
&lt;img src=&quot;\images\18_CopilotPII\18.png&quot; alt=&quot;Step 7 - Image 5&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Finally, we will show the &lt;strong&gt;PII detection output&lt;/strong&gt; as a &lt;strong&gt;basic card&lt;/strong&gt; back to the user, for which we will select the &lt;strong&gt;text&lt;/strong&gt; property of the &lt;strong&gt;varPrediction&lt;/strong&gt; record, which will contain the &lt;strong&gt;Generative AI output&lt;/strong&gt;.&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Topic.varPrediction.text
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;img src=&quot;\images\18_CopilotPII\19.png&quot; alt=&quot;Step 7 - Image 6&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;test-the-copilot&quot;&gt;Test the Copilot&lt;/h3&gt;

&lt;p&gt;Now, let’s test the Copilot by triggering the conversation, and we will enter the details to check for in the &lt;strong&gt;adaptive card&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\18_CopilotPII\20.png&quot; alt=&quot;Step 7 - Image 7&quot; /&gt;&lt;/p&gt;

&lt;p&gt;It fetches the details from the &lt;strong&gt;Dataverse table&lt;/strong&gt; and passes them to the &lt;strong&gt;Prompt action&lt;/strong&gt; to check if any PII is present. It masks the related information and shares the details back with the user.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\18_CopilotPII\21.png&quot; alt=&quot;Step 7 - Image 8&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;conclusion-&quot;&gt;Conclusion &lt;a name=&quot;conclusion&quot;&gt;&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;PII Detection Copilot&lt;/strong&gt; provides a powerful and automated solution for detecting personally identifiable information (PII) using &lt;strong&gt;Azure OpenAI&lt;/strong&gt; and &lt;strong&gt;Microsoft Copilot&lt;/strong&gt;. By fetching customer data from &lt;strong&gt;Dataverse&lt;/strong&gt;, detecting PII, and masking sensitive information, businesses can ensure compliance with data privacy regulations. This streamlined process, powered by AI, helps organizations safeguard sensitive data and improve customer trust.&lt;/p&gt;
</description>
                <pubDate>Wed, 29 Oct 2025 17:31:35 +0530</pubDate>
                <link>https://www.fusiondevblogs.com/Copilot-PII-Detection/</link>
                <guid isPermaLink="true">https://www.fusiondevblogs.com/Copilot-PII-Detection/</guid>
                
                <category>copilot</category>
                
                
            </item>
        
            <item>
                <title>Smart Invoice Anomaly Detection using AI prompt Action and Dataverse data</title>
                <description>&lt;h2 class=&quot;no_toc&quot; id=&quot;table-of-contents&quot;&gt;Table of Contents&lt;/h2&gt;

&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#introduction&quot; id=&quot;markdown-toc-introduction&quot;&gt;Introduction&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#process-flow&quot; id=&quot;markdown-toc-process-flow&quot;&gt;Process Flow&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#demo&quot; id=&quot;markdown-toc-demo&quot;&gt;Demo&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#steps-to-create-the-invoice-anomaly-detection-system&quot; id=&quot;markdown-toc-steps-to-create-the-invoice-anomaly-detection-system&quot;&gt;Steps to Create the Invoice Anomaly Detection System&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#create-the-dataverse-table&quot; id=&quot;markdown-toc-create-the-dataverse-table&quot;&gt;Create the Dataverse Table&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#creating-the-copilot-in-copilot-studio&quot; id=&quot;markdown-toc-creating-the-copilot-in-copilot-studio&quot;&gt;Creating the Copilot in Copilot Studio&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#enable-generative-selection-of-topics&quot; id=&quot;markdown-toc-enable-generative-selection-of-topics&quot;&gt;Enable Generative Selection of Topics&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#create-topics&quot; id=&quot;markdown-toc-create-topics&quot;&gt;Create Topics&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#test-the-copilot&quot; id=&quot;markdown-toc-test-the-copilot&quot;&gt;Test the Copilot&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#conclusion&quot; id=&quot;markdown-toc-conclusion&quot;&gt;Conclusion&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;

&lt;p&gt;Keeping invoices accurate is crucial to avoid financial mistakes. This blog will show you how to build an Invoice Anomaly Detection system using Copilot Studio. You’ll learn how to input invoice details using an Adaptive Card and compare them with previous month’s data stored in Dataverse. The system will automatically check for any irregularities using AI prompt actions, helping you ensure accuracy and streamline your invoice process.&lt;/p&gt;

&lt;h2 id=&quot;process-flow&quot;&gt;Process Flow&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Invoice Anomaly Detection System&lt;/strong&gt; involves several key steps to ensure accurate and efficient anomaly detection. Here’s an overview of the process:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;Data Storage:&lt;/strong&gt; Invoice details are stored in Dataverse, allowing us to easily access and compare previous month’s data.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Copilot Setup:&lt;/strong&gt; Using Copilot Studio, we build a bot that captures the current month’s invoice details through an Adaptive Card and stores them as variables.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Data Retrieval:&lt;/strong&gt; The system fetches invoice data from Dataverse and formats it for comparison.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Anomaly Detection:&lt;/strong&gt; By leveraging AI prompt actions, the bot compares the current month’s invoice details with the historical data. If discrepancies are detected, the bot highlights them for review.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Results Display:&lt;/strong&gt; Finally, the system presents the analysis results in a user-friendly format, allowing you to take any necessary actions to maintain financial accuracy.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img src=&quot;\images\17_CopilotInvoiceAnalyzer\0_0.gif&quot; alt=&quot;Create Dataverse Table&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;demo&quot;&gt;Demo&lt;/h2&gt;

&lt;p&gt;Watch the demo video below to see how the &lt;strong&gt;Invoice Anomaly Detection System&lt;/strong&gt; works.&lt;/p&gt;

&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/Dw5uSJEini4?vq=hd1080&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;h2 id=&quot;steps-to-create-the-invoice-anomaly-detection-system&quot;&gt;Steps to Create the Invoice Anomaly Detection System&lt;/h2&gt;

&lt;h2 id=&quot;create-the-dataverse-table&quot;&gt;Create the Dataverse Table&lt;/h2&gt;

&lt;p&gt;We will be storing the invoice details in the &lt;strong&gt;Dataverse&lt;/strong&gt; table, which will contain the previous month’s invoices that we will be using to spot any irregularities. The table will contain the following columns:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Product Name&lt;/strong&gt;&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Invoice Amount&lt;/strong&gt;&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Month&lt;/strong&gt;&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Quantity&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;\images\17_CopilotInvoiceAnalyzer\1.png&quot; alt=&quot;Create Dataverse Table&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;creating-the-copilot-in-copilot-studio&quot;&gt;Creating the Copilot in Copilot Studio&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; Head over to &lt;a href=&quot;https://copilotstudio.microsoft.com&quot;&gt;Copilot Studio&lt;/a&gt; and &lt;strong&gt;click&lt;/strong&gt; on &lt;strong&gt;Create&lt;/strong&gt;. This will provide the option to create a copilot based on an existing template or create a blank copilot from scratch. Let’s select &lt;strong&gt;New Copilot&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\17_CopilotInvoiceAnalyzer\2.png&quot; alt=&quot;Creating New Copilot&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; You will now see a page where you can:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Describe the copilot functionality&lt;/strong&gt; and provide any specific instructions.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Click&lt;/strong&gt; on &lt;strong&gt;Create&lt;/strong&gt; to provision the copilot.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;\images\17_CopilotInvoiceAnalyzer\3.png&quot; alt=&quot;Copilot Description&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;enable-generative-selection-of-topics&quot;&gt;Enable Generative Selection of Topics&lt;/h2&gt;

&lt;p&gt;Now that the copilot is created, we can configure it further.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; &lt;strong&gt;Click&lt;/strong&gt; on &lt;strong&gt;Edit&lt;/strong&gt; to modify details like the copilot’s name, icon, and description.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2:&lt;/strong&gt; &lt;strong&gt;Click&lt;/strong&gt; on &lt;strong&gt;Settings&lt;/strong&gt; and enable the &lt;strong&gt;Generative selection of topics&lt;/strong&gt;, which allows topics to be automatically selected based on user conversations. This leads to a smoother user experience.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\17_CopilotInvoiceAnalyzer\4.png&quot; alt=&quot;Edit Copilot Settings&quot; /&gt;&lt;/p&gt;

&lt;p&gt;To enable the automatic detection of topics from user interaction:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Click&lt;/strong&gt; on &lt;strong&gt;Generative AI&lt;/strong&gt;.&lt;/li&gt;
  &lt;li&gt;Select &lt;strong&gt;Generative (preview)&lt;/strong&gt;.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Click&lt;/strong&gt; on &lt;strong&gt;Save&lt;/strong&gt; to update the settings.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Click&lt;/strong&gt; the close icon to return to the home page of this custom copilot.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;\images\17_CopilotInvoiceAnalyzer\5.png&quot; alt=&quot;Generative AI Settings&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;create-topics&quot;&gt;Create Topics&lt;/h2&gt;

&lt;p&gt;Let’s create topics that will automatically redirect the conversation flow based on the questions posed by users.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1:&lt;/strong&gt; &lt;strong&gt;Click&lt;/strong&gt; on &lt;strong&gt;Topics&lt;/strong&gt; from the navigation menu.&lt;/p&gt;

&lt;p&gt;To add a topic:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Either create a blank topic or use Copilot to generate a topic with prepopulated conversation nodes based on the description you provide.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Click&lt;/strong&gt; on &lt;strong&gt;Add a Topic&lt;/strong&gt;.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Select&lt;/strong&gt; &lt;strong&gt;Create from description with Copilot&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;\images\17_CopilotInvoiceAnalyzer\6.png&quot; alt=&quot;Create Topics&quot; /&gt;&lt;/p&gt;

&lt;p&gt;In the pop-up, provide the necessary topic description and then &lt;strong&gt;Click&lt;/strong&gt; on &lt;strong&gt;Create&lt;/strong&gt;. This will provision the topic skeleton.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\17_CopilotInvoiceAnalyzer\7.png&quot; alt=&quot;Topic Creation&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Now that the basic topic is created with an automatic trigger, we can add more conversation nodes. Let’s add an &lt;strong&gt;Adaptive Card&lt;/strong&gt; so users can input invoice details.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\17_CopilotInvoiceAnalyzer\8.png&quot; alt=&quot;Adaptive Card&quot; /&gt;&lt;/p&gt;

&lt;p&gt;We will add the JSON schema for the adaptive card in the Node properties:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;{
    &quot;$schema&quot;: &quot;http://adaptivecards.io/schemas/adaptive-card.json&quot;,
    &quot;type&quot;: &quot;AdaptiveCard&quot;,
    &quot;version&quot;: &quot;1.4&quot;,
    &quot;body&quot;: [
        {
            &quot;type&quot;: &quot;ColumnSet&quot;,
            &quot;columns&quot;: [
                {
                    &quot;type&quot;: &quot;Column&quot;,
                    &quot;width&quot;: &quot;auto&quot;,
                    &quot;items&quot;: [
                        {
                            &quot;type&quot;: &quot;Image&quot;,
                            &quot;url&quot;: &quot;https://adaptivecardsbot.blob.core.windows.net/imagestore/InvoiceProcess.png&quot;,
                            &quot;size&quot;: &quot;Small&quot;,
                            &quot;style&quot;: &quot;Person&quot;
                        }
                    ]
                },
                {
                    &quot;type&quot;: &quot;Column&quot;,
                    &quot;width&quot;: &quot;stretch&quot;,
                    &quot;items&quot;: [
                        {
                            &quot;type&quot;: &quot;TextBlock&quot;,
                            &quot;text&quot;: &quot;Invoice Entry Form&quot;,
                            &quot;weight&quot;: &quot;Bolder&quot;,
                            &quot;size&quot;: &quot;Large&quot;,
                            &quot;wrap&quot;: true
                        }
                    ]
                }
            ]
        },
        {
            &quot;type&quot;: &quot;TextBlock&quot;,
            &quot;text&quot;: &quot;Please fill in the details below to submit your invoice.&quot;,
            &quot;wrap&quot;: true,
            &quot;weight&quot;: &quot;Bolder&quot;,
            &quot;color&quot;: &quot;Good&quot;, 
            &quot;spacing&quot;: &quot;Medium&quot;
        },
        {
            &quot;type&quot;: &quot;TextBlock&quot;,
            &quot;text&quot;: &quot;Invoice Month&quot;,
            &quot;weight&quot;: &quot;Bolder&quot;,
            &quot;wrap&quot;: true,
            &quot;spacing&quot;: &quot;Small&quot;
        },
        {
            &quot;type&quot;: &quot;Input.Text&quot;,
            &quot;id&quot;: &quot;invoiceMonth&quot;,
            &quot;placeholder&quot;: &quot;Enter Invoice Month (e.g., January)&quot;
        },
        {
            &quot;type&quot;: &quot;TextBlock&quot;,
            &quot;text&quot;: &quot;Product Name&quot;,
            &quot;weight&quot;: &quot;Bolder&quot;,
            &quot;wrap&quot;: true,
            &quot;spacing&quot;: &quot;Small&quot;
        },
        {
            &quot;type&quot;: &quot;Input.Text&quot;,
            &quot;id&quot;: &quot;productName&quot;,
            &quot;placeholder&quot;: &quot;Enter Product Name&quot;
        },
        {
            &quot;type&quot;: &quot;TextBlock&quot;,
            &quot;text&quot;: &quot;Quantity&quot;,
            &quot;weight&quot;: &quot;Bolder&quot;,
            &quot;wrap&quot;: true,
            &quot;spacing&quot;: &quot;Small&quot;
        },
        {
            &quot;type&quot;: &quot;Input.Number&quot;,
            &quot;id&quot;: &quot;quantity&quot;,
            &quot;placeholder&quot;: &quot;Enter Quantity&quot;
        },
        {
            &quot;type&quot;: &quot;TextBlock&quot;,
            &quot;text&quot;: &quot;Invoice Total&quot;,
            &quot;weight&quot;: &quot;Bolder&quot;,
            &quot;wrap&quot;: true,
            &quot;spacing&quot;: &quot;Small&quot;
        },
        {
            &quot;type&quot;: &quot;Input.Number&quot;,
            &quot;id&quot;: &quot;invoiceTotal&quot;,
            &quot;placeholder&quot;: &quot;Enter Invoice Total&quot;
        }
    ],
    &quot;actions&quot;: [
        {
            &quot;type&quot;: &quot;Action.Submit&quot;,
            &quot;title&quot;: &quot;Submit&quot;
        }
    ],
    &quot;style&quot;: &quot;default&quot;,
    &quot;backgroundImage&quot;: {
        &quot;url&quot;: &quot;https://adaptivecardsbot.blob.core.windows.net/imagestore/background.jpg&quot;
    }
}

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The user-entered values in the adaptive card will be available as output variables.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\17_CopilotInvoiceAnalyzer\10.png&quot; alt=&quot;Output Variables&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3:&lt;/strong&gt; Add a variable using &lt;strong&gt;Power Fx&lt;/strong&gt; to concatenate user input into the format: &lt;strong&gt;ProductName: Month: InvoiceTotal (Quantity kg)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For example:&lt;br /&gt;
&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Copper Wires: March: 1900 (15 kg)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;We will add the below expression to the variable &lt;strong&gt;varCurrentMonthInvoiceDetails&lt;/strong&gt;:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Concat(Topic.varFormattedTable, Product &amp;amp; &quot;: &quot; &amp;amp; Month &amp;amp; &quot;:&quot; &amp;amp; Amount &amp;amp; &quot; (&quot; &amp;amp; Quantity &amp;amp; &quot; kg)&quot;, &quot;, &quot;)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Step 4:&lt;/strong&gt; Now, add the &lt;strong&gt;Dataverse connector action&lt;/strong&gt; to fetch the previous month’s invoice details from the &lt;strong&gt;Monthly Invoices&lt;/strong&gt; table.&lt;/p&gt;

&lt;p&gt;To do this:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Select&lt;/strong&gt; &lt;strong&gt;Call an action&lt;/strong&gt;.&lt;/li&gt;
  &lt;li&gt;From the &lt;strong&gt;connector&lt;/strong&gt; tab, search for &lt;strong&gt;Dataverse&lt;/strong&gt;.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Select&lt;/strong&gt; &lt;strong&gt;List rows&lt;/strong&gt; from the selected environment.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;\images\17_CopilotInvoiceAnalyzer\12.png&quot; alt=&quot;Dataverse Connector&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Configure the connector by:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Mentioning the &lt;strong&gt;Environment&lt;/strong&gt; and &lt;strong&gt;table name&lt;/strong&gt;.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Click&lt;/strong&gt; on &lt;strong&gt;Advanced Inputs&lt;/strong&gt; to filter the columns returned.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;\images\17_CopilotInvoiceAnalyzer\13.png&quot; alt=&quot;Dataverse Columns&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Add the necessary logical names for &lt;strong&gt;Product Name&lt;/strong&gt;, &lt;strong&gt;Month&lt;/strong&gt;, &lt;strong&gt;Quantity&lt;/strong&gt;, and &lt;strong&gt;Invoice Amount&lt;/strong&gt; to the &lt;strong&gt;Select columns&lt;/strong&gt; field.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\17_CopilotInvoiceAnalyzer\15.png&quot; alt=&quot;Logical Names&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 5:&lt;/strong&gt; Add an output variable &lt;strong&gt;varInvoiceTable&lt;/strong&gt; to store the Dataverse returned data in a table format.
&lt;img src=&quot;\images\17_CopilotInvoiceAnalyzer\16.png&quot; alt=&quot;Logical Names&quot; /&gt;
Since there are system columns in the data, we’ll filter it using the following format:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;[
{&quot;Amount&quot;:&quot;1000&quot;,&quot;Month&quot;:&quot;January&quot;,&quot;Product&quot;:&quot;Copper Wires&quot;,&quot;Quantity&quot;:&quot;15&quot;}, 
{&quot;Amount&quot;:&quot;1100&quot;,&quot;Month&quot;:&quot;February&quot;,&quot;Product&quot;:&quot;Copper Wires&quot;,&quot;Quantity&quot;:&quot;15&quot;}
]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;We will store the filtered table in a new variable &lt;strong&gt;varFormattedTable&lt;/strong&gt; using the below &lt;strong&gt;Power Fx&lt;/strong&gt; expression:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;ForAll(
    Topic.varInvoiceTable,
    {
        Product: ThisRecord.crfeb_productname,
        Month: ThisRecord.crfeb_month,
        Amount: ThisRecord.crfeb_invoiceamount,
        Quantity: ThisRecord.crfeb_quantitykg
    }
)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;img src=&quot;\images\17_CopilotInvoiceAnalyzer\17.png&quot; alt=&quot;Logical Names&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 6:&lt;/strong&gt; Serialize the table data for the AI prompt action, as it cannot accept tables directly. Use the below format:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Eg:&lt;/strong&gt; Copper Wires: January: 1000 (15 kg), Copper Wires: February: 1100 (15 kg)&lt;/p&gt;

&lt;p&gt;Store the serialized data in a variable &lt;strong&gt;varSerializedInvoiceDetails&lt;/strong&gt; and concatenate the table data using the below expression.&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Concat(Topic.varFormattedTable, Product &amp;amp; &quot;: &quot; &amp;amp; Month &amp;amp; &quot;:&quot; &amp;amp; Amount &amp;amp; &quot; (&quot; &amp;amp; Quantity &amp;amp; &quot; kg)&quot;, &quot;, &quot;)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;img src=&quot;\images\17_CopilotInvoiceAnalyzer\18.png&quot; alt=&quot;Logical Names&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 7:&lt;/strong&gt; Add an &lt;strong&gt;AI Prompt action&lt;/strong&gt; by selecting &lt;strong&gt;Call an action&lt;/strong&gt;, and from the &lt;strong&gt;Basic actions&lt;/strong&gt; tab, select &lt;strong&gt;Create a prompt&lt;/strong&gt;.
&lt;img src=&quot;\images\17_CopilotInvoiceAnalyzer\19.png&quot; alt=&quot;AI Prompt&quot; /&gt;
This opens a pop-up where you can:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Enter a name for the prompt.&lt;/li&gt;
  &lt;li&gt;Create variables for &lt;strong&gt;Current Month Invoice&lt;/strong&gt; and &lt;strong&gt;Previous Month Details&lt;/strong&gt;.&lt;/li&gt;
  &lt;li&gt;Add dynamic variables to the prompt using the &lt;strong&gt;Insert&lt;/strong&gt; button.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Click&lt;/strong&gt; on &lt;strong&gt;Save custom prompt&lt;/strong&gt; to make it available in the Copilot designer.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;\images\17_CopilotInvoiceAnalyzer\20.png&quot; alt=&quot;AI Prompt&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 8:&lt;/strong&gt; Add the prompt by selecting &lt;strong&gt;Call an action&lt;/strong&gt;, and from the &lt;strong&gt;Basic actions&lt;/strong&gt; tab, choose the &lt;strong&gt;Invoice Anomaly Checker&lt;/strong&gt; prompt.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\17_CopilotInvoiceAnalyzer\21.png&quot; alt=&quot;Prompt Configuration&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Configure the prompt by adding the previously created variables:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;varSerializedInvoiceDetails&lt;/strong&gt;: Previous month’s data.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;varCurrentMonthInvoiceDetails&lt;/strong&gt;: Current user input.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;\images\17_CopilotInvoiceAnalyzer\22.png&quot; alt=&quot;AI Prompt&quot; /&gt;&lt;/p&gt;

&lt;p&gt;We will store the AI-prompt output in &lt;strong&gt;varPredictionOutput&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\17_CopilotInvoiceAnalyzer\23.png&quot; alt=&quot;Output Variable&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 9:&lt;/strong&gt; Finally, add a &lt;strong&gt;basic card&lt;/strong&gt; and populate it with details from the &lt;strong&gt;varPredictionOutput&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;text&lt;/strong&gt; property will contain the AI-generated output, which we will display in the Adaptive Card.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\17_CopilotInvoiceAnalyzer\24.png&quot; alt=&quot;Basic Card&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;test-the-copilot&quot;&gt;Test the Copilot&lt;/h2&gt;

&lt;p&gt;Let’s test the copilot by specifying invoice details for the month of &lt;strong&gt;March&lt;/strong&gt; using the &lt;strong&gt;Adaptive Card&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\17_CopilotInvoiceAnalyzer\25.png&quot; alt=&quot;Test Copilot&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Upon submission, previous month’s invoice details are fetched from &lt;strong&gt;Dataverse&lt;/strong&gt;, and using the &lt;strong&gt;AI Prompt action&lt;/strong&gt;, the copilot identifies any potential variations in the invoice and shares them back with the user.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\17_CopilotInvoiceAnalyzer\26.png&quot; alt=&quot;AI Prompt Output&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;In this blog, we successfully built an &lt;strong&gt;Invoice Anomaly Detection&lt;/strong&gt; system using &lt;strong&gt;Copilot Studio&lt;/strong&gt;. By leveraging &lt;strong&gt;Adaptive Cards&lt;/strong&gt; for user inputs, &lt;strong&gt;Dataverse&lt;/strong&gt; for storing historical data, and &lt;strong&gt;AI prompt actions&lt;/strong&gt; for detecting anomalies, we created a seamless and accurate invoice-checking process. This helps in identifying potential mistakes and ensures better financial accuracy. The same approach can be extended to various other data anomaly detection scenarios, streamlining business processes efficiently.&lt;/p&gt;

</description>
                <pubDate>Wed, 22 Oct 2025 17:31:35 +0530</pubDate>
                <link>https://www.fusiondevblogs.com/Copilot-Anomaly-Detection/</link>
                <guid isPermaLink="true">https://www.fusiondevblogs.com/Copilot-Anomaly-Detection/</guid>
                
                <category>copilot</category>
                
                
            </item>
        
            <item>
                <title>Build a Responsible AI Copilot with Azure Content Safety Service</title>
                <description>&lt;h2 class=&quot;no_toc&quot; id=&quot;table-of-contents&quot;&gt;Table of Contents&lt;/h2&gt;

&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#introduction&quot; id=&quot;markdown-toc-introduction&quot;&gt;Introduction&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#prerequisites&quot; id=&quot;markdown-toc-prerequisites&quot;&gt;Prerequisites&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#step-1-setting-up-azure-content-safety&quot; id=&quot;markdown-toc-step-1-setting-up-azure-content-safety&quot;&gt;Step 1: Setting Up Azure Content Safety&lt;/a&gt;    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;#create-an-azure-content-safety-resource&quot; id=&quot;markdown-toc-create-an-azure-content-safety-resource&quot;&gt;Create an Azure Content Safety Resource&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#step-2-create-the-copilot&quot; id=&quot;markdown-toc-step-2-create-the-copilot&quot;&gt;Step 2: Create the Copilot&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#step-3-enable-generative-selection-of-topics&quot; id=&quot;markdown-toc-step-3-enable-generative-selection-of-topics&quot;&gt;Step 3: Enable Generative Selection of Topics&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#step-4-create-topics&quot; id=&quot;markdown-toc-step-4-create-topics&quot;&gt;Step 4: Create Topics&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#test-the-copilot&quot; id=&quot;markdown-toc-test-the-copilot&quot;&gt;Test the Copilot&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#conclusion&quot; id=&quot;markdown-toc-conclusion&quot;&gt;Conclusion&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;

&lt;p&gt;In this blog, we will create a Copilot that can accept user input, check if it’s safe using Azure Content Safety against four categories (self-harm, hate, violence, and sexual), and if deemed safe, query the United Nations website using generative actions to provide a response to the user. Follow the steps below to build this solution.&lt;/p&gt;

&lt;h2 id=&quot;prerequisites&quot;&gt;Prerequisites&lt;/h2&gt;
&lt;p&gt;Before we start, ensure you have the following:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;An Azure account&lt;/li&gt;
  &lt;li&gt;Access to Azure Content Safety&lt;/li&gt;
  &lt;li&gt;Access to Copilot Studio&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;step-1-setting-up-azure-content-safety&quot;&gt;Step 1: Setting Up Azure Content Safety&lt;/h2&gt;

&lt;h3 id=&quot;create-an-azure-content-safety-resource&quot;&gt;Create an Azure Content Safety Resource&lt;/h3&gt;
&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;strong&gt;Head over to Azure portal and search for Content Safety&lt;/strong&gt;
 &lt;img src=&quot;\images\15_CopilotContentSafety\1.png&quot; alt=&quot;Search Content Safety&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;strong&gt;Select Create&lt;/strong&gt;, which will open the window to add the Content Safety configurations.
 &lt;img src=&quot;\images\15_CopilotContentSafety\2.png&quot; alt=&quot;Create Content Safety&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;strong&gt;Specify the Subscription and Instance details for the Content Safety Service&lt;/strong&gt;. Click on &lt;strong&gt;Review and Create&lt;/strong&gt;.
 &lt;img src=&quot;\images\15_CopilotContentSafety\3.png&quot; alt=&quot;Review and Create&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;strong&gt;From the Keys and Endpoint section of the service, Copy the Endpoint and Key&lt;/strong&gt; which we will be using in the Copilot.
 &lt;img src=&quot;\images\15_CopilotContentSafety\4.png&quot; alt=&quot;Keys and Endpoint&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;step-2-create-the-copilot&quot;&gt;Step 2: Create the Copilot&lt;/h2&gt;
&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;strong&gt;Head over to &lt;a href=&quot;https://copilotstudio.microsoft.com/&quot;&gt;Copilot Studio&lt;/a&gt; and click on Create&lt;/strong&gt;.
 &lt;img src=&quot;\images\15_CopilotContentSafety\5.png&quot; alt=&quot;Create Copilot&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;strong&gt;Select “New copilot”&lt;/strong&gt; to create a copilot from scratch.
 &lt;img src=&quot;\images\15_CopilotContentSafety\6.png&quot; alt=&quot;New Copilot&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;strong&gt;Describe the copilot functionality and provide any specific instructions to the copilot&lt;/strong&gt;. Once done, click on &lt;strong&gt;Create&lt;/strong&gt; to provision the copilot.
 &lt;img src=&quot;\images\15_CopilotContentSafety\7.png&quot; alt=&quot;Describe and Create&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;step-3-enable-generative-selection-of-topics&quot;&gt;Step 3: Enable Generative Selection of Topics&lt;/h2&gt;
&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;Click on Edit&lt;/strong&gt;, edit the copilot details like name, icon, and description.&lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;strong&gt;Click on Settings&lt;/strong&gt; to enable the Generative selection of topics so that without relying on triggers, the topics will be auto-selected based on user conversation resulting in a much smoother user experience.
 &lt;img src=&quot;\images\15_CopilotContentSafety\8.png&quot; alt=&quot;Edit and Settings&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Click on Generative AI&lt;/strong&gt;.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Select Generative (preview)&lt;/strong&gt;.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Click on Save&lt;/strong&gt; to update the settings.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Click on Close icon&lt;/strong&gt; to go back to the home page of this custom copilot.
 &lt;img src=&quot;\images\15_CopilotContentSafety\9.png&quot; alt=&quot;Generative AI Settings&quot; /&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;step-4-create-topics&quot;&gt;Step 4: Create Topics&lt;/h2&gt;
&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;Click on Topics&lt;/strong&gt; from the navigation menu.&lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;strong&gt;Click on Add a Topic&lt;/strong&gt; and select &lt;strong&gt;Create from description with Copilot&lt;/strong&gt;.
 &lt;img src=&quot;\images\15_CopilotContentSafety\11.png&quot; alt=&quot;Add a Topic&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;strong&gt;Provide the topic description details&lt;/strong&gt; and click on &lt;strong&gt;Create&lt;/strong&gt;, which will provision the topic skeleton based on the provided description.
 &lt;img src=&quot;\images\15_CopilotContentSafety\12.png&quot; alt=&quot;Create Topic from Description&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Add a variable to store the user query&lt;/strong&gt;:
    &lt;ul&gt;
      &lt;li&gt;
        &lt;p&gt;From variable management, select &lt;strong&gt;Set a variable value&lt;/strong&gt;.
 &lt;img src=&quot;\images\15_CopilotContentSafety\14.png&quot; alt=&quot;Set a Variable&quot; /&gt;&lt;/p&gt;
      &lt;/li&gt;
      &lt;li&gt;
        &lt;p&gt;Configure the variable:&lt;/p&gt;
        &lt;ol&gt;
          &lt;li&gt;Set the variable name to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;varUserQuery&lt;/code&gt;.&lt;/li&gt;
          &lt;li&gt;Click the arrow next to the &lt;strong&gt;To Value&lt;/strong&gt;.&lt;/li&gt;
          &lt;li&gt;Select the &lt;strong&gt;System&lt;/strong&gt; tab.&lt;/li&gt;
          &lt;li&gt;Set the value to &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Activity.Text&lt;/code&gt;.
  &lt;img src=&quot;\images\15_CopilotContentSafety\15.png&quot; alt=&quot;Configure Variable&quot; /&gt;&lt;/li&gt;
        &lt;/ol&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Add the step to invoke the Azure Content Safety API&lt;/strong&gt; to validate the user query and check for any unsafe content:
    &lt;ul&gt;
      &lt;li&gt;From the advanced tab, select &lt;strong&gt;Send HTTP Request&lt;/strong&gt;.
 &lt;img src=&quot;\images\15_CopilotContentSafety\16.png&quot; alt=&quot;Send HTTP Request&quot; /&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Configure the HTTP Action&lt;/strong&gt;:
    &lt;ul&gt;
      &lt;li&gt;Paste the content safety URL saved from Azure Portal.&lt;/li&gt;
      &lt;li&gt;Select the Method as &lt;strong&gt;POST&lt;/strong&gt;.&lt;/li&gt;
      &lt;li&gt;
        &lt;p&gt;Click on &lt;strong&gt;Edit&lt;/strong&gt; in the Headers and body section.
 &lt;img src=&quot;\images\15_CopilotContentSafety\17.png&quot; alt=&quot;Configure HTTP Action&quot; /&gt;&lt;/p&gt;
      &lt;/li&gt;
      &lt;li&gt;Add 2 headers:
        &lt;ol&gt;
          &lt;li&gt;Set the Key as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Content-Type&lt;/code&gt;.&lt;/li&gt;
          &lt;li&gt;Set the Value as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;application/json&lt;/code&gt;.&lt;/li&gt;
          &lt;li&gt;
            &lt;p&gt;Click on &lt;strong&gt;Add&lt;/strong&gt;.
  &lt;img src=&quot;\images\15_CopilotContentSafety\20.png&quot; alt=&quot;Add Content-Type Header&quot; /&gt;&lt;/p&gt;
          &lt;/li&gt;
          &lt;li&gt;Set the Key as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Ocp-Apim-Subscription-Key&lt;/code&gt;.&lt;/li&gt;
          &lt;li&gt;Set the Value to the content safety endpoint key saved from Azure.
  &lt;img src=&quot;\images\15_CopilotContentSafety\21.png&quot; alt=&quot;Add Subscription Key Header&quot; /&gt;&lt;/li&gt;
        &lt;/ol&gt;
      &lt;/li&gt;
      &lt;li&gt;Update the request body:
        &lt;ul&gt;
          &lt;li&gt;Select &lt;strong&gt;JSON Content&lt;/strong&gt; from the Body section.&lt;/li&gt;
          &lt;li&gt;
            &lt;p&gt;Select &lt;strong&gt;Edit Formula&lt;/strong&gt; and click on &lt;strong&gt;Formula&lt;/strong&gt; to add the user query variable.
  &lt;img src=&quot;\images\15_CopilotContentSafety\23.png&quot; alt=&quot;Edit Formula&quot; /&gt;&lt;/p&gt;
          &lt;/li&gt;
          &lt;li&gt;Add the below expression to the body tag:
            &lt;div class=&quot;language-json highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;w&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;Text&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;err&quot;&gt;Topic.varUserQuery&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;            &lt;/div&gt;
            &lt;p&gt;&lt;img src=&quot;\images\15_CopilotContentSafety\24.png&quot; alt=&quot;Body Expression&quot; /&gt;&lt;/p&gt;
          &lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;Define the response data type:
        &lt;ul&gt;
          &lt;li&gt;Select &lt;strong&gt;From sample data&lt;/strong&gt; to provide the sample output.&lt;/li&gt;
          &lt;li&gt;Paste the below schema in the pop-up and click on &lt;strong&gt;Confirm&lt;/strong&gt;:
            &lt;div class=&quot;language-json highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;w&quot;&gt;  &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;blocklistsMatch&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[],&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;categoriesAnalysis&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
          &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
              &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;category&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Hate&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
              &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;severity&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
          &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
          &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
              &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;category&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;SelfHarm&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
              &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;severity&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
          &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
          &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
              &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;category&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Sexual&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
              &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;severity&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
          &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
          &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
              &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;category&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Violence&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
              &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;severity&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
          &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
      &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
  &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;            &lt;/div&gt;
            &lt;p&gt;&lt;img src=&quot;\images\15_CopilotContentSafety\27.png&quot; alt=&quot;Sample Schema&quot; /&gt;&lt;/p&gt;
          &lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;strong&gt;Create a new variable&lt;/strong&gt; to hold the output of the content safety API, named &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;varSafetyOutput&lt;/code&gt;.
 &lt;img src=&quot;\images\15_CopilotContentSafety\28.png&quot; alt=&quot;Variable for Safety Output&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Declare variables for the content safety ratings&lt;/strong&gt;:
    &lt;ul&gt;
      &lt;li&gt;Hate Severity:
        &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;  First(Filter(Topic.varSafetyOutput.categoriesAnalysis, category = &quot;Hate&quot;)).severity
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;        &lt;/div&gt;
        &lt;p&gt;&lt;img src=&quot;\images\15_CopilotContentSafety\29.png&quot; alt=&quot;Hate Severity&quot; /&gt;&lt;/p&gt;
      &lt;/li&gt;
      &lt;li&gt;Self Harm Severity:
        &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;  First(Filter(Topic.varSafetyOutput.categoriesAnalysis, category = &quot;SelfHarm&quot;)).severity
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;        &lt;/div&gt;
        &lt;p&gt;&lt;img src=&quot;\images\15_CopilotContentSafety\30.png&quot; alt=&quot;Self Harm Severity&quot; /&gt;&lt;/p&gt;
      &lt;/li&gt;
      &lt;li&gt;Sexual Severity:
        &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;  First(Filter(Topic.varSafetyOutput.categoriesAnalysis, category = &quot;Sexual&quot;)).severity
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;        &lt;/div&gt;
        &lt;p&gt;&lt;img src=&quot;\images\15_CopilotContentSafety\31.png&quot; alt=&quot;Sexual Severity&quot; /&gt;&lt;/p&gt;
      &lt;/li&gt;
      &lt;li&gt;Violence Severity:
        &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;  First(Filter(Topic.varSafetyOutput.categoriesAnalysis, category = &quot;Violence&quot;)).severity
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;        &lt;/div&gt;
        &lt;p&gt;&lt;img src=&quot;\images\15_CopilotContentSafety\32.png&quot; alt=&quot;Violence Severity&quot; /&gt;&lt;/p&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Create an overall safety variable&lt;/strong&gt; named &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;varOverallSafety&lt;/code&gt; to determine if there is any sort of content safety issue:
    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt; If(
     Topic.varHateSeverity = 0 &amp;amp;&amp;amp; 
     Topic.varSelfHarmSeverity = 0 &amp;amp;&amp;amp; 
     Topic.varSexualSeverity = 0 &amp;amp;&amp;amp; 
     Topic.varViolenceSeverity = 0,
     &quot;Safe&quot;,
     &quot;Unsafe&quot;
 )
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
    &lt;p&gt;&lt;img src=&quot;\images\15_CopilotContentSafety\33.png&quot; alt=&quot;Overall Safety&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Check the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;varOverallSafety&lt;/code&gt; variable&lt;/strong&gt; and create a positive control flow branch:
    &lt;ul&gt;
      &lt;li&gt;
        &lt;p&gt;&lt;strong&gt;Add the condition action&lt;/strong&gt;.
&lt;img src=&quot;\images\15_CopilotContentSafety\34.png&quot; alt=&quot;Condition Action&quot; /&gt;&lt;/p&gt;
      &lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;Add the generative answers node&lt;/strong&gt; in the positive branch:
        &lt;ul&gt;
          &lt;li&gt;Select &lt;strong&gt;Generative Answers&lt;/strong&gt;.&lt;/li&gt;
          &lt;li&gt;Configure the input to use &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;varUserQuery&lt;/code&gt;.
  &lt;img src=&quot;\images\15_CopilotContentSafety\35.png&quot; alt=&quot;Generative Answers Node&quot; /&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;Edit the data source&lt;/strong&gt; and click on &lt;strong&gt;Add knowledge&lt;/strong&gt; to enter the United Nations website as the source.
        &lt;ul&gt;
          &lt;li&gt;Select &lt;strong&gt;Public Websites&lt;/strong&gt; as the knowledge source.&lt;/li&gt;
          &lt;li&gt;Enter the UN website link and click on &lt;strong&gt;Add&lt;/strong&gt;.
  &lt;img src=&quot;\images\15_CopilotContentSafety\37.png&quot; alt=&quot;Add Knowledge Source&quot; /&gt;
  &lt;img src=&quot;\images\15_CopilotContentSafety\38.png&quot; alt=&quot;Public Websites Source&quot; /&gt;
  &lt;img src=&quot;\images\15_CopilotContentSafety\39.png&quot; alt=&quot;UN Website Link&quot; /&gt;&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;In the negative flow branch&lt;/strong&gt;, add the below expression to check the 4 variables and provide appropriate messages to the user:
        &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;  If(
      Topic.varHateSeverity &amp;gt; 0,
      &quot;The query contains hate speech. Please reformulate your question.&quot;,
      &quot;&quot;
  ) &amp;amp; 
  If(
      Topic.varSelfHarmSeverity &amp;gt; 0,
      &quot;The query indicates self-harm. Please seek immediate help or contact a professional.&quot;,
      &quot;&quot;
  ) &amp;amp;
  If(
      Topic.varSexualSeverity &amp;gt; 0,
      &quot;The query contains inappropriate sexual content. Please rephrase your question.&quot;,
      &quot;&quot;
  ) &amp;amp;
  If(
      Topic.varViolenceSeverity &amp;gt; 0,
      &quot;The query contains references to violence. Please reformulate your question.&quot;,
      &quot;&quot;
  )
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;        &lt;/div&gt;
        &lt;p&gt;&lt;img src=&quot;\images\15_CopilotContentSafety\40.png&quot; alt=&quot;Negative Flow Expression&quot; /&gt;&lt;/p&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Thus we have completed the configuration of the copilot and have ensured that proper content safety is checked before generating the contextual answers from the UN website.&lt;/p&gt;

&lt;h2 id=&quot;test-the-copilot&quot;&gt;Test the Copilot&lt;/h2&gt;
&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;strong&gt;Test the copilot by triggering the conversation with a question&lt;/strong&gt;. You can see that the Azure Content Safety API has detected hate speech and has given the custom message back to the user to reformulate the question.
 &lt;img src=&quot;\images\15_CopilotContentSafety\41.png&quot; alt=&quot;Hate Speech Detection&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;strong&gt;Ask another question&lt;/strong&gt;. You can see that this time the Azure Content Safety has detected violence in the user query and has asked to reformulate the question.
 &lt;img src=&quot;\images\15_CopilotContentSafety\42.png&quot; alt=&quot;Violence Detection&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;strong&gt;Ask a content safe question&lt;/strong&gt;. You can see that the copilot fetches the accurate information along with citation links from the UN website using its generative AI capabilities.
 &lt;img src=&quot;\images\15_CopilotContentSafety\43.png&quot; alt=&quot;Content Safe Response&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;In this blog, we demonstrated how to create a Copilot that uses Azure Content Safety to filter user inputs against harmful content categories and queries the United Nations website for safe user inputs. This approach ensures a secure and informative interaction with the Copilot, providing accurate information while maintaining user safety. By following these steps, you can build similar solutions that integrate content safety checks with generative AI capabilities to deliver valuable and secure user experiences.&lt;/p&gt;
</description>
                <pubDate>Thu, 16 Oct 2025 17:31:35 +0530</pubDate>
                <link>https://www.fusiondevblogs.com/Copilot-Content-Safety/</link>
                <guid isPermaLink="true">https://www.fusiondevblogs.com/Copilot-Content-Safety/</guid>
                
                <category>copilot</category>
                
                
            </item>
        
            <item>
                <title>Customer Service Copilot using Sentiment Analysis and Live Agent Escalation</title>
                <description>&lt;h2 class=&quot;no_toc&quot; id=&quot;table-of-contents&quot;&gt;Table of Contents&lt;/h2&gt;

&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#introduction&quot; id=&quot;markdown-toc-introduction&quot;&gt;Introduction&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#process-flow&quot; id=&quot;markdown-toc-process-flow&quot;&gt;Process Flow&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#demo&quot; id=&quot;markdown-toc-demo&quot;&gt;Demo&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#prerequisites&quot; id=&quot;markdown-toc-prerequisites&quot;&gt;Prerequisites&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#technologies-involved&quot; id=&quot;markdown-toc-technologies-involved&quot;&gt;Technologies Involved&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#steps-to-create-the-customer-service-copilot&quot; id=&quot;markdown-toc-steps-to-create-the-customer-service-copilot&quot;&gt;Steps to Create the Customer Service Copilot&lt;/a&gt;    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;#step-1-provisioning-a-dynamics-365-customer-service-trial&quot; id=&quot;markdown-toc-step-1-provisioning-a-dynamics-365-customer-service-trial&quot;&gt;Step 1: Provisioning a Dynamics 365 Customer Service Trial&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#step-2-creating-necessary-dataverse-tables&quot; id=&quot;markdown-toc-step-2-creating-necessary-dataverse-tables&quot;&gt;Step 2: Creating Necessary Dataverse Tables&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#step-3-setting-up-azure-ai-language-service-for-sentiment-analysis&quot; id=&quot;markdown-toc-step-3-setting-up-azure-ai-language-service-for-sentiment-analysis&quot;&gt;Step 3: Setting Up Azure AI Language Service for Sentiment Analysis&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#step-4-configuring-the-copilot-in-copilot-studio-and-setting-up-the-handover&quot; id=&quot;markdown-toc-step-4-configuring-the-copilot-in-copilot-studio-and-setting-up-the-handover&quot;&gt;Step 4: Configuring the Copilot in Copilot Studio and Setting Up the Handover&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#step-5-creating-the-copilot&quot; id=&quot;markdown-toc-step-5-creating-the-copilot&quot;&gt;Step 5: Creating the Copilot&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#step-6-configuring-the-copilot&quot; id=&quot;markdown-toc-step-6-configuring-the-copilot&quot;&gt;Step 6: Configuring the Copilot&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#step-7-creating-topics&quot; id=&quot;markdown-toc-step-7-creating-topics&quot;&gt;Step 7: Creating Topics&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#step-8-configure-transfer-to-agent-node&quot; id=&quot;markdown-toc-step-8-configure-transfer-to-agent-node&quot;&gt;Step 8: Configure Transfer to Agent Node&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#step-9-create-the-queue&quot; id=&quot;markdown-toc-step-9-create-the-queue&quot;&gt;Step 9: Create the Queue&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#step-10-create-workstream&quot; id=&quot;markdown-toc-step-10-create-workstream&quot;&gt;Step 10: Create Workstream&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#step-11-testing-in-power-pages&quot; id=&quot;markdown-toc-step-11-testing-in-power-pages&quot;&gt;Step 11: Testing in Power Pages&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#conclusion&quot; id=&quot;markdown-toc-conclusion&quot;&gt;Conclusion&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;

&lt;p&gt;Providing exceptional customer service is crucial for businesses to thrive. One of the key aspects of modern customer service is leveraging AI to analyze and respond to customer feedback efficiently. This blog will guide you through creating a dynamic customer service Copilot using Microsoft Dynamics 365, Azure AI Language Service, and Copilot Studio. The Copilot will analyze user feedback for sentiment and handle it accordingly, either storing positive feedback in Dataverse or escalating negative feedback to a human agent through Omnichannel.&lt;/p&gt;

&lt;h2 id=&quot;process-flow&quot;&gt;Process Flow&lt;/h2&gt;

&lt;p&gt;This guide will walk you through the process of setting up an intelligent Customer Service Copilot from scratch. The steps involved are:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;User provides restaurant feedback&lt;/strong&gt; via a chat interface.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Copilot receives the feedback&lt;/strong&gt; and invokes the &lt;strong&gt;Azure AI Language endpoint&lt;/strong&gt; to perform sentiment analysis on the feedback.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Azure AI Language endpoint&lt;/strong&gt; identifies the feedback sentiment.
    &lt;ul&gt;
      &lt;li&gt;If the feedback is positive:
        &lt;ul&gt;
          &lt;li&gt;The feedback is &lt;strong&gt;saved to Dataverse&lt;/strong&gt;.&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
      &lt;li&gt;If the feedback is negative:
        &lt;ul&gt;
          &lt;li&gt;The feedback is &lt;strong&gt;handed over to a human agent&lt;/strong&gt; in Dynamics 365 Customer Service.&lt;/li&gt;
        &lt;/ul&gt;
      &lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Customer agent&lt;/strong&gt; gets notified with the conversation history and can respond to the user through Copilot, establishing a two-way communication channel.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This flow ensures that all feedback is appropriately analyzed and acted upon, with positive feedback being stored for future reference and negative feedback being escalated to human agents for immediate attention.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\0_0.png&quot; alt=&quot;1&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;demo&quot;&gt;Demo&lt;/h2&gt;

&lt;p&gt;Watch the demo video below to see how the intelligent Customer Service Copilot works.&lt;/p&gt;

&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/h3NpkP2dCLk?vq=hd1080&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;h2 id=&quot;prerequisites&quot;&gt;Prerequisites&lt;/h2&gt;

&lt;p&gt;Before we begin, ensure you have the following:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;A Microsoft account&lt;/li&gt;
  &lt;li&gt;Access to Azure Portal&lt;/li&gt;
  &lt;li&gt;Dynamics 365 Customer Service trial&lt;/li&gt;
  &lt;li&gt;Basic understanding of Power Platform and Azure services&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;technologies-involved&quot;&gt;Technologies Involved&lt;/h2&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Dynamics 365 Customer Service&lt;/strong&gt;: For providing a comprehensive customer service platform.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Azure AI Language Service&lt;/strong&gt;: For analyzing the sentiment of user feedback.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Dataverse&lt;/strong&gt;: For storing feedback data.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Copilot Studio&lt;/strong&gt;: For creating and configuring the Copilot.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Power Pages&lt;/strong&gt;: For embedding the chat widget and testing the Copilot interactions.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;steps-to-create-the-customer-service-copilot&quot;&gt;Steps to Create the Customer Service Copilot&lt;/h2&gt;

&lt;h3 id=&quot;step-1-provisioning-a-dynamics-365-customer-service-trial&quot;&gt;Step 1: Provisioning a Dynamics 365 Customer Service Trial&lt;/h3&gt;

&lt;p&gt;Go to &lt;a href=&quot;https://dynamics.microsoft.com/customer-service/customer-service/free-trial/&quot;&gt;Dynamics 365 Customer Service trial&lt;/a&gt; to sign up for the trial.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\1.png&quot; alt=&quot;1&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Once provisioned, you will land on the customer service workspace which gives you a 30-day trial run time.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\2.png&quot; alt=&quot;2&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;step-2-creating-necessary-dataverse-tables&quot;&gt;Step 2: Creating Necessary Dataverse Tables&lt;/h3&gt;

&lt;p&gt;Create a Dataverse table to store positive feedback, so it doesn’t need to be escalated to a human agent.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\2_3.png&quot; alt=&quot;2_3&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;step-3-setting-up-azure-ai-language-service-for-sentiment-analysis&quot;&gt;Step 3: Setting Up Azure AI Language Service for Sentiment Analysis&lt;/h3&gt;

&lt;p&gt;We will also need to create an instance of Azure AI Language service to help us with the sentiment analysis of the user submitted feedback.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Head over to the Azure AI Services section and from the left pane select &lt;strong&gt;Language Service&lt;/strong&gt; and click on &lt;strong&gt;Create&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\3_1.png&quot; alt=&quot;3_1&quot; /&gt;&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;The next page will show the default features that come with the service and the option to add custom features. We will go with the default features as it contains sentiment analysis. Click on &lt;strong&gt;Continue to create your resource&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\3_2.png&quot; alt=&quot;3_2&quot; /&gt;&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Mention the subscription and instance details and click on &lt;strong&gt;Review + Create&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\3_3.png&quot; alt=&quot;3_3&quot; /&gt;&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Once the resource is created, we can head over to the page and from the &lt;strong&gt;Keys and endpoint&lt;/strong&gt; section copy the Endpoint and Keys so that we can use it within the Copilot Studio to connect to the Azure AI Language Connector.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\3_4.png&quot; alt=&quot;3_4&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;step-4-configuring-the-copilot-in-copilot-studio-and-setting-up-the-handover&quot;&gt;Step 4: Configuring the Copilot in Copilot Studio and Setting Up the Handover&lt;/h3&gt;

&lt;ol&gt;
  &lt;li&gt;Head over to &lt;a href=&quot;https://copilotstudio.microsoft.com/&quot;&gt;Copilot Studio&lt;/a&gt; and select the Customer Service environment that got created as we signed up for the trial.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\3.png&quot; alt=&quot;3&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;step-5-creating-the-copilot&quot;&gt;Step 5: Creating the Copilot&lt;/h3&gt;

&lt;ol&gt;
  &lt;li&gt;Click on &lt;strong&gt;Create&lt;/strong&gt;.&lt;/li&gt;
  &lt;li&gt;This will provide us the option to create a Copilot based on an existing template or create a blank Copilot from scratch. Let’s select &lt;strong&gt;New Copilot&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\4.png&quot; alt=&quot;4&quot; /&gt;&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;This will take us to the page where we can:
    &lt;ul&gt;
      &lt;li&gt;Describe the Copilot functionality and provide any specific instructions to the Copilot.&lt;/li&gt;
      &lt;li&gt;Once done, click on &lt;strong&gt;Create&lt;/strong&gt; to provision the Copilot.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\5.png&quot; alt=&quot;5&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;step-6-configuring-the-copilot&quot;&gt;Step 6: Configuring the Copilot&lt;/h3&gt;

&lt;p&gt;The Copilot is now created. We can then make the needed configuration changes.&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Click on &lt;strong&gt;Edit&lt;/strong&gt;, edit the Copilot details like name, icon, and description.&lt;/li&gt;
  &lt;li&gt;Click on &lt;strong&gt;Settings&lt;/strong&gt; to set the authentication to &lt;strong&gt;No Authentication&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\6.png&quot; alt=&quot;6&quot; /&gt;&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;From the Settings section, select &lt;strong&gt;Security&lt;/strong&gt; -&amp;gt; &lt;strong&gt;Authentication&lt;/strong&gt;. Choose &lt;strong&gt;No authentication&lt;/strong&gt; and click on &lt;strong&gt;Save&lt;/strong&gt; so that the Copilot will be accessible without authentication to public users to give feedback.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\6_1.png&quot; alt=&quot;6_1&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;step-7-creating-topics&quot;&gt;Step 7: Creating Topics&lt;/h3&gt;

&lt;ol&gt;
  &lt;li&gt;Click on &lt;strong&gt;Topics&lt;/strong&gt; from the navigation menu.&lt;/li&gt;
  &lt;li&gt;To add the topic, we can either go with the option to create a blank topic or use Copilot to create the topic with an initial set of prepopulated conversation nodes based on the topic description that we provide.&lt;/li&gt;
  &lt;li&gt;Let’s click on &lt;strong&gt;Add a Topic&lt;/strong&gt; and select &lt;strong&gt;From blank&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\7.png&quot; alt=&quot;7&quot; /&gt;&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;We have named the topic as &lt;strong&gt;Feedback Analyzer&lt;/strong&gt; and added the trigger phrases that will invoke this topic. As a conversation starter, we are also asking the question about the feedback and the response is stored in the variable &lt;strong&gt;varUserFeedback&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Note: We are not enabling the Generative selection of topics due to existing issues in Agent Handover where null messages are posted during the handover process (we will see this down the line).&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\9.png&quot; alt=&quot;9&quot; /&gt;&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Now we will add the HTTP request node by selecting &lt;strong&gt;Advanced&lt;/strong&gt; -&amp;gt; &lt;strong&gt;Send HTTP request&lt;/strong&gt; so that we can invoke the Azure AI Language endpoint to detect the user feedback sentiments.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\10.png&quot; alt=&quot;10&quot; /&gt;&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Let’s configure the HTTP request node by:
    &lt;ul&gt;
      &lt;li&gt;Specify the URL of the Azure AI Language instance that we had created earlier and append &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;text/analytics/v3.1/sentiment&lt;/code&gt; to it. The URL will look like below &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;https://&amp;lt;Azure AI Language Instance Name&amp;gt;.cognitiveservices.azure.com/text/analytics/v3.1/sentiment&lt;/code&gt;&lt;/li&gt;
      &lt;li&gt;Mention the method as &lt;strong&gt;POST&lt;/strong&gt;&lt;/li&gt;
      &lt;li&gt;Click on &lt;strong&gt;Edit&lt;/strong&gt; to update the header and body&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\11.png&quot; alt=&quot;11&quot; /&gt;&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;We will add 2 header attributes:
    &lt;ul&gt;
      &lt;li&gt;Click on &lt;strong&gt;Add&lt;/strong&gt;&lt;/li&gt;
      &lt;li&gt;Mention the first parameter key as &lt;strong&gt;Content-Type&lt;/strong&gt; and value as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;application/json&lt;/code&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\12.png&quot; alt=&quot;12&quot; /&gt;&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Let’s add one more attribute for the API Key:
    &lt;ul&gt;
      &lt;li&gt;Click on &lt;strong&gt;Add&lt;/strong&gt;&lt;/li&gt;
      &lt;li&gt;Mention the key as &lt;strong&gt;Ocp-Apim-Subscription-Key&lt;/strong&gt; and value as &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;&amp;lt;the key copied from the Azure AI Language Instance&amp;gt;&lt;/code&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\13.png&quot; alt=&quot;13&quot; /&gt;&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Now we will add the body of the request by selecting the:
    &lt;ul&gt;
      &lt;li&gt;&lt;strong&gt;JSON Content&lt;/strong&gt; from the drop-down&lt;/li&gt;
      &lt;li&gt;Ensure that you select &lt;strong&gt;Formula&lt;/strong&gt; as the way of mentioning the body within the box so that we can pass in dynamic content which is the user feedback variable.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\14.png&quot; alt=&quot;14&quot; /&gt;&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Add the below formula to the box which will format the body as expected by the Azure AI Language API where text key will contain the user feedback submitted.
    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;{
  documents: [
{
  language: &quot;en&quot;,
  id: &quot;1&quot;,
  text: Topic.varUserFeedback
}
  ]
}

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\15.png&quot; alt=&quot;15&quot; /&gt;&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Now let’s configure the Response data type as &lt;strong&gt;From sample data&lt;/strong&gt; and click on &lt;strong&gt;Get schema from sample JSON&lt;/strong&gt; so that we can pass the sample output of the Azure AI Language API and the response schema can be auto-generated from it.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\16.png&quot; alt=&quot;16&quot; /&gt;&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;We will add the below sample output JSON to generate the schema:
    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;{
  &quot;documents&quot;: [
{
  &quot;confidenceScores&quot;: {
    &quot;negative&quot;: 0.98,
    &quot;neutral&quot;: 0.01,
    &quot;positive&quot;: 0.01
  },
  &quot;id&quot;: &quot;1&quot;,
  &quot;sentences&quot;: [
    {
      &quot;confidenceScores&quot;: {
        &quot;negative&quot;: 0.98,
        &quot;neutral&quot;: 0.01,
        &quot;positive&quot;: 0.01
      },
      &quot;length&quot;: 11,
      &quot;offset&quot;: 0,
      &quot;sentiment&quot;: &quot;negative&quot;,
      &quot;text&quot;: &quot;bad service&quot;
    }
  ],
  &quot;sentiment&quot;: &quot;negative&quot;,
  &quot;warnings&quot;: []
}
  ],
  &quot;errors&quot;: [],
  &quot;modelVersion&quot;: &quot;2022-11-01&quot;
}

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
    &lt;ul&gt;
      &lt;li&gt;Add the Sample JSON to the pop-up&lt;/li&gt;
      &lt;li&gt;Click on &lt;strong&gt;Confirm&lt;/strong&gt; which will convert this into a schema&lt;/li&gt;
      &lt;li&gt;Finally, save the output to a new variable &lt;strong&gt;varOutput&lt;/strong&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\17.png&quot; alt=&quot;17&quot; /&gt;&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;As we can see in the above sample output, the Sentiment value is nested within the node &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;documents-&amp;gt;sentences-&amp;gt;sentiment&lt;/code&gt; which we will be trying to extract using Power Fx. For this, we will add a new variable and use the below Power Fx:
    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;First(Topic.varOutput.documents).sentiment
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
    &lt;ul&gt;
      &lt;li&gt;Create a new variable named &lt;strong&gt;varSentiment&lt;/strong&gt; in the &lt;strong&gt;Set variable&lt;/strong&gt; field&lt;/li&gt;
      &lt;li&gt;Assign the above Power Fx formula to the &lt;strong&gt;To value&lt;/strong&gt; field so that we can extract the sentiment value from the output&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\18.png&quot; alt=&quot;18&quot; /&gt;&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Now that we have the sentiment value, we will add a condition check and if the sentiment is negative, we will escalate it to a human agent using the &lt;strong&gt;Transfer conversation&lt;/strong&gt; node.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\19.png&quot; alt=&quot;19&quot; /&gt;&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;If feedback is positive, we can save the feedback to Dataverse by calling a Power Automate and passing the user feedback. We will not be able to use the Dataverse connector directly in this scenario because we have enabled &lt;strong&gt;No authentication&lt;/strong&gt; for the Copilot. The positive feedback saving flow is pretty simple as it directly saves the feedback to the table.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\20.png&quot; alt=&quot;20&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;step-8-configure-transfer-to-agent-node&quot;&gt;Step 8: Configure Transfer to Agent Node&lt;/h3&gt;

&lt;p&gt;Before making further changes, let’s save the Topic and publish the bot once. Now let’s configure the Agent transfer by selecting &lt;strong&gt;Channels&lt;/strong&gt; -&amp;gt; &lt;strong&gt;Dynamic 365 Customer Service&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\25.png&quot; alt=&quot;25&quot; /&gt;&lt;/p&gt;

&lt;p&gt;We would need a Dynamics 365 Customer Service environment for the Omnichannel agent transfer to work.&lt;/p&gt;

&lt;p&gt;We can see the message stating, we don’t have access to all the required variables and actions. The mentioned packages aren’t required to hand off to Omnichannel for Customer Service, but they provide Copilot authors with a better experience by providing extra variables and actions.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\45.png&quot; alt=&quot;45&quot; /&gt;&lt;/p&gt;

&lt;p&gt;So let’s install the package from here.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\46_1.png&quot; alt=&quot;46_1&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Mention the user account and click on &lt;strong&gt;Get It Now&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Next, we will select the environment where we would like to install the Omnichannel Extension and click on &lt;strong&gt;Install&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\48.png&quot; alt=&quot;48&quot; /&gt;&lt;/p&gt;

&lt;p&gt;This will install the needed extensions and if we head back to the Copilot channel page, we can now see that the warning message is no longer there.&lt;/p&gt;

&lt;p&gt;Since we had signed up for a trial customer service instance, it is available for us to connect. We can see the status is currently &lt;strong&gt;Not connected&lt;/strong&gt;, let’s click on &lt;strong&gt;Connect&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\27.png&quot; alt=&quot;27&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Note: In case you end up seeing the below message even after having a Customer Service instance, it is probably because your Copilot and Customer Service are in two different environments. Both have to be in the same environment to configure the handover.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\26.png&quot; alt=&quot;26&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Thus we have established the connection between the Copilot and Omnichannel. Click on &lt;strong&gt;View in Omnichannel&lt;/strong&gt; so that we can head over to the Omnichannel admin center.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\28.png&quot; alt=&quot;28&quot; /&gt;&lt;/p&gt;

&lt;p&gt;In the &lt;strong&gt;Users&lt;/strong&gt; section of the Omnichannel admin center, we can see that the Copilot has been added as a user.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\29.png&quot; alt=&quot;29&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;step-9-create-the-queue&quot;&gt;Step 9: Create the Queue&lt;/h3&gt;

&lt;p&gt;So as to proceed with successfully performing the handover we need to do 3 actions:&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;Create a Queue&lt;/strong&gt;&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Create a Workstream&lt;/strong&gt;&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Create a RuleSet&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Though we can do this from the Omnichannel admin center, it is deprecated, and we are advised to start using the Customer Service Admin center going forward. So let’s head over to by clicking the &lt;strong&gt;Open Customer Service admin center&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\30.png&quot; alt=&quot;30&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Now that we are inside the Customer Service admin center, to hold the incoming conversations that are handed over, we will create a Queue and add the human agent as well as the Copilot that we have created to the queue.&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Click on &lt;strong&gt;Queues&lt;/strong&gt; from the left side pane.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\31.png&quot; alt=&quot;31&quot; /&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;From the &lt;strong&gt;Advanced queues&lt;/strong&gt; section, click on &lt;strong&gt;Manage&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\32.png&quot; alt=&quot;32&quot; /&gt;&lt;/p&gt;

&lt;p&gt;We will configure the queue by:&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;Click on &lt;strong&gt;New Queue&lt;/strong&gt;.&lt;/li&gt;
  &lt;li&gt;Mention the Queue Name.&lt;/li&gt;
  &lt;li&gt;We can create a Messaging/Record/Voice queue. For this demo, we will create a messaging handover queue.&lt;/li&gt;
  &lt;li&gt;Specify the Group Number. Assigning a group number helps you organize your queues in the list view if there are multiple queues. The group number won’t affect the priority of the queue or the incoming conversations.&lt;/li&gt;
  &lt;li&gt;Click on &lt;strong&gt;Create&lt;/strong&gt; to provision the queue.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\33.png&quot; alt=&quot;33&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Once the queue is created, it will take us to the newly created queue page. Click on &lt;strong&gt;Add Users&lt;/strong&gt; as we have to add the Human Agent as well as the Copilot to the Queue.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\34_1.png&quot; alt=&quot;34_1&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Select the human agent user as well as the Copilot agent instance and click on &lt;strong&gt;Add&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\34.png&quot; alt=&quot;34&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The queue setup is now done and we will add this to a workstream as the conversation handovers will first come to the workstream and from there it is routed to different queues.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\35.png&quot; alt=&quot;35&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;step-10-create-workstream&quot;&gt;Step 10: Create Workstream&lt;/h3&gt;

&lt;p&gt;Now let’s create a Workstream. A workstream acts as a container to route, and assign work items.&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;From the Workstreams tab in the left pane, click on &lt;strong&gt;New Workstream&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\36.png&quot; alt=&quot;36&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Let’s configure the workstream by:&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;Specifying the workstream name, Type as &lt;strong&gt;Messaging&lt;/strong&gt; and the channel type as &lt;strong&gt;Chat&lt;/strong&gt;.&lt;/li&gt;
  &lt;li&gt;Select the work distribution mode as &lt;strong&gt;Push&lt;/strong&gt; so that when a conversation comes, it is auto assigned to agents based on capacity and presence.&lt;/li&gt;
  &lt;li&gt;We will come to routing rules in a while. If there are no routing rules defined, then we need a fallback or default queue to which the conversation will be handed over. For this, we have already created a queue earlier, so let’s select &lt;strong&gt;choose existing&lt;/strong&gt; and pick the FeedbackMonitor queue.&lt;/li&gt;
  &lt;li&gt;Click on &lt;strong&gt;Create&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\37.png&quot; alt=&quot;37&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Once the workstream is created it will automatically take us to the newly created workstream where we can configure the chat that we will be using for interacting with the users. The Copilot interactions will now be hosted within this chatbot.&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Click on &lt;strong&gt;Set up chat&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\38.png&quot; alt=&quot;38&quot; /&gt;&lt;/p&gt;

&lt;p&gt;This will open up the popup where we can define the chat channel attributes like name and language and click on &lt;strong&gt;Next&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\39.png&quot; alt=&quot;39&quot; /&gt;&lt;/p&gt;

&lt;p&gt;In the next page, we can define the look and feel of the chat bot widget that will host the Copilot conversations and the human agent handover. We have provided the title, subtitle, theme color, Azure blob hosted logo URL, agent display name as well as the widget positioning. Click on &lt;strong&gt;Next&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\40.png&quot; alt=&quot;40&quot; /&gt;&lt;/p&gt;

&lt;p&gt;We will retain the chat channel behavior parameters &lt;strong&gt;AS IS&lt;/strong&gt; and click on &lt;strong&gt;Next&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\41.png&quot; alt=&quot;41&quot; /&gt;&lt;/p&gt;

&lt;p&gt;We will retain the user features like file upload, customer notifications, and conversation transcripts &lt;strong&gt;ON&lt;/strong&gt; and click on &lt;strong&gt;Next&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\42.png&quot; alt=&quot;42&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Let’s click on &lt;strong&gt;Create channel&lt;/strong&gt; to provision the chat channel.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\43.png&quot; alt=&quot;43&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Once the channel is created, it will take us to the chat channel section where we can copy the Chat Widget Javascript code by clicking on the &lt;strong&gt;Copy Live Chat Widget 2.0 Script&lt;/strong&gt;. This can later be embedded into the website or Power Pages which will allow the user to chat with the Copilot and initiate the handover to the agent as part of the escalation process.&lt;/p&gt;

&lt;p&gt;We can also create a rule set from this section which allows us to define some conditions and route the conversation to specific queues. If there are no rulesets defined, the fallback queue that we created earlier will be used.&lt;/p&gt;

&lt;p&gt;Clicking on the Ruleset will allow us to add conditions to route conversations. This comes in handy if there are multiple queues. For instance, we can check the incoming customer name and route the conversation to a specific queue where a particular agent assigned to that customer can handle all the related conversations.&lt;/p&gt;

&lt;p&gt;We will for the time being go with the fallback default queue that we have created.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\14_CopilotHandover\44.png&quot; alt=&quot;44&quot; /&gt;&lt;/p&gt;

&lt;p&gt;This completes the configuration of the Omnichannel within the Customer Service admin center. We can now go ahead and use the chat widget which embeds the Copilot and handover logic within Power Pages of a restaurant to test it out.&lt;/p&gt;

&lt;h3 id=&quot;step-11-testing-in-power-pages&quot;&gt;Step 11: Testing in Power Pages&lt;/h3&gt;

&lt;ol&gt;
  &lt;li&gt;Embed the chat widget script obtained from the Omnichannel setup into a Power Pages site.&lt;/li&gt;
&lt;/ol&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;	 &amp;lt;script v2 id=&quot;Microsoft_Omnichannel_LCWidget&quot; src=&quot;https://oc-cdn-public-ind.azureedge.net/livechatwidget/scripts/LiveChatBootstrapper.js&quot; data-app-id=&quot;4bf2da1c-da35-4f74-a4e1-6ad1cd38&quot; data-lcw-version=&quot;prod&quot; data-org-id=&quot;2c7dff01-f845-e1-8e4c-002248d5c5d3&quot; data-org-url=&quot;https://m-2c7dff01-f845-ef11-8e4c-002248d5c5d3.in.omnichannelengagementhub.com&quot;&amp;gt;&amp;lt;/script&amp;gt;

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The complete HTML Code used in the Power Pages is shared below :&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;   &amp;lt;meta charset=&quot;UTF-8&quot;&amp;gt;&amp;lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&amp;gt;&amp;lt;title&amp;gt;US Farming Information Hub&amp;lt;/title&amp;gt;&amp;lt;link rel=&quot;stylesheet&quot; href=&quot;styles.css&quot;&amp;gt;
&amp;lt;div class=&quot;container&quot;&amp;gt;
  &amp;lt;div class=&quot;main-column&quot;&amp;gt;
    &amp;lt;header class=&quot;header&quot;&amp;gt;
      &amp;lt;div class=&quot;header-content&quot;&amp;gt;
        &amp;lt;img src=&quot;/restaurant.png&quot; alt=&quot;Header Image&quot; class=&quot;header-img&quot;&amp;gt;
        &amp;lt;div class=&quot;header-text&quot;&amp;gt;
          &amp;lt;h1&amp;gt;Gourmet Dining Hub&amp;lt;/h1&amp;gt;
          &amp;lt;p&amp;gt;Your one-stop destination for all gourmet dining experiences&amp;lt;/p&amp;gt;
        &amp;lt;/div&amp;gt;
      &amp;lt;/div&amp;gt;
    &amp;lt;/header&amp;gt;
    &amp;lt;main class=&quot;main-content&quot;&amp;gt;
      &amp;lt;section class=&quot;card-row&quot;&amp;gt;
        &amp;lt;section id=&quot;farming-queries&quot; class=&quot;card&quot;&amp;gt;
          &amp;lt;h2&amp;gt;Our Menu&amp;lt;/h2&amp;gt;
          &amp;lt;p&amp;gt;Explore our extensive menu with a variety of dishes curated by our top chefs. Find the best meals to satisfy your cravings.&amp;lt;/p&amp;gt;
          &amp;lt;img src=&quot;/menu.png&quot; alt=&quot;Farming Queries&quot; class=&quot;responsive-img&quot;&amp;gt;
        &amp;lt;/section&amp;gt;
        &amp;lt;section id=&quot;weather&quot; class=&quot;card&quot;&amp;gt;
          &amp;lt;h2&amp;gt;Reservations&amp;lt;/h2&amp;gt;
          &amp;lt;p&amp;gt;Book a table at our restaurant easily through our online reservation system. Ensure you have a spot at our popular dining times.&amp;lt;/p&amp;gt;
          &amp;lt;img src=&quot;/booking.png&quot; alt=&quot;Weather&quot; class=&quot;responsive-img&quot;&amp;gt;
        &amp;lt;/section&amp;gt;
      &amp;lt;/section&amp;gt;
      &amp;lt;section class=&quot;card-row single-card&quot;&amp;gt;
        &amp;lt;section id=&quot;loans&quot; class=&quot;card&quot;&amp;gt;
          &amp;lt;h2&amp;gt;Special Offers&amp;lt;/h2&amp;gt;
          &amp;lt;p&amp;gt;Discover our special offers and discounts. Enjoy gourmet dining at the best prices with our exclusive deals.&amp;lt;/p&amp;gt;
          &amp;lt;img src=&quot;/offer.png&quot; alt=&quot;Loans&quot; class=&quot;responsive-img&quot;&amp;gt;
        &amp;lt;/section&amp;gt;
      &amp;lt;/section&amp;gt;
    &amp;lt;/main&amp;gt;
  &amp;lt;/div&amp;gt;
  
  &amp;lt;div class=&quot;sidebar&quot;&amp;gt;
    &amp;lt;div class=&quot;farmerAssistant&quot;&amp;gt;
      &amp;lt;h2 class=&quot;farmerAssistant-title&quot;&amp;gt;&amp;lt;/h2&amp;gt;
      &amp;lt;div&amp;gt;
        &amp;lt;script v2 id=&quot;Microsoft_Omnichannel_LCWidget&quot; src=&quot;https://oc-cdn-public-ind.azureedge.net/livechatwidget/scripts/LiveChatBootstrapper.js&quot; data-app-id=&quot;4bf2da1c-da35-4f74-a1-6adfcd38&quot; data-lcw-version=&quot;prod&quot; data-org-id=&quot;2c7dff01-f845-ef11-8e4c-002248d5c5d3&quot; data-org-url=&quot;https://m-2c7dff01-f845-ef11-8e4c-002248d5c5d3.in.omnichannelengagementhub.com&quot;&amp;gt;&amp;lt;/script&amp;gt;

      &amp;lt;/div&amp;gt;
    &amp;lt;/div&amp;gt;
  &amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;div class=&quot;row sectionBlockLayout text-left&quot; style=&quot;display: flex; flex-wrap: wrap; margin: 0px; min-height: auto; padding: 8px;&quot;&amp;gt;
  &amp;lt;div class=&quot;container&quot; style=&quot;padding: 0px; display: flex; flex-wrap: wrap;&quot;&amp;gt;&amp;lt;div class=&quot;col-md-12 columnBlockLayout&quot; style=&quot;flex-grow: 1; display: flex; flex-direction: column; min-width: 250px; word-break: break-word;&quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The complete CSS used in the Power Pages is shared below :&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;   body {
    background-color: #f0f0f3;
    font-family: &apos;Arial&apos;, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: stretch; /* Stretch to fill the full height */
    min-height: 100vh;
    height: 100vh; /* Ensure the body takes full height */
}

.container {
    display: flex;
    width: 100%;
    height: 100%;
    background: #e0e0e0;
    box-shadow: 20px 20px 60px #bebebe, -20px -20px 60px #ffffff;
}

.main-column {
    flex: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

.sidebar {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background: #e0e0e0;
    padding: 20px;
    height: 100%;
}

.header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: #e0e0e0;
    border-radius: 20px;
    box-shadow: inset 10px 10px 20px #bebebe, inset -10px -10px 20px #ffffff;
    width: 100%;
    margin-bottom: 10px;
}

.header-content {
    display: flex;
    align-items: center;
}

.header-text {
    text-align: center;
    margin-left: 20px;
}

.header h1 {
    margin: 0;
    font-size: 2.5em;
    color: #333;
}

.header p {
    margin: 10px 0 0;
    font-size: 1.2em;
    color: #666;
}

.header-img {
    width: 110px;
    height: auto;
    border-radius: 10px;
}

.main-content {
    width: 100%;
    flex-grow: 1; /* Make sure the content takes the remaining space */
}

.card-row {
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 10px;
}

.single-card {
    display: flex;
    justify-content: center;
    width: 100%;
}

.card {
    background: #e0e0e0;
    border-radius: 20px;
    box-shadow: 20px 20px 60px #bebebe, -20px -20px 60px #ffffff;
    padding: 15px;
    width: 48%;
    text-align: center;
    margin-bottom: 10px;
}

.single-card .card {
    width: 50%;
}

.card h2 {
    font-size: 24px;
    color: #333;
    margin-top: 0;
}

.card p {
    font-size: 1.1em;
    color: #666;
}

.responsive-img {
    margin: auto;
    width: 110px;
    height: auto;
    border-radius: 10px;
    margin-top: 10px;
}

.footer {
    display: none;
}

.copilot-container {
    width: 100%;
    height: calc(100vh - 60px); /* Adjust height to fit within the sidebar */
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.farmerAssistant-title {
    font-size: 26px;
    text-align: center;
}

.navbar {
    display: none !important;
}

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;Lets preview the Power Pages Site and interact with the Copilot by submitting a negative feedback 
&lt;img src=&quot;\images\14_CopilotHandover\49.png&quot; alt=&quot;44&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;As we can see the negative feedback has been identified the Azure AI Language Service and has escalated and handed it over to the human agent 
 &lt;img src=&quot;\images\14_CopilotHandover\50.png&quot; alt=&quot;44&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;The human agent will receive the notification in the customer service workspace where he can accept the conversation that has come to his queue. 
 &lt;img src=&quot;\images\14_CopilotHandover\51.png&quot; alt=&quot;44&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;Human agent can now start conversing with the customer asking for the details of the incident
 &lt;img src=&quot;\images\14_CopilotHandover\52.png&quot; alt=&quot;44&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;The customer can now provide detailed feedback report which will be attended to by the customer executive 
 &lt;img src=&quot;\images\14_CopilotHandover\53.png&quot; alt=&quot;44&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;The customer service center receives all the conversations from the customer in real time and this helps in establishing a proper escalation process in the feedback system
  &lt;img src=&quot;\images\14_CopilotHandover\54.png&quot; alt=&quot;44&quot; /&gt;
    &lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Thus we have successfully created a dynamic customer service Copilot that leverages AI to analyze user feedback and handle it efficiently. This Copilot not only improves customer satisfaction by quickly addressing negative feedback but also streamlines the process of storing positive feedback.&lt;/p&gt;
</description>
                <pubDate>Fri, 10 Oct 2025 17:31:35 +0530</pubDate>
                <link>https://www.fusiondevblogs.com/Copilot-Handover/</link>
                <guid isPermaLink="true">https://www.fusiondevblogs.com/Copilot-Handover/</guid>
                
                <category>copilot</category>
                
                
            </item>
        
            <item>
                <title>Cafeteria Feedback Copilot that uses AI Prompt Action for Sentiment Analysis</title>
                <description>&lt;h2 class=&quot;no_toc&quot; id=&quot;table-of-contents&quot;&gt;Table of Contents&lt;/h2&gt;

&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#introduction&quot; id=&quot;markdown-toc-introduction&quot;&gt;Introduction&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#process-flow&quot; id=&quot;markdown-toc-process-flow&quot;&gt;Process Flow&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#prerequisites&quot; id=&quot;markdown-toc-prerequisites&quot;&gt;Prerequisites&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#demo&quot; id=&quot;markdown-toc-demo&quot;&gt;Demo&lt;/a&gt;    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;#step-1--create-the-dataverse-table&quot; id=&quot;markdown-toc-step-1--create-the-dataverse-table&quot;&gt;Step 1 : Create the Dataverse Table&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#step-2-create-the-custom-copilot&quot; id=&quot;markdown-toc-step-2-create-the-custom-copilot&quot;&gt;Step 2: Create the Custom Copilot&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#step-3-enable-generative-selection-of-topics&quot; id=&quot;markdown-toc-step-3-enable-generative-selection-of-topics&quot;&gt;Step 3: Enable Generative Selection of Topics&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#step-4-create-topics&quot; id=&quot;markdown-toc-step-4-create-topics&quot;&gt;Step 4: Create Topics&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#step-5-add-ai-prompt-action&quot; id=&quot;markdown-toc-step-5-add-ai-prompt-action&quot;&gt;Step 5: Add AI Prompt Action&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#step-6-escalate-negative-feedback&quot; id=&quot;markdown-toc-step-6-escalate-negative-feedback&quot;&gt;Step 6: Escalate Negative Feedback&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#step-7-save-feedback-to-dataverse&quot; id=&quot;markdown-toc-step-7-save-feedback-to-dataverse&quot;&gt;Step 7: Save Feedback to Dataverse&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#step-8-publish-the-copilot&quot; id=&quot;markdown-toc-step-8-publish-the-copilot&quot;&gt;Step 8: Publish the Copilot&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#summary&quot; id=&quot;markdown-toc-summary&quot;&gt;Summary&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;In this blog, we will walk through the process of creating a custom Cafeteria Feedback Copilot using Copilot Studio. This Copilot will analyze user feedback using the AI Prompt action, perform sentiment analysis, automatically escalate negative feedback, and store positive feedback in Dataverse.&lt;/p&gt;

&lt;h2 id=&quot;process-flow&quot;&gt;Process Flow&lt;/h2&gt;
&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;User Interaction&lt;/strong&gt;: The user initiates the conversation with the Copilot by providing feedback about the cafeteria.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Automatic Topic Selection&lt;/strong&gt;: Based on the user’s input, the Copilot automatically detects the relevant topic and directs the conversation accordingly.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Feedback Collection&lt;/strong&gt;: The user is presented with an adaptive card to input specific details such as the date and their feedback.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Sentiment Analysis&lt;/strong&gt;: Once the feedback is submitted, the Copilot uses an AI Prompt action to analyze the sentiment of the feedback in real-time.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Action Based on Sentiment&lt;/strong&gt;:
    &lt;ul&gt;
      &lt;li&gt;&lt;strong&gt;Negative Feedback&lt;/strong&gt;: If the sentiment is negative, the feedback is escalated to the concerned team via email, and the details are logged in Dataverse.&lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;Positive Feedback&lt;/strong&gt;: If the sentiment is positive, the feedback is simply logged in Dataverse.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;User Confirmation&lt;/strong&gt;: The user receives a confirmation message indicating the action taken on their feedback.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This process ensures a seamless and responsive interaction where the user’s feedback is promptly analyzed and acted upon.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\17_CopilotFeedbackAnalyzer\0.gif&quot; alt=&quot;Step 2 Image 1&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;prerequisites&quot;&gt;Prerequisites&lt;/h2&gt;
&lt;ul&gt;
  &lt;li&gt;Access to &lt;a href=&quot;https://copilotstudio.microsoft.com/&quot;&gt;Copilot Studio&lt;/a&gt;.&lt;/li&gt;
  &lt;li&gt;Dataverse configured for storing feedback.&lt;/li&gt;
  &lt;li&gt;AI Builder Credits for using AI Prompt Action&lt;/li&gt;
  &lt;li&gt;Images stored in a location like Azure Blob Storage which can be used in Adaptive Cards&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;demo&quot;&gt;Demo&lt;/h2&gt;
&lt;p&gt;Watch the demo video below to see how the Smart Feedback Analyzer works.&lt;/p&gt;

&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/XiTWd3eG12E?vq=hd1080&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;h3 id=&quot;step-1--create-the-dataverse-table&quot;&gt;Step 1 : Create the Dataverse Table&lt;/h3&gt;
&lt;p&gt;We will be storing the positive and negative feedbacks in the dataverse table named &lt;em&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;RestaurantFeedbacks&lt;/code&gt;&lt;/em&gt; which contains the columns &lt;em&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Feedback&lt;/code&gt;&lt;/em&gt;,&lt;em&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Feedback Date&lt;/code&gt;&lt;/em&gt;,&lt;em&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Sentiment&lt;/code&gt;&lt;/em&gt;
&lt;img src=&quot;\images\17_CopilotFeedbackAnalyzer\3.png&quot; alt=&quot;Step 2 Image 1&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;step-2-create-the-custom-copilot&quot;&gt;Step 2: Create the Custom Copilot&lt;/h3&gt;
&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;Head over to &lt;a href=&quot;https://copilotstudio.microsoft.com/&quot;&gt;Copilot Studio&lt;/a&gt; and &lt;strong&gt;click&lt;/strong&gt; on &lt;strong&gt;Create&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\17_CopilotFeedbackAnalyzer\3_1.png&quot; alt=&quot;Step 2 Image 2&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;You will have the option to create a copilot based on an existing template or create a blank copilot from scratch. Let’s select &lt;strong&gt;New copilot&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\17_CopilotFeedbackAnalyzer\3_2.png&quot; alt=&quot;Step 2 Image 2&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;This will take you to the page where you can:&lt;/p&gt;
    &lt;ol&gt;
      &lt;li&gt;&lt;strong&gt;Describe the copilot functionality&lt;/strong&gt; and provide any specific instructions.&lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;Click&lt;/strong&gt; on &lt;strong&gt;Create&lt;/strong&gt; to provision the copilot.&lt;/li&gt;
    &lt;/ol&gt;

    &lt;p&gt;&lt;img src=&quot;\images\17_CopilotFeedbackAnalyzer\4.png&quot; alt=&quot;Step 2 Image 1&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;step-3-enable-generative-selection-of-topics&quot;&gt;Step 3: Enable Generative Selection of Topics&lt;/h3&gt;

&lt;ol&gt;
  &lt;li&gt;The copilot is now created. Next, we need to make some configuration changes.
    &lt;ol&gt;
      &lt;li&gt;&lt;strong&gt;Click&lt;/strong&gt; on &lt;strong&gt;Edit&lt;/strong&gt; to update the copilot’s name, icon, and description.&lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;Click&lt;/strong&gt; on &lt;strong&gt;Settings&lt;/strong&gt; to enable the &lt;strong&gt;Generative selection of topics&lt;/strong&gt; so that topics are auto-selected based on user conversations, resulting in a smoother user experience.&lt;/li&gt;
    &lt;/ol&gt;

    &lt;p&gt;&lt;img src=&quot;\images\17_CopilotFeedbackAnalyzer\5.png&quot; alt=&quot;Step 3 Image 1&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;To enable the automatic detection of topics from user interaction:
    &lt;ol&gt;
      &lt;li&gt;&lt;strong&gt;Click&lt;/strong&gt; on &lt;strong&gt;Generative AI&lt;/strong&gt;.&lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;Select&lt;/strong&gt; &lt;strong&gt;Generative&lt;/strong&gt;.&lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;Click&lt;/strong&gt; on &lt;strong&gt;Save&lt;/strong&gt; to update the settings.&lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;Click&lt;/strong&gt; on the &lt;strong&gt;Close&lt;/strong&gt; icon to return to the home page of this custom copilot.&lt;/li&gt;
    &lt;/ol&gt;

    &lt;p&gt;&lt;img src=&quot;\images\17_CopilotFeedbackAnalyzer\6.png&quot; alt=&quot;Step 3 Image 2&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;step-4-create-topics&quot;&gt;Step 4: Create Topics&lt;/h3&gt;

&lt;ol&gt;
  &lt;li&gt;Now, let’s go ahead and create the topics that will automatically redirect the conversation flow to appropriate topics based on the user’s questions.
    &lt;ol&gt;
      &lt;li&gt;&lt;strong&gt;Click&lt;/strong&gt; on &lt;strong&gt;Topics&lt;/strong&gt; from the navigation menu.&lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;Click&lt;/strong&gt; on &lt;strong&gt;Add a Topic&lt;/strong&gt;.&lt;/li&gt;
      &lt;li&gt;You can either create a blank topic or use Copilot to create the topic with an initial set of prepopulated conversation nodes based on the topic description.&lt;strong&gt;Select&lt;/strong&gt; &lt;strong&gt;Create from description with Copilot&lt;/strong&gt;.&lt;/li&gt;
    &lt;/ol&gt;

    &lt;p&gt;&lt;img src=&quot;\images\17_CopilotFeedbackAnalyzer\7.png&quot; alt=&quot;Step 4 Image 1&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Let’s provide the topic description details in the pop-up that appears.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\17_CopilotFeedbackAnalyzer\8.png&quot; alt=&quot;Step 4 Image 2&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;strong&gt;Click&lt;/strong&gt; on &lt;strong&gt;Create&lt;/strong&gt; to provision the topic skeleton based on the provided description.&lt;/p&gt;

    &lt;p&gt;Thus, we have the basic topic created with an automatic trigger. Now, let’s add an adaptive card to accept the user input, such as feedback date and cafeteria feedback.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\17_CopilotFeedbackAnalyzer\9.png&quot; alt=&quot;Step 4 Image 3&quot; /&gt;&lt;/p&gt;

    &lt;p&gt;We will add the below adaptive card JSON schema to the Adaptive Card Node Properties as shown below.&lt;/p&gt;
    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt; {
     &quot;$schema&quot;: &quot;http://adaptivecards.io/schemas/adaptive-card.json&quot;,
     &quot;type&quot;: &quot;AdaptiveCard&quot;,
     &quot;version&quot;: &quot;1.4&quot;,
     &quot;backgroundImage&quot;: {
         &quot;url&quot;: &quot;https://adaptivecardsbot.blob.core.windows.net/imagestore/108265.jpg&quot;,
         &quot;fillMode&quot;: &quot;cover&quot;,
         &quot;horizontalAlignment&quot;: &quot;center&quot;,
         &quot;verticalAlignment&quot;: &quot;center&quot;
     },
     &quot;body&quot;: [
         {
             &quot;type&quot;: &quot;Container&quot;,
             &quot;backgroundColor&quot;: &quot;#E0FFFF&quot;,
             &quot;items&quot;: [
                 {
                     &quot;type&quot;: &quot;ColumnSet&quot;,
                     &quot;columns&quot;: [
                         {
                             &quot;type&quot;: &quot;Column&quot;,
                             &quot;width&quot;: &quot;auto&quot;,
                             &quot;items&quot;: [
                                 {
                                     &quot;type&quot;: &quot;Image&quot;,
                                     &quot;url&quot;: &quot;https://adaptivecardsbot.blob.core.windows.net/imagestore/cafeteria.png&quot;,
                                     &quot;size&quot;: &quot;Small&quot;,
                                     &quot;horizontalAlignment&quot;: &quot;Left&quot;
                                 }
                             ]
                         },
                         {
                             &quot;type&quot;: &quot;Column&quot;,
                             &quot;width&quot;: &quot;stretch&quot;,
                             &quot;items&quot;: [
                                 {
                                     &quot;type&quot;: &quot;TextBlock&quot;,
                                     &quot;text&quot;: &quot;Cafeteria Food Feedback&quot;,
                                     &quot;weight&quot;: &quot;Bolder&quot;,
                                     &quot;size&quot;: &quot;Large&quot;,
                                     &quot;wrap&quot;: true,
                                     &quot;horizontalAlignment&quot;: &quot;Left&quot;,
                                     &quot;color&quot;: &quot;Default&quot;,
                                     &quot;spacing&quot;: &quot;Medium&quot;
                                 }
                             ]
                         }
                     ]
                 }
             ],
             &quot;style&quot;: &quot;emphasis&quot;,
             &quot;bleed&quot;: true,
             &quot;spacing&quot;: &quot;None&quot;
         },
         {
             &quot;type&quot;: &quot;TextBlock&quot;,
             &quot;text&quot;: &quot;Please provide your feedback for the food served today.&quot;,
             &quot;wrap&quot;: true,
             &quot;weight&quot;: &quot;Bolder&quot;,
             &quot;color&quot;: &quot;Good&quot;,
             &quot;spacing&quot;: &quot;Medium&quot;
         },
         {
             &quot;type&quot;: &quot;TextBlock&quot;,
             &quot;text&quot;: &quot;Date&quot;,
             &quot;weight&quot;: &quot;Bolder&quot;,
             &quot;wrap&quot;: true,
             &quot;spacing&quot;: &quot;Small&quot;
         },
         {
             &quot;type&quot;: &quot;Input.Date&quot;,
             &quot;id&quot;: &quot;feedbackDate&quot;,
             &quot;placeholder&quot;: &quot;dd-mm-yyyy&quot;
         },
         {
             &quot;type&quot;: &quot;TextBlock&quot;,
             &quot;text&quot;: &quot;Your Feedback&quot;,
             &quot;weight&quot;: &quot;Bolder&quot;,
             &quot;wrap&quot;: true,
             &quot;spacing&quot;: &quot;Small&quot;
         },
         {
             &quot;type&quot;: &quot;Input.Text&quot;,
             &quot;id&quot;: &quot;feedbackText&quot;,
             &quot;isMultiline&quot;: true,
             &quot;placeholder&quot;: &quot;Enter your feedback here...&quot;,
             &quot;maxLength&quot;: 500
         }
     ],
     &quot;actions&quot;: [
         {
             &quot;type&quot;: &quot;Action.Submit&quot;,
             &quot;title&quot;: &quot;Submit Feedback&quot;
         }
     ],
     &quot;style&quot;: &quot;default&quot;
 }


&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
    &lt;p&gt;&lt;img src=&quot;\images\17_CopilotFeedbackAnalyzer\10.png&quot; alt=&quot;Step 4 Image 5&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;As we can see, the user inputted values for date and feedback are stored in the &lt;em&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;feedbackDate&lt;/code&gt;&lt;/em&gt; and &lt;em&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;feedbackText&lt;/code&gt;&lt;/em&gt; variables, which we will use later.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\17_CopilotFeedbackAnalyzer\11.png&quot; alt=&quot;Step 4 Image 6&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;step-5-add-ai-prompt-action&quot;&gt;Step 5: Add AI Prompt Action&lt;/h3&gt;

&lt;ol&gt;
  &lt;li&gt;Now, let’s add the AI Prompt action:
    &lt;ol&gt;
      &lt;li&gt;&lt;strong&gt;Select&lt;/strong&gt; &lt;strong&gt;Call an action&lt;/strong&gt;.&lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;Click&lt;/strong&gt; on &lt;strong&gt;Basic Actions&lt;/strong&gt;.&lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;Select&lt;/strong&gt; &lt;strong&gt;Create a prompt&lt;/strong&gt;.&lt;/li&gt;
    &lt;/ol&gt;

    &lt;p&gt;&lt;img src=&quot;\images\17_CopilotFeedbackAnalyzer\12.png&quot; alt=&quot;Step 5 Image 2&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;This will open a pop-up window where we can define the prompt. We will:
    &lt;ol&gt;
      &lt;li&gt;Provide a name for the prompt (e.g., &lt;strong&gt;Cafeteria Feedback Analyzer&lt;/strong&gt;) so that we can later select it by this name.&lt;/li&gt;
      &lt;li&gt;Create an input with the name &lt;strong&gt;Feedback&lt;/strong&gt; so that we can dynamically pass the user input to this variable.&lt;/li&gt;
      &lt;li&gt;Add the prompt that will analyze the feedback in the &lt;strong&gt;Prompt&lt;/strong&gt; section and &lt;strong&gt;click&lt;/strong&gt; on &lt;strong&gt;Insert&lt;/strong&gt; to add the &lt;em&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;Feedback&lt;/code&gt;&lt;/em&gt; variable to the prompt.&lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;Click&lt;/strong&gt; on &lt;strong&gt;Save custom prompt&lt;/strong&gt; to make it available in the Copilot canvas.&lt;/li&gt;
    &lt;/ol&gt;

    &lt;p&gt;&lt;img src=&quot;\images\17_CopilotFeedbackAnalyzer\13.png&quot; alt=&quot;Step 5 Image 3&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;Now we can add the prompt to the conversation flow by selecting its name:
    &lt;ol&gt;
      &lt;li&gt;&lt;strong&gt;Select&lt;/strong&gt; &lt;strong&gt;Call an action&lt;/strong&gt;.&lt;/li&gt;
      &lt;li&gt;From &lt;strong&gt;Basic Actions&lt;/strong&gt;, search for the recently created prompt by its name.&lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;Select&lt;/strong&gt; the &lt;strong&gt;Cafeteria Feedback Analyzer&lt;/strong&gt; prompt.&lt;/li&gt;
    &lt;/ol&gt;

    &lt;p&gt;&lt;img src=&quot;\images\17_CopilotFeedbackAnalyzer\14.png&quot; alt=&quot;Step 5 Image 4&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Select the &lt;em&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;feedbackText&lt;/code&gt;&lt;/em&gt; variable, which contains the user inputted feedback, and assign it as the input to the Prompt action.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\17_CopilotFeedbackAnalyzer\15.png&quot; alt=&quot;Step 5 Image 5&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;We will also define a variable (&lt;em&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;feedbackSentiment&lt;/code&gt;&lt;/em&gt;) to hold the output of the AI Prompt action so that we can check the sentiment of the user feedback and take action on it.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\17_CopilotFeedbackAnalyzer\16.png&quot; alt=&quot;Step 5 Image 6&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;step-6-escalate-negative-feedback&quot;&gt;Step 6: Escalate Negative Feedback&lt;/h3&gt;
&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;Now, let’s add a condition to check whether the feedback analyzed by the AI Prompt action is negative or positive by adding the condition node.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\17_CopilotFeedbackAnalyzer\17.png&quot; alt=&quot;Step 6 Image 1&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Since &lt;em&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;feedbackSentiment&lt;/code&gt;&lt;/em&gt; is a record variable, we need to get the &lt;em&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;feedbackSentiment.text&lt;/code&gt;&lt;/em&gt; property, which contains the feedback analysis value. We will then check if it is negative and, if so, escalate the feedback to the concerned users.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\17_CopilotFeedbackAnalyzer\18.png&quot; alt=&quot;Step 6 Image 2&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;To escalate the feedback, let’s add an &lt;strong&gt;Office 365 Mail&lt;/strong&gt; action:&lt;/p&gt;

    &lt;ol&gt;
      &lt;li&gt;&lt;strong&gt;Select&lt;/strong&gt; &lt;strong&gt;Call an action&lt;/strong&gt;.&lt;/li&gt;
      &lt;li&gt;From the &lt;strong&gt;Connector&lt;/strong&gt; tab, search for &lt;strong&gt;Office 365 Mail&lt;/strong&gt; connectors.&lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;Select&lt;/strong&gt; &lt;strong&gt;Send an email (V2)&lt;/strong&gt; action.&lt;/li&gt;
    &lt;/ol&gt;

    &lt;p&gt;&lt;img src=&quot;\images\17_CopilotFeedbackAnalyzer\19.png&quot; alt=&quot;Step 6 Image 3&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Now, configure the Office 365 Mail connector:&lt;/p&gt;
    &lt;ol&gt;
      &lt;li&gt;Set the &lt;strong&gt;To&lt;/strong&gt; and &lt;strong&gt;Escalation Subject&lt;/strong&gt; fields.&lt;/li&gt;
      &lt;li&gt;In the &lt;strong&gt;Body&lt;/strong&gt;, add the mail content and concatenate it with the user feedback present in the &lt;em&gt;&lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;feedbackText&lt;/code&gt;&lt;/em&gt; variable using the &lt;strong&gt;Concatenate&lt;/strong&gt; expression.&lt;/li&gt;
      &lt;li&gt;Add an output variable to the Connector action.&lt;/li&gt;
    &lt;/ol&gt;

    &lt;p&gt;&lt;img src=&quot;\images\17_CopilotFeedbackAnalyzer\20.png&quot; alt=&quot;Step 6 Image 4&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;step-7-save-feedback-to-dataverse&quot;&gt;Step 7: Save Feedback to Dataverse&lt;/h3&gt;
&lt;ol&gt;
  &lt;li&gt;Once escalated, let’s save the negative feedback to the Dataverse backend using the Connector action:
    &lt;ol&gt;
      &lt;li&gt;&lt;strong&gt;Select&lt;/strong&gt; &lt;strong&gt;Call an action&lt;/strong&gt;.&lt;/li&gt;
      &lt;li&gt;From the &lt;strong&gt;Connector actions&lt;/strong&gt; tab, search for the &lt;strong&gt;Dataverse&lt;/strong&gt; connector.&lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;Select&lt;/strong&gt; the &lt;strong&gt;Add a new row to the selected environment&lt;/strong&gt; connector.&lt;/li&gt;
    &lt;/ol&gt;

    &lt;p&gt;&lt;img src=&quot;\images\17_CopilotFeedbackAnalyzer\21.png&quot; alt=&quot;Step 7 Image 1&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;Now, configure the Dataverse connector action:
    &lt;ol&gt;
      &lt;li&gt;Set the environment and table name.&lt;/li&gt;
      &lt;li&gt;Select the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;feedbackText&lt;/code&gt; variable, which contains the User Feedback.&lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;Select&lt;/strong&gt; &lt;strong&gt;Advanced inputs&lt;/strong&gt; to add the remaining data that needs to be saved.&lt;/li&gt;
    &lt;/ol&gt;

    &lt;p&gt;&lt;img src=&quot;\images\17_CopilotFeedbackAnalyzer\22.png&quot; alt=&quot;Step 7 Image 2&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Add additional inputs like Feedback Date and Feedback Sentiments retrieved from the AI prompt action to save them to Dataverse.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\17_CopilotFeedbackAnalyzer\23.png&quot; alt=&quot;Step 7 Image 3&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;We will also add an image to provide the user confirmation that the feedback has been escalated to the concerned individuals.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\17_CopilotFeedbackAnalyzer\23_5.png&quot; alt=&quot;Step 7 Image 4&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;In the positive branch of the condition, let’s repeat the same steps to save the positive feedback to Dataverse:
    &lt;ol&gt;
      &lt;li&gt;&lt;strong&gt;Select&lt;/strong&gt; &lt;strong&gt;Call an action&lt;/strong&gt;.&lt;/li&gt;
      &lt;li&gt;From the &lt;strong&gt;Connector actions&lt;/strong&gt; tab, search for the &lt;strong&gt;Dataverse&lt;/strong&gt; connector.&lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;Select&lt;/strong&gt; the &lt;strong&gt;Add a new row to the selected environment&lt;/strong&gt; connector.&lt;/li&gt;
    &lt;/ol&gt;

    &lt;p&gt;&lt;img src=&quot;\images\17_CopilotFeedbackAnalyzer\24.png&quot; alt=&quot;Step 7 Image 5&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;Now, configure the Dataverse connector action:
    &lt;ol&gt;
      &lt;li&gt;Set the environment and table name.&lt;/li&gt;
      &lt;li&gt;Select the &lt;code class=&quot;language-plaintext highlighter-rouge&quot;&gt;feedbackText&lt;/code&gt; variable, which contains the User Feedback.&lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;Select&lt;/strong&gt; &lt;strong&gt;Advanced inputs&lt;/strong&gt; to add the remaining data that needs to be saved.&lt;/li&gt;
    &lt;/ol&gt;

    &lt;p&gt;&lt;img src=&quot;\images\17_CopilotFeedbackAnalyzer\25.png&quot; alt=&quot;Step 7 Image 6&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Add additional inputs like Feedback Date and Feedback Sentiments retrieved from the AI prompt action to save them to Dataverse.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\17_CopilotFeedbackAnalyzer\26.png&quot; alt=&quot;Step 7 Image 7&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;We will also add an image to provide the user confirmation that the feedback has been saved.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\17_CopilotFeedbackAnalyzer\27.png&quot; alt=&quot;Step 7 Image 8&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;step-8-publish-the-copilot&quot;&gt;Step 8: Publish the Copilot&lt;/h3&gt;
&lt;ol&gt;
  &lt;li&gt;We have now completed the Copilot development. Let’s deploy this in Teams so that employees can start using it.
    &lt;ol&gt;
      &lt;li&gt;&lt;strong&gt;Select&lt;/strong&gt; &lt;strong&gt;Channels&lt;/strong&gt; and select &lt;strong&gt;Microsoft Teams&lt;/strong&gt;.&lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;Select&lt;/strong&gt; &lt;strong&gt;Turn on Teams&lt;/strong&gt; to enable Teams publishing channel.&lt;/li&gt;
    &lt;/ol&gt;

    &lt;p&gt;&lt;img src=&quot;\images\17_CopilotFeedbackAnalyzer\28.png&quot; alt=&quot;Step 8 Image 1&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Now we have the option to edit the Copilot icon, details, and description that will be shown in Teams. Once done, &lt;strong&gt;Click&lt;/strong&gt; on &lt;strong&gt;Availability options&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\17_CopilotFeedbackAnalyzer\29.png&quot; alt=&quot;Step 8 Image 2&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;We have different ways to publish the Copilot to Teams. We can download and upload the Zip to use the Copilot as a personal app, but we will publish it to the whole organization.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\17_CopilotFeedbackAnalyzer\30.png&quot; alt=&quot;Step 8 Image 3&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;strong&gt;Select&lt;/strong&gt; &lt;strong&gt;Submit for admin approval&lt;/strong&gt; so that the app can be approved by the admin from the Teams admin center.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\17_CopilotFeedbackAnalyzer\31.png&quot; alt=&quot;Step 8 Image 4&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;We can see that the app has come up for approval in the admin center. Let’s approve it.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\17_CopilotFeedbackAnalyzer\32.png&quot; alt=&quot;Step 8 Image 5&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;It would take some time for the app to be globally published. Once available, let’s search for the app from the Teams store and add it for our use.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\17_CopilotFeedbackAnalyzer\33_1.png&quot; alt=&quot;Step 8 Image 6&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;We will initiate the conversation with the copilot, and it provides the adaptive card for providing the feedback details.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\17_CopilotFeedbackAnalyzer\34.png&quot; alt=&quot;Step 8 Image 7&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;The feedback has been submitted, and we get a success message indicating the escalation process has been initiated.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\17_CopilotFeedbackAnalyzer\35.png&quot; alt=&quot;Step 8 Image 8&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;If we head to the Dataverse, we can see that the feedback has been logged.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\17_CopilotFeedbackAnalyzer\36.png&quot; alt=&quot;Step 8 Image 9&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;We can also see that the escalation mail has reached the concerned team.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\17_CopilotFeedbackAnalyzer\37.png&quot; alt=&quot;Step 8 Image 10&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Now, let’s test with positive feedback.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\17_CopilotFeedbackAnalyzer\38.png&quot; alt=&quot;Step 8 Image 11&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;The feedback has been submitted, and we get a positive feedback success message.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\17_CopilotFeedbackAnalyzer\39.png&quot; alt=&quot;Step 8 Image 12&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;If we check Dataverse, we can see that the positive feedback has also been logged.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\17_CopilotFeedbackAnalyzer\40.png&quot; alt=&quot;Step 8 Image 13&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;summary&quot;&gt;Summary&lt;/h2&gt;
&lt;p&gt;In this blog, we have walked through the process of developing a Cafeteria Feedback Copilot that uses AI Prompt action to perform sentiment analysis on the fly and take appropriate actions based on the sentiment. This copilot can be a powerful tool for automating feedback analysis and ensuring prompt responses to user feedback in an organization.&lt;/p&gt;
</description>
                <pubDate>Thu, 21 Aug 2025 17:31:35 +0530</pubDate>
                <link>https://www.fusiondevblogs.com/Copilot-AI-Sentiment-Analysis/</link>
                <guid isPermaLink="true">https://www.fusiondevblogs.com/Copilot-AI-Sentiment-Analysis/</guid>
                
                <category>copilot</category>
                
                
            </item>
        
            <item>
                <title>Building a Sales Analyzer Copilot using Dataverse and Llama Model in Azure AI Studio</title>
                <description>&lt;h2 class=&quot;no_toc&quot; id=&quot;table-of-contents&quot;&gt;Table of Contents&lt;/h2&gt;

&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#introduction&quot; id=&quot;markdown-toc-introduction&quot;&gt;Introduction&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#llama-model&quot; id=&quot;markdown-toc-llama-model&quot;&gt;Llama Model&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#understanding-the-use-case&quot; id=&quot;markdown-toc-understanding-the-use-case&quot;&gt;Understanding the Use Case&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#prerequisites&quot; id=&quot;markdown-toc-prerequisites&quot;&gt;Prerequisites&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#demo&quot; id=&quot;markdown-toc-demo&quot;&gt;Demo&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#step-1-preparing-your-dataverse-environment&quot; id=&quot;markdown-toc-step-1-preparing-your-dataverse-environment&quot;&gt;Step 1: Preparing Your Dataverse Environment&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#step-2-setting-up-azure-ai-studio&quot; id=&quot;markdown-toc-step-2-setting-up-azure-ai-studio&quot;&gt;Step 2: Setting Up Azure AI Studio&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#step-3-create-the-copilot-in-copilot-studio&quot; id=&quot;markdown-toc-step-3-create-the-copilot-in-copilot-studio&quot;&gt;Step 3: Create the Copilot in Copilot Studio&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#step-4-enable-generative-selection-of-topics&quot; id=&quot;markdown-toc-step-4-enable-generative-selection-of-topics&quot;&gt;Step 4: Enable Generative selection of topics&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#step-5--create-topics&quot; id=&quot;markdown-toc-step-5--create-topics&quot;&gt;Step 5 : Create Topics&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#step-6-add-an-http-request-for-llama-model&quot; id=&quot;markdown-toc-step-6-add-an-http-request-for-llama-model&quot;&gt;Step 6: Add an HTTP Request for Llama Model&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#step-7-configure-the-http-request&quot; id=&quot;markdown-toc-step-7-configure-the-http-request&quot;&gt;Step 7: Configure the HTTP Request&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#step-8-add-header-properties&quot; id=&quot;markdown-toc-step-8-add-header-properties&quot;&gt;Step 8: Add Header Properties&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#step-9-add-the-body-to-the-request&quot; id=&quot;markdown-toc-step-9-add-the-body-to-the-request&quot;&gt;Step 9: Add the Body to the Request&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#step-10-display-the-generative-answer&quot; id=&quot;markdown-toc-step-10-display-the-generative-answer&quot;&gt;Step 10: Display the Generative Answer&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#step-11-test-the-copilot&quot; id=&quot;markdown-toc-step-11-test-the-copilot&quot;&gt;Step 11: Test the Copilot&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#conclusion&quot; id=&quot;markdown-toc-conclusion&quot;&gt;Conclusion&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;

&lt;p&gt;Integrating cutting-edge AI models, such as the Llama model, with robust platforms like Azure AI Studio and Microsoft Dataverse, offers a sophisticated yet easy to build solution for analyzing sales data. This powerful combination allows businesses to transform raw data into meaningful insights and respond promptly to user queries.&lt;/p&gt;

&lt;p&gt;In this blog, we will explore how to leverage the Llama model within Azure AI Studio, alongside Microsoft Copilot, to read and analyze sales data stored in Dataverse. We will guide you through setting up this integration to create a system that efficiently processes user questions and delivers insightful answers directly from your sales data.&lt;/p&gt;

&lt;h2 id=&quot;llama-model&quot;&gt;Llama Model&lt;/h2&gt;

&lt;p&gt;Llama (Large Language Model for AI) is a groundbreaking language model from Meta AI designed to understand and generate human-like text. It’s adept at processing natural language inputs and can provide contextually relevant responses. When integrated with Azure AI Studio, Llama becomes a formidable tool for interpreting and analysing data, allowing businesses to address user queries with precision and depth.&lt;/p&gt;

&lt;h2 id=&quot;understanding-the-use-case&quot;&gt;Understanding the Use Case&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Use Case Overview:&lt;/strong&gt; We aim to build a system that allows users to query their sales data stored in Dataverse using natural language. This system will utilize the Llama model to understand and process these queries and Microsoft Copilot to facilitate interactive conversations.&lt;/p&gt;

&lt;p&gt;The control flow is as follows :&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;User Queries:&lt;/strong&gt; User asks sales-related questions to the Copilot.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Data Retrieval:&lt;/strong&gt; Copilot fetches Q1 sales data from the Sales Information Table in Dataverse.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Llama Model Analysis:&lt;/strong&gt; Copilot sends the data to the Llama model in Azure AI Studio for analysis.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Generate Response:&lt;/strong&gt; Llama model analyzes the data and generates a contextual response.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Display Answer:&lt;/strong&gt; Copilot displays the generated response to the user.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;\images\13_CopilotLlama\0.gif&quot; alt=&quot;Q1 Sales Data&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;prerequisites&quot;&gt;Prerequisites&lt;/h2&gt;

&lt;p&gt;To successfully implement this solution, you will need:&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;Azure Subscription: Access to Azure AI for configuring the Llama model.&lt;/li&gt;
  &lt;li&gt;Copilot Studio: Access to copilot studio to build custom copilots.&lt;/li&gt;
  &lt;li&gt;Dataverse Environment: Structured and accessible sales data within Dataverse.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;demo&quot;&gt;Demo&lt;/h2&gt;

&lt;p&gt;Watch the demo video below to see how the Sales Analysis Copilot works.&lt;/p&gt;

&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/80jM-w5Jvd8?vq=hd1080&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;h2 id=&quot;step-1-preparing-your-dataverse-environment&quot;&gt;Step 1: Preparing Your Dataverse Environment&lt;/h2&gt;

&lt;p&gt;Start by ensuring your sales data is well-structured and available in Dataverse. We have created a table named “Q1 Sales Data” which contains the First quarter sales details for 4 companies .&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\13_CopilotLlama\1.png&quot; alt=&quot;Q1 Sales Data&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;step-2-setting-up-azure-ai-studio&quot;&gt;Step 2: Setting Up Azure AI Studio&lt;/h2&gt;

&lt;p&gt;Azure AI Studio will be used to develop, train, and manage the Llama model. So as to work with the AI studio, we need to first create an instance of AI Services which we can do by navigating to the Azure AI Services in the azure portal .&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;strong&gt;Click on&lt;/strong&gt; &lt;strong&gt;Create&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\13_CopilotLlama\2.png&quot; alt=&quot;Create AI Services&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Specify the Resource Group, Name  and other details for the AI Services instance . &lt;strong&gt;Click on&lt;/strong&gt; &lt;strong&gt;Review+Create&lt;/strong&gt; which will run the validation and create the AI Services instance for us.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\13_CopilotLlama\3.png&quot; alt=&quot;Review and Create&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Head over to the newly created Azure AI Services instance and &lt;strong&gt;click on&lt;/strong&gt; &lt;strong&gt;Goto Azure AI Studio&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\13_CopilotLlama\4.png&quot; alt=&quot;Goto Azure AI Studio&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Once we are in Azure AI Studio , we can create an AI Hub which will act as a top level container for all resources created in the AI Studio. &lt;strong&gt;Click on&lt;/strong&gt; &lt;strong&gt;New hub&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\13_CopilotLlama\4_1.png&quot; alt=&quot;New Hub&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Specify the details like Name, Subscription, Resource group, Location and the AI Service Instance name. &lt;strong&gt;Click on&lt;/strong&gt; &lt;strong&gt;Next&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\13_CopilotLlama\4_2.png&quot; alt=&quot;Hub Details&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;strong&gt;Click on&lt;/strong&gt; &lt;strong&gt;Create&lt;/strong&gt; to provision the AI Hub.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\13_CopilotLlama\4_3.png&quot; alt=&quot;Create Hub&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;We can see that the AI hub is created, Within the hub lets create a project as well so that we can compartmentalize different model deployments to different projects. &lt;strong&gt;Click on&lt;/strong&gt; &lt;strong&gt;New Project&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\13_CopilotLlama\4_4.png&quot; alt=&quot;New Project&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Let’s provide a Project Name and &lt;strong&gt;click on&lt;/strong&gt; &lt;strong&gt;Create a Project&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\13_CopilotLlama\4_5.png&quot; alt=&quot;Project Name&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Now that the AI Hub and Project is created , lets select the  Model catalog from the left pane. Azure AI Studio offers a diverse range of AI models tailored to meet various business needs and enhance data analysis capabilities.&lt;/p&gt;

    &lt;p&gt;For this demo, we will be deploying an instance of the Meta Llama 3 - 8 B model where 3 stands for the version number of the model and 8 B refers to the number of parameters in the model, which is 8 billion. Parameters are the components of the model that get adjusted during training to learn patterns from the data.
Let’s select this model.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\13_CopilotLlama\5.png&quot; alt=&quot;Select Model&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;&lt;strong&gt;Click on&lt;/strong&gt; &lt;strong&gt;Deploy&lt;/strong&gt; to create the instance of the selected Llama model.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\13_CopilotLlama\6.png&quot; alt=&quot;Deploy Model&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;We can choose to have Azure AI Content safety filters along with the model which would incur charges through Azure AI Content Safety services. However, this is optional.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\13_CopilotLlama\7.png&quot; alt=&quot;Content Safety&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Ensure that you have selected the recently created project , Select &lt;strong&gt;Subscribe and Deploy&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\13_CopilotLlama\8.png&quot; alt=&quot;Subscribe and Deploy&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Specify the Deployment name and &lt;strong&gt;click on&lt;/strong&gt; &lt;strong&gt;Deploy&lt;/strong&gt; to finalize the deployment of the model.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\13_CopilotLlama\9.png&quot; alt=&quot;Deployment Name&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;It would take some time for the model deployment to complete. Once done,
    &lt;ol&gt;
      &lt;li&gt;In the deployments left side pane, we can see that the Provisioning State is succeeded.&lt;/li&gt;
      &lt;li&gt;We will copy the Key value as it is needed for authentication from copilot&lt;/li&gt;
      &lt;li&gt;We will now &lt;strong&gt;click on&lt;/strong&gt; &lt;strong&gt;consume&lt;/strong&gt; tab so as to copy the REST endpoint for this model.&lt;/li&gt;
    &lt;/ol&gt;

    &lt;p&gt;&lt;img src=&quot;\images\13_CopilotLlama\11.png&quot; alt=&quot;Provisioning State&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;In the consume tab,
    &lt;ol&gt;
      &lt;li&gt;Copy the REST endpoint which we will use for invoking the model from the copilot.&lt;/li&gt;
      &lt;li&gt;There is also samples of how the input prompt for Llama model looks like which we can follow while creating the prompt in copilot.&lt;/li&gt;
    &lt;/ol&gt;

    &lt;p&gt;&lt;img src=&quot;\images\13_CopilotLlama\12.png&quot; alt=&quot;Consume Tab&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;step-3-create-the-copilot-in-copilot-studio&quot;&gt;Step 3: Create the Copilot in Copilot Studio&lt;/h2&gt;

&lt;ol&gt;
  &lt;li&gt;Head over to &lt;a href=&quot;https://copilotstudio.microsoft.com/&quot;&gt;Copilot Studio&lt;/a&gt; and
    &lt;ol&gt;
      &lt;li&gt;&lt;strong&gt;Click on&lt;/strong&gt; &lt;strong&gt;Create&lt;/strong&gt;.&lt;/li&gt;
      &lt;li&gt;This will provide us the option to create a copilot based on an existing template on create a blank copilot from scratch, Lets select &lt;strong&gt;New copilot&lt;/strong&gt;.&lt;/li&gt;
    &lt;/ol&gt;

    &lt;p&gt;&lt;img src=&quot;\images\13_CopilotLlama\13.png&quot; alt=&quot;Create Copilot&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;This will take us to the page where we can
    &lt;ol&gt;
      &lt;li&gt;Describe the copilot functionality and provide any specific instructions to the copilot.&lt;/li&gt;
      &lt;li&gt;Once done, &lt;strong&gt;click on&lt;/strong&gt; &lt;strong&gt;Create&lt;/strong&gt; to provision the copilot.&lt;/li&gt;
    &lt;/ol&gt;

    &lt;p&gt;&lt;img src=&quot;\images\13_CopilotLlama\14.png&quot; alt=&quot;Describe Copilot&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;step-4-enable-generative-selection-of-topics&quot;&gt;Step 4: Enable Generative selection of topics&lt;/h2&gt;

&lt;ol&gt;
  &lt;li&gt;The copilot is now created. We can then make the needed configuration changes
    &lt;ol&gt;
      &lt;li&gt;&lt;strong&gt;Click on&lt;/strong&gt; &lt;strong&gt;Edit&lt;/strong&gt;, edit the copilot details like name, icon and description.&lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;Click on&lt;/strong&gt; &lt;strong&gt;Settings&lt;/strong&gt; to enable the Generative selection of topics so that without relying on triggers, the topics will be auto selected based on user conversation resulting in a much smoother user experience.&lt;/li&gt;
    &lt;/ol&gt;

    &lt;p&gt;&lt;img src=&quot;\images\13_CopilotLlama\15.png&quot; alt=&quot;Enable Generative Selection&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;To enable the automatic detection of topics from user interaction:
    &lt;ol&gt;
      &lt;li&gt;&lt;strong&gt;Click on&lt;/strong&gt; &lt;strong&gt;Generative AI&lt;/strong&gt;.&lt;/li&gt;
      &lt;li&gt;Select &lt;strong&gt;Generative(preview)&lt;/strong&gt;.&lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;Click on&lt;/strong&gt; &lt;strong&gt;Save&lt;/strong&gt; to update the settings.&lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;Click on&lt;/strong&gt; Close icon to go back to the home page of this custom copilot.&lt;/li&gt;
    &lt;/ol&gt;

    &lt;p&gt;&lt;img src=&quot;\images\13_CopilotLlama\15_1.png&quot; alt=&quot;Generative AI Settings&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;step-5--create-topics&quot;&gt;Step 5 : Create Topics&lt;/h2&gt;

&lt;ol&gt;
  &lt;li&gt;Now let’s go ahead and create the topics that will automatically redirect the conversation flow to appropriate topics based on the question user posts.
    &lt;ul&gt;
      &lt;li&gt;&lt;strong&gt;Click on&lt;/strong&gt; &lt;strong&gt;Topics&lt;/strong&gt; from the navigation menu.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;To add the topic, we can either go with the option to create a blank topic or use Copilot to create the topic with initial set of prepopulated conversation nodes based on the topic description that we provide.
    &lt;ul&gt;
      &lt;li&gt;Let’s &lt;strong&gt;Click on&lt;/strong&gt; &lt;strong&gt;Add a Topic&lt;/strong&gt; and&lt;/li&gt;
      &lt;li&gt;Select &lt;strong&gt;Create from description with Copilot&lt;/strong&gt;.&lt;/li&gt;
    &lt;/ul&gt;

    &lt;p&gt;&lt;img src=&quot;\images\13_CopilotLlama\16.png&quot; alt=&quot;Add Topic&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Let’s provide the below topic description details in the pop up that opened when we clicked the Add topic button previously.
Then, &lt;strong&gt;Click on&lt;/strong&gt; &lt;strong&gt;Create&lt;/strong&gt;, which will provision the topic skeleton based on the provided description.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\13_CopilotLlama\17.png&quot; alt=&quot;Topic Description&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Thus, we have the basic topic created with an automatic trigger as well as a question to the user which are generated using the description provided.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\13_CopilotLlama\18.png&quot; alt=&quot;Topic Created&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;Now lets add the dataverse connector action which will fetch the Q1 Sales data information from the table.
    &lt;ol&gt;
      &lt;li&gt;Select &lt;strong&gt;Call an action&lt;/strong&gt;.&lt;/li&gt;
      &lt;li&gt;From the Connector tab, select &lt;strong&gt;List rows from selected environment&lt;/strong&gt;.&lt;/li&gt;
    &lt;/ol&gt;

    &lt;p&gt;&lt;img src=&quot;\images\13_CopilotLlama\19.png&quot; alt=&quot;List Rows&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Create the connection and &lt;strong&gt;Click on&lt;/strong&gt; &lt;strong&gt;Submit&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\13_CopilotLlama\20.png&quot; alt=&quot;Create Connection&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;We can now configure the Dataverse connection by
    &lt;ol&gt;
      &lt;li&gt;Selecting the Environment and Table.&lt;/li&gt;
      &lt;li&gt;Mention the logical name of the columns to be retrieved.&lt;/li&gt;
    &lt;/ol&gt;

    &lt;p&gt;&lt;img src=&quot;\images\13_CopilotLlama\21.png&quot; alt=&quot;Configure Dataverse&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;We can see that the output of the Dataverse connector action is a table, and we need to define a variable to hold the table data. For this we will
    &lt;ol&gt;
      &lt;li&gt;Select the right arrow against the value field and&lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;Click on&lt;/strong&gt; &lt;strong&gt;Create a new variable&lt;/strong&gt; and name it as &lt;em&gt;varSalesTable&lt;/em&gt;.&lt;/li&gt;
    &lt;/ol&gt;

    &lt;p&gt;&lt;img src=&quot;\images\13_CopilotLlama\22.png&quot; alt=&quot;Create Variable&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;The output of the Dataverse Table Connector(&lt;em&gt;varSalesTable&lt;/em&gt;) will contain lots of system columns as well . We will need to format the table to filter and ensure only the needed columns are present. 
To do this let’s initialize a variable(&lt;em&gt;varSalesDetails&lt;/em&gt;) to hold the new filtered output of the Dataverse connector.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\13_CopilotLlama\39.png&quot; alt=&quot;Initialize Variable&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;We will then add the below formula which will filter the output to create a subset of the table and store it in the variable. It does this by looping through the previous Dataverse connector output and fetching only the columns that we have mentioned in the expression.&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;ForAll(
    Topic.varSalesTable,
    {
        Month: ThisRecord.cr06f_month,
        Product: ThisRecord.cr06f_product,
        SalesAmount: ThisRecord.cr06f_salesamount
    }
    )
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
    &lt;p&gt;&lt;img src=&quot;\images\13_CopilotLlama\40.png&quot; alt=&quot;Filtered Output&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;If we were to test and output this variable(&lt;em&gt;varSalesDetails&lt;/em&gt;) value in the test pane, we will get the table output as :&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;[{“Month”:“January”,“Product”:“AeroFusion Blender”,“SalesAmount”:7500},
{“Month”:“January”,“Product”:“SolarX PowerPack”,“SalesAmount”:6200},
{“Month”:“January”,“Product”:“QuantumLight Glasses”,“SalesAmount”:5600}]
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
    &lt;p&gt;We will do one more formatting of this output to serialize this table into a string readable format as shown below &lt;strong&gt;&amp;lt; Month &amp;gt;: &amp;lt; Product &amp;gt;: &amp;lt; Sales Amount &amp;gt;&lt;/strong&gt; . The reason for doing this is because the LLM input should be a string and hence the table has to be serialized to the string format.&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;January:AeroFusion Blender:7500, 
January:SolarX PowerPack:6200, 
January:QuantumLight Glasses:5600, 
January:EcoWave Cleanser:4300, 
February:AeroFusion Blender:8100, 
February:SolarX PowerPack:5900, 
February:QuantumLight Glasses:6300,

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
    &lt;p&gt;To do this, lets add another variable(&lt;em&gt;varSerializedSalesData&lt;/em&gt;) and set its formula to&lt;/p&gt;

    &lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Concat(Topic.varSalesDetails, Month &amp;amp; &quot;:&quot; &amp;amp; Product &amp;amp; &quot;:&quot; &amp;amp; SalesAmount, &quot;, &quot;)

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
    &lt;p&gt;This way, from the previous filtered table, we will concat the Product and sales details in the readable string format which can be shared as an input to the Llama Prompt&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img src=&quot;\images\13_CopilotLlama\41.png&quot; alt=&quot;Filtered Output&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;step-6-add-an-http-request-for-llama-model&quot;&gt;Step 6: Add an HTTP Request for Llama Model&lt;/h2&gt;

&lt;p&gt;Now let’s add an HTTP Request so that we can call the Llama deployment endpoint in Azure AI Studio.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\13_CopilotLlama\29.png&quot; alt=&quot;HTTP Request&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;step-7-configure-the-http-request&quot;&gt;Step 7: Configure the HTTP Request&lt;/h2&gt;

&lt;ol&gt;
  &lt;li&gt;Paste the REST URL we copied from azure ai studio to the URL field.&lt;/li&gt;
  &lt;li&gt;Change the Method to POST.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Click on&lt;/strong&gt; &lt;strong&gt;Edit&lt;/strong&gt; to update the Header and Body.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img src=&quot;\images\13_CopilotLlama\30.png&quot; alt=&quot;Edit Request&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;step-8-add-header-properties&quot;&gt;Step 8: Add Header Properties&lt;/h2&gt;

&lt;ol&gt;
  &lt;li&gt;This will open up the HTTP Request Properties pane where :
    &lt;ol&gt;
      &lt;li&gt;We will &lt;strong&gt;click on&lt;/strong&gt; &lt;strong&gt;Add&lt;/strong&gt; so that it adds a Key Value Pair field section&lt;/li&gt;
      &lt;li&gt;Add the &lt;strong&gt;Authorization&lt;/strong&gt; text to the Key and &lt;strong&gt;Bearer {Key copied from Azure AI Studio}&lt;/strong&gt; to the value field&lt;/li&gt;
    &lt;/ol&gt;

    &lt;p&gt;&lt;img src=&quot;\images\13_CopilotLlama\31.png&quot; alt=&quot;Add Authorization&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;We have to add one more header property
    &lt;ol&gt;
      &lt;li&gt;&lt;strong&gt;Click on&lt;/strong&gt; &lt;strong&gt;Add&lt;/strong&gt; once again so that we can add the next Key Value Pair&lt;/li&gt;
      &lt;li&gt;Add the &lt;strong&gt;Content-Type&lt;/strong&gt; text to the Key and &lt;strong&gt;application/json&lt;/strong&gt; to the value field&lt;/li&gt;
    &lt;/ol&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;img src=&quot;\images\13_CopilotLlama\32.png&quot; alt=&quot;Add Content-Type&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;step-9-add-the-body-to-the-request&quot;&gt;Step 9: Add the Body to the Request&lt;/h2&gt;

&lt;ol&gt;
  &lt;li&gt;Now we have to add the Body which is the Llama prompt to the Request for which we will
    &lt;ol&gt;
      &lt;li&gt;&lt;strong&gt;Click on&lt;/strong&gt; the Body field and&lt;/li&gt;
      &lt;li&gt;Select &lt;strong&gt;JSON Content&lt;/strong&gt;.&lt;/li&gt;
    &lt;/ol&gt;

    &lt;p&gt;&lt;img src=&quot;\images\13_CopilotLlama\32_2.png&quot; alt=&quot;Body Content&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;This will open up the JSON/Formula box just below the body field. If we were sending a static text as body, we could have selected JSON. But since, we need to dynamically pass the user query as well into the prompt,we will select Formula.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\13_CopilotLlama\33.png&quot; alt=&quot;Formula&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;We can now add the prompt by concatenating the User query along with the Dataverse table sales data and passing it to the content attribute of the prompt. The role attribute indicates that  this message is an input from the user. 
Thus we have created the prompt as expected by Llama. Now lets head back to the copilot designer and define the response data type.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\13_CopilotLlama\34.png&quot; alt=&quot;Configure Prompt&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;We will now configure the response data type field by :
    &lt;ol&gt;
      &lt;li&gt;&lt;strong&gt;Clicking the&lt;/strong&gt; right arrow and&lt;/li&gt;
      &lt;li&gt;Select &lt;strong&gt;From sample data&lt;/strong&gt;.&lt;/li&gt;
    &lt;/ol&gt;

    &lt;p&gt;&lt;img src=&quot;\images\13_CopilotLlama\35.png&quot; alt=&quot;Response Data Type&quot; /&gt;&lt;/p&gt;

    &lt;p&gt;In general the output of Llama 3 would look like below:&lt;/p&gt;

    &lt;div class=&quot;language-json highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;w&quot;&gt;     &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
         &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;choices&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
             &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
                 &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;finish_reason&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;stop&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
                 &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;index&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
                 &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;logprobs&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kc&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
                 &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;message&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
                     &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;content&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Output Text&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
                     &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;role&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;assistant&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
                     &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;tool_calls&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;kc&quot;&gt;null&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
                 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
                 &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;stop_reason&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;128009&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
             &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
         &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
         &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;created&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;1718285835&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
         &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;id&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;cmpl-7443f01686d24a52924850b34655bf22&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
         &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;model&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Meta-Llama-3-8B-Instruct&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
         &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;object&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;chat.completion&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
         &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;usage&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
             &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;completion_tokens&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;108&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
             &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;prompt_tokens&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;51&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
             &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;total_tokens&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;159&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
         &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
     &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Lets add this sample output data by clicking on&lt;/strong&gt; &lt;strong&gt;Getting schema from sample JSON&lt;/strong&gt;.
    &lt;ol&gt;
      &lt;li&gt;&lt;strong&gt;Paste&lt;/strong&gt; the above JSON Output content and&lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;Click on&lt;/strong&gt; &lt;strong&gt;Confirm&lt;/strong&gt;.&lt;/li&gt;
      &lt;li&gt;We will add a variable named &lt;em&gt;varLlamaOutput&lt;/em&gt; to hold the returned output value which is of record datatype.&lt;/li&gt;
    &lt;/ol&gt;

    &lt;p&gt;&lt;img src=&quot;\images\13_CopilotLlama\36.png&quot; alt=&quot;Response Data Type&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;step-10-display-the-generative-answer&quot;&gt;Step 10: Display the Generative Answer&lt;/h2&gt;

&lt;p&gt;Finally lets show the generative answer result from the Llama model as a basic card. As we can see in the output schema, the generative answer will be present in the content key value pair which is nested within the choice and message parent . We will get this output using the Power Fx formula:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;	First(Topic.varLlamaOutput.choices).message.content
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;img src=&quot;\images\13_CopilotLlama\37.png&quot; alt=&quot;Response Data Type&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Thus we have completed the creation of the copilot which will invoke Llama model to helps us derive meaningful insights from the Q1 Sales Data present in the dataverse table.&lt;/p&gt;

&lt;h2 id=&quot;step-11-test-the-copilot&quot;&gt;Step 11: Test the Copilot&lt;/h2&gt;

&lt;p&gt;Lets test the copilot by initiating the conversation. We will ask few sales related questions to the copilot.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\13_CopilotLlama\38.png&quot; alt=&quot;Test Copilot&quot; /&gt;&lt;/p&gt;

&lt;p&gt;We will also try to ask a bit more complex question which involves calculating the cumulative sales across different records and we can see that Llama has intelligently provided us back with the contextual response.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\13_CopilotLlama\39_1.png&quot; alt=&quot;Complex Question&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;By following these steps, you can successfully leverage the Llama model within Azure AI Studio and Microsoft Dataverse to create a system that efficiently processes user questions and delivers insightful answers from your sales data. This integration not only enhances data analysis capabilities but also provides a seamless and interactive user experience through Microsoft Copilot. With the power of AI, businesses can now make informed decisions based on real-time data insights, driving growth and innovation.&lt;/p&gt;
</description>
                <pubDate>Tue, 19 Aug 2025 17:31:35 +0530</pubDate>
                <link>https://www.fusiondevblogs.com/Copilot-Llama/</link>
                <guid isPermaLink="true">https://www.fusiondevblogs.com/Copilot-Llama/</guid>
                
                <category>copilot</category>
                
                
            </item>
        
            <item>
                <title>Creating a Meal and Fitness Advisor Using Google Gemini API and Copilot</title>
                <description>&lt;h2 class=&quot;no_toc&quot; id=&quot;table-of-contents&quot;&gt;Table of Contents&lt;/h2&gt;

&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#introduction&quot; id=&quot;markdown-toc-introduction&quot;&gt;Introduction&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#user-interaction-process-flow&quot; id=&quot;markdown-toc-user-interaction-process-flow&quot;&gt;User Interaction Process Flow&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#technologies-involved&quot; id=&quot;markdown-toc-technologies-involved&quot;&gt;Technologies Involved&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#prerequisites&quot; id=&quot;markdown-toc-prerequisites&quot;&gt;Prerequisites&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#demo&quot; id=&quot;markdown-toc-demo&quot;&gt;Demo&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#step-1-get-the-gemini-api-key&quot; id=&quot;markdown-toc-step-1-get-the-gemini-api-key&quot;&gt;Step 1: Get the Gemini API Key&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#step-2-create-a-custom-connector-in-power-automate&quot; id=&quot;markdown-toc-step-2-create-a-custom-connector-in-power-automate&quot;&gt;Step 2: Create a Custom Connector in Power Automate&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#testing-the-connector&quot; id=&quot;markdown-toc-testing-the-connector&quot;&gt;Testing the Connector&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#step-3-create-copilot&quot; id=&quot;markdown-toc-step-3-create-copilot&quot;&gt;Step 3: Create Copilot&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#step-4-enable-generative-selection-of-topics&quot; id=&quot;markdown-toc-step-4-enable-generative-selection-of-topics&quot;&gt;Step 4: Enable Generative Selection of Topics&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#step-5-create-topics&quot; id=&quot;markdown-toc-step-5-create-topics&quot;&gt;Step 5: Create Topics&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#step-6-create-the-prompt-and-assign-it-to-the-variable&quot; id=&quot;markdown-toc-step-6-create-the-prompt-and-assign-it-to-the-variable&quot;&gt;Step 6: Create the Prompt and Assign it to the Variable&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#step-7-add-the-google-gemini-custom-connector-as-an-action&quot; id=&quot;markdown-toc-step-7-add-the-google-gemini-custom-connector-as-an-action&quot;&gt;Step 7: Add the Google Gemini Custom Connector as an Action&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#test-the-copilot&quot; id=&quot;markdown-toc-test-the-copilot&quot;&gt;Test the Copilot&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#conclusion&quot; id=&quot;markdown-toc-conclusion&quot;&gt;Conclusion&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;In this blog, we will explore how to create a custom connector for the Google Gemini API in Microsoft Power Platform and use it within Copilot to build a dynamic Meal and Fitness Advisor. This process leverages advanced AI capabilities to generate personalized recommendations based on user inputs such as meal preferences and fitness goals.&lt;/p&gt;

&lt;p&gt;The user can ask personalized Meal and Fitness plan and the Copilot will use Google Gemini API connector to provide back the contextual plan back to the user.&lt;/p&gt;

&lt;h2 id=&quot;user-interaction-process-flow&quot;&gt;User Interaction Process Flow&lt;/h2&gt;

&lt;p&gt;The overall process flow will be as follows :&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;User Query&lt;/strong&gt;: User asks the Copilot for a personalized meal and fitness plan.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Query Formatting&lt;/strong&gt;: Copilot formats the user’s query and sends it to the Google Gemini Custom Connector.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Response Generation&lt;/strong&gt;: Google Gemini API generates a contextual meal and fitness plan based on the user’s inputs.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Response Handling&lt;/strong&gt;: The response is sent back to the Copilot.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;User Interaction&lt;/strong&gt;: User views the personalized meal and fitness plan and continues the conversation.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;img src=&quot;\images\12_CopilotGemini\0_0.gif&quot; alt=&quot;Get the Gemini API Key&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;technologies-involved&quot;&gt;Technologies Involved&lt;/h2&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Google Gemini API&lt;/strong&gt;: Used for generating personalized content based on user inputs.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Microsoft Power Automate&lt;/strong&gt;: To create a custom connector that interacts with the Google Gemini API.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Copilot Studio&lt;/strong&gt;: To create and manage the Copilot bot.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Microsoft Teams&lt;/strong&gt;: The platform where the Copilot will be deployed and used.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We will follow these steps to achieve our goal:&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;Obtain the API key from Google AI Studio.&lt;/li&gt;
  &lt;li&gt;Create a custom connector to interact with the Google Gemini API.&lt;/li&gt;
  &lt;li&gt;Develop a Copilot in Copilot Studio that utilizes this custom connector to get the personalized Meal and Fitness Plan.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;prerequisites&quot;&gt;Prerequisites&lt;/h2&gt;
&lt;ol&gt;
  &lt;li&gt;Access to the Google Gemini API and API keys.&lt;/li&gt;
  &lt;li&gt;Access to Microsoft Power Automate and Copilot Studio.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;demo&quot;&gt;Demo&lt;/h2&gt;

&lt;p&gt;Watch the demo video below to see how the Meal and Fitness Plan Advisor Copilot works.&lt;/p&gt;

&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/UfM7ooLRb5M?vq=hd1080&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;h2 id=&quot;step-1-get-the-gemini-api-key&quot;&gt;Step 1: Get the Gemini API Key&lt;/h2&gt;
&lt;p&gt;Head over to the Google AI Studio and get your API key by clicking on &lt;strong&gt;Create API Key&lt;/strong&gt;, which can be used to authenticate the Google Gemini API.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\12_CopilotGemini\1.png&quot; alt=&quot;Get the Gemini API Key&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;step-2-create-a-custom-connector-in-power-automate&quot;&gt;Step 2: Create a Custom Connector in Power Automate&lt;/h2&gt;
&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;Head over to Power Automate and from the &lt;strong&gt;Discover&lt;/strong&gt; menu, select &lt;strong&gt;Custom Connectors&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\12_CopilotGemini\2.png&quot; alt=&quot;Custom Connectors&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Click on &lt;strong&gt;New custom connector&lt;/strong&gt; and select &lt;strong&gt;Create from blank&lt;/strong&gt; to provision a connector from scratch.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\12_CopilotGemini\3.png&quot; alt=&quot;Create from blank&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Mention the API connector name as &lt;strong&gt;Google Gemini Generate Content&lt;/strong&gt; in the pop-up and click on &lt;strong&gt;Next&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\12_CopilotGemini\4.png&quot; alt=&quot;API Connector Name&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;This will open the editor where we can toggle the swagger editor and paste the below swagger file content that we have defined for the Text Generation endpoint.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\12_CopilotGemini\5.png&quot; alt=&quot;Swagger Editor&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;swagger: &apos;2.0&apos;
info:
  title: Google Gemini
  description: &amp;gt;-
    Custom connector for Google Gemini, providing advanced AI multi modal
    content generation functionalities.Gemini is a family of multimodal large
    language models developed by Google DeepMind, serving as the successor to
    LaMDA and PaLM 2. Comprising Gemini Ultra, Gemini Pro, and Gemini Nano, it
    was announced on December 6, 2023
  version: &apos;1.0&apos;
  contact:
    name: Fusion Dev Consulting
x-ms-connector-metadata:
  - propertyName: Website
    propertyValue: https://ai.google.dev/
  - propertyName: Privacy policy
    propertyValue: https://policies.google.com/privacy
  - propertyName: Categories
    propertyValue: AI
host: generativelanguage.googleapis.com
basePath: /
schemes:
  - https
produces:
  - application/json
consumes:
  - application/json
securityDefinitions:
  API Key:
    type: apiKey
    in: query
    name: key
security:
  - API Key: []
paths:
  /{apiVersion}/models/{modelName}:generateContent:
    post:
      summary: Generate text content
      description: Generates a text response from the model given an input message.
      operationId: GenerateTextContent
      parameters:
        - in: path
          name: apiVersion
          x-ms-summary: API Version
          x-ms-url-encoding: single
          required: true
          type: string
          default: v1beta
          description: API version to use for the endpoint. Eg- v1beta
        - in: path
          name: modelName
          x-ms-summary: Model Name
          x-ms-url-encoding: single
          required: true
          type: string
          default: gemini-pro
          description: Name of the model to be used for text generation. Eg - gemini-pro
        - in: body
          name: body
          required: true
          schema:
            type: object
            properties:
              contents:
                type: array
                x-ms-summary: Contents
                description: Contents for generating the text response.
                items:
                  type: object
                  required:
                    - parts
                  properties:
                    role:
                      type: string
                      x-ms-summary: Role
                      default: user
                      description: &amp;gt;
                        Optional. The producer of the content. Must be either
                        &apos;user&apos; or &apos;model&apos;
                    parts:
                      type: array
                      x-ms-summary: Parts
                      description: Parts of the content for text generation.
                      items:
                        type: object
                        required:
                          - text
                        properties:
                          text:
                            type: string
                            x-ms-summary: Text
                            description: Required.Text for generating the response.
              safetySettings:
                type: array
                x-ms-summary: Safety Settings
                description: Optional.Safety settings for text content generation.
                items:
                  type: object
                  properties:
                    category:
                      type: string
                      x-ms-summary: Category
                      description: Optional.The category of content to be filtered.
                    threshold:
                      type: string
                      x-ms-summary: Threshold
                      description: &amp;gt;-
                        Optional.The threshold for filtering content in the
                        specified category.
              generationConfig:
                type: object
                properties:
                  maxOutputTokens:
                    type: integer
                    x-ms-summary: Max Output Tokens
                    description: &amp;gt;-
                      Optional.The maximum number of tokens to include in a text
                      candidate.
                  temperature:
                    type: number
                    x-ms-summary: Temperature
                    description: Optional.Controls the randomness of the text output.
                  topP:
                    type: number
                    x-ms-summary: Top P
                    description: &amp;gt;-
                      Optional.The maximum cumulative probability of tokens to
                      consider when sampling.
                  topK:
                    type: integer
                    x-ms-summary: Top K
                    description: &amp;gt;-
                      Optional.The maximum number of tokens to consider when
                      sampling.
                  candidateCount:
                    type: integer
                    x-ms-summary: Candidate Count
                    description: Optional. Number of candidate responses to generate.
                  stopSequences:
                    type: array
                    x-ms-summary: Stop Sequences
                    description: &amp;gt;-
                      Optional.The set of character sequences that will stop
                      text output generation.
                    items:
                      type: string
                      description: &amp;gt;-
                        Optional.The set of character sequences that will stop
                        text output generation.
      responses:
        &apos;200&apos;:
          description: Successful text response
          schema:
            type: object
            properties:
              text:
                type: string
                description: The generated text response.
              candidates:
                type: array
                items:
                  type: object
                  properties:
                    content:
                      type: object
                      properties:
                        parts:
                          type: array
                          items:
                            type: object
                            properties:
                              text:
                                type: string
                    finishReason:
                      type: string
                    index:
                      type: integer
                    safetyRatings:
                      type: array
                      items:
                        type: object
                        properties:
                          category:
                            type: string
                          probability:
                            type: string
              promptFeedback:
                type: object
                properties:
                  safetyRatings:
                    type: array
                    items:
                      type: object
                      properties:
                        category:
                          type: string
                        probability:
                          type: string


&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;h2 id=&quot;testing-the-connector&quot;&gt;Testing the Connector&lt;/h2&gt;
&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;We can use the in-built test functionality to ensure that your connector works correctly. To do this, click on &lt;strong&gt;Authorize&lt;/strong&gt; and paste the Google API Key which we copied from the Google AI Studio into the field and click on &lt;strong&gt;Authorize&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\12_CopilotGemini\6.png&quot; alt=&quot;Authorize&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;Click on &lt;strong&gt;Try it out&lt;/strong&gt; and paste the below text in the body. Here we are passing the query to find the capital of the United States in the body.
    &lt;div class=&quot;language-json highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;contents&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
     &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
       &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;role&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;user&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
       &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;parts&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
         &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
           &lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;text&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;w&quot;&gt; &lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Capital of United States&quot;&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
         &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
       &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
     &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
   &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
 &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;

    &lt;p&gt;&lt;img src=&quot;\images\12_CopilotGemini\7.png&quot; alt=&quot;Try it out&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Click on &lt;strong&gt;Execute&lt;/strong&gt; to invoke the API and get back the contextual response from Google Gemini.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\12_CopilotGemini\7_1.png&quot; alt=&quot;Execute&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;As we go down the editor, we can see that it has successfully fetched back the capital of the United States.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\12_CopilotGemini\8.png&quot; alt=&quot;Response&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Now that we have created the connector using the swagger definition, let’s click on &lt;strong&gt;Create Connector&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\12_CopilotGemini\9.png&quot; alt=&quot;Create Connector&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;The Google Gemini Generate Content Connector is now available for use within the Power Platform.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\12_CopilotGemini\10.png&quot; alt=&quot;Connector Available&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;step-3-create-copilot&quot;&gt;Step 3: Create Copilot&lt;/h2&gt;
&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;Head over to &lt;a href=&quot;https://copilotstudio.microsoft.com/&quot;&gt;Copilot Studio&lt;/a&gt; and click on &lt;strong&gt;Create&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\12_CopilotGemini\1_3.png&quot; alt=&quot;Create Copilot&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;This will provide us the option to create a copilot based on an existing template or create a blank copilot from scratch. Let’s select &lt;strong&gt;New copilot&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\12_CopilotGemini\1_4.png&quot; alt=&quot;New Copilot&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;This will take us to the page where we can:&lt;/p&gt;
    &lt;ol&gt;
      &lt;li&gt;Describe the copilot functionality and provide any specific instructions to the copilot.&lt;/li&gt;
      &lt;li&gt;Once done, click on &lt;strong&gt;Create&lt;/strong&gt; to provision the copilot.&lt;/li&gt;
    &lt;/ol&gt;

    &lt;p&gt;&lt;img src=&quot;\images\12_CopilotGemini\11.png&quot; alt=&quot;Describe Copilot&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;step-4-enable-generative-selection-of-topics&quot;&gt;Step 4: Enable Generative Selection of Topics&lt;/h2&gt;
&lt;ol&gt;
  &lt;li&gt;The copilot is now created. We can then make the needed configuration changes:
    &lt;ol&gt;
      &lt;li&gt;Click on &lt;strong&gt;Edit&lt;/strong&gt;, edit the copilot details like name, icon, and description.&lt;/li&gt;
      &lt;li&gt;Click on &lt;strong&gt;Settings&lt;/strong&gt; to enable the Generative selection of topics so that without relying on triggers, the topics will be auto-selected based on user conversation resulting in a much smoother user experience.&lt;/li&gt;
    &lt;/ol&gt;

    &lt;p&gt;&lt;img src=&quot;\images\12_CopilotGemini\12.png&quot; alt=&quot;Edit Copilot&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;To enable the automatic detection of topics from user interaction:
    &lt;ol&gt;
      &lt;li&gt;Click on &lt;strong&gt;Generative AI&lt;/strong&gt;.&lt;/li&gt;
      &lt;li&gt;Select &lt;strong&gt;Generative (preview)&lt;/strong&gt;.&lt;/li&gt;
      &lt;li&gt;Click on &lt;strong&gt;Save&lt;/strong&gt; to update the settings.&lt;/li&gt;
      &lt;li&gt;Click on the &lt;strong&gt;Close&lt;/strong&gt; icon to go back to the home page of this custom copilot.&lt;/li&gt;
    &lt;/ol&gt;

    &lt;p&gt;&lt;img src=&quot;\images\12_CopilotGemini\12_1.png&quot; alt=&quot;Generative AI&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;step-5-create-topics&quot;&gt;Step 5: Create Topics&lt;/h2&gt;
&lt;ol&gt;
  &lt;li&gt;Now let’s go ahead and create the topics that will automatically redirect the conversation flow to appropriate topics based on the question the user posts.
    &lt;ol&gt;
      &lt;li&gt;Click on &lt;strong&gt;Topics&lt;/strong&gt; from the navigation menu.&lt;/li&gt;
    &lt;/ol&gt;

    &lt;p&gt;&lt;img src=&quot;\images\12_CopilotGemini\13.png&quot; alt=&quot;Topics&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;To add the topic, we can either go with the option to create a blank topic or use Copilot to create the topic with an initial set of prepopulated conversation nodes based on the topic description that we provide.
    &lt;ol&gt;
      &lt;li&gt;Click on &lt;strong&gt;Add a Topic&lt;/strong&gt; and&lt;/li&gt;
      &lt;li&gt;Select &lt;strong&gt;Create from description with Copilot&lt;/strong&gt;.&lt;/li&gt;
    &lt;/ol&gt;

    &lt;p&gt;&lt;img src=&quot;\images\12_CopilotGemini\14.png&quot; alt=&quot;Add Topic&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Let’s provide the below topic description details in the pop-up that opened when we clicked the &lt;strong&gt;Add topic&lt;/strong&gt; button previously. Then, click on &lt;strong&gt;Create&lt;/strong&gt;, which will provision the topic skeleton based on the provided description.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\12_CopilotGemini\15.png&quot; alt=&quot;Topic Description&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Thus, we have the basic topic created with an automatic trigger as well as a few questions to the user which are generated using the description provided.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\12_CopilotGemini\16.png&quot; alt=&quot;Topic Created&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;In addition to the meal preference, the questions around fitness goals and morbidities are also generated automatically, and responses are stored in respective variables which we will use down the line to pass to Google Gemini.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;step-6-create-the-prompt-and-assign-it-to-the-variable&quot;&gt;Step 6: Create the Prompt and Assign it to the Variable&lt;/h2&gt;
&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;Let’s create the prompt and assign it to the variable. For this, we will select &lt;strong&gt;Variable management&lt;/strong&gt; -&amp;gt; &lt;strong&gt;Set a variable value&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\12_CopilotGemini\17.png&quot; alt=&quot;Variable Management&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;We will create a new variable and name it as &lt;strong&gt;varPrompt&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\12_CopilotGemini\18.png&quot; alt=&quot;New Variable&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;We will be creating a table-structured prompt to send it to the Google Gemini Custom Connector. In the &lt;strong&gt;To value&lt;/strong&gt; field, use the below concatenate formula to create a prompt which will contain the meal preference, fitness goals, and morbidities information.
    &lt;div class=&quot;language-markdown highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt; Table({role: &quot;user&quot;, parts: [{text: Concatenate(&quot;Act as a Personalized Meal Advisor and Fitness Coach for a personal with the below morbidities: &quot;, Topic.ExistingMorbidities, &quot;The Meal Preferences are: &quot;, Topic.MealPreference, &quot;. Fitness Goals are: &quot;, Topic.FitnessGoals)}]})
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;    &lt;/div&gt;

    &lt;p&gt;The table structure described in the prompt is used to format the input data for the Google Gemini API’s text generation endpoint.&lt;/p&gt;
    &lt;ul&gt;
      &lt;li&gt;&lt;strong&gt;Role&lt;/strong&gt;: This specifies who is providing the input. In this context, the role is set to “user,” indicating that the input is coming from the user of the system. This helps the AI model understand the perspective or the context from which the content is generated.&lt;/li&gt;
      &lt;li&gt;&lt;strong&gt;Parts&lt;/strong&gt;: This is an array containing the actual content to be processed by the AI model. Parts will contain the actual prompt that describes the context and what is expected as a response from the model.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Once the formula is added to the box, click on &lt;strong&gt;Insert&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\12_CopilotGemini\19.png&quot; alt=&quot;Insert Formula&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;step-7-add-the-google-gemini-custom-connector-as-an-action&quot;&gt;Step 7: Add the Google Gemini Custom Connector as an Action&lt;/h2&gt;
&lt;ol&gt;
  &lt;li&gt;
    &lt;p&gt;Now that the prompt is ready, let’s add the Google Gemini custom connector as an action.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\12_CopilotGemini\20.png&quot; alt=&quot;Add Action&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;As we add the connector, it will ask to create a connection. Click on &lt;strong&gt;Create&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\12_CopilotGemini\21.png&quot; alt=&quot;Create Connection&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Add the connection name and paste the Google API Key copied from Google AI Studio. Click on &lt;strong&gt;Create&lt;/strong&gt; and then &lt;strong&gt;Submit&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\12_CopilotGemini\22.png&quot; alt=&quot;Connection Details&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;Let’s configure the Google Gemini custom connector with the needed input values.
    &lt;ul&gt;
      &lt;li&gt;Specify the API Version as &lt;strong&gt;v1beta&lt;/strong&gt;.&lt;/li&gt;
      &lt;li&gt;Mention the model name as &lt;strong&gt;gemini-pro&lt;/strong&gt;.&lt;/li&gt;
      &lt;li&gt;For the Contents field, select the &lt;strong&gt;varPrompt&lt;/strong&gt; variable that we had created earlier.&lt;/li&gt;
    &lt;/ul&gt;

    &lt;p&gt;&lt;img src=&quot;\images\12_CopilotGemini\23.png&quot; alt=&quot;Configure Connector&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;We can see that the generative output of the connector is stored in the variable &lt;strong&gt;text&lt;/strong&gt;.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\12_CopilotGemini\24.png&quot; alt=&quot;Generative Output&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
  &lt;li&gt;
    &lt;p&gt;Now let’s add a basic card and show the text output back to the user.&lt;/p&gt;

    &lt;p&gt;&lt;img src=&quot;\images\12_CopilotGemini\25.png&quot; alt=&quot;Basic Card&quot; /&gt;&lt;/p&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;test-the-copilot&quot;&gt;Test the Copilot&lt;/h2&gt;
&lt;p&gt;We have published the bot and will distribute it to Microsoft Teams by submitting it to the admin for approval.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\12_CopilotGemini\27.png&quot; alt=&quot;Submit for Approval&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Admins can now publish this to the organization from the Teams admin center.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\12_CopilotGemini\28.png&quot; alt=&quot;Publish to Teams&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The Meal and Fitness Coach has now become available in the Teams app store which we can start using.We have provided the basic information and preferences around the meal and fitness plan that we are looking at.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\12_CopilotGemini\35.png&quot; alt=&quot;Publish to Teams&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Google Gemini API is invoked through the custom connector, and we can see the detailed meal and fitness plan provided by the copilot.
&lt;img src=&quot;\images\12_CopilotGemini\36.png&quot; alt=&quot;Publish to Teams&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;In this blog, we explored how to create a custom connector for Google Gemini in Microsoft Power Platform and use it within Copilot to build a dynamic Meal and Fitness Advisor. By integrating advanced AI capabilities through this custom connector, we can generate personalized recommendations based on user inputs, such as meal preferences and fitness goals.&lt;/p&gt;
</description>
                <pubDate>Fri, 15 Aug 2025 17:31:35 +0530</pubDate>
                <link>https://www.fusiondevblogs.com/Copilot-Google-Gemini/</link>
                <guid isPermaLink="true">https://www.fusiondevblogs.com/Copilot-Google-Gemini/</guid>
                
                <category>copilot</category>
                
                
            </item>
        
            <item>
                <title>Power Apps FAQ Copilot built using Azure AI Search and Azure Open AI</title>
                <description>&lt;h2 class=&quot;no_toc&quot; id=&quot;table-of-contents&quot;&gt;Table of Contents&lt;/h2&gt;

&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#introduction&quot; id=&quot;markdown-toc-introduction&quot;&gt;Introduction&lt;/a&gt;    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;#process-flow-explanation&quot; id=&quot;markdown-toc-process-flow-explanation&quot;&gt;Process Flow Explanation&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#demo&quot; id=&quot;markdown-toc-demo&quot;&gt;Demo&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#prerequisites&quot; id=&quot;markdown-toc-prerequisites&quot;&gt;Prerequisites&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#step-by-step-implementation&quot; id=&quot;markdown-toc-step-by-step-implementation&quot;&gt;Step-by-Step Implementation&lt;/a&gt;    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;#step-1-download-the-power-apps-documentation&quot; id=&quot;markdown-toc-step-1-download-the-power-apps-documentation&quot;&gt;Step 1: Download the Power Apps Documentation&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#step-2-create-an-azure-ai-search-instance&quot; id=&quot;markdown-toc-step-2-create-an-azure-ai-search-instance&quot;&gt;Step 2: Create an Azure AI Search Instance&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#step-3-add-blob-storage-and-create-an-indexer&quot; id=&quot;markdown-toc-step-3-add-blob-storage-and-create-an-indexer&quot;&gt;Step 3: Add Blob Storage and Create an Indexer&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#step-4-create-azure-openai-instance&quot; id=&quot;markdown-toc-step-4-create-azure-openai-instance&quot;&gt;Step 4: Create Azure OpenAI Instance&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#step-5-integrate-copilot-with-azure-openai-instance&quot; id=&quot;markdown-toc-step-5-integrate-copilot-with-azure-openai-instance&quot;&gt;Step 5: Integrate Copilot with Azure OpenAI Instance&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#step-6-publish-the-bot&quot; id=&quot;markdown-toc-step-6-publish-the-bot&quot;&gt;Step 6: Publish the Bot&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#alternate-approach--power-apps-documentation-as-local-datasource&quot; id=&quot;markdown-toc-alternate-approach--power-apps-documentation-as-local-datasource&quot;&gt;Alternate Approach : Power Apps Documentation as Local Datasource&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#high-level-data-source-comparison--azure-ai-search-vs-sharepoint-vs-local-file&quot; id=&quot;markdown-toc-high-level-data-source-comparison--azure-ai-search-vs-sharepoint-vs-local-file&quot;&gt;High Level Data Source Comparison : Azure AI Search vs SharePoint Vs Local File&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#conclusion&quot; id=&quot;markdown-toc-conclusion&quot;&gt;Conclusion&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;
&lt;p&gt;Connecting data through Azure OpenAI Service within Microsoft Copilot Studio enables your Copilots to utilize Azure resources effectively via the Generative Answers node. Leveraging the robust capabilities of Azure AI Search and Azure OpenAI, these copilots can deliver responses that are both contextually relevant and compliant with your organization’s guidelines.
In this blog we will see how to create a Power Apps FAQ copilot utilizing the official Microsoft PowerApps documentation PDF and leveraging the Azure AI Search and Azure Open AI.&lt;/p&gt;

&lt;h3 id=&quot;process-flow-explanation&quot;&gt;Process Flow Explanation&lt;/h3&gt;

&lt;p&gt;The overall process flow that we will see in this explanation is as follows :&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;Power Apps Documentation&lt;/strong&gt; : &lt;strong&gt;PDF&lt;/strong&gt; is uploaded to &lt;strong&gt;Azure Storage account&lt;/strong&gt;&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Index the Document&lt;/strong&gt; : &lt;strong&gt;Azure AI Search&lt;/strong&gt; indexes the document for easy retrieval&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;User Interaction&lt;/strong&gt;: A &lt;strong&gt;user&lt;/strong&gt; initiates a &lt;strong&gt;query&lt;/strong&gt; related to Power Apps via the Copilot interface.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Copilot Processing&lt;/strong&gt;: The Copilot captures the user’s query and passes it as a &lt;strong&gt;prompt&lt;/strong&gt; to the &lt;strong&gt;Azure OpenAI&lt;/strong&gt;, which is configured as a datasource.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Grounding&lt;/strong&gt; :  &lt;strong&gt;Azure OpenAI&lt;/strong&gt; processes the query using its generative capabilities, accessing the &lt;strong&gt;indexed Power Apps documentation&lt;/strong&gt; stored in Azure AI Search.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;User Display&lt;/strong&gt;: The &lt;strong&gt;Copilot&lt;/strong&gt; displays the &lt;strong&gt;contextual response to the user&lt;/strong&gt;, providing accurate and detailed answers to their Power Apps-related queries.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This integration allows users to get precise answers to their queries by leveraging the power of Azure’s AI services, making it a valuable tool for enhancing productivity and knowledge access.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\11_CopilotOpenAI\0_0.gif&quot; alt=&quot;Download Power Apps Documentation&quot; /&gt;&lt;/p&gt;

&lt;h2 id=&quot;demo&quot;&gt;Demo&lt;/h2&gt;

&lt;p&gt;Watch the demo video below to see how the Power Apps FAQ Copilot works.&lt;/p&gt;

&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/ukmZUNxCeIs?vq=hd1080&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;h2 id=&quot;prerequisites&quot;&gt;Prerequisites&lt;/h2&gt;
&lt;p&gt;If you are intending to implement, ensure you have the following:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;An active &lt;strong&gt;Azure subscription&lt;/strong&gt;.&lt;/li&gt;
  &lt;li&gt;Access to &lt;strong&gt;Microsoft Copilot Studio&lt;/strong&gt;.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Power Apps Documentation PDF&lt;/strong&gt; from Microsoft Learn site.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;step-by-step-implementation&quot;&gt;Step-by-Step Implementation&lt;/h2&gt;

&lt;h3 id=&quot;step-1-download-the-power-apps-documentation&quot;&gt;Step 1: Download the Power Apps Documentation&lt;/h3&gt;
&lt;p&gt;Head over to the &lt;strong&gt;Power Apps Documentation&lt;/strong&gt; and download the &lt;strong&gt;PDF&lt;/strong&gt;. We will index it using the Azure search service and use it to generate contextual answers to user queries around Power Apps.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\11_CopilotOpenAI\0.png&quot; alt=&quot;Download Power Apps Documentation&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;step-2-create-an-azure-ai-search-instance&quot;&gt;Step 2: Create an Azure AI Search Instance&lt;/h3&gt;
&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;Navigate to the Azure Portal&lt;/strong&gt;: Log in to the Azure portal, search for “AI Search,” and select the service.
&lt;img src=&quot;\images\11_CopilotOpenAI\1.png&quot; alt=&quot;Navigate to AI Search&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Create a New Search Service&lt;/strong&gt;: Click on &lt;strong&gt;Create&lt;/strong&gt; to start setting up a new search service.
&lt;img src=&quot;\images\11_CopilotOpenAI\2.png&quot; alt=&quot;Create New Search Service&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;Fill in the necessary details like resource group, service name, location, and pricing tier. Once you’ve filled in the details, review your configurations and click &lt;strong&gt;Create&lt;/strong&gt;.
&lt;img src=&quot;\images\11_CopilotOpenAI\3.png&quot; alt=&quot;Fill in Details&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;After a while, the search instance will be provisioned and available for use.
&lt;img src=&quot;\images\11_CopilotOpenAI\4.png&quot; alt=&quot;Search Instance Provisioned&quot; /&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;step-3-add-blob-storage-and-create-an-indexer&quot;&gt;Step 3: Add Blob Storage and Create an Indexer&lt;/h3&gt;
&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;Set Up Azure Blob Storage&lt;/strong&gt;: Navigate to the &lt;strong&gt;Storage Accounts&lt;/strong&gt; in the Azure portal and click on &lt;strong&gt;Create&lt;/strong&gt; to add a new storage account.
&lt;img src=&quot;\images\11_CopilotOpenAI\5.png&quot; alt=&quot;Setup Blob Storage&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;Fill in the necessary details like resource group, storage account name, region, and performance. Click on &lt;strong&gt;Create&lt;/strong&gt; to provision the storage account.
&lt;img src=&quot;\images\11_CopilotOpenAI\6.png&quot; alt=&quot;Provision Storage Account&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;Once the storage account is created, head over to this resource and click on &lt;strong&gt;Container&lt;/strong&gt; to create a new container to store the Power Apps PDF.
&lt;img src=&quot;\images\11_CopilotOpenAI\7.png&quot; alt=&quot;Create Container&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;Click on &lt;strong&gt;Container&lt;/strong&gt;, specify the container name, and click on &lt;strong&gt;Create&lt;/strong&gt; to add the new container to the storage account.
&lt;img src=&quot;\images\11_CopilotOpenAI\8.png&quot; alt=&quot;Specify Container Name&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;Inside the container, click on &lt;strong&gt;Browse for files&lt;/strong&gt; to add the Power Apps documentation PDF downloaded earlier. Click on &lt;strong&gt;Upload&lt;/strong&gt;.
&lt;img src=&quot;\images\11_CopilotOpenAI\9.png&quot; alt=&quot;Upload PDF&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;Navigate back to the Azure search instance that we created to index this PDF document. From the AI Search Overview page, click on &lt;strong&gt;Import data&lt;/strong&gt;.
&lt;img src=&quot;\images\11_CopilotOpenAI\10.png&quot; alt=&quot;Import Data&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;In the &lt;strong&gt;Connect your data&lt;/strong&gt; tab, select &lt;strong&gt;Azure Blob Storage&lt;/strong&gt;.
&lt;img src=&quot;\images\11_CopilotOpenAI\11.png&quot; alt=&quot;Select Blob Storage&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;Specify a name for the datasource and click on &lt;strong&gt;Choose an existing connection&lt;/strong&gt; to connect to the container within the storage account.
&lt;img src=&quot;\images\11_CopilotOpenAI\12.png&quot; alt=&quot;Choose Existing Connection&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;Select the appropriate container and click on &lt;strong&gt;Select&lt;/strong&gt;.
&lt;img src=&quot;\images\11_CopilotOpenAI\13.png&quot; alt=&quot;Select Container&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;The connection string is automatically added for this container. Click on &lt;strong&gt;Next: Add Cognitive Skills&lt;/strong&gt;. This is optional and will be skipped for now.
&lt;img src=&quot;\images\11_CopilotOpenAI\14.png&quot; alt=&quot;Connection String Added&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;Ensure the content field of the indexer is marked as &lt;strong&gt;Retrievable&lt;/strong&gt; and &lt;strong&gt;Searchable&lt;/strong&gt;. Click on &lt;strong&gt;Create an Indexer&lt;/strong&gt; to create the index.
&lt;img src=&quot;\images\11_CopilotOpenAI\15.png&quot; alt=&quot;Create Indexer&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;The indexer is now created, and we can connect this to Azure OpenAI for generative features.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;step-4-create-azure-openai-instance&quot;&gt;Step 4: Create Azure OpenAI Instance&lt;/h3&gt;
&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;Navigate to Azure OpenAI&lt;/strong&gt;: Head over to Azure, search for Azure OpenAI, and select the service.
&lt;img src=&quot;\images\11_CopilotOpenAI\16.png&quot; alt=&quot;Search Azure OpenAI&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;Click on &lt;strong&gt;Create&lt;/strong&gt;.
&lt;img src=&quot;\images\11_CopilotOpenAI\17.png&quot; alt=&quot;Create OpenAI Instance&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;Specify the values for Resource Group, Name, and Pricing tier. Click on &lt;strong&gt;Next&lt;/strong&gt; for network-specific configurations. Finally, click on &lt;strong&gt;Create&lt;/strong&gt; on the review page.
&lt;img src=&quot;\images\11_CopilotOpenAI\18.png&quot; alt=&quot;Specify Details&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;The Azure OpenAI Instance is now created. Click on &lt;strong&gt;Go to Azure OpenAI Studio&lt;/strong&gt; where we can configure and connect the OpenAI Instance with the Azure Search indexer.
&lt;img src=&quot;\images\11_CopilotOpenAI\19.png&quot; alt=&quot;Go to OpenAI Studio&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;In Azure OpenAI Studio, create a model deployment. From the Chat section, click on &lt;strong&gt;Create new deployment&lt;/strong&gt;.
&lt;img src=&quot;\images\11_CopilotOpenAI\20.png&quot; alt=&quot;Create Model Deployment&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;Specify the model type (e.g., gpt-4), mention the name, and click on &lt;strong&gt;Create&lt;/strong&gt;.
&lt;img src=&quot;\images\11_CopilotOpenAI\21.png&quot; alt=&quot;Specify Model Type&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;The model is deployed. In the chat playground, click on &lt;strong&gt;Add your data&lt;/strong&gt; to connect to the search index.
&lt;img src=&quot;\images\11_CopilotOpenAI\22.png&quot; alt=&quot;Model Deployed&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;Select the data source.
&lt;img src=&quot;\images\11_CopilotOpenAI\23.png&quot; alt=&quot;Select Data Source&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;In the opened pop-up:
    &lt;ul&gt;
      &lt;li&gt;Select the data source as &lt;strong&gt;Azure AI Search&lt;/strong&gt;.&lt;/li&gt;
      &lt;li&gt;Mention the Search Instance and Search Index created earlier.&lt;/li&gt;
      &lt;li&gt;Click on &lt;strong&gt;Next&lt;/strong&gt;.
&lt;img src=&quot;\images\11_CopilotOpenAI\25.png&quot; alt=&quot;Configure Data Source&quot; /&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;In the Data Management section, enable &lt;strong&gt;Keyword search&lt;/strong&gt;. Semantic search is also an option that can be configured.
&lt;img src=&quot;\images\11_CopilotOpenAI\28.png&quot; alt=&quot;Enable Keyword Search&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;Select &lt;strong&gt;API Key&lt;/strong&gt; as the Azure resource authentication type. Click on &lt;strong&gt;Next&lt;/strong&gt;.
&lt;img src=&quot;\images\11_CopilotOpenAI\26.png&quot; alt=&quot;Select API Key&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;Finally, click on &lt;strong&gt;Save and close&lt;/strong&gt; to finalize the data source setup.
&lt;img src=&quot;\images\11_CopilotOpenAI\29.png&quot; alt=&quot;Save and Close&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;Test the Azure OpenAI playground, which has its data source as Azure AI Search. For example, ask about Power Apps offline functionality, and it will fetch detailed contextual answers from the Azure AI search index.
&lt;img src=&quot;\images\11_CopilotOpenAI\30.png&quot; alt=&quot;Test OpenAI Playground&quot; /&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;step-5-integrate-copilot-with-azure-openai-instance&quot;&gt;Step 5: Integrate Copilot with Azure OpenAI Instance&lt;/h3&gt;
&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;Deploy to Copilot Studio&lt;/strong&gt;: Click on &lt;strong&gt;Deploy to&lt;/strong&gt; and select &lt;strong&gt;A new copilot in Copilot Studio&lt;/strong&gt;.
&lt;img src=&quot;\images\11_CopilotOpenAI\31.png&quot; alt=&quot;Deploy to Copilot Studio&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;Select &lt;strong&gt;Continue in Copilot Studio&lt;/strong&gt;, which will take us to Copilot Studio to continue with the copilot creation.
&lt;img src=&quot;\images\11_CopilotOpenAI\32.png&quot; alt=&quot;Continue in Copilot Studio&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;Specify the copilot name and click on &lt;strong&gt;Create&lt;/strong&gt;.
&lt;img src=&quot;\images\11_CopilotOpenAI\33.png&quot; alt=&quot;Specify Copilot Name&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;This initializes the copilot, which is already connected to the Azure OpenAI Instance.
&lt;img src=&quot;\images\11_CopilotOpenAI\34.png&quot; alt=&quot;Copilot Initialized&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;Head over to topics and select the &lt;strong&gt;Conversational boosting system&lt;/strong&gt; topic.
&lt;img src=&quot;\images\11_CopilotOpenAI\35.png&quot; alt=&quot;Select Conversational Boosting System&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;It contains a &lt;strong&gt;Generative answers node&lt;/strong&gt; preconfigured with the Azure OpenAI instance set up earlier.
&lt;img src=&quot;\images\11_CopilotOpenAI\36.png&quot; alt=&quot;Generative Answers Node&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;Click on the connection properties. Under the &lt;strong&gt;General&lt;/strong&gt; tab, you can see the model details and parameters used for generating answers.
&lt;img src=&quot;\images\11_CopilotOpenAI\37.png&quot; alt=&quot;General Tab&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;In the &lt;strong&gt;Model data&lt;/strong&gt; tab, you can see the Azure AI Search data source and the field from which the data is grounded.
&lt;img src=&quot;\images\11_CopilotOpenAI\38.png&quot; alt=&quot;Model Data Tab&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;The copilot is auto-configured and connected to the Azure OpenAI instance, which is internally connected with the Azure AI Search Instance.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;step-6-publish-the-bot&quot;&gt;Step 6: Publish the Bot&lt;/h3&gt;
&lt;ol&gt;
  &lt;li&gt;We can publish the bot to different channels. For now, deploy it to Teams.
&lt;img src=&quot;\images\11_CopilotOpenAI\40.png&quot; alt=&quot;Deploy to Teams&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;Head over to &lt;strong&gt;Channels -&amp;gt; Microsoft Teams -&amp;gt; Turn on Teams&lt;/strong&gt;.
&lt;img src=&quot;\images\11_CopilotOpenAI\41.png&quot; alt=&quot;Turn on Teams&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;Click on &lt;strong&gt;Availability Options&lt;/strong&gt; to choose how to distribute the app in Teams.
&lt;img src=&quot;\images\11_CopilotOpenAI\42.png&quot; alt=&quot;Availability Options&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;You can either deploy it to the app store through admin approval or upload the app as a zip and use it as a personal app.
&lt;img src=&quot;\images\11_CopilotOpenAI\43.png&quot; alt=&quot;Deploy Options&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;The app becomes available in the Teams admin centre, and the admin can now publish it for org-wide use.
&lt;img src=&quot;\images\11_CopilotOpenAI\44.png&quot; alt=&quot;App in Teams Admin Centre&quot; /&gt;&lt;/li&gt;
  &lt;li&gt;Access the app from the Teams App Store and start a conversation. Ask anything about Power Apps, and the copilot will fetch contextual answers from the grounded Power Apps Documentation PDF and provide responses.
&lt;img src=&quot;\images\11_CopilotOpenAI\45.png&quot; alt=&quot;Access App in Teams&quot; /&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Thus we have completed the implementation and demo of a scalable Copilot that can leverage Azure AI search and Azure Open AI to provide us with contextual answers for our questions.&lt;/p&gt;

&lt;h3 id=&quot;alternate-approach--power-apps-documentation-as-local-datasource&quot;&gt;Alternate Approach : Power Apps Documentation as Local Datasource&lt;/h3&gt;

&lt;p&gt;So far we explored how we can build a scalable Copilot using Azure AI search Index as the primary data source. Now lets see how we can implement the same using the native local datasource approach in Copilot. For this we can upload the same Power Apps PDF documentation as a Local File Knowledge base : 
&lt;img src=&quot;\images\11_CopilotOpenAI\46.png&quot; alt=&quot;Access App in Teams&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Once uploaded, depending on the size, the processing time varies and once ready we can see the status in the Knowledge section 
&lt;img src=&quot;\images\11_CopilotOpenAI\47.png&quot; alt=&quot;Access App in Teams&quot; /&gt;&lt;/p&gt;

&lt;p&gt;We can now create a new Topic and add the &lt;strong&gt;Generative Answers&lt;/strong&gt; node and connect to this knowledge source that we have uploaded. 
&lt;img src=&quot;\images\11_CopilotOpenAI\48.png&quot; alt=&quot;Access App in Teams&quot; /&gt;&lt;/p&gt;

&lt;p&gt;We can test the Copilot’s ability to use the local knowledge source by initiating a conversation and asking questions and we can see that we are getting back the contextual response along with citations. 
&lt;img src=&quot;\images\11_CopilotOpenAI\49.png&quot; alt=&quot;Access App in Teams&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;high-level-data-source-comparison--azure-ai-search-vs-sharepoint-vs-local-file&quot;&gt;High Level Data Source Comparison : Azure AI Search vs SharePoint Vs Local File&lt;/h3&gt;

&lt;table&gt;
  &lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;&lt;strong&gt;Data Source&lt;/strong&gt;&lt;/th&gt;
      &lt;th&gt;&lt;strong&gt;When to Use&lt;/strong&gt;&lt;/th&gt;
      &lt;th&gt;&lt;strong&gt;Pros&lt;/strong&gt;&lt;/th&gt;
      &lt;th&gt;&lt;strong&gt;Cons&lt;/strong&gt;&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Local File Upload&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;- Quick, simple setups&lt;/td&gt;
      &lt;td&gt;- &lt;strong&gt;Simplicity&lt;/strong&gt;: Easy setup&lt;br /&gt;- &lt;strong&gt;Flexibility&lt;/strong&gt;: User uploads as needed when creating a personal Copilot&lt;/td&gt;
      &lt;td&gt;- &lt;strong&gt;Limited Scope&lt;/strong&gt;: Best for small-scale operations&lt;br /&gt;- &lt;strong&gt;Size&lt;/strong&gt;: - 512 MB per file limitation&lt;br /&gt;- &lt;strong&gt;Manual Process&lt;/strong&gt;: Requires user intervention every time the document has to be updated&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;SharePoint Documents&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;- Enterprise applications&lt;br /&gt;- Collaboration and document management&lt;br /&gt;- Regularly updated, accessible content&lt;/td&gt;
      &lt;td&gt;- &lt;strong&gt;Centralized Management&lt;/strong&gt;: Easy to update the document from SharePoint&lt;br /&gt;- &lt;strong&gt;Version Control&lt;/strong&gt;: Tracks document changes&lt;/td&gt;
      &lt;td&gt;- &lt;strong&gt;Complexity&lt;/strong&gt;: As of writing, Manual authentication with App registration is required for authentication configuration&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Azure OpenAI with Azure AI Search&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;- Complex searches across large datasets&lt;br /&gt;- Aggregation and analysis of unstructured data&lt;br /&gt;- Enterprise-level applications requiring AI-driven insights&lt;/td&gt;
      &lt;td&gt;- &lt;strong&gt;Powerful AI Capabilities&lt;/strong&gt;: Combines NLU with robust search&lt;br /&gt;- &lt;strong&gt;Scalability&lt;/strong&gt;: Handles large datasets&lt;br /&gt;- &lt;strong&gt;Advanced Features&lt;/strong&gt;: Semantic and cognitive search&lt;/td&gt;
      &lt;td&gt;- &lt;strong&gt;Complex Setup&lt;/strong&gt;: Requires more configuration&lt;br /&gt;- &lt;strong&gt;Cost&lt;/strong&gt;: Different tiers have different storage limitations. Higher the tier, higher the cost&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;

&lt;h2 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;Integrating Azure OpenAI Service with Microsoft Copilot Studio opens up a lot of possibilities for creating intelligent, data-driven copilots. This guide has walked you through the process of setting up Azure AI Search, configuring Azure OpenAI, and seamlessly connecting these services in Copilot Studio. By harnessing the power of Azure’s AI capabilities, you can build copilots that provide rich, contextual responses tailored to your organizational needs. We also saw how the same Power Apps PDF documentation can be used as a Local Source Knowledge Data Source. Depending on the use case and complexity of search involved, we can use either of them as a source of generative answers.&lt;/p&gt;

</description>
                <pubDate>Wed, 13 Aug 2025 17:31:35 +0530</pubDate>
                <link>https://www.fusiondevblogs.com/Copilot-Azure-OpenAI/</link>
                <guid isPermaLink="true">https://www.fusiondevblogs.com/Copilot-Azure-OpenAI/</guid>
                
                <category>copilot</category>
                
                
            </item>
        
            <item>
                <title>Creating a Smart Supply Chain Vendor Selection Copilot with AI Prompt Actions</title>
                <description>&lt;h2 class=&quot;no_toc&quot; id=&quot;table-of-contents&quot;&gt;Table of Contents&lt;/h2&gt;

&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#introduction&quot; id=&quot;markdown-toc-introduction&quot;&gt;Introduction&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#overview&quot; id=&quot;markdown-toc-overview&quot;&gt;Overview&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#demo&quot; id=&quot;markdown-toc-demo&quot;&gt;Demo&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#step-by-step-guide-to-building-the-supply-chain-copilot&quot; id=&quot;markdown-toc-step-by-step-guide-to-building-the-supply-chain-copilot&quot;&gt;Step-by-Step Guide to Building the Supply Chain Copilot&lt;/a&gt;    &lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;#step-1-set-up-dataverse-for-vendor-data&quot; id=&quot;markdown-toc-step-1-set-up-dataverse-for-vendor-data&quot;&gt;Step 1: Set Up Dataverse for Vendor Data&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#step-2-populate-the-dataverse-table&quot; id=&quot;markdown-toc-step-2-populate-the-dataverse-table&quot;&gt;Step 2: Populate the Dataverse Table&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#step-3-creating-the-copilot-in-copilot-studio&quot; id=&quot;markdown-toc-step-3-creating-the-copilot-in-copilot-studio&quot;&gt;Step 3: Creating the Copilot in Copilot Studio&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#step-4-enable-generative-selection-of-topics&quot; id=&quot;markdown-toc-step-4-enable-generative-selection-of-topics&quot;&gt;Step 4: Enable Generative Selection of Topics&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#step-5-create-topics&quot; id=&quot;markdown-toc-step-5-create-topics&quot;&gt;Step 5: Create Topics&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#step-6adding-the-ai-prompt&quot; id=&quot;markdown-toc-step-6adding-the-ai-prompt&quot;&gt;Step 6:Adding the AI Prompt&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#step-7-publish-the-copilot-to-team&quot; id=&quot;markdown-toc-step-7-publish-the-copilot-to-team&quot;&gt;Step 7: Publish the Copilot to Team&lt;/a&gt;&lt;/li&gt;
      &lt;li&gt;&lt;a href=&quot;#conclusion&quot; id=&quot;markdown-toc-conclusion&quot;&gt;Conclusion&lt;/a&gt;&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;introduction&quot;&gt;Introduction&lt;/h2&gt;

&lt;p&gt;Leveraging advanced technologies like Microsoft Power Platform can significantly enhance your supply chain operations. In this blog, we will explore how to create a Copilot for supply chain management that identifies the best vendor based on vendor details stored in Dataverse. This Copilot will utilize parameters like lead time, quality score, and unit price, and employ AI prompts to make intelligent vendor recommendations.&lt;/p&gt;

&lt;h2 id=&quot;overview&quot;&gt;Overview&lt;/h2&gt;

&lt;p&gt;Our supply chain Copilot will:&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;Fetch Vendor Details from Dataverse&lt;/strong&gt;: Retrieve data for multiple vendors, each providing the same product with different parameters.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Use AI to Identify the Best Vendor&lt;/strong&gt;: Implement AI-powered analysis using the AI Prompt to find the most suitable vendor based on the retrieved data and parameters like lead time, quality score, and unit price.
&lt;img src=&quot;\images\10_CopilotAIPrompt\0_0.gif&quot; alt=&quot;Vendor Details&quot; /&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;demo&quot;&gt;Demo&lt;/h2&gt;

&lt;p&gt;Watch the demo video below to see how the Smart Supply Chain Copilot works.&lt;/p&gt;

&lt;iframe width=&quot;560&quot; height=&quot;315&quot; src=&quot;https://www.youtube.com/embed/RgXZJWqQg5E?vq=hd1080&quot; frameborder=&quot;0&quot; allow=&quot;accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture&quot; allowfullscreen=&quot;&quot;&gt;&lt;/iframe&gt;

&lt;h2 id=&quot;step-by-step-guide-to-building-the-supply-chain-copilot&quot;&gt;Step-by-Step Guide to Building the Supply Chain Copilot&lt;/h2&gt;

&lt;h3 id=&quot;step-1-set-up-dataverse-for-vendor-data&quot;&gt;Step 1: Set Up Dataverse for Vendor Data&lt;/h3&gt;

&lt;p&gt;To begin, we need to organize our vendor details in Dataverse. Create a table named &lt;strong&gt;Vendor Details&lt;/strong&gt; with the following columns:&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;&lt;strong&gt;Material Name&lt;/strong&gt;: The name of the material or product (e.g., Aluminium Sheets, Copper Wires).&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Vendor Name&lt;/strong&gt;: The name of the vendor supplying the product.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Unit Price (Dollars)&lt;/strong&gt;: The cost per unit of the product.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Quality Score&lt;/strong&gt;: A score representing the quality of the product (typically on a scale of 1-100).&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Lead Time (Days)&lt;/strong&gt;: The time taken by the vendor to deliver the product.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;step-2-populate-the-dataverse-table&quot;&gt;Step 2: Populate the Dataverse Table&lt;/h3&gt;

&lt;p&gt;Enter the vendor details into the Dataverse table. We have the below data for the demo:
&lt;img src=&quot;\images\10_CopilotAIPrompt\1.png&quot; alt=&quot;Vendor Data&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;step-3-creating-the-copilot-in-copilot-studio&quot;&gt;Step 3: Creating the Copilot in Copilot Studio&lt;/h3&gt;

&lt;p&gt;Head over to &lt;a href=&quot;https://copilotstudio.microsoft.com/&quot;&gt;Copilot Studio&lt;/a&gt; and &lt;strong&gt;click on Create&lt;/strong&gt;.
&lt;img src=&quot;\images\10_CopilotAIPrompt\1_3.png&quot; alt=&quot;Create Copilot&quot; /&gt;&lt;/p&gt;

&lt;p&gt;This will provide us the option to create a copilot based on an existing template or create a blank copilot from scratch. Let’s select &lt;strong&gt;New copilot&lt;/strong&gt;.
&lt;img src=&quot;\images\10_CopilotAIPrompt\1_4.png&quot; alt=&quot;New Copilot&quot; /&gt;&lt;/p&gt;

&lt;p&gt;This will take us to the page where we can:&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;Describe&lt;/strong&gt; the copilot functionality and provide any specific instructions.&lt;/li&gt;
  &lt;li&gt;Click on &lt;strong&gt;Create&lt;/strong&gt; to provision the copilot.
&lt;img src=&quot;\images\10_CopilotAIPrompt\2.png&quot; alt=&quot;Provision Copilot&quot; /&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;step-4-enable-generative-selection-of-topics&quot;&gt;Step 4: Enable Generative Selection of Topics&lt;/h3&gt;

&lt;p&gt;The copilot is now created. We can then make the needed configuration changes:&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;Click on &lt;strong&gt;Edit&lt;/strong&gt;, edit the copilot details like name, icon, and description.&lt;/li&gt;
  &lt;li&gt;Click on &lt;strong&gt;Settings&lt;/strong&gt; to enable the Generative selection of topics so that without relying on triggers, the topics will be auto-selected based on user conversation resulting in a much smoother user experience.
&lt;img src=&quot;\images\10_CopilotAIPrompt\3.png&quot; alt=&quot;Generative Settings&quot; /&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To enable the automatic detection of topics from user interaction:&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;Click on &lt;strong&gt;Generative AI&lt;/strong&gt;.&lt;/li&gt;
  &lt;li&gt;Select &lt;strong&gt;Generative (preview)&lt;/strong&gt;.&lt;/li&gt;
  &lt;li&gt;Click on &lt;strong&gt;Save&lt;/strong&gt; to update the settings.&lt;/li&gt;
  &lt;li&gt;Click on the &lt;strong&gt;Close icon&lt;/strong&gt; to go back to the home page of this custom copilot.
&lt;img src=&quot;\images\10_CopilotAIPrompt\4_1.png&quot; alt=&quot;Save Settings&quot; /&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3 id=&quot;step-5-create-topics&quot;&gt;Step 5: Create Topics&lt;/h3&gt;

&lt;p&gt;Now let’s go ahead and create the topics that will automatically redirect the conversation flow to appropriate topics based on the question user posts.&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;Click on &lt;strong&gt;Topics&lt;/strong&gt; from the navigation menu.
To add the topic, we can either go with the option to create a blank topic or use Copilot to create the topic with an initial set of prepopulated conversation nodes based on the topic description that we provide.&lt;/li&gt;
  &lt;li&gt;Click on &lt;strong&gt;Add a Topic&lt;/strong&gt; and&lt;/li&gt;
  &lt;li&gt;Select &lt;strong&gt;Create from description with Copilot&lt;/strong&gt;.
&lt;img src=&quot;\images\10_CopilotAIPrompt\4.png&quot; alt=&quot;Add Topic&quot; /&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Let’s provide the below topic description details in the pop-up that opened when we clicked the Add topic button previously.
Then, &lt;strong&gt;Click on Create&lt;/strong&gt;, which will provision the topic skeleton based on the provided description.
&lt;img src=&quot;\images\10_CopilotAIPrompt\5.png&quot; alt=&quot;Create Topic&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Thus we have the basic topic created with an automatic trigger as well as a question to the user which are generated using the description provided. We can now add more conversation nodes.
&lt;img src=&quot;\images\10_CopilotAIPrompt\6.png&quot; alt=&quot;Basic Topic&quot; /&gt;&lt;/p&gt;

&lt;p&gt;We now need to fetch the vendor details from the Dataverse table for which we will add the Dataverse connector action by:&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;Select &lt;strong&gt;Call an action&lt;/strong&gt;.&lt;/li&gt;
  &lt;li&gt;Select the &lt;strong&gt;Connector tab&lt;/strong&gt;.&lt;/li&gt;
  &lt;li&gt;Click on &lt;strong&gt;List rows from selected environment&lt;/strong&gt;.
&lt;img src=&quot;\images\10_CopilotAIPrompt\36.png&quot; alt=&quot;List Rows&quot; /&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This will add the Dataverse connector action to the Copilot canvas. Let’s configure the inputs for this action by:&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;Mentioning&lt;/strong&gt; the Environment and Table name where Vendor Details Table is present.&lt;/li&gt;
  &lt;li&gt;Click on &lt;strong&gt;Advanced inputs&lt;/strong&gt; to filter the data that is returned from the table.
&lt;img src=&quot;\images\10_CopilotAIPrompt\37.png&quot; alt=&quot;Configure Inputs&quot; /&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Specify the Dataverse table columns which should be present in the returned output. We will specify the Material name, Vendor name, Lead time, Unit Price, and Quality Score columns.
&lt;img src=&quot;\images\10_CopilotAIPrompt\38.png&quot; alt=&quot;Specify Columns&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: You can get the logical name of the columns used in the &lt;strong&gt;Select columns&lt;/strong&gt; field from the Dataverse table by following the below path:
&lt;img src=&quot;\images\10_CopilotAIPrompt\10.png&quot; alt=&quot;Logical Names&quot; /&gt;&lt;/p&gt;

&lt;p&gt;The output of the Dataverse Table Connector (&lt;em&gt;varVendorTable&lt;/em&gt;) will contain lots of system columns as well. We will need to format the table to filter and ensure only the needed columns are present. To do this, let’s initialize a variable to hold the output of Dataverse connector:
&lt;img src=&quot;\images\10_CopilotAIPrompt\39.png&quot; alt=&quot;Initialize Variable&quot; /&gt;&lt;/p&gt;

&lt;p&gt;We will then add the below formula which will filter the output to create a subset of the table and store it in the variable. It does this by looping through the previous Dataverse connector output and fetching only the columns that we have mentioned in the expression:&lt;/p&gt;
&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;ForAll(
    Topic.varVendorTable,
    {
        MaterialName: ThisRecord.cr06f_materialname,
        VendorName: ThisRecord.cr06f_vendorname,
        LeadTime: ThisRecord.cr06f_leadtimedays,
        Quality: ThisRecord.cr06f_qualityscore,
        UnitPrice: ThisRecord.cr06f_unitpricedollars
    }
)
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&lt;img src=&quot;\images\10_CopilotAIPrompt\40.png&quot; alt=&quot;Initialize Variable&quot; /&gt;&lt;/p&gt;

&lt;p&gt;If we were to test and output this variable value(&lt;em&gt;varFilteredTable&lt;/em&gt;) in the test pane, we will get the output as:&lt;/p&gt;

&lt;div class=&quot;language-json highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;LeadTime&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;5&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;MaterialName&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Aluminum Sheets&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;Quality&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;92&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;UnitPrice&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;35&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;VendorName&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;PureAluminum&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;LeadTime&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;6&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;MaterialName&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Aluminum Sheets&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;Quality&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;90&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;UnitPrice&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;37&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;VendorName&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;MetalSheetsCo&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;LeadTime&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;7&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;MaterialName&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Aluminum Sheets&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;Quality&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;91&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;UnitPrice&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;33&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;VendorName&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;HighGradeAluminum&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;LeadTime&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;10&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;MaterialName&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Copper Wires&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;Quality&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;93&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;UnitPrice&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;60&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;VendorName&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;ElectroCopper&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
    &lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;LeadTime&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;9&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;MaterialName&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;Copper Wires&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;Quality&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;92&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;UnitPrice&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;62&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;&lt;span class=&quot;nl&quot;&gt;&quot;VendorName&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&quot;PureCopperSupplies&quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;
&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;w&quot;&gt;

&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;We will do one more formatting of this output to serialize this JSON into a readable format: &lt;strong&gt;Material Name: Vendor Name: Lead Time Days: Quality Score: Unit Price Dollars&lt;/strong&gt; . To do this, let’s add another variable(&lt;em&gt;varSerializedVendorDetails&lt;/em&gt;) and set its formula to:&lt;/p&gt;

&lt;div class=&quot;language-plaintext highlighter-rouge&quot;&gt;&lt;div class=&quot;highlight&quot;&gt;&lt;pre class=&quot;highlight&quot;&gt;&lt;code&gt;Concat(Topic.varFormattedTable, MaterialName &amp;amp; &quot;:&quot; &amp;amp; VendorName &amp;amp; &quot;:&quot; &amp;amp; LeadTime &amp;amp; &quot;:&quot; &amp;amp; Quality &amp;amp; &quot;:&quot; &amp;amp; UnitPrice, &quot;, &quot;)

&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This way, from the previous filtered table, we will concat the Material Name and details in a readable format which can be shared as an input to the AI Prompt.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;\images\10_CopilotAIPrompt\41.png&quot; alt=&quot;Initialize Variable&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;step-6adding-the-ai-prompt&quot;&gt;Step 6:Adding the AI Prompt&lt;/h3&gt;
&lt;p&gt;Now let’s add the AI prompt using which we can find the best vendor for the product specified by the user. To do this:&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;Select Call an action&lt;/strong&gt; and&lt;/li&gt;
  &lt;li&gt;From &lt;strong&gt;Basic Actions&lt;/strong&gt;, select &lt;strong&gt;Create a prompt&lt;/strong&gt;.
&lt;img src=&quot;\images\10_CopilotAIPrompt\42.png&quot; alt=&quot;Create Prompt&quot; /&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This will open up the Prompt AI Builder in a pop-up where we can:&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;Create&lt;/strong&gt; the Product Variable to which we will pass the user inputted product name for which they are finding the best vendor.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Create&lt;/strong&gt; the Vendor Details variable to which we will pass the Dataverse connector returned vendor details.&lt;/li&gt;
  &lt;li&gt;In the &lt;strong&gt;Prompt section&lt;/strong&gt;, use the below prompt and add the variables dynamically using the &lt;strong&gt;Insert&lt;/strong&gt; button which will allow us to add the Product and Vendor Details input variables into the prompt.&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Click on Save custom prompt&lt;/strong&gt;, which will make the prompt available in the copilot designer.
&lt;img src=&quot;\images\10_CopilotAIPrompt\43.png&quot; alt=&quot;Prompt AI Builder&quot; /&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;We will add the recently created prompt by:&lt;/p&gt;
&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;Selecting Call an action&lt;/strong&gt;.&lt;/li&gt;
  &lt;li&gt;From the &lt;strong&gt;Basic actions tab&lt;/strong&gt;, select the &lt;strong&gt;Best Vendor Details&lt;/strong&gt; prompt.
&lt;img src=&quot;\images\10_CopilotAIPrompt\43_1.png&quot; alt=&quot;Best Vendor Details&quot; /&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The prompt is now available. Let’s configure it by adding the first input parameter, which is the user-inputted Product Name.
&lt;img src=&quot;\images\10_CopilotAIPrompt\44.png&quot; alt=&quot;Configure Input&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Next, we will add the Dataverse returned output data, which we had formatted, to the Vendor Details field.
&lt;img src=&quot;\images\10_CopilotAIPrompt\45.png&quot; alt=&quot;Vendor Details Field&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Finally, we need to store the output record generated by the Prompt action in a variable for which we will create a new variable named &lt;strong&gt;varBestVendor&lt;/strong&gt;.
&lt;img src=&quot;\images\10_CopilotAIPrompt\46.png&quot; alt=&quot;Store Output&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Thus, we have configured the Prompt action with the required input, and it should ideally fetch us back the best vendor for the passed-in product based on the Quality Score parameter.&lt;/p&gt;

&lt;p&gt;Finally, we will show the best vendor output as a basic card back to the user for which we will select the &lt;strong&gt;text&lt;/strong&gt; Property of the &lt;strong&gt;varBestVendor&lt;/strong&gt; record, which will contain the generative AI output.
&lt;img src=&quot;\images\10_CopilotAIPrompt\47.png&quot; alt=&quot;Best Vendor Output&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;step-7-publish-the-copilot-to-team&quot;&gt;Step 7: Publish the Copilot to Team&lt;/h3&gt;
&lt;p&gt;We will finally publish the copilot and add it to the Teams Channel for which we will enable the teams channel by selecting the &lt;strong&gt;Channels Tab&lt;/strong&gt; -&amp;gt; &lt;strong&gt;Microsoft Teams&lt;/strong&gt; -&amp;gt; &lt;strong&gt;Turn On Teams&lt;/strong&gt;.
&lt;img src=&quot;\images\10_CopilotAIPrompt\28.png&quot; alt=&quot;Enable Teams&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Click on the &lt;strong&gt;Availability Options&lt;/strong&gt; to select how to distribute the copilot within Teams.
&lt;img src=&quot;\images\10_CopilotAIPrompt\29.png&quot; alt=&quot;Availability Options&quot; /&gt;&lt;/p&gt;

&lt;p&gt;We have the option to publish the app to the app store, which goes through an admin approval, or we can download the zip file and upload it as a personal app. For this demo, we will go with publishing the app org-wide.
&lt;img src=&quot;\images\10_CopilotAIPrompt\30.png&quot; alt=&quot;Publish Org-wide&quot; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Click on Submit for Admin approval&lt;/strong&gt;, and the admin can approve this from the Teams admin center.
&lt;img src=&quot;\images\10_CopilotAIPrompt\31.png&quot; alt=&quot;Admin Approval&quot; /&gt;&lt;/p&gt;

&lt;p&gt;We can see that the copilot has become available for publishing in the Teams admin center. &lt;strong&gt;Click on Publish&lt;/strong&gt;.
&lt;img src=&quot;\images\10_CopilotAIPrompt\32.png&quot; alt=&quot;Publish&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Let’s now add the copilot to Teams so that we can interact and get results with it.
&lt;img src=&quot;\images\10_CopilotAIPrompt\33.png&quot; alt=&quot;Add to Teams&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Thus, we have initiated the conversation with the copilot and tried to find the best vendor for Copper Wires. If we filter the Dataverse table for Copper Wire Vendors, we could see three records, but the AI prompt that we used has refined the results by comparing the Unit Price and Quality score to arrive at the best vendor.
&lt;img src=&quot;\images\10_CopilotAIPrompt\35.png&quot; alt=&quot;Vendor Comparison&quot; /&gt;&lt;/p&gt;

&lt;p&gt;We can see that the copilot has picked the vendor details from Dataverse and using the AI Prompt, fetched the generative contextual answer for the best vendor by comparing the unit price and quality score.
&lt;img src=&quot;\images\10_CopilotAIPrompt\34.png&quot; alt=&quot;Best Vendor Result&quot; /&gt;&lt;/p&gt;

&lt;h3 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;In this blog, we’ve explored how to build a supply chain Copilot using Microsoft Power Platform and Dataverse to streamline the vendor selection process. By leveraging Dataverse for structured storage of vendor details and employing AI prompts for intelligent analysis, our Copilot provides an efficient solution for identifying the best vendor based on critical parameters like lead time, quality score, and unit price.&lt;/p&gt;
</description>
                <pubDate>Sat, 09 Aug 2025 17:31:35 +0530</pubDate>
                <link>https://www.fusiondevblogs.com/Copilot-AI-Prompt/</link>
                <guid isPermaLink="true">https://www.fusiondevblogs.com/Copilot-AI-Prompt/</guid>
                
                <category>copilot</category>
                
                
            </item>
        
    </channel>
</rss>