Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

How to Automate Manual Business Processes with Application Integration

In this article we’ll see how Google Cloud Application Integration can help automate manual processes like Purchase Order Processing for an enterprise.

Purchase order (PO) processing is a common business process that involves receiving, reviewing, and approving purchase orders from suppliers or vendors. The goal of purchase order processing is to ensure that the goods or services ordered are received in good condition and that the supplier is paid in a timely manner.

If there is no automation, vendors or suppliers usually send Purchase Orders PDFs in email as attachments and someone in the order processing (or some other department) manually downloads those PDFs to get the information like account name, opportunity Id, quote amount etc. They then need to log in to salesforce (or any other ERP System), find the account, look for the corresponding opportunities and validate the information manually.

Downsides of Manual Purchase Order Processing

The manual process for purchase order (PO) processing has several downsides, including:

  • Error-prone: Manual data entry is prone to errors, which can lead to incorrect orders, delays, and disputes
  • Time-consuming: Manual processing is slow and inefficient, requiring significant time and effort from employees
  • Lack of visibility: With a manual process, it is difficult to track the status of POs and gain insights into the overall process
  • Scalability issues: A manual process is not scalable and can become overwhelming as the volume of POs increases

Desired State with Automation 

  1. Purchase Orders (PO) PDFs should be automatically picked up from the source without any human interaction
  2. There should be a mechanism to avoid duplication
  3. Without any human intervention, details (Opportunity Id, Account name, Quote amount etc) should be extracted from the PDF
  4. There should be an automated way to query the ERP System like Salesforce using the extracted values
  5. Monitoring/logging capabilities should provide valuable insights into the process. These insights can be used to improve the efficiency, accuracy, and scalability of the process
  6. Notifications should be sent in case the amount does not match or the matching account is not found so the business users can work with vendors/suppliers
  7. For quote amounts greater than $$$  an approval email should be sent before the PO is attached to the opportunity
  8. The solution should be scalable and designed to handle large volumes of data

Automation with Application Integration

We are using Google Cloud Application Integration and Document AI to provide a scalable, robust and secure solution to automate this manual business process. We have used Application Integration tasks, triggers, data transformation functions, and in-built Connectors.

Document AI is used to parse the PDF; being native to GCP, the solution provides a seamless Integration with DocumentAI, making it a robust solution.  As both Application Integration and Document AI are designed to scale, the solution can handle large volumes with ease. 

This is the flow diagram of our solution with email as source to receive PO PDFs:

Flow Diagram.png

How this solution works:

Step 1: Configure a Gmail watcher to send a notification message when a new email is received in the inbox with an attachment. Send the notification to a pub-sub topic or a web-hook

Step 2: Configure the integration flow to subscribe to that topic, so as soon as there is an event, integration flow will be triggered

Pub-Sub Trigger 1.png

P.S. for each loop Gmail - Get Email Attachments calls a sub-integration

Sub-integration.png

Step 3: For every attachment retrieved, the Sub-Integration is called asynchronously. In the Sub-integration, configure the gmail connector to get the message ID, use that ID to get the attachment from the email as a base64 string 

Step 4: Mark the email as read/processed so the email is not read twice to avoid duplication

Get Attachment.png

Step 5: The attachment encoded string is then sent to Document AI using The Doc AI - Process task. First to classify/validate if it is a valid Purchase Order and then to Extract the values 

Step 6: After getting the response from the Document AI, the response is parsed in the Data Transformation task to assign those values to variables

DocAI Tasks.png

Step 7a: Using the account name, connect to Salesforce (built-in Connector). Salesforce is queried and all the opportunities are fetched. The Opportunity Id is then validated and quotes in that opportunity are retrieved 

Step 7b: If there is no valid account name, a notification email is sent

List Accounts.png

Step 8a: The Quote value is then validated and if the amount matches, and the value is less than $$$  the PDF is attached to the opportunity

Step 8a: If the amount matches, and the value is more than $$$  and approval email is sent and when it’s approved, the PDF is attached to the opportunity

Step 8c: If quote amount does not match, a notification email is sent

Create Attachment.png

 

Document AI Processes: A custom classifier and a custom extractor

Doc AI screen.png

  • Custom Classifier - Trained to identify if the PDF is a valid Purchase-order or not
  • Custom Extractor - Trained to automatically extract values from purchase-order PDF: 
    • amount
    • Company_address
    • Company_name
    • Currency
    • Po_date
    • Po_number
    • quote_number

Learn how to set up:

Application Integration triggers: https://cloud.google.com/application-integration/docs/configure-api-trigger

Gmail Connector: ​​https://cloud.google.com/integration-connectors/docs/connectors/gsc_gmail/configure

Salesforce Connectorhttps://cloud.google.com/integration-connectors/docs/connectors/salesforce/configure

Approval task: https://cloud.google.com/application-integration/docs/configure-approval-task

Document AI Classifier: https://cloud.google.com/document-ai/docs/custom-classifier

Document AI Extractor: https://cloud.google.com/document-ai/docs/extracting-overview

 

3 2 797
2 REPLIES 2

Hey @PoornimaD 😊 Thanks so much for sharing your valuable insights with the community! Your guidance is incredibly helpful. We're excited to see what new discussions this sparks.

Excellent explainer Poornima.

I'm looking forward to 2025 being the year where App Integration takes off and attains critical mass. Combined with Google's AI offerings, it's indeed a great way to orchestrate Agentic AI applications.

Top Labels in this Space