Code / Digital Health · September 6, 2024

A computer generated image of a purple substance

Process Mining in UK Procurement and Supply Chain Environments

Process mining has become a transformative technology for analysing and improving operational processes across various sectors, including procurement and supply chain management. In the UK, organisations within industries such as healthcare, manufacturing, and public procurement can leverage process mining to optimise workflows, enhance transparency, reduce costs, and ensure compliance with stringent regulations.

This article delves into the fundamentals of process mining and explores how it can be applied specifically in UK procurement and supply chain environments. We will provide concrete examples and use cases, and where appropriate, include Python code to demonstrate how to apply process mining techniques in practice.

What is Process Mining?

Process mining is a data-driven approach that combines elements of business process management (BPM), data science, and artificial intelligence. It uses event logs generated by enterprise systems—such as ERP (Enterprise Resource Planning) or SCM (Supply Chain Management) systems—to reconstruct and visualise the actual flow of business processes. The goal is to uncover hidden patterns, inefficiencies, deviations from the ideal workflow, and compliance issues.

There are three main types of process mining:

  1. Discovery: Creating a process model based purely on event log data.
  2. Conformance: Comparing the real-life process (from event logs) to an existing process model to identify deviations.
  3. Enhancement: Improving or extending an existing process model based on the real-life process data.

Why is Process Mining Important in Procurement and Supply Chains?

In UK procurement and supply chain environments, processes are often complex and involve multiple stakeholders, systems, and regulatory requirements. Manual process analysis is inefficient and prone to errors, especially when large datasets are involved. Process mining provides a solution by automating the analysis and delivering insights in near real-time.

Some key benefits of applying process mining in procurement and supply chains include:

  • Transparency: Detailed insight into the actual processes, from requisition to fulfilment.
  • Efficiency: Identification of bottlenecks and delays that impact overall supply chain performance.
  • Compliance: Ensuring adherence to regulatory requirements and internal policies, particularly important in the public sector.
  • Cost Reduction: Optimisation of process flows can lead to more cost-effective procurement and supply chain operations.

Process Mining in UK Procurement: A Practical Example

Let’s explore how process mining can be applied in the context of UK public procurement, where organisations need to ensure compliance with the Public Contracts Regulations 2015 and meet deadlines for tender submissions.

Consider the following scenario: A UK-based NHS Trust is using process mining to analyse its procurement of medical supplies. The Trust uses an ERP system that records event logs for each stage of the procurement process—from creating a purchase order to receiving the goods.

Event Log Example

Each step of the procurement process generates an event, with data such as:

  • Case ID: Unique identifier for each purchase order.
  • Activity: The step in the process (e.g., “Create Purchase Order”, “Approve Purchase Order”, “Send to Supplier”).
  • Timestamp: When the event occurred.
  • Resource: The person or department responsible for the activity.

A simplified event log could look like this:

Case IDActivityTimestampResource
PO001Create Purchase Order2024-01-05 09:00:00Procurement Officer
PO001Approve Purchase Order2024-01-06 14:00:00Procurement Manager
PO001Send to Supplier2024-01-07 10:00:00Automated System
PO002Create Purchase Order2024-01-06 10:00:00Procurement Officer
PO002Approve Purchase Order2024-01-07 16:00:00Procurement Manager

Using this event log, we can apply process mining to analyse the procurement process. Python’s pm4py library is a popular tool for this purpose.

Example Code for Process Discovery

The following Python code uses pm4py to discover and visualise the procurement process based on the event log data:

 

import pm4py
import pandas as pd

# Load the event log data into a pandas DataFrame
data = {'case_id': ['PO001', 'PO001', 'PO001', 'PO002', 'PO002'],
        'activity': ['Create Purchase Order', 'Approve Purchase Order', 'Send to Supplier', 'Create Purchase Order', 'Approve Purchase Order'],
        'timestamp': ['2024-01-05 09:00:00', '2024-01-06 14:00:00', '2024-01-07 10:00:00', '2024-01-06 10:00:00', '2024-01-07 16:00:00']}
df = pd.DataFrame(data)

# Convert the 'timestamp' column to datetime format
df['timestamp'] = pd.to_datetime(df['timestamp'])

# Apply process mining algorithm to discover the process model
event_log = pm4py.format_dataframe(df, case_id='case_id', activity_key='activity', timestamp_key='timestamp')
net, im, fm = pm4py.discover_petri_net_inductive(event_log)

