Skip to main content

Walkthrough 1: Purchase price drift at a distributor

Order Guard: tolerance bands, delta re-approval, signing limits at approval time, a break-glass release at quarter end, and the audit trail it all leaves.

This is a fictional story. The company, the people and the numbers are invented. What Warden does at each step has been checked against the MGCWarden model; where something could not be confirmed, the text says so. See the walkthroughs index for the cast and the rules these stories follow.


The situation​

Brackwater Fluid Supply is a distributor of industrial valves, hoses and fittings with one legal entity and an accounting currency of pounds sterling. Its buyers place around four hundred purchase orders a quarter with about sixty vendors, most of them on a stock replenishment cycle. Purchase orders are approved through the standard Dynamics 365 purchase order workflow before they are confirmed to the vendor.

The people in this story:

PersonJobWarden role or grant
Alex BrennanERP analystWarden guard administrator (writes policies)
Jordan ElleryFinancial controllerWarden controls owner (activates policies)
Sam OkaforBuyerNo Warden role; ordinary purchasing access
Robin HalePurchasing managerTheir own purchasing role, plus the duty Decide Warden purchase order delta re-approvals
Quinn AdeyemiFinance directorThe same duty
Morgan TateOperations directorA temporary emergency role, granted on the night it is needed
Casey LindqvistInternal auditWarden auditor, plus the read-only duty Inquire into Warden governance

The problem​

Internal audit's year-end sample found a pattern. A purchase order was approved at one price, and then, after approval, the unit price on one or two lines was edited upwards, sometimes more than once. The standard purchase order workflow had approved the document as it stood on the day of approval; it did not ask again when a line changed afterwards, and the approval record still showed the original figures. In the worst case a line had been raised by small amounts four times, each edit too small to look unusual, ending eleven per cent above the price that had been approved.

Casey's recommendation was specific: price changes after approval should be measured against the price that was approved, not against the last saved value; small changes should be allowed; large ones should go back to someone with authority to approve that size of order; and nothing should be received or invoiced while such a change is waiting.

What they decided​

Alex and Jordan agreed the following, and Alex entered it on System administration → Setup → Guard control policies:

SettingValueWhy
Policy codePO-PRICE
DescriptionPurchase price drift, stock vendors
Document familyPurchase order (standard)Direct-delivery and intercompany orders are out of scope for now
Gated eventSave under changeThe edit is evaluated when the line is saved
PostureBlockingOnly a Blocking policy holds and routes; Log only would record and do nothing else
Workflow hookThe Warden delta approval workflow typeRouting always uses that workflow; a Blocking policy with no hook is listed as a setup gap
Effective from(blank)Blank means the day the activation is approved

On the Scope tab: Item code All, Account code Group with the vendor group used for stock vendors in Account selection, Priority 10.

On the Field change matrix tab:

TableFieldField classTolerance valueTolerance unit
PurchLinePurchPriceTolerance band5Percent
PurchLineLinePercentRe-approve delta
PurchTableCurrencyCodeBlock

A tolerance band lets a change through as long as the line's drift stays within the band, and routes it for approval once the drift goes past it. Drift is measured from the approved baseline for that line, not from the previous edit, which is the part that answers the audit finding. Any change to the line discount is routed. A change of order currency is refused outright.

They also agreed:

  • Signing limits (System administration → Setup → Signing limits): Robin, Document type PurchaseOrder, Signing limit type Approval, Amount 50,000. Quinn, the same, 250,000. Nobody else approving delta work items has a row. A user with no row is not limited, and Warden logs the approval as unconstrained; a row of 0 means that user may approve nothing.
  • Workflows: in the workflow editor for the System administration module, a Warden policy activation workflow assigned to Jordan, and a Warden delta approval workflow assigned to Robin. See Getting started, section 5.
  • Break-glass: no standing holder. If a held order has to move when no approver can be reached, the system administrator grants a pre-built emergency role for one evening. The role carries the privilege Warden break-glass release (which ships in no role) and the duty Inquire into Warden governance (so the holder can open Governance holds). On Warden guard parameters, Break-glass grant duration (hours) stays at the default of 4, and Break-glass alert recipients lists Jordan and Casey.
  • Role grants are watched too. Brackwater also runs the Warden Evidence & Compliance feature, with Role event capture scheduled and Jordan and Casey as Sensitive-role alert recipients on Warden audit compliance parameters.
  • The Warden break-glass grant expiry and Warden delta route drain batch jobs are scheduled.

