# Validation Report: URS-081

**Title:** Bill-only automated replenishment
**Date:** 2026-09-29T02:31:00.928Z
**Duration:** 115.6s
**Overall Status:** ✅ PASS

## User Requirement

> The system shall, when a manufacturer enables automated bill-only replenishment, generate a replenishment order from a submitted trunk bill-only whose items match the trunk stock consumed, route the generated order through order approval when configured, link the replenishment order and its originating bill-only in both directions, honor agency-level overrides that block automated replenishment, and create no order when no line requests replenishment.

*Source: `User_Requirement_Specifications_Vantis_DeviceFlow.xlsx` — the run below proves the system meets this requirement.*

## Environment

- **Inbox URL:** http://localhost:37307
- **Database:** localhost:38985/cc_repinbox_dev

## Setup

Status: ✅ PASS

## Test Steps

Each step below corresponds to one Playwright test that ran sequentially. Screenshots and video recordings provide visual evidence of the UI behaviour.

### 1. Step 1: Manufacturer enables automated replenishment — ✅ PASS

**What this step proves:**

Alex Admin (Vantis manufacturer) opens Settings → Automation → Bill-Only Orders and switches on "Enable automated replenishment". Enabling reveals the timing radio (default "On bill-only submission") and the "Replenishment order requires approval" switch (default on); saving shows the "Automated replenishment settings saved" toast and writes an organization-settings audit event. This establishes the manufacturer setting the whole chain is gated on — the automation is off by default and setup deliberately leaves it off so this step proves the UI enablement path.

**Audit events generated by this step:**

*(Evidence scoped to step execution window: 2026-09-29T02:31:10.848Z → 2026-09-29T02:31:13.121Z)*

| Time | Type | Action | User | Org | Performed |
|------|------|--------|------|-----|-----------|
| 2026-09-29 02:31:12Z | organization_settings | bill_only_replenishment_settings_changed | alex.admin@vantismedical.com | Vantis | — |

**Screenshots:**

![step 01 automation off](screenshots/step-01-automation-off.png)

![step 01 automation configured](screenshots/step-01-automation-configured.png)

![step 01 automation saved](screenshots/step-01-automation-saved.png)

**Video recording:**

[▶ Watch step recording](videos/step-01-enable-automation.webm)

---

### 2. Step 2: Rep submits a trunk bill-only with replenishment requested — ✅ PASS

**What this step proves:**

Blair Bennett (Corveta distributor rep) submits a bill-only at /billing/new drawing from her trunk: 2 units of URS081-PLATE and 1 unit of URS081-SCREW. With the automation on and no override blocking it, the "Replenish trunk stock" master toggle and every per-unit Replenish checkbox are checked by default, and the review step prints "Replenish: Requested" per lot. Submitting persists replenishment_requested=true on every unit row — the consumption record the trigger later reads.

**Audit events generated by this step:**

*(Evidence scoped to step execution window: 2026-09-29T02:31:37.679Z → 2026-09-29T02:31:43.321Z)*

| Time | Type | Action | User | Org | Performed |
|------|------|--------|------|-----|-----------|
| 2026-09-29 02:31:40Z | decision | bill_only_order.duplicate_submission_block | blair.bennett@corvetasurgical.com | Corveta Surgical Group | no |
| 2026-09-29 02:31:40Z | decision | bill_only.link_purchase_order | blair.bennett@corvetasurgical.com | Corveta Surgical Group | no |
| 2026-09-29 02:31:40Z | decision | representatives.gate_rep_action | blair.bennett@corvetasurgical.com | Vantis | no |
| 2026-09-29 02:31:40Z | scheduled_task | scheduled_task.scheduled | blair.bennett@corvetasurgical.com | Vantis | — |
| 2026-09-29 02:31:40Z | decision | basicErp.deriveSalesOrder | blair.bennett@corvetasurgical.com | Vantis | no |
| 2026-09-29 02:31:40Z | decision | representatives.gate_rep_action | blair.bennett@corvetasurgical.com | Vantis | no |
| 2026-09-29 02:31:40Z | decision | bill_only_order.inventory_items_decrement | blair.bennett@corvetasurgical.com | Vantis | yes |
| 2026-09-29 02:31:40Z | decision | bill_only_order.direct_po_import_on_create | blair.bennett@corvetasurgical.com | Vantis | no |
| 2026-09-29 02:31:40Z | billing_order | status_change | blair.bennett@corvetasurgical.com | Vantis | — |
| 2026-09-29 02:31:40Z | scheduled_task | scheduled_task.scheduled | blair.bennett@corvetasurgical.com | Vantis | — |
| 2026-09-29 02:31:40Z | scheduled_task | scheduled_task.scheduled | blair.bennett@corvetasurgical.com | Vantis | — |
| 2026-09-29 02:31:41Z | decision | bill_only.notifications.cc_incident_recipients | — | Vantis | no |
| 2026-09-29 02:31:42Z | transactional_email | new_bill_only | — | Corveta Surgical Group | — |

