Skip to content
Senior1 view

Design a procurement management system for a large company with approvals, limits, and auditing.

Practice

AI answer

Architecture

The system includes a request portal, a catalog of products and suppliers, an approval workflow, budget controls, integrations with ERP/accounting systems, and reporting. A relational database stores requests, line items, limits, decisions, and audit records; a message queue is used for notifications and exchanges with external systems. For a large company, start with a modular monolith and split out components when a demonstrated need arises.

Request and Approval

A request contains the department, initiator, budget items, line items, supplier, and justification. The workflow is defined by rules: amount, category, department, country, or an exception may determine the sequence of approvers. The workflow version is saved with the request so that changes to the rules do not affect approvals already in progress.

Each decision is recorded as a separate event with its author, timestamp, comment, and request version. If material fields change after approval, the request returns to the appropriate stage. Use optimistic locking to prevent race conditions; make repeated API commands idempotent. After approval, the request is sent to the ERP, and the integration status is tracked and retried in case of temporary errors.

Limits, Security, and Audit

  • Check the available budget atomically when reserving funds; define rules for releasing the reservation when a request is canceled or an order is closed.
  • Separate roles and access by department, cost, and purchase type; support delegation with a limited term and audit trail.
  • Maintain an immutable log of actions and changes to limits; ordinary users must not be able to edit the history.
  • Use SSO, encryption, personal data minimization, backups, and retention policies.

Operational metrics include time spent at each stage, overdue approvals, integration errors, limit violations, and the share of requests requiring manual processing. Before implementation, clarify financial rules, the authority matrix, segregation-of-duties requirements, and ERP interfaces.