The setup work behind this (enabling the Warden Order Guard feature, running Initialize Warden, configuring workflows and batch jobs) is covered in Getting started and the configuration reference.

Walking through it​

1. Alex tests the policy against last quarter​

Before submitting, Alex opens the draft policy and presses Simulate. In the Simulate policy dialog they set Window from and Window to to the previous quarter.

Warden evaluates the purchase orders in that window against the draft and writes a row to Policy simulation results, showing Documents evaluated, Would have routed for approval, Would have been logged only and Would have been blocked outright. Further columns count orders governed by, or tied with, another policy; Brackwater has none. The simulation changes nothing on any order.

The routed count is higher than Jordan expected. They agree it is the point of the exercise and leave the band at 5 per cent.

2. Two people put the policy into force​

Alex presses Submit for activation. The policy moves to Pending activation and a Warden policy activation work item reaches Jordan. Jordan opens it from their work item list and approves. The policy becomes Active, with Effective from set to the day of approval.

Had Alex tried to approve the activation themselves, Warden would have refused at the moment of approval with a message beginning "Approval refused:" and explaining that the author is not the activator. This comparison is made in Warden's own code on both the in-client and the API approval channels; the native workflow on its own does not compare the submitter with the approver. See the policy author's guide.

3. Sam makes a small price change​

Purchase order PO-004417 is for 600 ball valves from a stock vendor at £41.20 each, a line value of £24,720. It has been approved and confirmed. The vendor writes to say a raw material surcharge applies; Sam agrees £42.40 and edits the line.

The save goes through with no message. Behind the scenes, Warden sees the first governed change to this line, seeds the line's approved baseline with the value before the edit (£41.20), and measures the drift: |42.40 − 41.20| ÷ 41.20 is 2.9 per cent, inside the 5 per cent band. It writes a change diff set recording the edit with the band verdict Within band, and a Change diff recorded row on the governance event log. No hold is placed and nobody is asked anything.

4. A second change crosses the band​

Three weeks later the vendor asks for £43.60. Sam edits the line again and saves. Again there is no message; a tolerance band never refuses the save itself.

This time Warden measures from the approved baseline, which is still £41.20 because nothing has been approved since: |43.60 − 41.20| ÷ 41.20 is 5.8 per cent. The single edit was only 2.8 per cent, but the drift is past the band. Warden writes the diff set with the verdict Band crossed, places a governance hold on the order, and queues the change for routing. The event log gains a Change diff recorded row, which says the diff set is held and queued for approval routing and that the approval is raised at the next confirmation attempt or by the delta route drain batch, and a Hold placed row. The order's native status does not change.

baseline £41.20 (seeded at first edit, moves only on approval)
|
|-- edit 1: £42.40 drift 2.9% -> within band, recorded, no hold
|
|-- edit 2: £43.60 drift 5.8% -> band crossed, hold placed, route queued
|
v
Warden delta approval -> Robin

Within a few minutes the Warden delta route drain batch activates the Warden delta approval workflow, and the event log records Delta approval requested. If Sam had tried to confirm the order first, the confirmation attempt would have raised the approval itself before being refused. See route drains.

5. Sam tries to send the revised order​

Sam re-confirms the order to send the vendor the new price. The confirmation is refused:

Purchase order PO-004417 is under a Warden governance hold. Purchase order confirmation is gated until the approval completes or the hold is released. This is a governance hold, not a missing confirmation: confirming or reposting the order will not clear it. The change that caused it and the approver it is waiting on are on the order Warden governance event log.

The same refusal, with the action named, would meet a product receipt, a vendor invoice or an invoice approval journal for this order. Sam can still edit the order; the hold stops acting on it, not correcting it.

Screenshot to add: the purchase order with the refusal message and the Warden change sets FactBox showing the held diff set.

6. Robin reads the change, not the whole order again​

Robin opens the work item from Work items assigned to me. The work list shows a Warden change set FactBox, and opening the work item opens the Consolidated diff page for this diff set. At the top, under Change set totals (recomputed at open), Warden has re-read the live order and says whether any recorded value no longer matches it and whether later change sets exist. Below it, one row per changed field: Table, Field, Old value, New value, Field class, Band verdict and Version stamp.

Robin sees one row: PurchLine, PurchPrice, Tolerance band, Band crossed. They check the vendor's letter and press Approve.

