Automated Supplier Invoice Upload using SAP Build Process Automation
Introduction – Use Case
We are introducing a simpler and faster way to enhance business efficiency and agility with confidence using SAP Build Process Automation. The SAP Build Process Automation gives an opportunity to develop a solution to automatically fetch supplier invoices from five Microsoft 365 email accounts, push them to SAP Business ByDesign and scan for verification and validation. This solution helps to manage labor-intensive, error-prone manual processing of invoices from suppliers.
Monitoring five email accounts and downloading a large number of attachments manually from emails and saving them on the computer as well as entering suppliers’ invoices into SAP Business ByDesign one by one is a tedious task. The current process is wasting resources while keeping manual processes alive. Additionally, there is a high probability of committing mistakes, while performing repetitive tasks.
In this blog, we are describing a few important aspects that we learned while developing a solution to automate supplier invoice processing with SAP Build Process Automation and setting up a Desktop Agent to run the automation in unattended mode.
The following setup was crucial for this automation to work:
- Enabling the invoice scanning in SAP ByDesign project scope
- Enabling external authentication for accessing multiple Microsoft 365 email accounts
- Creating a service Agent in SAP Business ByDesign
As a first step, we enabled integration with SAP Build Process Automation in the Business Configuration and Implementation Project questions.
We also enabled supplier invoices via PDF scanning. However, we didn’t select the automated invoice creation as we wanted the user to review scanned files before creating an invoice.
To use Microsoft 365 Cloud SDK in our automation and create external authentication for the Desktop Agent to access emails, we first configured an Azure application. In the Azure Active Directory, we created an application registration. We ensured the following:
- Under Certificates & Secrets, we created a new client secret.
- Under API Permissions, we added ‘Mail: Mail.ReadWrite’ as a delegated permission and application permission.
- Under Authentication, we added the following URL as a redirect URI:https://login.microsoftonline.com/common/oauth2/nativeclient
- Under App roles, we created a default app role with a value ‘Agent’.
- Finally, we checked that in the admin section of My apps, in the email apps management, ‘Authenticated SMTP’ was selected.
To use these external authentications in the automation, we added authentication name for each email account in a configuration excel file and used authentication name as part of the input parameter in the 365 online authentication step of the automation.
Once saved, we created a new security policy for the newly created business user. In this security policy we left the password validity field blank.
With the automated supplier invoice scanning process, we reduced the manual invoicing process and the risk of human errors associated with repetitive tasks.