**Screenshots:**

![step 02 devices replenish checked](screenshots/step-02-devices-replenish-checked.png)

![step 02 review replenish requested](screenshots/step-02-review-replenish-requested.png)

![step 02 submitted](screenshots/step-02-submitted.png)

**Video recording:**

[▶ Watch step recording](videos/step-02-trunk-bill-only.webm)

---

### 3. Step 3: Submission trigger generates the replenishment order — ✅ PASS

**What this step proves:**

In production, Restate delivers BillOnlyOrderObject.handleOrderCreatedDelayed one hour after submission (the void/edit grace window) and that handler runs the replenishment trigger. The suite invokes the same handler through the Restate ingress — the identical invocation, delivered early — and then observes the outcome: an order_requests row with order_type=replenishment appears, linked to the bill-only via source_billing_order_id, and the orders list shows it as a Replenishment order awaiting approval (the requires-approval switch suppressed auto-approval).

**Audit events generated by this step:**

*(Evidence matched by declared name — step timing not available or no events fell in window)*

| Time | Type | Action | User | Org | Performed |
|------|------|--------|------|-----|-----------|
| 2026-09-29 02:31:47Z | decision | create_replenishment_order_on_bill_only | — | Vantis | yes |
| 2026-09-29 02:32:26Z | decision | create_replenishment_order_on_bill_only | — | Vantis | no |

**Screenshots:**

![step 03 order in list](screenshots/step-03-order-in-list.png)

**Video recording:**

[▶ Watch step recording](videos/step-03-order-generated.webm)

---

### 4. Step 4: Replenishment order matches the consumed items and links back — ✅ PASS

**What this step proves:**

The generated order's detail page lists exactly the products the bill-only consumed — the plate and the screw — and its Related section renders the "Created from bill-only" link (DF-4805) that navigates to the triggering bill-only. The DB validations pin the quantities exactly: requested 2 and 1, matching the flagged unit rows one-to-one. This is the core of the requirement: the generated order equals what was used.

**Screenshots:**

![step 04 order items and link](screenshots/step-04-order-items-and-link.png)

![step 04 link lands on bill only](screenshots/step-04-link-lands-on-bill-only.png)

**Video recording:**

[▶ Watch step recording](videos/step-04-order-detail.webm)

---

### 5. Step 5: Bill-only links to its replenishment order — ✅ PASS

**What this step proves:**

The bill-only's own detail page closes the loop: its Related rail lists "Replenishment order" with the generated order's number, linking to the order detail. Together with Step 4 this proves the DF-4805 bidirectional link, whose single source of truth is order_requests.source_billing_order_id.

**Screenshots:**

![step 05 related replenishment order](screenshots/step-05-related-replenishment-order.png)

**Video recording:**

[▶ Watch step recording](videos/step-05-bill-only-link.webm)

---

### 6. Step 6: Bill-only with no lines flagged generates no order — ✅ PASS

**What this step proves:**

Blair submits a second trunk bill-only but clears the "Replenish trunk stock" master toggle, which unchecks every per-unit Replenish box; the review step shows no replenishment request. When the trigger fires for this bill-only it records the decision performed=false with reason no_items_flagged and creates nothing — the negative control proving orders are generated only from explicit per-line requests.

**Audit events generated by this step:**

*(Evidence scoped to step execution window: 2026-09-29T02:32:22.355Z → 2026-09-29T02:32:29.750Z)*

