MuleSoft helps organisations enable hyperautomation and derive maximum benefits from automation and integration. Only recently MuleSoft launched MuleSoft RPA which is well integrated into the MuleSoft ecosystem. They also partner with various companies to enrich their automation capabilities even further.
At MuleSoft CONNECT 2022, MuleSoft announced their partnership with Ephesoft, an 'industry-leading intelligent document processing solution that automates the processing of documents'. Ephesoft Transact platform is powered by Optical Character Recognition (OCR) engine and AI for data extraction from digital and physical documents. Today, I want to test the MuleSoft connector to Ephesoft, and it's going to be fun.
Testing Ephesoft Transact Web Services Connector
Suppose we have to build an integration to extract data from a PDF document and transform it into a JSON format. Ephesoft Transact Web Services connector is what we need to do the job. The connector is available on MuleSoft Exchange. Keep in mind that this connector is new and, therefore, may have some limitations.
I decided to test the Ephesoft connector by executing two operations. Obviously, I start by reading the Connector Release Notes and User Manual.
Pre-requisites: The connector requires a licensed instance of Ephesoft Transact.
My test environment: I use the Postman platform to execute API calls. APIs are running on my local machine.
Ephesoft's OCR Classify Extract operation
A Postman call sends a PDF file to a MuleSoft API which executes Ephesoft's OCR Classify Extract operation to extract data and transform it into a JSON. The transformed response is mapped to fields in CSV format and is saved to my local directory.
Send a PDF file.
Postman Call – sends one PDF file
The message's body contains the file and the batchClassIdentifier
A PDF file was sent
Mule API flows.
Add the connector dependency into the project POM.
Ephesoft Transact Config.
OCR Classify Extract properties.
Response from Ephesoft function OCR Classify Extract.
Mule Transformations.
The result CSV file is saved in my local directory. The extracted information looks right.
Ephesoft's Upload Batch operation
Upload Batch function allows submission of several files directly to Ephesoft for processing. We send two files to this operation. The files are uploaded to the Ephesoft platform, reviewed and validated. Ephesoft then makes a callback to our MuleSoft API sending the files processed.
Postman Call – sends two PDF files. The message contains the files, while variables batchClassIdentifier and batchInstanceName are set as query parameters.
Mule API flows
Ephesoft – Upload Batch Properties
Response from Ephesoft – Upload Batch
A person in charge reviews and validates the document on the Ephesoft side. The process is completed, so Ephesoft calls MuleSoft API sending back the files processed.
Mule API flow – Note: this flow is a copy from the Connector Guide available in the Connector in Exchange
Mule transformations
The original files are returned and saved in my local directory under the unique batch ID.
The Response is logged into Anytoint Studio
I have demonstrated how to use the Ephesoft connector to automate document-centric processes as a part of your API-based integration. Feel free to check out the project
https://github.com/mayarasilva11/mule-ephesoft-connector
I hope this blog was helpful and explained how to leverage the power of intelligent document processing in the MuleSoft environment