Skip to content
Cloud Mechanics
Procurement Automation iconAI Agent

Procurement Automation

Agent that compares vendors, validates purchase orders, analyses spend and extracts the contract terms that govern them

The challenge

Buyers raise purchase orders against approvals they cannot easily see, price them from rate cards that live in a shared drive, and re-quote work that a framework agreement already covers. Off-contract spend is only discovered in an audit, scope creep against a requisition goes unnoticed, and an unsuccessful bidder asking why they lost gets an answer assembled from memory and email.

The outcome

Azure AI Document Intelligence reads requisitions, purchase orders and quotations into structured data, a deterministic rules engine validates the order against its approval, its budget and its contracted pricing, and a Microsoft Foundry agent scores competing bids on a published weighting. Exceptions reach a named buyer with the evidence, the variance and the reason already attached — and the award decision stays with a person.

At a glance

Type
ai agent

Next step

Move from solution to engagement.

Build This Solution

01 — Architecture

End-to-end architecture

Purchasing documents arrive from any channel, land in Blob, and are extracted by Document Intelligence. The Foundry agent resolves the vendor, requisition and contract behind the order, validates pricing and authority in deterministic code, then either recommends standard handling or queues a buyer — with the ledger, audit trail and spend dashboards updated either way.

REQUESTER & SUPPLIERRequester /supplieremail · portal · sourcing eventINTAKEAzure Logic Appsinbox & folder watchAzure BlobStorageoriginal documentsEXTRACTIONAzure APIManagementgateway · auth · SLAAI DocumentIntelligenceOCR · line tables · termsAzure Functionsnormalise & enrichAI & VALIDATIONMicrosoft FoundryAgentvalidate · compare · flagAzure OpenAImodelscase summarisationAzure AI Searchcontracts & rate cardsDATA & RECORDSAzure SQLorder & spend ledgerAzure Cosmos DBprocess state & auditAzure Key VaultERP credentialsBUYING & INSIGHTDynamics 365 /ERPorder & commitmentBuyer reviewexception queuePower BI / Fabricspend & contract coverageDEVOPS & DELIVERYGitHubsource control & CIDockercontainer buildContainer Registryversioned imagesWorker releasedeploy with rollback
Figure 1 — End-to-end reference architecture for controlled purchasing on the Microsoft stack.
  • Requester & supplier: Requester / supplier
  • Intake: Azure Logic Apps, Azure Blob Storage
  • Extraction: Azure API Management, AI Document Intelligence, Azure Functions
  • AI & validation: Microsoft Foundry Agent, Azure OpenAI models, Azure AI Search
  • Data & records: Azure SQL, Azure Cosmos DB, Azure Key Vault
  • Buying & insight: Dynamics 365 / ERP, Buyer review, Power BI / Fabric

02 — Workflow

Process & decision workflow

How a purchasing case is received, extracted, validated, compared and routed — then branched. Low-value, on-contract, in-budget orders to a known vendor are recommended for fast-track handling, while anything that breaches a control reaches a named buyer with the variance and the evidence.

1ReceiveRequisitions, orders and quotationsarrive by email, portal or sourcing…2StoreOriginal files secured in Azure BlobStorage3ExtractHeader fields, line tables and contractterms via Document Intelligence4ValidateOrder checked against requisition,budget and contracted rates5CompareCompeting bids scored on price, leadtime, quality, compliance and terms6RoutePath chosen by value, control breach,vendor risk and confidenceWithin authority& on contract?Path 1 · routine purchaseRecommend fast-track handlingOn contract, in budget, known vendor — abuyer still confirmsPath 2 · control breach or riskBuyer or specialist reviewReviewer sees the order, the varianceand the rule that firedLedger updatedCommitment, category spend andaudit trail storedStakeholders notifiedRequester and supplier told whathappens nextCloseorder placed by a person
Figure 2 — Receive → extract → validate → compare → route → authority branch → fast track or review.
  1. Receive: Requisitions, orders and quotations arrive by email, portal or sourcing event
  2. Store: Original files secured in Azure Blob Storage
  3. Extract: Header fields, line tables and contract terms via Document Intelligence
  4. Validate: Order checked against requisition, budget and contracted rates
  5. Compare: Competing bids scored on price, lead time, quality, compliance and terms
  6. Route: Path chosen by value, control breach, vendor risk and confidence
  7. Path 1 · routine purchaseRecommend fast-track handling: On contract, in budget, known vendor — a buyer still confirms
  8. Path 2 · control breach or riskBuyer or specialist review: Reviewer sees the order, the variance and the rule that fired

03 — Components

Key Microsoft components

