Automation of business process through APIs is a powerful approach that allows integration with SBPA tenant, enabling you to interact with and manipulate data programmatically.
Deploying an automation BOT as a web service API involves making your automation functionality accessible over the internet so that other systems or users can interact with it by the API calls. These API calls can be executed from 3rd Party API tools like POSTMAN.
Triggering a bot through APIs offers several advantages. Bots are software applications designed to automate tasks, interact with users, and perform actions based on predefined rules or AI capabilities. When we trigger a bot through APIs, it means we are initiating its execution or instructing it to perform specific tasks programmatically using API calls.
APIs allow seamless integration between bots and other applications, services, or databases. By triggering the bot through APIs, we can connect it with various platforms, enabling the bot to access and exchange data. Through APIs, we can initiate multiple instances of the bot simultaneously. This feature helps distribute workload and process tasks in parallel, enhancing performance and scalability.
By triggering bots through APIs, we can maintain centralized control and monitoring. API calls can be logged, audited, and tracked, providing a clear view of the bot’s activity.
Use case:
In this use case we are going to see creating Sales order scenario in SAP S/4H System. This UI Automation scenario will be triggered from API calls via POSTMAN.
Pre-requisite:
Then these following steps need to be performed sequentially,
1)Deploying SBPA Bot:
Sample endpoint IMG 1.8
Now we have successfully deployed the Bot and created the Automation trigger.
2)Configuration of BTP Cockpit:
1.Navigate to the BTP Cockpit centre->Services and Instances page,
Create an instance of the SAP Build Process Automation service, using the standard plan,
3)Configuration of POSTMAN,
Choose Client Authentication as a Send as a Basic Auth header.
Give the access token URL as per the following format.
<Authentication URL>/OAuth/token
8. Provide API Key name and click Next
9.Click create,
10.Note down the API Key, it will be shown only once.
Finally Add the generated API key to POSTMAN.
Execution
Now the Bot is ready to execute,
Give the payload as per the Input schema generated and click Send.
for a successful API call, we will get the response as 201 Created and the Job ID will be shown in the body. Which means the job has been added in the queue for execution.
To check the execution status of the bot, navigate to tenant and click Monitor->Automation Jobs,
Note:
Conclusion:
By using this method, we can trigger a job to automate SAP and Non-SAP application in asynchronous way.
I hope this blog addressed what you’re looking for,
Let me know in comments if you have any queries.
Thanks,
Ajith