|
| 1 | +id: scm.procurement |
| 2 | +version: 1.0.0 |
| 3 | +domain: scm |
| 4 | +description: > |
| 5 | + Purchase order lifecycle from requisition through receipt and settlement. |
| 6 | + Tracks approval, supplier confirmation, receipt scheduling, and 3-way match. |
| 7 | +
|
| 8 | +states: |
| 9 | + - id: OPEN |
| 10 | + - id: PO_CONFIRMED |
| 11 | + - id: RECEIPT_SCHEDULED |
| 12 | + - id: RECEIVED |
| 13 | + - id: INVOICE_MATCHED |
| 14 | + - id: SETTLED |
| 15 | + isTerminal: true |
| 16 | + - id: CANCELLED |
| 17 | + isTerminal: true |
| 18 | + isError: false |
| 19 | + - id: DISPUTED |
| 20 | + isError: true |
| 21 | + |
| 22 | +initialState: OPEN |
| 23 | + |
| 24 | +transitions: |
| 25 | + - id: confirm_po |
| 26 | + from: OPEN |
| 27 | + to: PO_CONFIRMED |
| 28 | + allowedActors: [human, automation, ai-agent] |
| 29 | + guards: |
| 30 | + - id: approval_obtained |
| 31 | + severity: hard |
| 32 | + evaluatedBy: external |
| 33 | + description: PO must be approved before confirmation |
| 34 | + failureMessage: PO confirmation requires explicit approval |
| 35 | + - id: actor_has_permission |
| 36 | + severity: hard |
| 37 | + evaluatedBy: runtime |
| 38 | + description: Actor must have purchase-order confirm permission |
| 39 | + failureMessage: Insufficient permissions to confirm PO |
| 40 | + |
| 41 | + - id: schedule_receipt |
| 42 | + from: PO_CONFIRMED |
| 43 | + to: RECEIPT_SCHEDULED |
| 44 | + allowedActors: [human, automation] |
| 45 | + guards: |
| 46 | + - id: deadline_not_exceeded |
| 47 | + severity: soft |
| 48 | + evaluatedBy: external |
| 49 | + description: Supplier delivery deadline check |
| 50 | + failureMessage: Delivery deadline approaching or exceeded |
| 51 | + |
| 52 | + - id: receive_goods |
| 53 | + from: RECEIPT_SCHEDULED |
| 54 | + to: RECEIVED |
| 55 | + allowedActors: [human] |
| 56 | + |
| 57 | + - id: match_invoice |
| 58 | + from: RECEIVED |
| 59 | + to: INVOICE_MATCHED |
| 60 | + allowedActors: [human, automation, ai-agent] |
| 61 | + guards: |
| 62 | + - id: approval_obtained |
| 63 | + severity: hard |
| 64 | + evaluatedBy: external |
| 65 | + description: Three-way match must be confirmed |
| 66 | + failureMessage: Invoice match requires 3-way match confirmation |
| 67 | + |
| 68 | + - id: settle |
| 69 | + from: INVOICE_MATCHED |
| 70 | + to: SETTLED |
| 71 | + allowedActors: [automation, system] |
| 72 | + |
| 73 | + - id: cancel |
| 74 | + from: OPEN |
| 75 | + to: CANCELLED |
| 76 | + allowedActors: [human] |
| 77 | + |
| 78 | + - id: dispute_from_received |
| 79 | + from: RECEIVED |
| 80 | + to: DISPUTED |
| 81 | + allowedActors: [human] |
| 82 | + |
| 83 | + - id: dispute_from_invoice_matched |
| 84 | + from: INVOICE_MATCHED |
| 85 | + to: DISPUTED |
| 86 | + allowedActors: [human] |
| 87 | + |
| 88 | +outcome: |
| 89 | + id: po_settled |
| 90 | + description: Purchase order fully settled with matched invoice and inventory updated |
| 91 | + valueUnit: po_settled |
| 92 | + measurable: true |
| 93 | + businessMetrics: |
| 94 | + - id: cycle_time_days |
| 95 | + label: PO cycle time (days) |
| 96 | + unit: days |
| 97 | + improvableByAI: true |
| 98 | + - id: three_way_match_first_attempt |
| 99 | + label: 3-way match on first attempt |
| 100 | + unit: boolean |
| 101 | + improvableByAI: false |
| 102 | + - id: supplier_lead_time_accuracy |
| 103 | + label: Supplier lead time accuracy |
| 104 | + unit: percentage |
| 105 | + improvableByAI: true |
| 106 | + |
| 107 | +spawnableLoops: |
| 108 | + - scm.replenishment |
0 commit comments