At the moment of approval, before the workflow records the decision, Warden runs its approve-time checks. The one that matters here is the signing limit. The amount Warden uses is the whole order total in accounting currency, not the size of the change, because approving commits the whole order: £26,160, inside Robin's £50,000. The approval goes through.

When the workflow completes, Warden moves the line's baseline to £43.60, releases the hold, and writes Delta approved. Sam's next confirmation posts normally. A later edit to this line will be measured from £43.60. See the approver's guide.

7. A larger order goes past Robin's limit​

PO-004502 is a single line of 2,000 pressure regulators at £85.00, an order total of £170,000. The vendor announces a 7 per cent increase, and Sam edits the price to £90.95. The drift is 7 per cent, the order is held, and a delta work item reaches Robin as before.

Robin presses Approve. This time Warden refuses:

Approval refused: this approval commits 181,900.00 (Purchase order PO-004502 total (sum of order lines, accounting currency)), which exceeds your PurchaseOrder approval limit of 50,000.00. Approvers whose current limit covers this amount: qadeyemi (limit 250,000.00). Delegate or reject the work item so it can be routed to one of them.

The covering approvers are listed by user ID with their limits, smallest sufficient limit first, up to five of them. The number formatting follows the session. The refused attempt is recorded on the governance event log, naming Robin by subject reference. Robin uses the native Delegate action to pass the work item to Quinn.

8. Quinn rejects​

Quinn reads the consolidated diff, compares the increase with the vendor's contract, which caps annual increases at 4 per cent, and presses Reject with a comment.

A rejection in Warden's delta workflow is a return to the originator. Warden writes Delta rejected to the event log, saying that the approval instance is still live and the delta hold still stands, so the document remains blocked and can be corrected and resubmitted. The baseline does not move. Nothing has been unlocked: the order still cannot be confirmed, received or invoiced.

Sam goes back to the vendor, who accepts the contract cap. Sam corrects the price to £88.40, 4 per cent over the old price, and presses Resubmit on the returned work item. The order can be edited while the hold stands, because the hold blocks acting on the order, not correcting it.

Before the workflow acts on the resubmission, Warden records it on the order's change set: the time, and the version stamp the change set carries. The work item then comes back for approval on the same workflow instance, showing the corrected change in the consolidated diff, with the first rejection still in the workflow history. Robin's limit still does not cover the order, so the approval is Quinn's, as in step 7.

Quinn presses Approve. The version-stamp check measures from the latest resubmission, so Sam's correction is part of what Quinn was asked about, and the approval goes through. The order total, £176,800, is inside Quinn's limit of £250,000. Had Sam edited the order again after pressing Resubmit, the approval would have been refused as a change after resubmission. When the workflow completes, the baseline moves to £88.40 and the hold is released.

9. Sam tries to change the order currency​

While renegotiating, the vendor offers a better price if Brackwater pays in euros. Sam changes the currency on a new draft order from the same vendor and saves. The save is refused:

Field CurrencyCode is blocked by guard policy PO-PRICE v1; the change is not allowed.

The edit is rolled back. Warden records the refusal on the event log out of band, so the record survives the rollback that the refusal itself causes.

10. Quarter end: a held receipt and no approver​

On the last working day of the quarter, at 17:40, a lorry arrives with the goods for PO-004588. That morning Sam had raised one line's price by 6 per cent at the vendor's request, so the order is held and its delta work item is with Robin, who is on leave. Quinn is on a flight. The receiving clerk tries to post the product receipt and gets the governance hold refusal, this time naming Product receipt posting.

Jordan and Morgan agree that the stock must be received tonight for the quarter-end count, and that the price question can wait for Robin. At 18:10 the system administrator assigns Morgan the emergency role. Because the role carries the break-glass privilege, it is one of the roles Initialize Warden places on the Sensitive roles list (Initialize Warden has to be run again after such a role is created), so the next run of Role event capture records the grant and sends Jordan and Casey an in-client alert headed Sensitive role granted.

Morgan opens System administration → Setup → Governance holds, selects the hold on PO-004588 and presses Break-glass release. The Break-glass release dialog asks for a Reason code, which is free text and cannot be left blank. Morgan writes: Quarter-end receipt, goods on dock, approver on leave; price change to be decided by purchasing manager on return. Warden replies Hold … released via break-glass.

