Automating Creation of Purchase Order Process with...
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!
SAP Intelligent Robotics Process Automation automates the enterprise business processes. Cloud Studio is used to design the end-to-end workflows and the packages can be generated into the cloud factory in SAP BTP. On-premise agent is responsible for execution of these packages and act as digital assistant ( attended automation) or as a digital worker (unattended automation).This blog explains step-by-step process on how to automate the creation of purchase order using Manage Purchase Orders FIORI Application in SAP S/4 HANA Cloud, triggering the automation in the SAP Chatbot using SAP Conversational AI, and then integrating with Microsoft Teams
Generate Package- Once the automation project is created, the package can be generated by clicking the "Generate Package" in the Overview tab
Release Package- Navigate to the package tab of the Automation factory
Create an API Trigger -
API trigger opens a dedicated endpoint which allows the execution of the automation by the external application
In the API trigger information pop-up, click Copy and paste it in a notepad (API URL). Click Close. The newly generated trigger is visible in your Environment.
Generating new API Key -To generate a new API key, click Add API Key
Click Copy and make sure to note down the key
Creating Service Key in SAP BTP Trial -
Name the Service key and click Create
View the Service key and copy the clientid, clientsecret and URL
Create the Intent based chatbot by clicking the new New Bot. Select the predefined skills like greetings, weather etc.
Forking the Intent-Train the intent by using the expressions.
Add skill- In the build tab, click on add skill
Go to the skill and click on trigger to add the forked intent created above
Click on the action type and create new action group and then Click Connect External Service and then click CONSUME API SERVICE.
API Service Configuration
POST URL- paste the API trigger URL ( API URL in API trigger information above)
Client ID- paste from the Creating Service Key in SAP BTP Trial section above
Client Secret- paste from the Creating Service Key in SAP BTP Trial section above
Authorization URL-paste from the Creating Service Key in SAP BTP Trial section above appended with suffix /oauth/token (https://<yourtenant>.authentication.us10.hana.ondemand.com/oauth/token)
Go to the Headers tab and click New Fields and add below
irpa-api-key = key copied from Generating new API Key
Click the connect tab in SAP CAI and click on MS Teams third party channels and copy the Messaging endpoints which will be used later in MS Azure resource ( MS Azure Portal)
Log into Microsoft Azure and create a new Azure Bot resource
post creation, click on the resource and then configuration
Add copied values in SAP CAI
Messaging endpoint is coped as mentioned above
Copy the Microsoft App ID and Secret key Value
Go back to the Azure Portal and click on channels and MS teams and then publish
Click on Open in Teams to complete the MS team integration with SAP CAI chatbot
4. Demo
To Wrap, the Purchase order creation process is automated using the attended bot and triggered from the MS Teams. The automation can be extended by reading the data from from an excel, pdf or email etc. for the creation of the purchase order.
Please click on the links for more information on SAP Intelligent Robotics Process Automation content : SAP Community | Q&A | Blogs
Please share your feedback or thoughts in the comment section below
Thanks
2 Comments
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.