SAP Intelligent RPA Template Bot Design and Development Guidelines
In this blog post, we have listed down the points to be taken care before you begin the development of any new template bots and/or customization of the existing template bots.
The SAP Intelligent RPA template bots are developed to automate the otherwise manual and repetitive business process in several SAP S/4HANA lines of business. The customers adopting these template bots from the Intelligent Robotic Process Automation Store can also customize the bots according to the business needs. However, it is good to consider few aspects of the bot design and development before executing or customizing the existing template bots.
The following guidelines are applicable for both SAP iRPA Desktop Studio and SAP iRPA Cloud Studio template bots:
- Use only allowlist APIs available in SAP API Hub.
- Use OData Batch for creating and updating entities. The batch size depends on the API.
- Request only JSON response and not XML. For this, in headers of the request add the key ‘Accept’ and the value as ‘application/json’ or use ‘$format=json’ in the URL.
- Use separate change set if the update/create operations are independent.
- Use same change set if some update/create operations should be done atomically.
- Check the OData metadata to find the details of each field. For example, dates in OData API generally returns in UTC milliseconds or UTC timestamp. Check the date format mentioned in the respective bot documentation.
Input Excel File
- Use the mapping maintained in an external configuration file to generate the OData API payloads from Excel file data.
- Use a base folder path to store all relevant Input Excel files that will be fetched and processed by the bot. The bot saves the output log files in the same the base folder after execution.
- Check whether the input Excel contains records which are linked to records in other sheets. If yes, records of an input file cannot be processed independently. A record in a sheet is dependent on other records from the same sheet or another sheet.
Example: An input file contains a sheet named ‘Header’ with 5 rows and another sheet named ‘Items’ with 10 rows. Each row from the ‘Header’ sheet is linked with 2 records from the ‘Items’ sheet. The data can be processed only after linking the records from both the sheets. Suppose a column, say ‘A’ acts as the grouping field( as a column ) for such linked rows from multiple sheets, then such groups can be processed independently after linking.
- Do not save sensitive data in the logs generated by the bot.
- Do not export sensitive data from any bot so that it does not appear in cloud factory logs.
Screen Scrapping Bots
- Use Ids and classes as identifying criteria for the UI elements.
- Do not use text as criteria for page (title) or elements to make it compatible for multiple languages.
- Do not use those classes as criteria which can depend on the theme of the Fiori launchpad.
- Do not use autogenerated id as criteria for example M0_1001 or list_1.
- For elements having no clear identification criteria, use tree structure to identify the element.
- Map the element with a UI5 control using the custom type.
Workflow Development in Studio
- Analyse if the bot execution process can be logically split into smaller units of work such as processing a single Excel file, processing a single batch, processing a single record. Here processing refers to performing all logical steps that are related to that entity, and reading a file, performing API calls for all records, saving all logs).
- Consider creating a separate scenario/automation which takes user input from the popups and pass them as input parameters to the scenario/automation that performs the actual business logic.
Generic (Before Execution)
- Create a separate SAP S/4HANA Communication/Technical Users to run the template bots to analyse the transaction logs resulted from bot execution.
- Close the SAP S/4HANA apps before triggering the screen scrapping bot as the bot must open the related apps and do the needful actions. When the bot is running, do not interrupt the executing with any system interactions.
- Close the related input Excel template before triggering the bot. However, during execution, do not close the input templates being read by the bot.
We have covered most of the aspects to be considered while designing or developing template bot. As we consistently target to improve the performance of template bots, we would publish similar blog posts to convey our findings as best practices and guidelines.