Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
In this blog post, we will focus on how we can easily leverage the functionalities of Integrating SAP Intelligent RPA bot with SAP Conversational AI chatbot to implement some Business relevance use cases.

Introduction:


SAP Intelligent Robotic Process Automation : 

Automate repetitive manual processes by creating intelligent bots at the same time you can schedule, monitor and manage
your bots on cloud.

SAP Conversational AI :

An Intelligent way of offering a conversational experience to mimic conversations with real people, through digital and
telecommunication technologies. Here we can build, train, connect and monitor chatbots.

Use case:

An IRPA Bot that will dig into SAP system and will dynamically fetch all those purchase order which are pending for release and will send back to you.

Deployment Strategies:

  • Deployed on webpage for a web chat.

  • Deployed on Telegram.


For this development, the following are the prerequisites:

  • SAP CAI Bot.

  • SAP Intelligent RPA 2.0 Bot.

  • API trigger and notifiers in SAP Intelligent RPA.

  • Client ID and Secret – To setup Integration.

  • Cloud studio – Installed on your machine.

  • Desktop Agent – Installed on your machine.


The main steps involved in developing this are as follows :-

  • We create a project using Desktop studio.

  • We deploy, add API trigger, and CAI Notifiers.

  • We create a chatbot using Conversational AI.

  • Setup Integration of Intelligent Robotic Process Automation and Conversational AI bots.

  • Setup Connect SAP Conversational AI Web Client.

  • Deploy our chatbot on Telegram and test it by communicating with it on Telegram.



SAP Intelligent RPA Bot Details :


First, we create our and IRPA Bot in Desktop Studio by capturing screens, creating workflows, generating scripts and defining context variables as per requirement and finally it should look like below :

Workflow :




Context variable:



 

Export the package of your project from Desktop Studio and import that same package in Cloud Factory.


Add that package in your Environment and create an API Trigger.


Select a package created and recently added by you in your environment..


Select trigger type as "API".


Click on next then Provide trigger details like name and create it.


once trigger is created then in order to connect your API save these two info as follows :

  • POST URL :  Copy from Trigger information

  • API Keys    :  Copy from your Environment




SAP Conversation AI chatbots:


Login to the http://cai.tools.sap and go to the home page click on the new bot.


Click on “Perform Actions”:


Select predefined skills for your CAI bot.


Enter your Bot details and create it.


Select the options as done in below image:


Now, click on Create button for new intent and name it.



Provide intent name , description and click on create button.



Click on the newly created intent and an some expression for it.


Then click on the tab “Build” and add a customized skill or any standard skill (I took small-talk).


 

Click on the tab "Triggers" and add a condition.



Click on the tab Actions and define your conditions, Autoreply messages, any other service/action by bot:


click on "Connect to External service".


Now, We will get Client Id, Client Secret, and Authorization URL for OAuth2 Authentication from Secret key created for our instance in the environment as mentioned in the below image.


Click on "1 key" link.


Set the value for ‘URL’ of the trigger in the API Service Configuration after POST and copy all details from previous step and paste it here.



In Headers tab, create a new field and put "irpa-api-key" in box below "content-type" and paste key that you copied from environment in box below "application/json" as key value.


Open Body Tab, fill it as filled below:


Now train your CAI bot and then we can trigger a job and test it.

Finally, we are good to go for adding a SAP CAI notifier.

In the Cloud factory, We will initialize SAP Conversational AI notifiers and it will be triggered when the bot has been executed successfully.

In order to add a notifier, we will be needing SAP CAI Client-ID , Secret-key , Authorization URL , Developer token.

To get above details, go back to CAI portal http://cai.tools.sap and in the chatbot configuration - click on the setting on the top right corner, under the "Token" tab go and copy the Client-ID , Secret-key , Authorization URL , Developer token.


Go back to Cloud Factory environment, select your trigger and click on add notifier.


Select CAI and click on next.


, Fill below details:

  • Choose notify on Success.

  • Put the copied Developer token in the field token.

  • Initialize the Conversation ID with ${invocation_context.conversationid}.



Fill details like Client-ID , Secret-key , Authorization URL , Developer token which you copied from previous step.



Finally, our CAI Bot is ready for its deployment in web page and Telegram.

Web page Deployment:


go back to CAI portal and open "connect" tab and select webchat and click on create button and then copy the webchat script.


Paste that script in your HTML page code within body tag.



Telegram Deployment:


For Telegram deployment, you need a token and you can get it by following steps:

Open the Telegram App on your mobile phone and search BotFather.


Start Chatting with BotFather by clicking START/ RESTART.


After Clicking START/ RESTART, click on /newbot.

Choose a name and a username for your bot, a username must end with ‘bot’ like testbot,
user31bot. It will give you a congratulation message that includes Token.


Post getting token, Go back to CAI portal and open connect tab and select Telegram.


A pop-up will come asking for a token, provide the token which you copied in previous step and click on update channel.

               


Finally your Bot is ready and deployed on Telegram and to access it, click on “t.me/bot name” link on the telegram that has come with a congratulation message, It will take you to the chat and Start Chatting Now !!!.

Congratulation, You have deployed your Integrated SAP IRPA & Conversational AI chatbot to both webpage and Telegram portal.

!! Enough Theory !!  Its time to watch now:

 

WEB Page  Deployment Video:


 



 

TELEGRAM  Deployment Video:


 



Reference links:


 

SAP Community call -  https://www.youtube.com/watch?v=T-eGePzq9ic


Conclusion :


 

Concluding this blog post, here we have seen that how exactly we can integrate SAP Intelligent RPA & SAP Conversational AI by defining parameters between them and set-up a connection. Also its deployment on multiple platforms like webpage supporting webchat and social platform like telegram.

Feel free to post a comment in case of any query or concern.

!!! Stay tuned for more, Happy Learning !!!.

9 Comments
Labels in this area