| Time | Type | Action | User | Org | Performed |
|------|------|--------|------|-----|-----------|
| 2026-09-29 02:32:24Z | decision | bill_only_order.inventory_items_decrement | blair.bennett@corvetasurgical.com | Vantis | yes |
| 2026-09-29 02:32:24Z | decision | bill_only_order.direct_po_import_on_create | blair.bennett@corvetasurgical.com | Vantis | no |
| 2026-09-29 02:32:24Z | billing_order | status_change | blair.bennett@corvetasurgical.com | Vantis | — |
| 2026-09-29 02:32:24Z | decision | basicErp.deriveSalesOrder | blair.bennett@corvetasurgical.com | Vantis | no |
| 2026-09-29 02:32:24Z | scheduled_task | scheduled_task.scheduled | blair.bennett@corvetasurgical.com | Vantis | — |
| 2026-09-29 02:32:24Z | scheduled_task | scheduled_task.scheduled | blair.bennett@corvetasurgical.com | Vantis | — |
| 2026-09-29 02:32:24Z | decision | representatives.gate_rep_action | blair.bennett@corvetasurgical.com | Vantis | no |
| 2026-09-29 02:32:24Z | decision | bill_only.link_purchase_order | blair.bennett@corvetasurgical.com | Corveta Surgical Group | no |
| 2026-09-29 02:32:24Z | decision | bill_only_order.duplicate_submission_block | blair.bennett@corvetasurgical.com | Corveta Surgical Group | no |
| 2026-09-29 02:32:24Z | scheduled_task | scheduled_task.scheduled | blair.bennett@corvetasurgical.com | Vantis | — |
| 2026-09-29 02:32:24Z | decision | representatives.gate_rep_action | blair.bennett@corvetasurgical.com | Vantis | no |
| 2026-09-29 02:32:24Z | decision | bill_only.notifications.cc_incident_recipients | — | Vantis | no |
| 2026-09-29 02:32:25Z | transactional_email | new_bill_only | — | Corveta Surgical Group | — |
| 2026-09-29 02:32:26Z | decision | create_replenishment_order_on_bill_only | — | Vantis | no |
| 2026-09-29 02:32:26Z | decision | generate_dof | — | Corveta Surgical Group | yes |
| 2026-09-29 02:32:26Z | decision | send_dof_notification | — | Corveta Surgical Group | yes |
| 2026-09-29 02:32:26Z | decision | send_bill_only_submitted_notification | — | Corveta Surgical Group | yes |
| 2026-09-29 02:32:26Z | decision | call_org_logic | — | Corveta Surgical Group | no |

**Screenshots:**

![step 06 replenish unchecked](screenshots/step-06-replenish-unchecked.png)

![step 06 review no replenish](screenshots/step-06-review-no-replenish.png)

![step 06 submitted](screenshots/step-06-submitted.png)

**Video recording:**

[▶ Watch step recording](videos/step-06-no-replenish.webm)

---

### 7. Step 7: Agency override blocks replenishment for the rep — ✅ PASS

**What this step proves:**

Dan Distributor (Corveta admin) switches off "Allow automated replenishment for this agency" on the organization settings page — a hard block for every rep in the agency. Blair's wizard then renders the replenishment toggle disabled with "Automated replenishment is turned off for your agency.", and she cannot re-enable it. Dan then restores the override to the inherit state. Both changes are audited on Corveta.

**Audit events generated by this step:**

*(Evidence scoped to step execution window: 2026-09-29T02:32:35.521Z → 2026-09-29T02:32:54.936Z)*

| Time | Type | Action | User | Org | Performed |
|------|------|--------|------|-----|-----------|
| 2026-09-29 02:32:37Z | user_log | user:login | blair.bennett@corvetasurgical.com | Corveta Surgical Group | — |
| 2026-09-29 02:32:48Z | decision | bill_only_order.duplicate_submission_block | blair.bennett@corvetasurgical.com | Corveta Surgical Group | no |
| 2026-09-29 02:32:54Z | organization_settings | bill_only_replenishment_agency_override_changed | dan.distributor@corvetasurgical.com | Corveta Surgical Group | — |

**Screenshots:**

![step 07 agency override off](screenshots/step-07-agency-override-off.png)

![step 07 rep toggle blocked](screenshots/step-07-rep-toggle-blocked.png)

![step 07 agency override restored](screenshots/step-07-agency-override-restored.png)

**Video recording:**

[▶ Watch step recording](videos/step-07-agency-off.webm)

---

## Database Validations

The following SQL queries ran against the application database after the Playwright scenarios completed. Each query asserts a specific condition that proves the feature under test persisted its data correctly.

### Automation settings change audited — ✅ PASS

**Assertion:** Saving the automation should write an audit_events row (event_type=organization_settings, action=bill_only_replenishment_settings_changed) by Alex whose payload records automatedReplenishmentEnabled=true.

```sql
SELECT id, action, user_id, payload, created_at
    FROM audit_events
    WHERE organization_id = $1
      AND created_at >= $2
      AND event_type = 'organization_settings'
      AND action = 'bill_only_replenishment_settings_changed'
      AND user_id = $3
    ORDER BY created_at ASC
```

| id | action | user_id | payload | created_at |
| --- | --- | --- | --- | --- |
| 01a0eb00-7c64-7e5d-8bae-9d08556d657a | bill_only_replenishment_settings_changed | f6a7b8c9-d0e1-2345-f123-456789012345 | {"previous":{},"automatedReplenishmentTiming":"on_submission","automatedReplenishmentEnabled":true,"automatedReplenishmentRequiresApproval":true} | 2026-09-29T02:31:12.535Z |

### Automation settings persisted on the manufacturer — ✅ PASS

**Assertion:** organizations.settings.billOnly on Vantis should persist automatedReplenishmentEnabled=true with on_submission timing and requires-approval on (the Step 1 configuration).

