Home / Process Mining on Production Orders, Step by Step: Your First Event Log from ERP

Process Mining on Production Orders, Step by Step: Your First Event Log from ERP

"Our orders are late because the machines are slow." I have heard that sentence in plant meetings more times than I can count. Every time, I ask for the same thing: not a report, not a dashboard, just the history of status changes on last month's production orders. An hour later we are usually looking at a very different picture. The machines are rarely where the time goes.

I am Faramarz Ahmadi, and in my 24 years in manufacturing and data I have learned that most ERP systems already record the real story of every production order. Nobody reads it, because it sits in a status-history table instead of a report. This is a free, hands-on tutorial: how to turn that history into an event log and do your first process-mining pass on production orders with Excel and, if you like, a free tool. The scene above is a composite of conversations I have often; the numbers in this article are illustrative.

Process mining on production orders step by step by Faramarz Ahmadi: ERP status history turned into a three-column event log (case ID, activity, timestamp), median waits between released, material staged, confirmations and goods receipt, and an Excel first pass

If you want the bigger picture first, I wrote about where released production orders really get stuck. This article is the practical "how do I start on Monday" companion.

Step 1: Find where your ERP keeps the order history

Almost every ERP that runs production orders keeps a trail of what happened to each order: created, released, material staged, first confirmation, last confirmation, goods receipt, technically complete. Sometimes it is a status-change log, sometimes it is the confirmation and goods-movement tables, sometimes it is a change-document table. Ask your ERP key user one simple question: "For one order, can you show me every status it had and when?" If they can show it on screen for one order, it can be exported for a month of orders.

Start small: one plant, one product family, the last four to six weeks. Fewer than a few thousand orders is perfect for a first pass in Excel.

Step 2: Shape it into three columns

Process mining needs only three columns. Everything else is a bonus.

ColumnWhat it holdsExample
Case IDThe production order number100457
ActivityThe step, in plain wordsReleased, Material staged, First confirmation
TimestampDate and time of the step2026-11-03 14:20
OptionalWork centre, product family, order quantity, plannerLine 2, family B

Rename the system status codes into words people on the floor would use. "Material staged" means something to a supervisor; a four-letter code does not. Keep one row per order per step.

Step 3: Check the timestamps before you trust anything

This is where most first attempts go wrong. Before any analysis, I run three quick checks:

  1. Date without time. If a step only has a date, every wait inside one day disappears. Note which steps have no time.
  2. Steps out of order. Sort by order and timestamp, and look for orders where confirmation comes before release. Those are usually back-dated entries.
  3. Batch entries. If hundreds of steps share the same minute at the end of a shift, someone is entering them in bulk. That time is when it was typed, not when it happened.

You will not fix all of this on day one, and you don't need to. You need to know where the data is weak so you don't present a "bottleneck" that is really a typing habit.

Step 4: Measure the waits between steps

Sort the log by case ID and timestamp. For each row, find the timestamp of the next step for the same order, and subtract. That gives you the time each order spent between one step and the next. In Excel a helper column with the next timestamp for the same order does the job; in Power BI the same idea works with a calculated column.

Then build one pivot table: rows are "from step → to step", values are the number of orders and the median wait in hours. I use the median, not the average, because one order that sat for three weeks will make the average lie about all the others.

In the illustrative sample behind this article, the machine steps (first to last confirmation) took a median of about 9 hours. The wait between "released" and "material staged" took a median of 31 hours. That is the conversation that changes the meeting: the time is going into waiting for material, not into the machines.

Step 5: Count the paths orders really take

For each order, join its steps in time order into one text string, for example "Released → Staged → First conf → Last conf → GR". Count how many orders share each string. These are your variants.

In a healthy process a few variants cover most orders. When you see dozens of variants, look at the rare ones: orders that were released twice, orders confirmed before staging, orders that went back to "created". Each one is a question for the planner or the warehouse, and often the beginning of a real improvement.

Step 6 (optional): Draw the map with a free tool

Excel tells you the numbers; a process map shows the shape. Save your three columns as a CSV and load it into a free process-mining tool, or, if someone on your team knows a little Python, into the open-source PM4Py library. You map Case ID, Activity and Timestamp, and the tool draws the flow with frequencies and waiting times on the arrows. The first time a production manager sees the thick arrow looping back from "staged" to "released", the room gets quiet.

If the concepts are new to you, the IEEE Task Force process mining manifesto is a good, vendor-neutral introduction, and my article on building the event log for a first pilot covers the basics in plain language.

What this first pass will not tell you

A first pass shows where time goes. It does not yet tell you why. Split orders, rework orders, partial confirmations and orders that share material will distort the numbers until you treat them properly, and deciding which timestamp to trust when two systems disagree is a judgement call, not a formula. Linking a long wait to the rule, role or master-data field that causes it is the step that turns a nice chart into savings.

FAQ

Do I need special software to do process mining on production orders?

No. For a first pass, an export from your ERP and Excel are enough. A free process-mining tool or PM4Py helps you draw the map, but the first insights usually come from a simple pivot of waits between steps.

What data do I need for a process-mining event log?

Three columns: the production order number as the case ID, the step as the activity, and the date and time of each step. Work centre, product family and quantity are useful extras for filtering.

How many orders should I use for the first analysis?

Four to six weeks of one plant or one product family is a good start. That is enough to see patterns and small enough to check the data by hand.

Why use the median wait instead of the average?

A few orders that wait for weeks pull the average up and hide what normally happens. The median shows the typical order; look at the long waits separately.

How is this different from a normal production report?

A report shows totals and late orders. Process mining shows the path each order took and where it waited between steps, including loops and rework that never appear in a standard report.

What I keep for the actual work

When I do this with a plant, the export and the pivot are the easy part. The value is in the rules I have built over many projects for cleaning split and rework orders, deciding which timestamps are trustworthy, the thresholds that separate normal waiting from a real problem, and the short set of measures that keeps the improvement from fading after the first month. That depends on your ERP, your plant and your people, so I do it with your team, on your data.

Key takeaway: your ERP already records the real story of every production order. Export the status history, shape it into three columns, check the timestamps, then look at waits between steps and the paths orders take. The machines are rarely where the time goes.

Want to see where your production orders really wait?

Send me a few lines about your plant and which ERP you use. I will tell you honestly what your order history can show and what I would look at first. And the next time someone says the machines are slow, you will have a better question ready: slow compared to what, and waiting for what?

Contact me Read: where production orders get stuck Read: order-to-cash process mining


More on finding where time really goes: find the open production bottleneck with data and plan vs actual in Power BI, step by step.

👁 Views: 2