Automate order entry with Flow MuleSoft and Agentforce

Automate Order Entry With Flow, MuleSoft & Agentforce | Automate with Agentforce

By

Welcome to our blog and video series, Automate with Agentforce! Get ready to take your automation skills to the next level with the power of Salesforce, MuleSoft, and innovative AI with Agentforce. In each episode, we highlight real solutions built by Awesome Admin Trailblazers—just like you. Whether you’re just beginning your automation journey or you’re already a pro, Automate with Agentforce delivers practical tips and fresh inspiration to help you thoughtfully weave AI and Agentforce into your everyday workflows. In this episode, Kiru Nithyanandan will share how a powerful combination of Agentforce, Flow, MuleSoft RPA, and MuleSoft Intelligent Document Processing can turn a messy manual order entry process into a smooth and seamless automated workflow.


The challenge

Picture this: You work at Global Chemicals, a busy B2B supplier. Every day, you receive hundreds (if not thousands) of customer orders—all in scanned PDF format. And every PDF looks different. Some have headers, some don’t. Some put totals at the top, others at the bottom.

Your enterprise resource planning (ERP) system? Let’s just say it’s seen better days. No application programming interfaces (APIs), no integrations—just keyboard and mouse entry. Employees spend their days opening PDFs, figuring out who the customer is, extracting key details like order number and items, and typing them one by one into the ERP.

It’s manual. It’s tedious. And it’s a breeding ground for errors.

There has to be a better way!

The solution

Here’s how we build a fully automated, conversational experience for this end-to-end process, using only low-code/no-code tools.

Overall architecture for the end-to-end process automation.

Step 1: Classify and extract with MuleSoft IDP

We start by setting up MuleSoft Intelligent Document Processing (IDP) because let’s face it—those unstructured PDFs aren’t going to sort themselves. The goal here is to help the system understand and make sense of the wide variety of formats that different customers send us.

Using nothing but just natural language prompts, we configure IDP to:

  • Classify each document based on the customer (for example, Polychemtex vs. Inbrew).
  • Extract key data like order number, item list, order net value, tax, etc.
  • Structure complex tables and addresses into clean, parsable fields.

We also set up confidence thresholds. If the model’s confidence drops below 80%, the document would be routed to a human for manual review. This ensures we’re getting quality data right from the start.

IDP; prompt to classify the invoice.

Step 2: Orchestrate the process with MuleSoft RPA

Once IDP gives us that structured, cleaned-up data, we pass the baton to MuleSoft Robotic Process Automation (RPA). This is where the real hands-free magic begins.

We build a bot that acts just like a human would—only faster and without ever needing a coffee break.

Here’s what it does.

  • It watches a shared folder like a hawk, waiting for new PDF orders to drop in.
  • Once it finds one, it reaches out to IDP to classify and extract all the juicy order details.
  • Then, depending on which customer the order is from, it takes the right path and follows the steps we’ve laid out.
  • Finally, it logs in to the ERP system—yes, the one with no APIs—and manually enters the order details by mimicking mouse clicks and keystrokes.

It’s like having a super-efficient teammate who never gets tired or makes a typo. The process might look manual, but behind the scenes, it’s fully automated and running like clockwork.

RPA; overall process flow and orchestration.

This is the RPA configuration to send a document to a published IDP document action.

RPA configuration to send a document to a published IDP document action.

This is the RPA configuration query results from a published IDP document action.

RPA configuration query results from a published IDP document action.

Step 3: Use Flow to connect everything

Now that the bot is doing the heavy lifting, we need a way to control and keep tabs on everything. That’s where Flow steps in.

We set up two simple, yet powerful autolaunched flows.

  1. One to kick off the RPA bot—the moment someone requests an upload. It not only triggers the automation but also hands us back something super useful: the execution ID.
  2. Another to check in on the bot later using that ID. It asks, “Hey, how’s the upload going?” and the bot responds with its current status—like "in progress", "success", or "failed"— plus helpful info like the order number and total.

These flows are like the connectors behind the scenes, making sure the automation engine stays responsive and transparent without adding complexity. And the best part? They're all no-code.

This is the flow that triggers the RPA bot.

Flow to trigger the RPA bot.

This is the flow that queries the status of the RPA bot.

Flow to query the status of the RPA bot.]

Step 4: Wrap it all in a friendly face with Agentforce

This is where the magic really comes to life for the end user. We bring in Agentforce to make the whole thing feel like a natural conversation rather than an automation sequence.

We give Agentforce a simple topic—Order Upload—and a clear set of instructions.

  • When someone says, “Upload the orders”, it knows to trigger the flow that kicks off the bot.
  • If the user asks, “What’s the status?”, it checks in on the bot using the execution ID.
  • And if the execution ID isn’t mentioned, it simply asks for it—like a good teammate would.

With this setup, employees don’t need to think about bots or flows. They just chat with Agentforce like they would with a colleague, and things happen in the background.

Agent Builder showing the agent's response to the upload order request.

Key benefits and lessons learned

  • Built with clicks, not code: You don’t need to write code to automate complex, error-prone workflows. With the right tools, low-code is more than enough.
  • With RPA and IDP on the MuleSoft side and Flow and Agentforce on the Salesforce side, you have a powerful combo to automate a wide variety of processes.
  • Agentforce ties it all together: It turns all that backend magic into something users can access with a simple chat. That’s where the real adoption begins.

Resources

Want to see more good stuff? Subscribe to our channel!

SUBSCRIBE TODAY
Build Secure and Compliant AI Agents

Build Secure and Compliant AI Agents | Automate with Agentforce

Welcome to our new blog and video series, Automate with Agentforce! Get ready to take your automation skills to the next level with the power of Salesforce, MuleSoft, and innovative AI with Agentforce. In each episode, we highlight real solutions built by Awesome Admin Trailblazers — just like you. Whether you’re just beginning your automation […]

READ MORE
Using AI To Maximize Sales

Using AI To Maximize Sales | Automate with Agentforce

Welcome to our new blog and video series, Automate with Agentforce! Get ready to take your automation skills to the next level with the power of Salesforce, MuleSoft, and innovative artificial intelligence (AI) with Agentforce. In each episode, we highlight real solutions built by Awesome Admin Trailblazers—just like you. Whether you’re just beginning your automation […]

READ MORE