```sql
SELECT settings->'billOnly' AS bill_only FROM organizations WHERE id = $1
```

| bill_only |
| --- |
| {"automatedReplenishmentTiming":"on_submission","automatedReplenishmentEnabled":true,"automatedReplenishmentRequiresApproval":true} |

### Bill-only lines persisted the replenishment flags — ✅ PASS

**Assertion:** Two URS-081 bill-onlys should exist: one with 3 unit rows all carrying replenishment_requested=true (Step 2), and one with a single unflagged row (Step 6).

```sql
SELECT bo.id, bo.patient_id, bo.status,
      COUNT(*) FILTER (WHERE boi.parent_billing_order_item_id IS NULL)::int AS top_level_rows,
      COUNT(*) FILTER (WHERE boi.replenishment_requested)::int AS flagged_rows
    FROM billing_orders bo
    JOIN billing_order_items boi ON boi.billing_order_id = bo.id
    WHERE bo.sales_organization_id = $1
      AND bo.manufacturer_organization_id = $2
      AND bo.patient_id LIKE $3 || '%'
      AND bo.created_at >= $4
    GROUP BY bo.id, bo.patient_id, bo.status
    ORDER BY MIN(bo.created_at)
```

| id | patient_id | status | top_level_rows | flagged_rows |
| --- | --- | --- | --- | --- |
| 01a0eb00-e861-7caf-a765-619e454f76f2 | URS081-MRN-1790649062965-1 | submitted | 3 | 3 |
| 01a0eb01-943e-77b3-9c81-3eaa93356e3d | URS081-MRN-1790649062965-2 | submitted | 1 | 0 |

### Replenishment order generated with the expected shape — ✅ PASS

**Assertion:** Exactly one order_requests row should point at bill-only #1: order_type=replenishment, Corveta requesting from Vantis, requested by and receiving to Blair, at Blair's trunk, no submission grace window, status=submitted (awaiting approval), notes naming the bill-only.

```sql
SELECT id, request_number, status, order_type,
      requesting_organization_id, fulfilling_organization_id, requested_by_user_id,
      receiving_rep_user_id, location_id, source_billing_order_id,
      submission_grace_until, notes, created_at
    FROM order_requests
    WHERE source_billing_order_id = $1
```

| id | request_number | status | order_type | requesting_organization_id | fulfilling_organization_id | requested_by_user_id | receiving_rep_user_id | location_id | source_billing_order_id | submission_grace_until | notes | created_at |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 01a0eb01-033f-7247-93f9-84f6371a6f26 | OR-2 | submitted | replenishment | b2c3d4e5-f6a7-8901-bcde-f12345678901 | a1b2c3d4-e5f6-7890-abcd-ef1234567890 | 17b8c9d0-e1f2-3456-1234-567890123456 | 17b8c9d0-e1f2-3456-1234-567890123456 | a6e7f8a9-b0c1-2345-0123-456789012345 | 01a0eb00-e861-7caf-a765-619e454f76f2 | NULL | Replenishment order for bill-only BO-1 | 2026-09-29T02:31:47.232Z |

### Order items match the consumed units and await approval — ✅ PASS

**Assertion:** The order should have exactly two items matching the bill-only's consumption — URS081-PLATE × 2 and URS081-SCREW × 1 — each with pending_quantity equal to requested_quantity and approved_quantity 0 (requires-approval suppressed auto-approval).

```sql
SELECT oi.id, oi.product_id, p.sku, oi.requested_quantity,
      oi.pending_quantity, oi.approved_quantity
    FROM order_request_items oi
    JOIN org_products p ON p.id = oi.product_id
    WHERE oi.order_request_id = $1
    ORDER BY p.sku
```

| id | product_id | sku | requested_quantity | pending_quantity | approved_quantity |
| --- | --- | --- | --- | --- | --- |
| 01a0eb01-034b-7641-92e7-281d6aafeaa6 | 08100000-0000-4000-8000-000000000011 | URS081-PLATE | 2 | 2 | 0 |
| 01a0eb01-034b-7641-92e7-281e73e14397 | 08100000-0000-4000-8000-000000000012 | URS081-SCREW | 1 | 1 | 0 |

### Replenishment creation decision recorded — ✅ PASS

**Assertion:** The trigger should log a decision (action=create_replenishment_order_on_bill_only) against bill-only #1 with performed=true, reason=replenishment_order_created, and the created order as secondary_object_id, scoped to the manufacturer organization.

```sql
SELECT id, action, object_id, secondary_object_id,
      payload->>'performed' AS performed, payload->>'reason' AS reason, created_at
    FROM audit_events
    WHERE organization_id = $1
      AND created_at >= $2
      AND event_type = 'decision'
      AND action = $3
      AND object_id = $4
    ORDER BY created_at ASC
```