Controlled purchasing needs accurate extraction, trustworthy validation and an audit trail that survives a bidder challenge — all on the Microsoft stack.

  • Azure Logic Apps iconAzure Logic AppsMailbox, folder and sourcing-portal watchers plus retry and routing.
  • Azure Blob Storage iconAzure Blob StorageOriginal requisitions, orders, quotations and audit evidence.
  • Azure AI Document Intelligence iconAzure AI Document IntelligenceHeader, line table and contract term extraction into structured JSON.
  • Microsoft Foundry Agent Service iconMicrosoft Foundry Agent ServiceValidation, comparison and routing orchestration with tools.
  • Azure OpenAI models iconAzure OpenAI modelsDrafts the case summary and relates contract clauses to the facts.
  • Azure AI Search iconAzure AI SearchGrounded retrieval across framework agreements, rate cards and clauses.
  • Azure Functions iconAzure FunctionsNormalisation, weighted scoring and approval routing.
  • Azure API Management iconAzure API ManagementSecure gateway for ERP, vendor master and contract repository APIs.
  • Azure SQL iconAzure SQLOrder ledger, commitments and category spend.
  • Azure Cosmos DB iconAzure Cosmos DBProcess state, retries and per-case audit history.
  • Azure Key Vault iconAzure Key VaultERP and contract repository credentials and integration secrets.
  • Azure Communication Services iconAzure Communication ServicesRequester, buyer and supplier notifications by email or SMS.
  • Azure Container Apps iconAzure Container AppsContainerised extraction and validation workers.
  • Power BI / Microsoft Fabric iconPower BI / Microsoft FabricSpend, contract coverage, cycle time and exception dashboards.

04 — AI

What the agent consumes

The capabilities the agent applies to every purchasing case, and the line it does not cross.

AI capabilities embedded in the agent

  • OCR
  • Table extraction
  • Key-value extraction
  • Requisition and budget validation
  • Contract rate comparison
  • Weighted vendor scoring
  • Framework call-off detection
  • Duplicate order detection
  • Sanctions and eligibility screening
  • Contract term and renewal tracking
  • Spend concentration analysis
  • Prompt-injection screening

AI responsibility boundaries

The agent ranks and shows its working; a person awards. It never selects a supplier, approves or issues a purchase order, commits the company to a contract, changes vendor bank details or widens a tolerance to clear a queue. Of its sixteen tools exactly two write anything, and neither commits spend. Every assessment stores the extracted evidence, the rule version applied, the weighting used and the reviewer — so an unsuccessful bidder gets a reasoned answer rather than a reconstruction.

05 — Personalization

Personalization & evolving process

The same methodology applies to every agent in the catalog. Tune the category profile, the workflow, the thresholds and the value model — the page structure stays identical.

Category & document profile

Define the spend categories, currencies and document formats in scope, the vendor master and contract repository, the framework agreements already in place and the cost-centre structure. The personas are the requester, the buyer, the procurement manager and the auditor.

06 — Impact

Key outcomes & business impact

Starting targets for the value case — validate each one against the customer baseline during discovery.

  • Contract coverage+30ptsMore spend placed against negotiated rates rather than ad hoc pricing.
  • Off-contract spend−40%Price variance is caught before the order is placed, not at audit.
  • Requisition cycle timeSame dayRoutine, on-contract orders clear validation inside one working day.
  • Audit readiness100%Every assessment stores the evidence, the rule version and the weighting.

Illustrative improvement index

Manual baseline = 100. Illustrative targets, not a commitment — confirm against the customer baseline.

10060Off-contract spend10035Order cycle time10045Exception reworkManual baselineAI-assisted target
  • Off-contract spend: manual baseline 100, AI-assisted target 60
  • Order cycle time: manual baseline 100, AI-assisted target 35
  • Exception rework: manual baseline 100, AI-assisted target 45

07 — Deployment

Deploy this agent

Checks every purchase order against the approval, the budget and the contract that are supposed to govern it, so buyers spend their time on the exceptions instead of discovering them in an audit. This agent ships as a versioned, evaluated package: 9 Azure resources described in Bicep, 16 scoped tools, and a blocking evaluation gate that must pass before it is considered ready.

  • Package version1.0.0foundation maturity, hosted agent on Microsoft Agent Framework, probed on port 8088.
  • Azure resources9Provisioned from Bicep in roughly 25 minutes, excluding model capacity approval.
  • Evaluation cases3610 evaluators run as a blocking gate on every change.
  • Review triggers2720 of them stop the agent and hand the case to a person.

What gets provisioned

