← Back to overview

Personal portfolio project · fictional data · MVP in progress

CSAP: Corporate Services Automation Platform

A finance request and approval process with built-in budget controls, built on Microsoft Power Platform.

  • 12custom tables
  • 12cloud flows
  • 2approval stages
  • 5currencies (HUF base)

Why I built it

Recurring budget lines are a good place to start automating. The steps repeat and follow clear rules: plan, forecast, check the remaining budget before each approval, track the actuals. Time invested in automating them is worth it, because the capacity it frees up can go into more creative work, often into automating the next process. That loop is what motivates me.

That was the starting point for CSAP. The question was simple: why shouldn’t one system handle the whole thing? Not only the numbers, but also the part that usually sits outside them, the request itself. So I built the request and approval process into the same system.

The aim is a single place where a spending request, its approval status and its budget position remain aligned, with financial and approval rules enforced by the system rather than relying on people to remember them. The current version covers the request, approval and budget-protection core. Actual costs, reconciliation and reporting are the next layers.

Where it stands

StatusWhat
Implemented and testedRequest submission, currency conversion, funding split, budget holds, two-stage approval, clarification, rejection, budget reservation at final approval. A 25-scenario regression set, all passing
Partly testedMulti-user security (limited by the test environment)
PlannedActual costs and reconciliation, consumption and release of reservations, Power BI plan-versus-actual view, final user interface
Outside the MVP by choiceBudget reallocation, multi-round clarification, re-pricing at approval (a fresh exchange-rate snapshot, with the difference settled against the budget)

How it works

A request is submitted, converted to HUF if needed, and checked against the available budget. The amount is held while the request waits for approval. Final approval by the Department Lead is the commitment event: the hold becomes a budget reservation.

A request moves from Draft to Submitted, then Pending Direct Manager Approval, then Pending Department Lead Approval, then Approved. Both approval stages can reject the request, which ends as Rejected. Each approval stage can send a clarification back to the previous stage. A planned Completed state follows Approved. If the request is rejected at either approval stage, the hold is released and no reservation is made.

Draft Submitted Pending Direct ManagerApproval Pending Department LeadApproval Approved Completed (planned) Rejected reject reject Clarification returns to previous stage Forward step or rejection Planned, not yet built

Two lanes. The Request process lane shows where the request stands: Draft, Submitted, Pending Direct Manager Approval, Pending Department Lead Approval, then Approved. Both approval stages can reject the request, which ends as Rejected. Each approval stage can send a clarification back to the previous stage. A planned Completed state follows Approved. The Budget process lane shows what happens to the budget: there is no hold at Draft. The hold is created at Submitted and stays through both approvals. At final approval the reservation is created and the hold released. If the request is rejected, the hold is released and no reservation is made.

Request processWhere the request stands Draft Submitted Pending DirectManager Approval Pending DepartmentLead Approval Approved Rejected Completed (planned) Forward step or rejectionClarification returns to previous stagePlanned, not yet built Budget processWhat happens to the budget No hold yet Amount held Hold created If rejected: hold released,no reservation Reservation created,hold released

A hold placed at submission becomes a reservation at final approval.

The hold is created when the request is submitted and stays through Direct Manager approval and Department Lead approval. At final approval the reservation is created and the hold released. If the request is rejected at either approval stage, the hold is released and no reservation is made.

Submitholdcreated DirectManagerapproval DepartmentLeadapproval Reservationcreated, holdreleased Amount held Amount reserved

If rejected: hold released, no reservation

Funding follows one rule: Department capacity first, the Directorate envelope for the remainder. If both together can’t cover the request, submission is blocked.

Illustrative examples · fictional data

  • Department only

    RequestHUF 600,000

    Department 600,000

    Directorate 0

    Department available 1,000,000

  • Directorate only

    RequestHUF 700,000

    Department 0

    Directorate 700,000

    Department available 0
    Directorate available 2,000,000

  • Split

    RequestHUF 800,000

    Department 500,000

    Directorate 300,000

    Department available 500,000
    Directorate available 2,000,000

