Case study · 4 min read

Where a person checks an AI agent’s orders before they reach SAP

An AI agent drafts stock transport orders from emails and spreadsheets. A few failed SAP attempts lock the account it uses and stop orders for every sender. I designed the screen where an approver stops a bad order first.

Client
Supply chain team at a global food and agriculture company
My role
UX design consultant. I designed the review workflow and its three flags, and built the screens.
Built with
Claude Code, an AI coding tool, and Figma
Outcome
Approved, now being built
An extracted order open for review: sender, time, intake path, and subject across the top, a link to download the original email, and six line items, each with a High confidence, Low confidence, or Merged flag. Reject and Approve sit at the foot.
Everything the agent pulled from the email, a flag on every line, and the original one click away.

What a failure costs

Requests to move stock between sites reach a shared mailbox as a spreadsheet or an email. An AI agent drafts a stock transport order from each one. A person approves it before SAP, the company’s ordering system, creates anything.

The first question I asked the client’s developers was: what happens when SAP says no?

The agent logs into SAP with one shared account, and that account locks after a few failed attempts. A lock stops orders for every sender until IT unlocks it. It had happened before.

That set the review screen’s job: every failure the system can see coming happens in front of a person, before SAP sees it.

The STO approval queue in dark mode: five pending requests, each with the time received, the sender, whether it came as Excel or email, the line count, a status, and a View button.

Three questions, three kinds of flag

A single “needs review” badge would have mixed up three different risks. So each flag answers one question:

  • Will SAP accept it? Every line is checked against SAP’s records when the email arrives. A line that fails blocks Approve, because it would fail at SAP too.
  • Did the agent read it right? Low confidence asks the reviewer to check the source. Approve stays open, because the reviewer often knows what the agent couldn’t.
  • Did the system change it? When duplicate lines are summed, the total is marked Merged and its parts sit underneath.
How flags work: High confidence and Low confidence under Confidence, Validation failed under Validation, which blocks approve, and Merged under Modifier.

I wasn’t sure about letting low-confidence lines through, since a hard stop would have been simpler to build. The client’s product owner kept Approve open: the confirm step counts the lines still flagged, so the approver goes ahead on purpose.

The Approve STO dialog: it says approving creates the STO in SAP and emails the sender, summarizes the sender, 42 line items, and the route, and notes that 3 lines need review.

Every outcome has a reason

Reject takes one of three fixed reasons: field-rep error, agent error, or duplicate. No free text. The split tells the team whether to fix the agent or the senders’ instructions.

The Reject STO dialog with its reason menu open: Field-rep error, Agent error, and Duplicate.

Some refusals can’t be seen in advance. When SAP does refuse an order, its error is kept word for word, emailed back to the sender, and filed under SAP failed in the approval history.

Approval history with tabs for All, Approved, Rejected, and SAP failed. Each row shows the outcome: an STO number, a reject reason, or the SAP error itself.

Built from a system I’d already made

The screens came from a design system I’d built in code: 48 components and the rules for using them. It grew out of the standard I made for this company’s 40+ SAP apps.

From one style guide to a system any project can build from
  1. Style guide and patternsone standard for 40+ SAP apps
  2. A larger design systemthat standard joined the company’s newer, wider system
  3. Rebuilt in Claude Code48 components, their rules, and a plugin
  4. Synced to Figmaevery component, built in Figma from the code

What working with AI changed

Two things kept the reviews on product questions:

  • Every screen carries its requirements. Each screen sat beside the numbered requirements it met, so a review checked each requirement against its screen.
  • Feedback arrived clear. AI turned recorded sessions into translated notes, so a comment made in another language reached the change in plain words.
The requirements panel under the Approve dialog: four requirements, each ending in its numbers, such as FR018 for the confirmed summary and FR025 and FR027 for flagged lines that don't block approval.

Reviewed until it held

I took the screens through reviews with the developers and managers. The second round came back approved, and the client’s developers are building the app now.

An agent that’s right most of the time still needs a screen designed for the time it isn’t.