Create Sales Orders from Email Purchase Orders via IRPA
Challenges/Requirement
Companies receive Purchase Order (PO) documents from their customers and based on them, the business users will create sales orders in the SAP Business ByDesign application. Typically, users will enter or copy & paste the details from the documents to the system. This manual process is not only time-consuming, but also often prone to errors such as incorrect/missing information.
Technical Solutions
Solution Overview
We implemented SAP Intelligent Robotic Process Automation (IRPA) to automate the process of retrieving PO documents from mail box and extracting the order information from the corresponding attachments, followed by creating Sales Orders using SOAP web services.
Information from attachments are extracted using Extract Data (Template) of IRPA cloud studio which inturn consumes SAP Document Information Extraction Service
Initially, a mail folder needs to be created, and a rule should be set up to store emails with the Purchase Order separately. The desktop agent of iRPA will then process the Purchase Order document from this folder, extract the necessary data, and create a Sales Order in SAP BYD.
SAP Business ByDesign Setup
Step1: Business Configuration Setup
- In SAP Business ByDesign, navigate to Business configuration → Implementation Projects.
- Choose the active business configuration and click Edit Project Scope.
- By clicking the Next button, navigate to the Questions section of the scoping document.
- From the Scoping Elements choose Communication and Information Exchange→ Integration with External Applications and Solutions → Integration Scenarios for Cloud Solutions from SAP.
- On the right-hand side, find the checkbox for the question Do you want to enable integration with SAP Intelligent Robotic Process Automation?
- Ensure that the checkbox is selected.
- By clicking the Next and the Finish button, you navigate to the Confirmation section to accept the changes performed.
- At this point, the system will create a provisioning request. This might be checked under Service Control Center → Service Requests.
- To validate the completion status, you should first go to the Service Control Center → Service Requests, search the request ID BYD_ML_RPA and check its status. The status should be Completed.
- To retrieve the IRPA URL, go to the SAP Business ByDesign tenant, navigate to Application and User Management → Input and Output Management → Communication Arrangements.
- Search for the IRPA application in the list and click on the link.
- The URL will be presented in the Service URL column.
Step2: Set Up Windows Generic Credentials
When you are running IRPA bots designed for SAP Business ByDesign, some bots will need user authentication details. The Windows Credential Manager can be used to keep the secure data at user convenience.
- On your Windows desktop, search for the Credential Manager and open it.
- Click Windows Credentials.
- Under Generic Credentials, click Add a generic credential.
- Provide the Internet or network address. It can be any unique identifier for the credentials you are going to maintain.
- Enter user name and password. This is relevant for the system you will connect to the bot.
- Click OK.
- The credentials will be visible in the Generic Credentials list.
E-mail Setup for Bot Processing
This bot can be configured in attended mode using the Intelligent Robotic Process Automation (IRPA) Cloud Factory. The development of an IRPA project involves initiating the desktop agent. Attended automation enables your bots to be automatically triggered to execute complete processes.
- The bot is able to download .png, .jpg, .pdf or .tiff files from e-mails.
- Configure the mail system to create specific folders named “To Be Process,” “Failed,” and “Processed.”
- Implement the rules in the mail system to automatically move purchase order templates shared by users into the “To Be Process” folder.
- Before executing the bot, a root folder must be created, containing a configuration Excel file. The configuration Excel file contains rules for the filtering of emails in the Outlook inbox.
- The name of the configuration file can be chosen by the user and must be specified in the Cloud Factory variable “configExcelFilename”.
- Once the desktop agent is started, it retrieves the purchase order template from the “In Process” folder.
IRPA Automation Flow Setup
This bot automates the extraction of customer purchase orders (POs) from emails. Once the PO is identified, it sends the document to the Document Information Extraction service to scan and extract relevant information. The extracted details are then transmitted by the bot to SAP Business ByDesign via ODATA or SOAP services to create a draft sales order. The original document is also uploaded for business user review.
Overview of the Automation Flow in iRPA Studio
- Step 1: Generate a log file to track the success or failure of each record.
- Step 2: Retrieve files marked as “To Be Processed” to begin data extraction.
- Step 3: Extract data using a predefined template.
- Step 4: Invoke OData Services to create the Sales Order.
Desktop Agent Installation
The installation files for the Desktop Agent can be downloaded from the SAP Software Download Centre (SWDC). For the latest version, refer to the SAP Help documentation: Install the Desktop Agent 3.
Business Benefits
- Efficient Sales Order Creation
The automation streamlines and simplifies the sales order creation process, minimizing manual effort and reducing the likelihood of errors.
- Improved PO Template Management
Better organization and management of purchase order templates lead to faster processing times and increased operational efficiency.
- Enhanced Monitoring and Troubleshooting
Clear distinction between successfully processed and failed templates allows for easy monitoring and prompt troubleshooting.
- Comprehensive Logging
Log files are provided for users to track failed steps and store successful record IDs locally, enhancing transparency and facilitating quicker issue resolution.