Design decisions

Each decision below follows one principle: the financial position must be right at every step, not only at the end.

  • Hold first, reservation at commitment.

    I was determined not to check the budget only at approval. While a request waits, its amount is held, so no other request can claim the same part of the budget.

  • Department first, Directorate second.

    The local budget owner’s capacity is used first and the central envelope covers only the remainder. The rule decides the funding source, not a manual choice.

  • Exchange rate fixed at submission.

    The approver sees the HUF value that gets committed. Re-pricing at approval would be more precise, but for an MVP this is the right trade-off, and it could be added later.

  • The backend decides.

    Buttons can be hidden in the interface, but every action is checked again against who the user is and whose turn it is.

Controls

ControlWhat it protectsHow it worksHow I tested it
Budget controls
Fresh revalidationStale budget contextCapacity is recalculated just before submission: available = approved budget minus pending holds minus active commitmentsChanged context between calculation and submit
Complete protection firstFunding gapsHolds are released only after the reservations are proven to cover the full committed amountEnd-to-end approval in all three funding cases
Duplicate and recovery guardDouble financial impactOne reservation per request and scope; a retry reuses valid state only if the amounts matchPartial-commit retry, duplicate attempts
Reject releaseStale reserved capacityReject releases both holds and creates no reservationRejection at both stages, including split funding
Clarification invarianceAccidental funding movementHolds stay unchanged through a clarification roundRound trips at both stages
Process and authorisation controls
One clarification roundEndless loopsA second round per stage is blockedSecond-round attempt
Backend authorityUnauthorised decisionsThe current user must be the assigned approver or responderInvalid-responder test

How I built and tested it

I came up with the idea of CSAP and started from the business needs: requirements, financial rules, process design and scope. Microsoft Copilot proposed the technical design, documented it and guided me through the implementation, which I built and tested step by step in Power Platform. I reviewed its proposals, rejected what didn’t fit the scope and checked that the controls hold in the automation itself, not only in the interface. The business logic, validation criteria and decisions stayed mine.

I ran 60+ test requests during development. They are consolidated into a regression set of 25 scenarios covering submission, all three funding cases, approval, rejection, clarification, recovery after a forced failure and a smoke test after cleanup. All 25 pass in the current build.

  • 60+test requests
  • 25regression scenarios
  • 25/25scenarios passing

Three major things the tests caught

  • Rejected requests kept consuming budget.

    Rejecting closed the request but did not release its holds. Fixed, and rejection retested at both stages.

  • Available budget went up again after final approval.

    The hold had been replaced by a reservation that the availability formula did not count. Commitments now reduce capacity in both the approval view and the submission check.

  • A failed reservation still reported success.

    An obsolete success path was left reachable. I removed it and kept only the guarded one.

The lesson: “the flow checker passed” proves little. Each of these looked correct in the designer and was wrong in what it meant for the budget.

Demo with fictional data.

Technical details

Data model (12 custom tables)
  • Approval
  • Budget Allocation
  • Budget Category
  • Budget Reservation
  • Cost Center
  • Department
  • Directorate
  • Employee
  • Financial Period
  • FX Rate
  • Request
  • Request Type
Cloud flows (12)
  • Submit Request
  • Start Request Approval
  • Approve Approval
  • Approve Approval from App
  • Process Approval Decision
  • Process DL Final Approval
  • Reject Approval from App
  • Process Approval Rejection
  • Request Clarification from App
  • Process Clarification Request
  • Submit Clarification Response from App
  • Process Clarification Response
User interface (test build)
  • 1 canvas app: Request and approval page
  • 2 custom pages: Approval financial context side pane; Clarification response side pane
Exchange-rate maintenance

Exchange rates are maintained semi-manually from the central bank’s published file. Five currencies, HUF base, EUR/USD/GBP/CHF from historical central-bank rates, maintained with an Excel VBA utility that produces a macro-free XLSX which is imported into Dataverse.