# Visualise the discovered process model
pm4py.view_petri_net(net, im, fm)

This script loads the event log data, formats it correctly, applies an inductive process mining algorithm to discover the process, and visualises the result as a Petri net. Petri nets are often used in process mining for formalising and analysing business processes.

Insights from Process Mining

Once the process is visualised, the NHS Trust can easily see if any deviations from the expected process occur. For example, the Trust might find that:

  • Certain purchase orders take longer to be approved, causing delays in the procurement process.
  • There are repeated loops where approvals are requested multiple times for the same order, indicating inefficiencies or compliance issues.

Process mining can help the procurement team pinpoint exactly where these inefficiencies occur and take corrective action, such as streamlining the approval process or introducing automation in repetitive tasks.

Process Mining in Supply Chain Management: A Warehouse Example

Now, let’s consider an example in supply chain management. A UK-based retail company uses process mining to optimise warehouse operations, particularly the process of fulfilling customer orders.

In this case, the event log records every step involved in processing an order:

Case IDActivityTimestampResource
ORD001Pick Item2024-02-10 08:00:00Picker
ORD001Pack Item2024-02-10 08:15:00Packer
ORD001Dispatch Item2024-02-10 09:00:00Dispatch Team
ORD002Pick Item2024-02-10 08:10:00Picker
ORD002Pack Item2024-02-10 08:30:00Packer

In this case, process mining can help visualise the sequence of operations and identify bottlenecks, such as delays in packing or dispatching items.

Example Code for Performance Analysis

Using the same pm4py library, we can conduct a performance analysis of the warehouse order fulfilment process to determine how long each step takes on average.

# Calculate the duration between 'Pick Item' and 'Dispatch Item' for each order
df['duration'] = df.groupby('case_id')['timestamp'].transform(lambda x: x.max() - x.min())

# Calculate the average duration for the entire order fulfilment process
average_duration = df['duration'].mean()
print(f"Average order fulfilment duration: {average_duration}")

This simple code calculates the duration between the first and last activity for each case (i.e., each customer order) and then computes the average time taken for the fulfilment process.

By analysing the results, the company can identify areas for improvement. For example, if packing consistently takes too long, they could consider changes in staff allocation or the introduction of automated packing systems.

Process Mining in Compliance and Audit

In highly regulated industries like healthcare, where NHS Trusts and other public organisations operate, compliance with regulations is critical. Process mining can be used to ensure that all procurement steps follow prescribed guidelines. For instance, an NHS Trust must ensure that all contracts over a certain value go through a formal tender process as required by the Public Contracts Regulations 2015.

Process mining can be used to perform a conformance check between the ideal process model and the actual process extracted from event logs. Deviations can indicate non-compliance, which is crucial in avoiding penalties or fines.

Process mining has emerged as a powerful tool in the realm of procurement and supply chain management, especially within highly regulated environments like the UK’s public sector and healthcare industries. By automatically mapping out the actual processes from event logs, process mining provides organisations with unparalleled visibility into their workflows, enabling them to identify inefficiencies, bottlenecks, and compliance gaps. In the examples discussed, NHS Trusts can use process mining to ensure they comply with procurement regulations while optimising their operational efficiency, and retail companies can improve warehouse performance by identifying delays in order fulfilment.

One of the key strengths of process mining lies in its ability to not only uncover inefficiencies but also to highlight deviations from the expected or mandated process flows. In procurement environments, this is particularly important where adherence to regulations such as the Public Contracts Regulations 2015 is paramount. By identifying deviations from the ideal workflow, organisations can ensure that their procurement activities remain compliant, thus avoiding potential penalties or reputational damage.

Moreover, process mining helps organisations by enabling more informed decision-making. Rather than relying on anecdotal evidence or incomplete data, decision-makers can leverage concrete insights derived from real process data. This can lead to targeted improvements, such as streamlining approval processes in procurement or reducing delays in the supply chain by reallocating resources in key areas like packing or dispatching.

From an operational perspective, process mining also offers a significant opportunity for automation. Once inefficiencies and bottlenecks are identified, organisations can implement automated workflows to reduce manual intervention, particularly in repetitive tasks such as approvals or warehouse packing. This can lead to substantial cost savings and a more efficient allocation of human resources, allowing staff to focus on higher-value tasks.

