Work · No. 003 · In-house
Simple order questions were eating our reps’ time
- Who it's for
- A wholesale order team at a large manufacturer
- Problem
- Retailers email the order team all day with every kind of request. Each simple status question meant a rep checking the ERP and the shipping system, then typing a reply, so manual lookups and data entry crowded out the edge cases that actually need a person.
- What I built
- An agent that sorts incoming emails, picks out the status questions and looks each order up in the ERP and the shipping system. AI reads the email and drafts the answer, fixed rules check it, and a rep reads every draft before it’s sent.
- Built with
- Microsoft Graph · Azure Functions · Service Bus · Azure AI Foundry · Python · C#
- Status
- In progress
What was going wrong
Retailers send the wholesale order team a steady stream of email: purchase orders as PDFs, freeform orders, changes, and a lot of plain “where’s my order?” questions. Answering one of those meant opening the ERP, then the shipping system, working out what had happened to the order, and typing a reply. None of it was hard. It just added up, and it kept the customer service reps away from the complicated issues and edge cases that really need a person.
What I built
I kept the first version to status questions only. It doesn’t create or change orders. A new email starts a chain of small steps, each its own Azure Function, written in Python and C#. The first step sorts the email by type. If it’s a status question, an agent built in Azure AI Foundry looks the order up in the ERP and the shipping system and drafts an answer. A rep reads every draft before it goes to the customer.
The hardest part
Triage. These mailboxes get every kind of request, and the agent can only help with some of them. Most of the work was narrowing down exactly which requests it should handle, and making sure everything else still lands with a person. In test runs on synthetic emails, it sorted about 95% of them correctly. When it got one wrong, it usually sent it to a person instead of answering it, which is the safe way to be wrong.
Where AI fits, and where it doesn’t
I used AI and fixed rules side by side. AI is good at reading a messy email, working out what the customer is asking, and writing a clear reply. It doesn’t decide whether a reply is fit to send. The agent returns its answer in a fixed format, and plain rules check that everything lines up before the draft goes forward. These replies go straight to customers, so that decision needs to be predictable.
What’s next
It’s still in development. For now a person reviews every reply. The goal is to let replies that pass every check go out on their own, so the reps only see the questions that need them.
Result
In test runs on synthetic emails, it sorted about 95% of them correctly, and when an email is unclear it sends it to a person rather than guessing. The goal is for reps to approve a drafted answer instead of doing two lookups and typing it themselves, and eventually for replies to go out automatically.