| id | action | object_id | secondary_object_id | performed | reason | created_at |
| --- | --- | --- | --- | --- | --- | --- |
| 01a0eb01-0387-7f5b-9fa8-861045b1a5e1 | create_replenishment_order_on_bill_only | 01a0eb00-e861-7caf-a765-619e454f76f2 | 01a0eb01-033f-7247-93f9-84f6371a6f26 | true | replenishment_order_created | 2026-09-29T02:31:47.232Z |

### Auto-approval suppressed on the generated order — ✅ PASS

**Assertion:** With the requires-approval switch on, order creation should log auto_approve_order with performed=false (auto-approval suppressed) for the generated order.

```sql
SELECT id, action, payload->>'performed' AS performed,
      payload->>'reason' AS reason, created_at
    FROM audit_events
    WHERE organization_id = $3
      AND created_at >= $1
      AND event_type = 'decision'
      AND action = 'auto_approve_order'
      AND object_id = $2
    ORDER BY created_at ASC
```

| id | action | performed | reason | created_at |
| --- | --- | --- | --- | --- |
| 01a0eb01-034e-76cf-a104-ff457904b3a6 | auto_approve_order | false | Auto-approval suppressed by caller | 2026-09-29T02:31:47.232Z |

### Unflagged bill-only skipped with no order created — ✅ PASS

**Assertion:** The trigger should log performed=false with reason=no_items_flagged against bill-only #2, and no order_requests row may point at it.

```sql
SELECT id, payload->>'performed' AS performed, payload->>'reason' AS reason,
      (SELECT COUNT(*)::int FROM order_requests r WHERE r.source_billing_order_id = $4) AS spawned_orders
    FROM audit_events
    WHERE organization_id = $1
      AND created_at >= $2
      AND event_type = 'decision'
      AND action = $3
      AND object_id = $4
    ORDER BY created_at ASC
```

| id | performed | reason | spawned_orders |
| --- | --- | --- | --- |
| 01a0eb01-9d3e-7de9-94dd-4556dad90fc7 | false | no_items_flagged | 0 |

### Agency override changes audited — ✅ PASS

**Assertion:** Dan turning the agency override off and back on should write two bill_only_replenishment_agency_override_changed audit rows on Corveta: first storing false (hard block), then null (inherit).

```sql
SELECT id, payload, created_at
    FROM audit_events
    WHERE organization_id = $1
      AND created_at >= $2
      AND event_type = 'organization_settings'
      AND action = 'bill_only_replenishment_agency_override_changed'
      AND user_id = $3
    ORDER BY created_at ASC
```

| id | payload | created_at |
| --- | --- | --- |
| 01a0eb01-bf62-7e34-aa73-842732a6bdae | {"previous":null,"agencyReplenishmentEnabled":false} | 2026-09-29T02:32:35.377Z |
| 01a0eb02-0b0a-7081-a686-2d6dc0cbb444 | {"previous":false,"agencyReplenishmentEnabled":null} | 2026-09-29T02:32:54.791Z |

### Multi-tenant isolation: no URS-081 rows outside the participating orgs — ✅ PASS

**Assertion:** No organization other than Vantis owns a URS081 product, no org outside the Vantis/Corveta pair appears on the generated order, and the replenishment decisions are scoped to the manufacturer only.

```sql
SELECT
      (SELECT COUNT(*)::int FROM org_products
        WHERE sku LIKE 'URS081-%' AND organization_id <> $1) AS foreign_products,
      (SELECT COUNT(*)::int FROM order_requests
        WHERE source_billing_order_id = $3
          AND (requesting_organization_id NOT IN ($1, $2)
            OR fulfilling_organization_id NOT IN ($1, $2))) AS foreign_orders,
      (SELECT COUNT(*)::int FROM audit_events
        WHERE event_type = 'decision' AND action = $4 AND object_id = $3
          AND organization_id <> $1) AS foreign_decisions
```

| foreign_products | foreign_orders | foreign_decisions |
| --- | --- | --- |
| 0 | 0 | 0 |

## Audit & Email Assertion Ledger

Per-declaration outcome of every `expectedAuditActions` and `expectedEmailTemplates` entry written into the orchestrator. Missing evidence here is a real test failure, not a soft warning.

### Audit Action Assertions

Each row asserts that a declared `expectedAuditActions` entry produced a matching row in `audit_events`. A ❌ flips overall status to FAIL — the declaration is real proof, not just an annotation.

