Skip to content

Latest commit

 

History

History
 
 
page_type description products languages
sample
This sample showcases a Teams message extension that serves as a plugin for Microsoft Copilot, enabling users to query the Northwind Database.
office-teams
copilot-m365
typescript

Northwind inventory message extension sample

License.

This sample demonstrates a Teams message extension that integrates with Microsoft Copilot, allowing users to query the Northwind Database efficiently. It supports copilot handoffs for a smooth transition to custom bot interactions, enhancing the user experience.

Screenshot of the sample extension working in Copilot in Microsoft Teams

Prerequisites

Setup and use the sample

For instructions on setting up and running the sample, see the lab exercises.

Example prompts for Copilot

Here are some ideas for prompts to try. If you don't get the result you expect, try typing "new chat" and then trying again.

Single parameter prompts

  • Find Chai in Northwind Inventory

  • Who supplies discounted produce to Northwind?

  • Find high revenue products in Northwind. Have there been any ad campaigns for these products?

    [!NOTE] The ad campaign details are in the sample documents.

Multi-parameter prompts

  • Find northwind dairy products that are low on stock. Show me a table with the product, supplier, units in stock and on order. Reference the details for each product.

    (then)

    OK can you draft an email to our procurement team asking them if we've had any delivery issues with these suppliers?

  • Find Northwind beverages with more than 100 units in stock

    (then)

    What are the payment terms for these suppliers?

    [!NOTE] The answer to the 2nd question is in the sample documents.

  • We’ve been receiving partial orders for Tofu. Find the supplier in Northwind and draft an email summarizing our inventory and reminding them they should stop sending partial orders per our MOQ policy.

    [!NOTE] The MOQ policy is in one of the sample documents.

  • Northwind will have a booth at Microsoft Community Days in London. Find products with local suppliers and write a LinkedIn post to promote the booth and products.

    (then)

    Emphasize how delicious the products are and encourage people to visit our booth at the conference

  • What beverage is high in demand due to social media that is low stock in Northwind in London. Reference the product details to update stock.

    [!NOTE] There is a document that discusses a social media campaign for one of the products in the sample documents.

Copilot handoff to bot

This sample has a copilot agent handoff to enable users to transition from Copilot for Microsoft 365 to a custom engine agent or other Teams bot when needed. To try a copilot agent handoff when running the sample, follow the instructions below. Also, see the copilot agent handoff section at the end of lab Exercise 05 - Code tour to explore the copilot handoff code in depth.

  • Copilot welcome screen Welcome screen for copilot

  • Select the handoff to bot button Handoff action button

  • A new chat opens with the NorthwindProduct bot in Teams, seemlessly continuing the conversation with context Bot response