Manufacturing & Supply Chain · C# SDK

Check each purchase order award before your agent places it

A procurement agent picks the lowest bid, and your procurement rules still get a say. Call GovernAsync around the award, send the supplier and budget facts, and a category manager sees the orders that need one.

C#: place the order only when allowed

If the order doesn’t go through, PolicyAction and ReasonCode tell you why without exposing any protected output.

C# · Veriproof.Sdk.Core

using Veriproof.Sdk.Core;

var result = await veriproof.GovernAsync(
    "purchase_order.award",
    award,
    (context, cancellationToken) =>
        erp.PlaceOrderAsync(context.Input, context.IdempotencyKey, cancellationToken),
    new GovernOptions
    {
        Facts = new Dictionary<string, object?>
        {
            ["category"] = award.Category,
            ["award_amount_usd"] = award.AmountUsd,
            ["denied_party_screen"] = screening.Result,
            ["supplier_quality_rating"] = supplier.QualityRating,
            ["single_source_award"] = award.IsSingleSource,
            ["budget_remaining_usd"] = budget.RemainingUsd,
            ["region_concentration_pct"] = exposure.RegionSharePct,
        },
    });

if (!result.Completed)
    logger.LogInformation("{Action} {Code}: {Message}",
        result.PolicyAction, result.ReasonCode, result.Message);

erp.PlaceOrderAsync gets the idempotency key, so an ERP that supports one can reject a duplicate order after a timeout.

Why C# here: ERP integrations and procurement services are often .NET, and there’s an Agent Framework adapter if the agent is built on it.

Award, review, or stop

Three sample orders from the purchase order simulator. Run purchase order simulator

Allowed

When: A competitive tooling order from a well-rated supplier.

Your code: The order is placed, and the record keeps the supplier facts with the rule that allowed it.

Who picks it up: The Business Owner sees spend moving. Auditors read the record inside an engagement.

Sent to a person

When: A $72,000 order that only one supplier can make.

Your code: The award waits for a category manager.

Who picks it up: The category manager with that authority, in the VeriProof Inbox, by email, or in Slack or Microsoft Teams, with reminders and escalation.

Stopped

When: The lowest bid on a $95,000 order comes from a supplier with a denied-party match.

Your code: The status is Blocked, and no order is placed.

Who picks it up: The Governance Engineer sees the screening rule that stopped it.

Supplier and budget facts

These are the fields the purchase order simulator sends. Screening results come from your trade compliance provider.

FactWhat it holds
categoryraw_materials, electronic_components, tooling, or logistics_services.
award_amount_usdThe order value.
denied_party_screenclear or match.
supplier_quality_ratingYour quality rating for the supplier.
single_source_awardTrue when only one supplier can fill the order.
budget_remaining_usdBudget left in the cost center.
region_concentration_pctShare of the category already sourced from this supplier’s region.

Built on Microsoft Agent Framework?

The Veriproof.Sdk.Adapter.AgentFramework package applies the same check around model and local tool calls when you pass tools through AsVeriproofAgent(...). Keep GovernAsync for calls your code makes outside the agent, like placing the ERP order.

Growing the procurement rules

Developer fix request

A new rule on supplier certifications needs a field your agent doesn’t send yet. The Developer gets a fix request naming it.

Changing the rule

Changing the single-source threshold can run in Shadow against live orders first. An engineer can’t enforce it on the production agent alone. An administrator or compliance officer approves it.

See how the six role portals hand off work

Documentation and tools

Watch a held order reach the manager

Try the demo portal as the category manager, then as the Developer who gets a fix request.