Automated Order Creation
This use case outlines an automated workflow with Salesforce and MuleSoft, tailored for service personnel handling purchase orders (POs) from B2B customers. These POs, typically received as scanned PDF documents, are deposited into a shared FTP folder. The service agent then initiates a request through an Order Management Agent to upload, process the documents and create the corresponding orders in Salesforce.
The end-to-end automation seamlessly handles the following steps:
• Upload of scanned POs
• Document classification
• Data extraction and validation
• Creation of the final order in Salesforce
This streamlined end-to-end automation significantly reduces manual effort, ensures greater accuracy, and accelerates order fulfilment.
Step 1
The process begins when a service agent submits an order upload request through an Order Management Agent built with Salesforce Agentforce for seamless interaction. Once the request is received, the Agent triggers a Salesforce Flow to initiate the order intake process.
Step 1: Uploading PDFs from FTP to Salesforce
The first step in the flow invokes MuleSoft API #1, known as the Uploader. This API connects to a shared FTP folder, where scanned PDF purchase orders from B2B customers are stored. The API converts each file into Base64 format and uses the Salesforce REST API to upload the documents into Salesforce. Upon successful upload, it returns a list of Upload IDs (Content Version) back to the calling flow.
Step 2
Step 2: Document Classification and Data Extraction
The Salesforce Flow then iterates through each uploaded document using the list of the returned IDs. For every document, it generates a secure download link and sends it to MuleSoft API #2, known as the Data Extractor. This API retrieves the file from Salesforce and forwards it to an MuleSoft Intelligent Document Processing (IDP) system for data extraction.
The IDP system performs two essential functions:
1. Classification
It identifies the document’s layout and source. This step is crucial, as B2B customers often use different templates and formats for their purchase orders.
2. Data Extraction
The IDP extracts all key information from the scanned image, like Purchase order type, Order date, Billing and shipping addresses, Line items details, Total order value etc.
The extracted information is then returned to the Salesforce Flow in a structured JSON format, ready for further processing and validation.
Step 3
Step 3: Creating the Order in Salesforce
Once the structured data is received, the Salesforce Flow parses the JSON to extract both the order header and line-item details. It begins by creating the Order record in Salesforce, followed by a loop that creates individual Line Items for each product listed in the purchase order.
To maintain full traceability, the original scanned PDF is also linked to the order record as a supporting document.
Upon successful order creation, the Flow returns the Order ID and Order Number back to Agent and then subsequently to the service person, confirming that the process is complete.
Optional Post-Processing via AgentForce
Following order creation, the service agent can continue interacting with the system through the Agent to perform additional actions such as:
• Checking the current order status
• Reviewing billing or shipping details
• Accessing related documents
All of these tasks can be performed within the same conversational interface—eliminating the need to navigate between different systems and enhancing overall productivity.
Technologies & Tools Used
| Component |
Technology/Tool |
Purpose |
| Order System |
Salesforce |
CRM system to store and manage orders |
| Automation (Salesforce) |
Agentforce |
Front-end used by service agents to manage order uploads and review created orders |
| Automation (Salesforce) |
Flow (Auto-launched) |
Orchestrates the end-to-end process |
| Automation (MuleSoft) |
MuleSoft Anypoint platform |
Interfaces with FTP, IDP, and Salesforce APIs |
| Automation (MuleSoft) |
MuleSoft Intelligent Document Processing |
Classifies and extracts data from Order documents |
| Order External upload point |
FTP Server |
Source of Purchase orders |
Key Functional Highlights
Key Highlights
• Scanned Image to Structured Data
Converts a wide range of non-machine-readable PDFs of drastically varying formats into structured data using AI-powered document understanding—no reliance on fixed templates.
• Intelligent and Scalable Data Extraction
Used MuleSoft IDP, to automatically classify and adapt to different customer PO formats, eliminating the need for one-off configurations or too specific code. This ensures a scalable architecture that can be easily extended to include more customer specific documents.
• Fully Automated Workflow
Delivers end-to-end automation from scanned document to Salesforce order creation, with zero manual intervention.
• Designed for Scalability
Easily handles increasing document volume and supports onboarding of new customers with minimal effort, thanks to flexible, API-driven architecture.
• Built for Maintainability
Modular design using Salesforce Flows and MuleSoft APIs enables easy updates, version control, and low-code enhancements without disrupting the end-to-end process.
Business Impact
This use case demonstrates the powerful synergy between Salesforce, MuleSoft, and AI-based Intelligent Document Processing (IDP) to deliver a resilient, scalable, and agent-friendly automation of B2B order intake.
Tangible Benefits:
For the Business:
o Reduced manual workload and errors
o Faster order processing
o High adaptability to customer diversity
For the Frontline Team:
o Seamless experience with zero technical friction
o Quick access to order details and actions via chat
o More time to focus on customer service, not data entry
This is intelligent automation not just for efficiency—but for empowering people.