Skip to Content
Technical Articles
Author's profile photo Pankaj Kumar

Quick reference: Microsoft Power Platform & SAP Integration

Introduction:

In this article, I have highlighted some simple steps to integrate Power Platform’s Power Virtual Agents with SAP Gateway Demo System – ES5 to create a Chatbot for Microsoft Teams which fetches product information from the SAP system based on user inputs.

 

Thanks to some fantastic YouTube videos from Holger Bruchelt and the help provided.

It was really easy to get started and get my hands dirty with Power Virtual Agents bots

.

Figure: High-level architecture

 

The intent of this blog is to emphasize how easy it is to create, deploy and integrate Power Platform with SAP System.

 

The Power Platform is an intuitive, extensible platform of low-code tools that empower users to build apps, automate processes, and analyze data, including SAP data. Solutions built on the Power Platform enables organizations to get more out of their SAP data, from deeper analysis and reporting to more efficient, SAP-driven business processes.

 

Power Virtual Agents lets you create powerful chatbots that can answer questions posed by your customers, other employees, or visitors to your website or service. Power Virtual Agents is available as both a standalone web app, and as a discrete app within Microsoft Teams.

 

1. Develop Chatbot using Power Virtual Agents

Go to: https://web.powerva.microsoft.com/ and sign in using your credentials:

             Figure: Microsoft Sign in, Source: Microsoft

 

2. Creating Topics for the Chatbot

The starting point of a chatbot is Topics. In Power Virtual Agents, a topic defines how a bot conversation plays out. You can author topics by customizing available templates, create new topics from scratch, or get suggestions from existing help sites.

Figure: Power Virtual Agents Topics

Source: Microsoft (modified)

 

Figure: Create Topics in Power Virtual Agents

Source: Microsoft

 

You may enter other details as follows:

Figure: Trigger phrases in Power Virtual Agents, Source: Microsoft (modified)

 

A topic has trigger phrases, these are phrases, keywords, or questions that a user is likely to type.

A trigger phrase is a phrase that a customer enters in the chat window to start a conversation with the bot. Once the conversation is started, the conversation follows the path you define.

This specific Topic would be triggered based on user inputs provided to the bot during an interaction.

The AI uses natural language understanding to parse what a customer actually types and find the most appropriate trigger phrase or node. For example:

Figure: Test bot in Power Virtual Agents, Source: Microsoft (modified)

 

3. Creating conversation path for topic:

 

You would need to create a conversation path for this bot to interact with the end-user. This can be created by selecting Go to authoring canvas:

Figure: Call to authoring canvas in Power Virtual Agents, Source: Microsoft (modified)

 

Below is an example of the user interacting with this bot:

Figure: Conversation path in Power Virtual Agents, Source: Microsoft (modified)

 

 

 

  • The user inputs are matched with Trigger Phrases to find the most relevant trigger phrase.

 

 

 

  • As per design flow, a message is displayed to the user to look up products.

 

 

 

 

  • In this step, a question is asked to the user and the response is captured in a variable.

 

 

 

  • The next step has a call to action based on the user input captured in the variable. The action here is to Create a Power Automate Flow

Figure: Create a flow, Source: Microsoft (modified)

 

In this flow, the user input variable is passed as a Product ID through Get product functionality, that connects to the SAP system through a custom OData connector. As a result fetches the corresponding Name,  Description, and Price of Product ID.

Figure: Flow of input & return values, Source: Microsoft (modified)

 

  • The values returned from SAP system can be further displayed to the user through the Message.

 

This flow of Power Automate is ready now and can be tested through the Test bot option:

        Figure: Test bot demo interaction in Power Virtual Agents

        Source: Microsoft (modified)

 

4. Publish the Chatbot

 

The Chatbot is now ready and can be Published, activated and added to applications like Microsoft Teams:

                 Figure: Options to Publish Chatbot

                 Source: Microsoft (modified)

 

5. Integrate with Microsoft Teams

Once published, this Chatbot can be added to your Microsoft Teams application.

Figure: Microsoft Teams integration with Chatbot

Source: Microsoft Teams(modified)

 

The chatbot can be shared with your team members or published to Teams Channel for others to interact.

Figure: Microsoft Teams Chatbot for SAP Products

Source: Microsoft Teams(modified)

 

Figure: SAP Demo System with a list of Products, Source: SAP(modified)

 

Final thoughts & Call to action

 

This is a basic example of a Chatbot created using Microsoft Power Platform and integrated with SAP Gateway Demo System – ES5. I have used Get product functionality to get the data from the above SAP system. There are many more functionalities that can be implemented with a similar integration approach. I hope you find it simple to integrate and set up. I would strongly encourage going through the references below for a detailed understanding of the topic.

 

If you have any questions, feedback, or suggestion, please post them as a comment.

 

References:

 

 


I intend to publish this blog post as a knowledge share and a quick reference. Errors or omissions are not intentional. Products and services mentioned in this article are not endorsements. Opinions are my own and not endorsed by any organization. It is highly recommended to refer to the official Microsoft documentation and SAP notes for the latest and accurate information.

 

Assigned Tags

      3 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Vladislav Klimov
      Vladislav Klimov

      Hello Pankaj

      Thank you for the article, how to combine 2 worlds in one seamless UX. Can you please advise, how to implemented authentication of OData service call from MS PwoerPlatofm? (I know this was usually a problem in MS PowerApp and PowerAutomate products). They support BASIC-authenticaiton and OAuth againsts regular REST API calls, but have difficuleties with SAP OData services.

       

      Thank you!

      Vlad

      Author's profile photo Pankaj Kumar
      Pankaj Kumar
      Blog Post Author

      Hi Vladislav,

      It depends on the use case and how best these tools are able to help a user in productiveness at work.

      For example, it would be a highly efficient scenario for a user, if they are not only able to communicate with other team members with these tools but also able to update the order information through Power Virtual Agent bots, or Automate the order and requests for internal approvals through Power Automate

      or use a Power Apps app to locate items and enable any barcode scan etc., every possible thing from one platform and hence not required to switch multiple systems back and forth.

      For this integration, I have connected to the SAP Developer System ES5 through my S-User Id.

      When you are building the customer connector, your S-User Id is required for sapes5.sapdevcenter.com authentication. Please follow the Github and YouTube video(Building custom connectors) references above for the details of the configuration.

      Thanks, Pankaj

      Author's profile photo Vladislav Klimov
      Vladislav Klimov

      Hello Pankaj

      Ok, clear! Thank you for those details.

      I had issues when using the PowerAutomate + PowerApps and trying to reach out OData service of the S/4HANA on-prem system. This was not working smoothly, and OAuth did not work as expected. Thus, eventually, Basic authentication was used to authenticate the service call

       

      Thank you!

      Vlad