| Step | Expected Audit Action | Found |
|------|-----------------------|-------|
| Step 1: Manufacturer enables automated replenishment | `organization_settings:bill_only_replenishment_settings_changed` | ✅ |
| Step 3: Submission trigger generates the replenishment order | `decision:create_replenishment_order_on_bill_only` | ✅ |
| Step 6: Bill-only with no lines flagged generates no order | `decision:create_replenishment_order_on_bill_only` | ✅ |
| Step 7: Agency override blocks replenishment for the rep | `organization_settings:bill_only_replenishment_agency_override_changed` | ✅ |

## Audit Log Events

Every row written to `audit_events` while this test was running (scoped to the demo organizations). Provides compliance evidence that user actions are traced end-to-end (URS-003).

**Capture window start:** 2026-09-29T02:30:59.122Z

<details><summary>Query used to capture events</summary>

```sql
SELECT
    ae.created_at,
    ae.event_type,
    ae.action,
    ae.user_id,
    u.email AS user_email,
    ae.organization_id,
    o.name AS organization_name,
    ae.object_id,
    ae.secondary_object_id,
    ae.payload,
    ae.route,
    ae.trace_id
  FROM audit_events ae
  LEFT JOIN users u ON u.id = ae.user_id
  LEFT JOIN organizations o ON o.id = ae.organization_id
  WHERE ae.created_at >= $1
    AND ae.organization_id = ANY($2::uuid[])
  ORDER BY ae.created_at ASC
```
</details>

53 event(s) captured:

| Time | Type | Action | User | Org | Object ID | Performed | Reason |
|------|------|--------|------|-----|-----------|-----------|--------|
| 2026-09-29 02:31:06Z | user_log | user:login | alex.admin@vantismedical.com | Vantis | — | — |  |
| 2026-09-29 02:31:12Z | organization_settings | bill_only_replenishment_settings_changed | alex.admin@vantismedical.com | Vantis | a1b2c3d4-e5f6-7890-abcd-ef1234567890 | — |  |
| 2026-09-29 02:31:16Z | user_log | user:login | blair.bennett@corvetasurgical.com | Corveta Surgical Group | — | — |  |
| 2026-09-29 02:31:29Z | decision | bill_only_order.duplicate_submission_block | blair.bennett@corvetasurgical.com | Corveta Surgical Group | fea7b8c9-d0e1-2345-0123-456789012345 | no | no_same_day_candidates |
| 2026-09-29 02:31:40Z | decision | bill_only_order.duplicate_submission_block | blair.bennett@corvetasurgical.com | Corveta Surgical Group | fea7b8c9-d0e1-2345-0123-456789012345 | no | no_same_day_candidates |
| 2026-09-29 02:31:40Z | decision | bill_only.link_purchase_order | blair.bennett@corvetasurgical.com | Corveta Surgical Group | 01a0eb00-e861-7caf-a765-619e454f76f2 | no | no_purchase_order_selected |
| 2026-09-29 02:31:40Z | decision | representatives.gate_rep_action | blair.bennett@corvetasurgical.com | Vantis | a1b2c3d4-e5f6-7890-abcd-ef1234567890 | no | no_blocking_relationship |
| 2026-09-29 02:31:40Z | scheduled_task | scheduled_task.scheduled | blair.bennett@corvetasurgical.com | Vantis | 01a0eb00-e8ac-74c9-ba94-bcdbee76d57b | — |  |
| 2026-09-29 02:31:40Z | decision | basicErp.deriveSalesOrder | blair.bennett@corvetasurgical.com | Vantis | 01a0eb00-e861-7caf-a765-619e454f76f2 | no | flag_disabled |
| 2026-09-29 02:31:40Z | decision | representatives.gate_rep_action | blair.bennett@corvetasurgical.com | Vantis | a1b2c3d4-e5f6-7890-abcd-ef1234567890 | no | no_blocking_relationship |
| 2026-09-29 02:31:40Z | decision | bill_only_order.inventory_items_decrement | blair.bennett@corvetasurgical.com | Vantis | 01a0eb00-e861-7caf-a765-619e454f76f2 | yes | inventory_items_decremented |
| 2026-09-29 02:31:40Z | decision | bill_only_order.direct_po_import_on_create | blair.bennett@corvetasurgical.com | Vantis | 01a0eb00-e861-7caf-a765-619e454f76f2 | no | No uploaded PO documents |
| 2026-09-29 02:31:40Z | billing_order | status_change | blair.bennett@corvetasurgical.com | Vantis | 01a0eb00-e861-7caf-a765-619e454f76f2 | — |  |
| 2026-09-29 02:31:40Z | scheduled_task | scheduled_task.scheduled | blair.bennett@corvetasurgical.com | Vantis | 01a0eb00-e8a7-7087-beed-33b5b8cf8593 | — |  |
| 2026-09-29 02:31:40Z | scheduled_task | scheduled_task.scheduled | blair.bennett@corvetasurgical.com | Vantis | 01a0eb00-e8a0-7911-9408-ecef98d8e8e2 | — |  |
| 2026-09-29 02:31:41Z | decision | bill_only.notifications.cc_incident_recipients | — | Vantis | 01a0eb00-e861-7caf-a765-619e454f76f2 | no | order has no no-charge item with an incident reason |
| 2026-09-29 02:31:42Z | transactional_email | new_bill_only | — | Corveta Surgical Group | 01a0eb00-e861-7caf-a765-619e454f76f2 | — |  |
| 2026-09-29 02:31:45Z | user_log | user:login | blair.bennett@corvetasurgical.com | Corveta Surgical Group | — | — |  |
| 2026-09-29 02:31:47Z | decision | order_request_created | blair.bennett@corvetasurgical.com | Vantis | 01a0eb01-033f-7247-93f9-84f6371a6f26 | yes | Order request OR-2 created (importSource=manual) |
| 2026-09-29 02:31:47Z | decision | create_replenishment_order_on_bill_only | — | Vantis | 01a0eb00-e861-7caf-a765-619e454f76f2 | yes | replenishment_order_created |
| 2026-09-29 02:31:47Z | checklist | checklists.create | — | Vantis | 01a0eb01-0359-73d1-9adc-4bc46483084e | — |  |
| 2026-09-29 02:31:47Z | decision | auto_approve_order | — | Vantis | 01a0eb01-033f-7247-93f9-84f6371a6f26 | no | Auto-approval suppressed by caller |
| 2026-09-29 02:31:47Z | decision | generate_dof | — | Corveta Surgical Group | 01a0eb00-e861-7caf-a765-619e454f76f2 | yes | Generated successfully |
| 2026-09-29 02:31:47Z | decision | send_dof_notification | — | Corveta Surgical Group | 01a0eb00-e861-7caf-a765-619e454f76f2 | yes | Invoice generated, no blocking issues |
| 2026-09-29 02:31:48Z | decision | send_bill_only_submitted_notification | — | Corveta Surgical Group | 01a0eb00-e861-7caf-a765-619e454f76f2 | yes | Notification sent |
| 2026-09-29 02:31:48Z | decision | call_org_logic | — | Corveta Surgical Group | 01a0eb00-e861-7caf-a765-619e454f76f2 | no | Org logic called but not executed |
| 2026-09-29 02:31:53Z | user_log | user:login | blair.bennett@corvetasurgical.com | Corveta Surgical Group | — | — |  |
| 2026-09-29 02:31:59Z | user_log | user:login | blair.bennett@corvetasurgical.com | Corveta Surgical Group | — | — |  |
| 2026-09-29 02:32:04Z | user_log | user:login | blair.bennett@corvetasurgical.com | Corveta Surgical Group | — | — |  |
| 2026-09-29 02:32:16Z | decision | bill_only_order.duplicate_submission_block | blair.bennett@corvetasurgical.com | Corveta Surgical Group | fea7b8c9-d0e1-2345-0123-456789012345 | no | acknowledged_not_duplicate |
| 2026-09-29 02:32:24Z | decision | bill_only_order.inventory_items_decrement | blair.bennett@corvetasurgical.com | Vantis | 01a0eb01-943e-77b3-9c81-3eaa93356e3d | yes | inventory_items_decremented |
| 2026-09-29 02:32:24Z | decision | bill_only_order.direct_po_import_on_create | blair.bennett@corvetasurgical.com | Vantis | 01a0eb01-943e-77b3-9c81-3eaa93356e3d | no | No uploaded PO documents |
| 2026-09-29 02:32:24Z | billing_order | status_change | blair.bennett@corvetasurgical.com | Vantis | 01a0eb01-943e-77b3-9c81-3eaa93356e3d | — |  |
| 2026-09-29 02:32:24Z | decision | basicErp.deriveSalesOrder | blair.bennett@corvetasurgical.com | Vantis | 01a0eb01-943e-77b3-9c81-3eaa93356e3d | no | flag_disabled |
| 2026-09-29 02:32:24Z | scheduled_task | scheduled_task.scheduled | blair.bennett@corvetasurgical.com | Vantis | 01a0eb01-9455-7fb3-994a-7cd133373cbf | — |  |
| 2026-09-29 02:32:24Z | scheduled_task | scheduled_task.scheduled | blair.bennett@corvetasurgical.com | Vantis | 01a0eb01-945c-7546-9481-87d0b3bd6bc8 | — |  |
| 2026-09-29 02:32:24Z | decision | representatives.gate_rep_action | blair.bennett@corvetasurgical.com | Vantis | a1b2c3d4-e5f6-7890-abcd-ef1234567890 | no | no_blocking_relationship |
| 2026-09-29 02:32:24Z | decision | bill_only.link_purchase_order | blair.bennett@corvetasurgical.com | Corveta Surgical Group | 01a0eb01-943e-77b3-9c81-3eaa93356e3d | no | no_purchase_order_selected |
| 2026-09-29 02:32:24Z | decision | bill_only_order.duplicate_submission_block | blair.bennett@corvetasurgical.com | Corveta Surgical Group | fea7b8c9-d0e1-2345-0123-456789012345 | no | acknowledged_not_duplicate |
| 2026-09-29 02:32:24Z | scheduled_task | scheduled_task.scheduled | blair.bennett@corvetasurgical.com | Vantis | 01a0eb01-9459-74cd-9dc4-abcab1132c47 | — |  |
| 2026-09-29 02:32:24Z | decision | representatives.gate_rep_action | blair.bennett@corvetasurgical.com | Vantis | a1b2c3d4-e5f6-7890-abcd-ef1234567890 | no | no_blocking_relationship |
| 2026-09-29 02:32:24Z | decision | bill_only.notifications.cc_incident_recipients | — | Vantis | 01a0eb01-943e-77b3-9c81-3eaa93356e3d | no | order has no no-charge item with an incident reason |
| 2026-09-29 02:32:25Z | transactional_email | new_bill_only | — | Corveta Surgical Group | 01a0eb01-943e-77b3-9c81-3eaa93356e3d | — |  |
| 2026-09-29 02:32:26Z | decision | create_replenishment_order_on_bill_only | — | Vantis | 01a0eb01-943e-77b3-9c81-3eaa93356e3d | no | no_items_flagged |
| 2026-09-29 02:32:26Z | decision | generate_dof | — | Corveta Surgical Group | 01a0eb01-943e-77b3-9c81-3eaa93356e3d | yes | Generated successfully |
| 2026-09-29 02:32:26Z | decision | send_dof_notification | — | Corveta Surgical Group | 01a0eb01-943e-77b3-9c81-3eaa93356e3d | yes | Invoice generated, no blocking issues |
| 2026-09-29 02:32:26Z | decision | send_bill_only_submitted_notification | — | Corveta Surgical Group | 01a0eb01-943e-77b3-9c81-3eaa93356e3d | yes | Notification sent |
| 2026-09-29 02:32:26Z | decision | call_org_logic | — | Corveta Surgical Group | 01a0eb01-943e-77b3-9c81-3eaa93356e3d | no | Org logic called but not executed |
| 2026-09-29 02:32:31Z | user_log | user:login | dan.distributor@corvetasurgical.com | Corveta Surgical Group | — | — |  |
| 2026-09-29 02:32:35Z | organization_settings | bill_only_replenishment_agency_override_changed | dan.distributor@corvetasurgical.com | Corveta Surgical Group | b2c3d4e5-f6a7-8901-bcde-f12345678901 | — |  |
| 2026-09-29 02:32:37Z | user_log | user:login | blair.bennett@corvetasurgical.com | Corveta Surgical Group | — | — |  |
| 2026-09-29 02:32:48Z | decision | bill_only_order.duplicate_submission_block | blair.bennett@corvetasurgical.com | Corveta Surgical Group | fea7b8c9-d0e1-2345-0123-456789012345 | no | all_candidates_vetoed |
| 2026-09-29 02:32:54Z | organization_settings | bill_only_replenishment_agency_override_changed | dan.distributor@corvetasurgical.com | Corveta Surgical Group | b2c3d4e5-f6a7-8901-bcde-f12345678901 | — |  |

## Email Evidence

2 notification email(s) were captured during this test run. Each email is rendered as a screenshot for compliance review.

### 1. New Bill-Only Order - 9/29/2026 - Vantis BO-1

**Template:** `New_Bill-Only_Order_-_9_29_2026_-_Vantis_BO-1`

![New Bill-Only Order - 9/29/2026 - Vantis BO-1](screenshots/emails/2026-09-29T02-31-42-050Z-New_Bill-Only_Order_-_9_29_2026_-_Vantis_BO-1.png)

### 2. New Bill-Only Order - 9/29/2026 - Vantis BO-3

**Template:** `New_Bill-Only_Order_-_9_29_2026_-_Vantis_BO-3`

![New Bill-Only Order - 9/29/2026 - Vantis BO-3](screenshots/emails/2026-09-29T02-32-25-189Z-New_Bill-Only_Order_-_9_29_2026_-_Vantis_BO-3.png)

## Additional Video Evidence

The following screencast recordings were captured but could not be matched to a specific test step. Step-matched recordings appear inline in their respective step sections above.

- [videos/step-07-agency-restore.webm](videos/step-07-agency-restore.webm)
- [videos/step-07-rep-blocked.webm](videos/step-07-rep-blocked.webm)