Ultimately, process mining’s impact extends beyond cost reduction and efficiency gains. By providing detailed, data-driven insights into processes, it empowers organisations to operate with greater transparency, ensuring that all stakeholders—from procurement officers to suppliers and regulators—can have a clear view of how processes are being executed. This transparency is crucial in today’s increasingly complex and interconnected supply chain environments, where delays, inefficiencies, or non-compliance can have ripple effects across the entire value chain.

Future Outlook

As UK organisations continue to digitise their operations and invest in advanced technologies like artificial intelligence and automation, the role of process mining is set to grow even further. The current trend towards digital transformation across both public and private sectors will only increase the volume of process data being generated. With more data at their disposal, organisations will need sophisticated tools to analyse this data and extract actionable insights. Process mining is ideally positioned to fill this need, especially in the procurement and supply chain sectors, where efficiency and compliance are critical drivers of success.

In the future, we can expect process mining to become more deeply integrated into enterprise systems, such as ERP, SCM, and CRM platforms, enabling real-time process monitoring and analysis. Rather than relying on retrospective analysis, organisations will be able to track their processes in real-time and respond dynamically to any inefficiencies or compliance risks. This shift from reactive to proactive process management will be a game-changer for industries where timing is critical, such as healthcare supply chains, where delays in procurement could impact patient outcomes.

Another key area where process mining will play an increasing role is in the domain of predictive analytics. As the technology evolves, process mining will move beyond simply describing the current state of processes and start to predict future outcomes based on historical data. For example, in a supply chain context, process mining tools could forecast potential delays in order fulfilment by analysing past data and current trends, enabling organisations to take pre-emptive action to mitigate risks. Similarly, in procurement, predictive process mining could help organisations anticipate potential compliance issues before they arise, reducing the likelihood of regulatory breaches.

Furthermore, the integration of process mining with other emerging technologies, such as artificial intelligence (AI) and machine learning, will unlock new possibilities for process optimisation. AI can help organisations not only analyse processes more effectively but also suggest optimal ways to improve them. For instance, AI algorithms could identify patterns in procurement approval delays and recommend changes to the approval workflow, such as delegating low-risk approvals to automated systems or routing high-priority requests to senior management more quickly. Machine learning models could also be trained to detect anomalies in real-time, ensuring that deviations from expected processes are caught and addressed immediately.

In the public sector, where procurement often involves lengthy and complex tendering processes, process mining could help reduce administrative burdens and improve the transparency of how taxpayer money is spent. By providing real-time insights into procurement workflows, public sector bodies can ensure that all steps of the process are followed correctly and that no critical steps are missed. This is particularly important in the context of large-scale projects such as infrastructure development, where delays or non-compliance could result in significant financial and reputational costs.

In the private sector, the demand for process mining is likely to increase as organisations continue to face pressure to improve efficiency, reduce costs, and adapt to rapidly changing market conditions. Companies with complex global supply chains, such as retail and manufacturing firms, will increasingly rely on process mining to keep their operations running smoothly. As supply chains become more interconnected and digital, the ability to monitor processes in real-time and predict potential disruptions will become a key competitive advantage.

Finally, as organisations place more emphasis on sustainability, process mining will play a crucial role in helping companies optimise their operations to reduce waste and improve environmental performance. By identifying inefficiencies in supply chain processes, such as excessive transportation times or unnecessary inventory handling, companies can make more informed decisions that reduce their carbon footprint. This will not only help organisations meet regulatory requirements but also appeal to customers and stakeholders who are increasingly prioritising sustainability.

In summary, the future of process mining in UK procurement and supply chain environments is bright. As organisations continue to embrace digital transformation, process mining will become a critical tool for improving efficiency, ensuring compliance, and driving innovation. By integrating process mining with real-time monitoring, predictive analytics, and AI-powered optimisation, UK organisations will be better positioned to navigate the complexities of modern procurement and supply chain management, ultimately delivering greater value to their customers and stakeholders.

Here are three excellent websites for further reading on process mining and its applications in procurement and supply chain management:

  1. Celonis: A leading platform in process mining, offering resources, case studies, and industry insights on how businesses can improve their processes and operations through data-driven approaches.

  2. ProcessMining.org: A comprehensive resource for all things process mining, maintained by experts in the field. It provides academic papers, tutorials, and tools for both beginners and advanced users.

  3. PM4Py: An open-source process mining library in Python that offers tutorials, documentation, and tools for hands-on process mining projects, ideal for those who want to apply these techniques in practice.