Simplify Business Document Processing with SAP AI Business Services
Part of the SAP AI Business Services introductory-, and product portfolio series (see all parts at the end of this post). Credit to Tim Nusch and Tobias Weller who helped me drafting this blog post.
The concepts and applications of machine learning and artificial intelligence have been on everyone’s lips for some time. Nonetheless, many of us are not aware of how much we use this technology every day. In fact, we are constantly training machine learning algorithms without realizing it. It is enough to name well-known examples such as Facebook’s face tagging, Google Maps, or Netflix movie recommender. However, it is still very challenging to productively use and scale the technology in the enterprise context for relevant business processes. Businesses for example still deal with huge volumes of paper-based documents, e-mails and other forms of unstructured documents causing businesses huge document processing costs.
What is Business Document Processing?
Just invoices alone make up for an estimated yearly volume 550B documents with other invoice-like documents adding an additional volume of 5-15 times the invoice volume . Processing costs per invoice range from 5 to 12 USD with 62% of the costs coming from manual processing , thus automation of BDP is a key driver for businesses to reduce their labor costs.
Business Document Processing provides strategic machine learning capabilities that automate and optimize processes and enrich the customer experience across the intelligent suite. They are provided as re-usable services for SAP Business Technology Platform customers.
Fig. 1: The concept of Business Document Processing. Source: SAP Internal – AI Business Services (2020).
Services from the Business Document Processing portfolio all follow the same underlying principles. The first step is to automate the extraction of semantical information from Business Documents. The next logical step is to automate the processing of the extracted information via automatic enrichment with Business Data. The extracted and enriched information is then ready for embedding into systems and processes.
The main mission and value proposition of the Business Document Processing service is to transform unstructured documents to structured information with machine learning-based document processing and embed the information into your business processes for instant value.
From Machine Learning Research to a Machine Learning Standard Product
In 2018 SAP Data Scientists presented a novel approach of document representation: character grid or chargrid. This approach makes use of a 2D grid of characters to preserve the 2D layout structure of documents; while simultaneously working on the textual content . At SAP it has been seen as a break-through in text extraction, mainly with regard to recognizing and processing information from tabular structures, which can be found in most of SAP-relevant documents.
Chargrid makes use of fully convolutional encoder – decoder networks. Not only it recognizes the characters of the text (OCR) and understands the contextual information of these characters (e.g. invoice number, invoice date) but it also takes the format of the document into consideration. The model predicts a segmentation mask and bounding boxes. It significantly outperforms approaches based on sequential text or document images. The research work was published as a paper . For more details please also refer to this article .
Fig. 2: The Chargrid represents a document as an image with many color channels. Source: SAP Internal – AI Business Services (2020).
Business Document Processing Portfolio
Currently four re-usable AI Business Services for SAP Busienss Technology Platform customers are available:
- Document Classification to classify unstructured documents
- Document Information Extraction to extract information out of unstructured documents and enrich it with business data
- Business Entity Recognition to locate and classify named entities in unstructured text
- Business Optical Character Recognition to extract text out of business documents
Document Classification can classify business documents based on customer-specific machine learning models. These customer-specific classification models are trained based on a sub-set of already classified (labeled) documents.
In this scenario, Bob, a Customer Service agent, needs to classify incoming documents in terms of their types. However, because of the large quantities of documents, he spends a lot of time classifying the documents since he must open and read every file separately.
By using Document Classification, this classification process can be fully automated. Since the underlying machine learning model is trained on the customer-specific types such as Invoice, Dunning Letter or Complaint, it uses these types for future document classification.
Figure 3 shows an exemplary use case for document classification. Please note that the classifications (here: document type) are customer-specific and could represent other criteria such as criticality of documents as well.
Fig. 3: Exemplary representation of Document Classification. Source: SAP Internal – AI Business Services (2020).
Document Classification helps to reduce the manual effort and errors for the classification of business documents. Additionally, it speeds up the document processing overall by channeling documents based on their type.
The following video provides an overview about document classification and contains a demo of Document Classification in the S/4HANA Document Management system.
Document Information Extraction
Document Information Extraction extracts structured information from unstructured documents. The extracted information can be automatically enriched with your existing structured master data and transactional data.
John, an accounts payable clerk, is processing large numbers of documents, especially invoices in his case. For processing these invoices, John needs to read the whole invoice, understand the context and then type the relevant information into his ERP system. Besides this a matching of information is sometimes required additionally, for example the sender name to the supplier ID, which is done manually. John spends a lot of time on searching and matching the right information and errors can occur in this manual extraction because of misunderstandings.
Document Information Extraction helps to automate this extraction process and enriches information such as supplier IDs or company codes automatically. Now the document processing is happening much faster and John can use his time on higher value tasks.
Figure 4 shows an exemplary invoice being processed by Document Invoice Processing. Please notice that apart from the extracted fields the supplier ID is added via the enrichment functionality of the service.
Fig. 4: Exemplary representation of Document Information Extraction. Source: SAP Internal – AI Business Services (2020).
Document Information Extraction helps to drastically reduce manual efforts by automatically extracting structured information from unstructured business documents. By reducing the manual efforts, the overall document processing efficiency can be increased while also reducing the error rate.
The video below provides an overview about Document Information Extraction and presents a demo for invoice processing.
Business Entity Recognition
Business Entity Recognition helps to locate and classify named entities in unstructured text documents. Any given type of named entities can be detected and classified into pre-defined categories. Business Entity Recognition utilizes a pre-trained machine learning model for text to automatically recognize entities in text documents.
Fig. 5: Exemplary representation of Business Entity Recognition. Source: SAP Internal – AI Business Services (2020).
Bob, a customer service agent, receives many requests from customers, who want to know the status of their payments or deliveries. These requests reach Bob typically via email in unstructured format. Bob needs to create service tickets and extract the required information from both the email text and the attached documents. Then he needs to search for the required information in ERP systems. This process takes Bob between 5 and 15 minutes per request, summing up to long days of responding customers on their requests.
With Business Entity Recognition, this process can be automated and accelerated to a high degree. The automation helps to detect and classify the information contained in the document. Now Bob is prepared with all required information coming from the request. This process can be further enhanced via integration with further solutions such as the SAP Shared Service Framework and SAP Service Ticket Intelligence. This eliminates the need to switch from system to system and simplifies the search process for example by providing recommended resolutions.
This process can be further enhanced via integration with further solutions such as the SAP Shared Service Framework and Service Ticket Intelligence. This eliminates the need to switch from system to system and simplifies the search process for example by providing recommended resolutions. In addition, Document Classification and Document Information Extraction can be used to classify and extract information out of the email attachments.
Business Optical Character Recognition
Business Optical Character Recognition helps to extract text out of business documents. It detects the document language and chooses the best OCR (Optical Character Recognition) model to extract text out of it.
Fig. 6: Exemplary representation of Business OCR. Source: SAP Internal – AI Business Services (2020).
Marie, a software consultant, needs to input her paper invoices for her business travel expenses. During a business trip she typically collects five to ten invoices, mostly from public transport, taxi and hotels. After her trip, she needs to sort, scan and enter the data from the paper invoices manually.
Business Optical Character Recognition can help to automatically recognize and digitally input the invoices. This helps eliminating labor costs and improve efficiency.
Business Optical Character Recognition targets multiple scenarios next to the travel expense review scenario above. Other scenarios could be document archive search, insurance claims recognition or contract comparison. The service can be integrated into your business scenarios, such as your travel expense management process via the APIs.
Please notice that Business Optical Character Recognition aims at extracting the information string for further processing and does not process semantics in contrast to the Document Information Extraction service.
The business document processing services are all offered in the same way. The services are running on SAP Busienss Technology Platform and offered as re-usable services for SAP Business Technology Platform customers.
All functionalities are delivered via web services over the HTTPS protocol. The communication with the services is secured by the OAuth 2.0 protocol. The standard user authentication and authorization mechanisms provided by SAP Business Technology Platform for Cloud Foundry is used. The service consumer can create an instance of the service and generate credentials to communicate with the service instance. For more information on this topic, see Data Privacy and Security in the SAP Business Technology Platform documentation.
As visible in the illustration below, the service consumer – which could be an SAP or non-SAP application – would call the service via the HTTPS-based API which is secured by the OAuth 2.0 protocol. The functionalities of the services (e.g. to classify a document or to extract the information contained in a PDF file) are available as RESTful APIs with respective endpoints and HTTP methods (especially GET, POST, DELETE). The data is provided back to the service consumer in the JSON format.
Fig. 7: An example of a reference architecture for integrating AI Business Services. Source: SAP Internal – AI Business Services (2020).
There are two options for consuming the Business Document Processing services.
Ready to use
Document Information Extraction, Document Classification and Business Entity Recognition are generally available on SAP Business Technology Platform as SAP AI Business Services. Commercially the services can be consumed via the Cloud Platform Enterprise Agreement (CPEA). For more information, please visit Pricing and Packaging for SAP Business Technology Platform. Additionally, Document Information Extraction is natively embedded into SAP Concur Invoice, and integrated into SAP S/4HANA, SAP S/4HANA Cloud and SAP ERP as part of the SAP Cash Application and Payment Advice Extraction and can be consumed as part of the respective license. Business Optical Character Recognition service is avaiable as a dedicated API endpoint of Document Information Extraction: Get All Pages Text.
Ready to test
Document Information Extraction is available for testing via SAP Business Technology Platform Trial. You can easily activate the service, test it on your own business documents and build a proof-of-concept around it. A trial activation tutorial is available on the SAP Developer Center under Use Machine Learning to Extract Information from Files.
- Getting Started with Document Information Extraction Trial Service.
- Find more information about Invoice Object Recommendation HERE.
- Internal – Find more information about our AI Business Service and our Business Document Processing Services on JAM!
- Business Document Processing with AI by Dr Markus Noga.
Read all blog posts of the SAP AI Business Services introductory–, and product portfolio series:
- Part 1: SAP AI Business Services – Exploit the Full Potential of Intelligent Technologies to Optimise your Business Processes
- Part 2: Artificial Intelligence – What it is and why you can’t turn a blind eye
- Part 3: Simplify your Procurement Process and Automate Accounts Payable with Invoice Object Recommendation”
- Part 4: Simplify Business Document Processing with SAP AI Business Services (this blog post)
- Part 5: Make Efficient and High-Quality Master Data Management a Reality with Data Attribute Recommendation
Great blog, thanks Tomasz!
Excellent blog Tomasz. Could you help me understand what makes SAP AI Business services so
different from SAP Data Intelligence in terms of Machine Learning?
Thanks a lot for your feedback and question, Hayat. SAP Data Intelligence is a platform you can use to build your own custom specific AI / ML use-cases.
AI Business Services are pre-build services that are tailored to a very specific business problem. You can consume them through an API without the need to adapt. You do not need to have data science know-how but simply consume a service through an API that uses AI under the hood. In case you want to build your own AI / ML Service or use-case, SAP Data Intelligence is the tool of choice.
On top of Ivona's answer, you don't need to have SAP Data Intelligence in place to consume AI Business Services. If you have access to SAP Cloud Platform you can activate the service you require and test/consume the API. From the commercial perspective you can use the Cloud Platform Enterprise Agreement (cloud credits) or SAP Store for subscription-based consumption (currently available only for selected AI Business Service; we are working on extending it to all services). Hope it helps.
Speaking of Document Information extraction, can we leverage this service to extract Engineering Documents such as Mechanical Engineering Title Blocks as used in the Discrete manufacturing industry.
Also, can this model be trained to decipher a TIFF or JPEG.
please note that DOX is optimized for business invoices and payment advices. We are soon to deliver models for Purchase Orders. There is no custom training possible at the moment for DOX, however. We are currently working on a concept for that.
I am pretty confident that the Business OCR engine will do the extraction job (it supports TIFF and JPEG). One could then train the Business Entity Recognition to recognize the entities of interest. However, the Business OCR service is not yet available externally. We plan the GA for later this year or beginning of next year.
Thanks for your response ! Would wait for business OCR service. We see some potential use cases in the engineering domain as there are lots of legacy drawings available to be machine-read.
In the meantime I am exploring more on OCR
Is the Business OCR service available now on BTP? If not, by when it can be expected?
Business OCR is not yet available for external consumption. However, you can already use Business OCR via a dedicated endpoint of Document Information Extraction:
Here is how you set up Document Information Extraction on BTP:
Thanks a lot Tomasz Janasz. Your inputs have been quite useful!
I have another query. Is "Document Information Extraction" service going to support Arabic language in future? Any plans for that?
Hello Dr. Tomasz - Can we say that "Business Document Processing" service from SAP Cloud platform can do what SAP iRPA would do for some of these use cases around invoice processing, sales order processing, incoming email to incident creation and will do away with need to procure iRPA license for customers who only have these selected use case needs ?
sorry for the late reply. BDP portfolio does not replace the need for IRPA. It rather extend its functionality by providing dedicated enterprise ready ML services.
This scenario you can try out by following this blog:
There is a bot template for that:
I'm investigating the posibilities of this service for my company and maybe you can help me with a couple of questions I have about retraining process:
1.- If I send Confirmed documents to retrain the service, would the retraining results affect only to my instance/tenant or affect to the instances/tenants of any other client too?
2.- Does the retraining process allow to extract more fields than the preset ones for a document type?
Thanks a lot in advance.
Great blog post Tomasz Janasz, well done! 👍🏻