Every resource below is declared in the agent's Bicep templates and deployed with a user-assigned managed identity. No key or connection string is stored in the package.

  • Microsoft Foundry account and projectHosts the agent, its model deployments and its managed identity.Microsoft.CognitiveServices/accounts
  • Azure AI Document IntelligenceLayout, table and field extraction from quotations and purchase orders. Effectively required here: line tables are the input to comparison and validation.Microsoft.CognitiveServices/accounts
  • Azure StoragePurchasing intake and immutable assessment records for audit.Microsoft.Storage/storageAccounts
  • Azure Key VaultHolds ERP and contract-repository credentials that cannot use managed identity.Microsoft.KeyVault/vaults
  • Application Insights and Log AnalyticsTraces, metrics and the human-review audit trail.Microsoft.Insights/components

Optional: Azure AI Search.

Deployment parameters

Collected before provisioning and validated against the manifest. Credentials are never parameters: the agent resolves them through managed identity, or by Key Vault secret name.

Identity

  • Tenant identifierrequiredData isolation boundary. Every tool call is scoped to it.

Infrastructure

  • Azure regionuaenorthRegion for the Foundry project and supporting resources.
  • Environmentdev

Model

  • Document understanding model deploymentgpt-5.4-mini
  • Case reasoning model deploymentgpt-5.4

Thresholds

  • Extraction confidence floor0.7Below this score the case is routed to a human.
  • Assessment confidence floor0.7
  • Fast-track recommendation floor0.85Both confidence scores must reach this before fast track is recommended.
  • High-value order threshold50000Orders at or above this value always reach a human, whatever the confidence. It is also the point above which an order placed without a requisition becomes a finding - below it, the low-value purchase channel is a deliberate policy choice and flagging it produces noise the desk has already decided to accept.
  • Allow fast-track recommendationtrueSet false to route every case to a human regardless of confidence. Fast track recommends faster human handling; it approves nothing either way.

Competition

  • Competitive quotation threshold25000Above this order value the buying policy expects competing quotations.
  • Minimum competing quotations3How many quotations are expected above the threshold. A call-off against a live framework agreement is exempt: the competition happened when the framework was tendered.

Validation

  • Requisition variance tolerance5Permitted overage between the ordered value and the approved requisition, as a percentage. Applied together with the absolute floor below; the larger of the two is allowed.
  • Absolute variance floor50Minimum permitted overage in currency units. Without it a percentage tolerance on a small requisition flags rounding noise as scope creep and buries buyers in false positives.
  • Duplicate order window180How far back purchasing history is searched for a possible duplicate order. Deliberately shorter than a payables duplicate window: purchasing genuinely repeats, and a year-long window on a consumable makes every legitimate repeat order look like a duplicate.
  • New vendor window90An order to a vendor created, or whose bank details changed, within this many days is treated as elevated risk regardless of value. Supplier fraud overwhelmingly arrives through newly created or newly modified vendor records.

Contracts

  • Contract renewal notice window90How far ahead a contract expiry or auto-renewal notice deadline is surfaced. Set this shorter than the notice periods in your framework agreements and the agent will report renewals you can no longer stop.

Spend

  • Single-source concentration threshold70Share of category spend with one vendor above which concentration is reported.
  • Tail spend threshold2500Orders below this value are tail spend: individually immaterial, collectively the largest source of maverick buying.

Vendor scoring

  • Vendor scoring weight - price0.35Weight applied to price when comparing quotations. The five weights must sum to 1.0. This is a purchasing policy decision, not an engineering default: awarding on unit price alone is how a function accumulates quality failures and single-source risk, and an unsuccessful bidder is entitled to be told the weighting that was used.
  • Vendor scoring weight - lead time0.2
  • Vendor scoring weight - quality0.2
  • Vendor scoring weight - compliance0.15
  • Vendor scoring weight - commercial terms0.1

Locale

  • Default currencyAEDCurrency assumed when a document does not state one. The agent performs no currency conversion; quotations in different currencies are reported as incomparable rather than converted at a rate it would have to invent.
  • Dates are day-firsttrueResolves ambiguous numeric dates such as 03/04/2026.
  • Purchase order number formatrequiredRegular expression a purchase order number must match. Leave empty unless the organisation genuinely enforces one format.

Integrations

  • ERP credential secret namerequiredKey Vault secret NAME holding the ERP or contract-repository credential, used only when the integration cannot authenticate with managed identity. The secret value is never collected here and never appears in a manifest or a deployment log.

Deployment lifecycle

