Skip to content

An OpenAI-powered Copilot for SAP users, enabling them to view, change, and select the right products, as well as place orders within the SAP system directly from the Microsoft Teams App.

Notifications You must be signed in to change notification settings

mimergel/SAP_Product_Copilot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SAP Product Copilot

Azure OpenAI-powered Copilot for SAP users, enabling:

  • Choosing the right product.
  • Assisting in ordering a product (final ordering is not implemented).
  • Providing details of a product.
  • Updating an existing product (only the price in this demo).
  • Entering a new product into the system.

Unlike traditional bots, where users are constrained to rigid, predefined pathways, this AI assistant provides the flexibility to interact in natural language. It mimics a conversational experience like interacting with a human, making it intuitive and user-friendly. Users can freely express their queries and commands in everyday language, eliminating the need to understand complex code or specific command language.

No more clicking through endless menus or decoding tech jargon. Just type what you need in your natural language. It’s as easy as chatting with a friend - quick, straightforward, and no hassle!

Greetings in Teams

Greetings

Architecture

High Level Process

Prerequesites

  1. Power Platform Access
  2. Azure Subscription
  3. Azure OpenAI Service
  4. SAP System

Setup

Azure OpenAI Service

Import the Solution

This step will import the required components into your environment. Make sure you are connected to your Non-PROD environment.

  • Download the solution as zip file: Download the Solution.

  • Login to https://make.powerapps.com/

  • Go to Solutions.

  • Choose "Import solution".

    Import solution

  • Browse files and select the downloaded SAPProductCopilot_[version number].zip.

  • During the subsequent steps you'll need to update the connection references:

    import-flow-connections

  • For Teams and Office 365 you might have already connections and you could simply choose from the list. Otherwise create these as well.

  • Create the required SAP Odata Connection:

    Create Odata Connection

    Values for SAP ES5 Demo System are:

  • Now after refreshing and entering the ODATA connection reference you can proceed to import the solution.

    Create Odata Connection

Adapt the HTTP Connector in the Flow

  • Enter your Azure OpenAI URL and API-Key from the Azure Open AI Service Chat playground.

    Get URI and KEY

  • For now you can enter this directly in clear text. For later production use it is recommended to configure these as secrets and put references to the secrets.

Publish the Copilot

  • Login to https://web.powerva.microsoft.com/

  • You should see the imported copilot. If not check that you are in the same environment where you have imported the solution.

    Copilot

  • Click on the name and then go to "Publish"

    Publish

  • Go to "Settings" -> "Channels" to connect the Copilot with Teams.

    Connect Teams

  • Finally open the Copilot in Teams by using the web app instead

  • Cancel the request to open the teams app to avoid opening your desktop app and leaving your work or school tenant.

Test the Copilot

A simple and quick test is to ask for details of a product:

  • Option C.

  • ProductID e.g.: HT-6102

    Test

Troubleshooting

  • In case of errors most likely the primary or the child flow failed.

  • The logs of the flow run provide helpful error messages.

    Troubleshooting 1

  • In this case the copilot (bot) was not pointing to the correct Teams Channel and I had to change the value of "cr680_sapProductCopilot" to refelct the Channel of my environment.

    Troubleshooting 2


Other root causes could be:

  • SAP ES5 system not reachable
  • HTTP timeouts of the Azure OpenAI service.

Contributing

Contributions to enhance the capabilities are welcome.

License

This project is licensed under the MIT License.

Disclaimer

THE CONTENT OF THIS REPOSITORY IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.

About

An OpenAI-powered Copilot for SAP users, enabling them to view, change, and select the right products, as well as place orders within the SAP system directly from the Microsoft Teams App.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published