Behind the scenes Warden marks the hold Break-glass released, with the Break-glass flag, the Release reason and Released by (recorded as a WP- subject reference, not a name). It writes a Break-glass release row on the event log and sends Jordan and Casey an in-client alert headed Break-glass release: hold …, naming the document, who released it and the reason. The alert goes to the users listed on the parameters page; no email is sent. The receiving clerk posts the receipt.

Break-glass releases the hold. It does not approve the price change, does not move the baseline, and does not cancel the delta workflow: the work item is still in Robin's list. See the break-glass holder's guide.

11. The grant runs out​

The emergency role assignment was made without a Valid from date, which is the usual case. The next run of Warden break-glass grant expiry after 18:10 stamps the assignment with the time it first saw it and starts the four-hour clock from there. The first run after those four hours disables the assignment (it is not deleted) and writes an Override row on the event log against the document BREAK-GLASS, recording the role, the user's reference, when the clock started and the four-hour time-box. If the system administrator sets Valid from explicitly, the clock runs from that instead. See break-glass expiry.

12. Casey reconstructs the quarter​

At the start of the next quarter Casey opens System administration → Setup → Governance event log and filters Document to each of the three orders. For PO-004417 they see, in order: Change diff recorded (within band), Change diff recorded (held), Hold placed, Delta approval requested, Delta approved. For PO-004502: the held change, Delta rejected, Sam's correction and its resubmission (each a Change diff recorded row), and Delta approved. For PO-004588: the held change and Break-glass release with Morgan's reason. Two rows are not filed under an order number. Robin's refused approval is recorded against the change set the work item routes, with the event type Change diff recorded and a Detail that names the work item and says the approval was refused under the signing limit; Casey finds it by the work item ID. The grant's expiry is under the document BREAK-GLASS.

Each row shows Event type, Actor, When, Detail, Policy, Workflow correlation and whether it has been Forwarded to audit store. People appear as WP- subject references. Where a row is written by the workflow runtime, Warden does not record the runtime's own account as the person who acted; the native workflow history shows who approved or rejected.

Casey holds the Warden auditor role, which has no right to change documents, policies or setup. For the change sets themselves Brackwater also gave Casey the read-only duty Inquire into Warden governance, which opens Change diff sets (old and new values) and Field approval baselines, where Casey confirms that PO-004588's baseline was not moved by the break-glass release. The auditor role on its own does not open those two pages. See the auditor's guide.

The outcome​

  • Small price changes still go through without anybody being asked.
  • A run of small changes is caught once it adds up to more than 5 per cent of the approved price, however many edits it took.
  • A change that needs approval reaches someone whose signing limit covers the whole order, and an approver without enough authority is told who has it.
  • A rejected change leaves the order blocked rather than quietly unlocked, until a corrected change is resubmitted and approved.
  • The one emergency release in the quarter is on record with who, when and why, was alerted the same evening, and the right to do it expired on its own.

What did not change: Warden did not stop the vendor raising prices, and it did not decide whether Robin should have accepted the first surcharge. It made the change visible and put the decision with the person entitled to take it.

What this story simplified​

  • Setup off stage. Enabling the feature, running Initialize Warden in the legal entity, configuring the two workflows, scheduling the batch jobs and building the emergency role all happen before the story starts. Getting started covers them, and the system administrator's guide covers the role.
  • One policy. With more than one active policy covering the same order, the more specific scope line wins, and Priority breaks ties between equally specific ones (lower wins). Simulation counts orders governed by, or tied with, another policy.
  • Approver duties. Warden ships the delta approval duty on the Warden controls owner role as a floor, so a work item can always be acted on. Brackwater added it to Robin's and Quinn's own roles. See the security model.
  • E-signatures. The policy did not ask for an electronic signature (Require e-signature). When it does, the native signature dialog appears at approval and the manifestation is filed for the 21 CFR Part 11 pack.
  • Alerts are in-client. Break-glass and sensitive-role alerts appear in the recipients' alert list and as a pop-up while they are signed in. If the Publish business events parameter is on, a business event is also published, which is the channel that can leave the product.
  • Internal failure. On purchase order header and line saves, a Warden malfunction during evaluation refuses the save rather than letting an ungoverned change through. These are two of the four seams decided to fail closed. Elsewhere Warden fails open and files an Ungoverned action occurred attestation.
  • The full process. Purchase order delta re-approval describes the same process as a procedure rather than a story.