A deployment moves through an explicit state machine. Illegal transitions are rejected, so a deployment record can never sit in an undefined position — and a failure is always either retried or torn down, never abandoned.

  1. 01 Requested
  2. 02 Validating request
  3. 03 Waiting for configuration
  4. 04 Provisioning Azure resources
  5. 05 Configuring Foundry project
  6. 06 Deploying agent
  7. 07 Connecting tools
  8. 08 Connecting knowledge
  9. 09 Running deployment validation
  10. 10 Running evaluation gate
  11. 11 Ready
  12. 12 Degraded
  13. 13 Failed
  14. 14 Updating
  15. 15 Decommissioning
  16. 16 Decommissioned

Tools and their blast radius

16 tools across 1 toolbox. 2 can write, and every write is scoped, audited and reversible.

  • lookup_vendor
  • get_vendor
  • screen_vendor
  • get_requisition
  • get_purchase_order
  • find_recent_orders
  • get_quotations
  • compare_quotations
  • calculate_order_totals
  • get_contract
  • find_contract_for_vendor
  • search_contract_clauses
  • find_expiring_contracts
  • get_spend_history
  • create_review_task · write
  • request_missing_information · write

What this agent will never do on its own

  • Awarding business or selecting a winning supplier
  • Approving, issuing or releasing a purchase order
  • Creating or amending a purchase order or requisition to make it pass validation
  • Committing the company to any contract, framework or call-off
  • Renewing, extending, terminating or varying a contract
  • Approving a vendor into a category or clearing a sanctions match
  • Changing, adding or verifying a vendor bank account
  • Creating or modifying a vendor master record
  • Overriding, widening or waiving a validation tolerance or a competition requirement
  • Communicating with a bidder during an open sourcing event without approval
  • Making or recording an allegation of fraud or collusion
  • Requesting or storing data belonging to another tenant

Evidence before it ships

The evaluation gate is blocking: a regression on any evaluator stops the release rather than documenting it.

  • golden-procurement18 casesRepresentative purchasing cases with expected routing and validation outcome, including framework call-offs, scope creep, budget overruns, off-contract pricing, expired contracts, incomparable bids and unretrievable requisitions.
  • adversarial-procurement18 casesPrompt injection inside supplier quotations, self-asserted pre-approval, bank redirection and authority-boundary probes, with benign controls - ordinary persuasive commercial language - that must stay clean.

Evaluators

  • routing_accuracy
  • review_decision_accuracy
  • validation_outcome_accuracy
  • finding_recall
  • trigger_recall
  • injection_containment
  • injection_false_positive_rate
  • authority_boundary
  • bank_detail_containment
  • tool_authority_surface

Identity, isolation and network

  • Agent identityuser-assigned-managed-identity. No shared keys, no embedded credentials.
  • Public network accessconfigurable. Private endpoints available for Azure AI Search, Azure Storage, Azure Key Vault, Azure AI Document Intelligence.

Role assignments

  • Foundry UserFoundry projectRun the agent and read its project configuration.
  • Search Index Data ReaderAzure AI Search serviceRetrieve contract clauses and rate cards for grounded citations. Read-only by design.
  • Storage Blob Data ContributorProcurement intake containerRead submitted purchasing documents and write the immutable assessment record.
  • Key Vault Secrets UserKey VaultResolve ERP and contract-repository credentials that cannot use managed identity.
  • Monitoring Metrics PublisherApplication InsightsEmit traces and metrics.

What you can see once it is running

Traced with opentelemetry and exported to Application Insights. Document content and model reasoning are dropped before export — neither is ever written to a log.

  • procurement.processed
  • procurement.review_required_rate
  • procurement.confidence.extraction
  • procurement.confidence.assessment
  • procurement.recommended_action
  • procurement.validation_outcome
  • procurement.off_contract_rate
  • procurement.competition_shortfall
  • procurement.duplicate_detected
  • procurement.vendor_risk_detected
  • procurement.injection_detected
  • procurement.tool_failure_rate
  • procurement.processing_duration_ms

Cost drivers

  • Document Intelligence pages analysed
  • Model inference for document understanding
  • Hosted-agent container compute
  • Azure AI Search unit hours

Supported regions

  • uaenorth
  • westeurope
  • swedencentral
  • eastus2

Getting it deployed

The package is ready to provision into a customer subscription: infrastructure as Bicep, the agent as a container image, and the evaluation gate as a pipeline step. Provisioning runs against your own tenant with your own approvals, so the last step is a conversation about region, capacity and the systems this agent will read from.

Published by Cloud Mechanics · Owner Cloud Mechanics - AI Solutions · standard support

Deploy this agent

Related & recommended

Derived automatically from our solution knowledge graph.

Ready to move from challenge to solution?

Talk to a Cloud Mechanics expert or build your solution in minutes.