# Validation Report: URS-073

**Title:** Lot traceability for virtual kits (direct orders and bill-only)
**Date:** 2026-08-03T23:05:35.930Z
**Duration:** 217.7s
**Overall Status:** ✅ PASS

## User Requirement

> The system shall provide lot traceability for virtual kits: lot numbers recorded against a kit's child components must flow through direct orders (warehouse ASN import → package → fulfillment order → order pages → received inventory) and through bill-only orders (component lot entry with approved-lot validation → order detail → notification emails → inventory decrement).

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

## Environment

- **Inbox URL:** http://localhost:43713
- **Database:** localhost:33223/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: Kit setup — ✅ PASS

**What this step proves:**

Documents the virtual-kit definition: IK2025LL (LiraLock® Implant Kit) is a virtual kit with lot policy "none" — kits are never lot-stamped — composed of two components that each carry lot policy "approved" with a distinct allowed-lot list (LL516SNA: LN2509/LN2510, NP019N1A: LN2511/LN2512). The distinct lists prove there is no ambiguity about which lots are valid for which component.

**Screenshots:**

![step 01 kit product](screenshots/step-01-kit-product.png)

![step 01 kit bom](screenshots/step-01-kit-bom.png)

![step 01 liralock allowed lots](screenshots/step-01-liralock-allowed-lots.png)

![step 01 novapatch allowed lots](screenshots/step-01-novapatch-allowed-lots.png)

**Video recording:**

[▶ Watch step recording](videos/step-01-kit-setup.webm)

---

### 2. Step 2: Catalog & account — ✅ PASS

**What this step proves:**

Shows the kit product-catalog entry with billing and ordering enabled, and the ROSS sales account carrying effective approved pricing for the kit plus the "holds stocked inventory" billing setting that makes it eligible for direct orders.

**Screenshots:**

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

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

**Video recording:**

[▶ Watch step recording](videos/step-02-catalog-account.webm)

---

### 3. Step 3: Baseline inventory — ✅ PASS

**What this step proves:**

Records the component inventory on hand at the ROSS shipping location before any order activity. This baseline is what makes the later inventory increase (delivery) and decrease (bill-only) conclusively attributable to the two order flows.

**Screenshots:**

![step 03 baseline inventory](screenshots/step-03-baseline-inventory.png)

**Video recording:**

[▶ Watch step recording](videos/step-03-baseline-inventory.webm)

---

### 4. Step 4: Create direct order — ✅ PASS

**What this step proves:**

A Corveta sales rep orders 1x of the virtual kit for the ROSS account. Because the account holds owned stock, the order is created as a DIRECT order.

**Audit events generated by this step:**

*(Evidence scoped to step execution window: 2026-08-03T23:06:43.039Z → 2026-08-03T23:06:49.795Z)*

| Time | Type | Action | User | Org | Performed |
|------|------|--------|------|-----|-----------|
| 2026-08-03 23:06:49Z | checklist | checklists.create | blair.bennett@corvetasurgical.com | Vantis | — |
| 2026-08-03 23:06:49Z | decision | order_request_created | blair.bennett@corvetasurgical.com | Vantis | yes |

**Screenshots:**

![step 04 destination](screenshots/step-04-destination.png)

![step 04 kit quantity](screenshots/step-04-kit-quantity.png)

![step 04 review](screenshots/step-04-review.png)

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

**Video recording:**

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

---

### 5. Step 5: Approve order — ✅ PASS

**What this step proves:**

The manufacturer approves the order, creating the fulfillment order. The order detail lists the kit's components but shows no lot numbers yet — lots are stamped by the warehouse at shipment time, not at order time. The "Direct Order Created" notification email (captured in the Email Evidence section) breaks the kit line out into its component SKUs so recipients see what the warehouse will fulfill.

**Audit events generated by this step:**

*(Evidence scoped to step execution window: 2026-08-03T23:06:58.523Z → 2026-08-03T23:07:05.506Z)*

| Time | Type | Action | User | Org | Performed |
|------|------|--------|------|-----|-----------|
| 2026-08-03 23:06:59Z | fulfillment_order | status_change | alex.admin@vantismedical.com | Vantis | — |
| 2026-08-03 23:06:59Z | decision | extensiv_order_push.skipped | — | Vantis | no |
| 2026-08-03 23:06:59Z | decision | tickets.checklist_item_resolve.auto_resolve_ticket | — | Vantis | no |
| 2026-08-03 23:06:59Z | fulfillment_order | status_change | alex.admin@vantismedical.com | Vantis | — |
| 2026-08-03 23:07:00Z | transactional_email | direct_order_created | — | Corveta Surgical Group | — |

**Emails triggered by this step:**

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

**Email 1: Direct Order Created - OR-1-FO-1**

Template: `Direct_Order_Created_-_OR-1-FO-1`

![Direct Order Created - OR-1-FO-1](screenshots/emails/2026-08-03T23-07-00-447Z-Direct_Order_Created_-_OR-1-FO-1.png)

**Screenshots:**

![step 05 approval dialog](screenshots/step-05-approval-dialog.png)

![step 05 approved no lots](screenshots/step-05-approved-no-lots.png)

**Video recording:**

[▶ Watch step recording](videos/step-05-approve-order.webm)

---

### 6. Step 6: Import shipping notice — ✅ PASS

**What this step proves:**

The warehouse ASN is imported through the real /packages/upload pipeline. The warehouse has no concept of virtual kits, so the notice lists the component SKUs with their lots (LL516SNA/LN2509, NP019N1A/LN2511) against the fulfillment order number, with carrier "demo" and a magic DFX tracking number that simulates the carrier feed.

**Audit events generated by this step:**

*(Evidence scoped to step execution window: 2026-08-03T23:07:17.728Z → 2026-08-03T23:07:22.577Z)*

| Time | Type | Action | User | Org | Performed |
|------|------|--------|------|-----|-----------|
| 2026-08-03 23:07:19Z | fulfillment_order | status_change | — | Vantis | — |
| 2026-08-03 23:07:19Z | decision | recalculate_order_status | — | Vantis | yes |

**Screenshots:**

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

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

**Video recording:**

[▶ Watch step recording](videos/step-06-import-shipping-notice.webm)

---

### 7. Step 7: Lot pages — ✅ PASS

**What this step proves:**

The imported component lots are now traceable on every page in the chain: the shipping package detail (each item shows its SKU, resolved product description, lot, and the virtual kit it belongs to), the fulfillment order detail (lots per component SKU), and the order request detail ("Shipped lots:" per component under the kit line).

**Screenshots:**

![step 07 package lots](screenshots/step-07-package-lots.png)

![step 07 fulfillment lots](screenshots/step-07-fulfillment-lots.png)

![step 07 order shipped lots](screenshots/step-07-order-shipped-lots.png)

**Video recording:**

[▶ Watch step recording](videos/step-07-lot-pages.webm)

---

### 8. Step 8: Delivery & inventory increase — ✅ PASS

**What this step proves:**

The demo tracking sequence delivers the package through the same handler a real carrier webhook uses, firing the auto-add-inventory hook: each component lot rises by exactly the shipped quantity at the ROSS location, proving received direct-order stock increases inventory with the correct lots.

**Screenshots:**

![step 08 package delivered](screenshots/step-08-package-delivered.png)

![step 08 inventory increased](screenshots/step-08-inventory-increased.png)

**Video recording:**

[▶ Watch step recording](videos/step-08-delivery-inventory-increase.webm)

---

### 9. Step 9: Bill-only lot entry — ✅ PASS

**What this step proves:**

The bill-only form asks for a lot for every tracked kit component and validates them: continuing without lots is rejected, and each component's dropdown offers only that component's approved lots (never the other component's). The order is submitted with LN2509 + LN2511 sourced from the ROSS location stock.

**Audit events generated by this step:**

*(Evidence scoped to step execution window: 2026-08-03T23:08:04.133Z → 2026-08-03T23:08:16.996Z)*

| Time | Type | Action | User | Org | Performed |
|------|------|--------|------|-----|-----------|
| 2026-08-03 23:08:14Z | decision | bill_only_order.inventory_items_decrement | blair.bennett@corvetasurgical.com | Vantis | yes |
| 2026-08-03 23:08:14Z | decision | bill_only_order.direct_po_import_on_create | blair.bennett@corvetasurgical.com | Vantis | no |
| 2026-08-03 23:08:14Z | decision | bill_only.link_purchase_order | blair.bennett@corvetasurgical.com | Corveta Surgical Group | no |
| 2026-08-03 23:08:14Z | billing_order | status_change | blair.bennett@corvetasurgical.com | Vantis | — |
| 2026-08-03 23:08:16Z | transactional_email | new_bill_only | — | Corveta Surgical Group | — |

**Screenshots:**

![step 09 kit selected](screenshots/step-09-kit-selected.png)

![step 09 missing lot error](screenshots/step-09-missing-lot-error.png)

![step 09 ll516sna lot options](screenshots/step-09-ll516sna-lot-options.png)

![step 09 np019n1a lot options](screenshots/step-09-np019n1a-lot-options.png)

![step 09 lots selected](screenshots/step-09-lots-selected.png)

![step 09 review](screenshots/step-09-review.png)

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

**Video recording:**

[▶ Watch step recording](videos/step-09-bill-only-lots.webm)

---

### 10. Step 10: Bill-only lots & decrement — ✅ PASS

**What this step proves:**

The submitted bill-only order shows the kit line with its component lots, and the same lots decrement at the same location — consuming the exact units the direct order delivered, which closes the traceability loop. The "New Bill-Only Order" notification (captured in the Email Evidence section) nests each component and its lot number under the kit line. Hospital-stock-only orders intentionally send no billing-contact emails (the stock is already owned by the facility), so the DOF evidence comes from the billable trunk order in the next steps.

**Emails triggered by this step:**

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

**Email 1: New Bill-Only Order - 8/3/2026 - Vantis BO-2**

Template: `New_Bill-Only_Order_-_8_3_2026_-_Vantis_BO-2`

![New Bill-Only Order - 8/3/2026 - Vantis BO-2](screenshots/emails/2026-08-03T23-08-16-127Z-New_Bill-Only_Order_-_8_3_2026_-_Vantis_BO-2.png)

**Email 2: New Bill-Only Order - 8/3/2026 - Vantis BO-3**

Template: `New_Bill-Only_Order_-_8_3_2026_-_Vantis_BO-3`

![New Bill-Only Order - 8/3/2026 - Vantis BO-3](screenshots/emails/2026-08-03T23-08-49-205Z-New_Bill-Only_Order_-_8_3_2026_-_Vantis_BO-3.png)

**Screenshots:**

![step 10 billing order lots](screenshots/step-10-billing-order-lots.png)

![step 10 inventory decremented](screenshots/step-10-inventory-decremented.png)

**Video recording:**

[▶ Watch step recording](videos/step-10-bill-only-decrement.webm)

---

### 11. Step 11: Trunk bill-only — ✅ PASS

**What this step proves:**

A second bill-only order sources the kit from Blair's trunk using each component's OTHER approved lot (LL516SNA: LN2510, NP019N1A: LN2512). Unlike hospital stock, trunk-sourced orders bill the facility, so this order produces the notification emails that evidence the lots.

**Audit events generated by this step:**

*(Evidence scoped to step execution window: 2026-08-03T23:08:45.615Z → 2026-08-03T23:08:49.997Z)*

| Time | Type | Action | User | Org | Performed |
|------|------|--------|------|-----|-----------|
| 2026-08-03 23:08:47Z | decision | bill_only_order.inventory_items_decrement | blair.bennett@corvetasurgical.com | Vantis | yes |
| 2026-08-03 23:08:47Z | decision | bill_only_order.direct_po_import_on_create | blair.bennett@corvetasurgical.com | Vantis | no |
| 2026-08-03 23:08:47Z | billing_order | status_change | blair.bennett@corvetasurgical.com | Vantis | — |
| 2026-08-03 23:08:47Z | decision | bill_only.link_purchase_order | blair.bennett@corvetasurgical.com | Corveta Surgical Group | no |
| 2026-08-03 23:08:49Z | transactional_email | new_bill_only | — | Corveta Surgical Group | — |

**Screenshots:**

![step 11 trunk lots selected](screenshots/step-11-trunk-lots-selected.png)

![step 11 trunk review](screenshots/step-11-trunk-review.png)

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

**Video recording:**

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

---

### 12. Step 12: DOF notification email — ✅ PASS

**What this step proves:**

The manufacturer sends the Delivered Order Form notification from the bill-only detail page. The DOF email (captured in the Email Evidence section) renders the kit line with its component lot numbers, proving the lots flow into outbound notifications.

**Audit events generated by this step:**

*(Evidence scoped to step execution window: 2026-08-03T23:08:57.971Z → 2026-08-03T23:09:09.508Z)*

| Time | Type | Action | User | Org | Performed |
|------|------|--------|------|-----|-----------|
| 2026-08-03 23:08:59Z | transactional_email | bill_only_dof_generated | — | Corveta Surgical Group | — |

**Emails triggered by this step:**

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

**Email 1: Delivered Order - 8/3/2026 - Vantis BO-3**

Template: `Delivered_Order_-_8_3_2026_-_Vantis_BO-3`

![Delivered Order - 8/3/2026 - Vantis BO-3](screenshots/emails/2026-08-03T23-08-59-743Z-Delivered_Order_-_8_3_2026_-_Vantis_BO-3.png)

**Screenshots:**

![step 12 send notifications](screenshots/step-12-send-notifications.png)

![step 12 notifications sent](screenshots/step-12-notifications-sent.png)

**Video recording:**

[▶ Watch step recording](videos/step-12-dof-notification.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.

### Virtual kit is defined with lot policy none and a two-component BOM — ✅ PASS

**Assertion:** Kit IK2025LL is a virtual_kit with lot_policy none and components LL516SNA + NP019N1A

```sql
SELECT p.sku, p.product_kind, p.lot_policy, cp.sku AS component_sku, pc.quantity
     FROM org_products p
     JOIN product_components pc ON pc.composite_product_id = p.id
     JOIN org_products cp ON cp.id = pc.component_product_id
     WHERE p.id = $1 ORDER BY pc.sort_order
```

| sku | product_kind | lot_policy | component_sku | quantity |
| --- | --- | --- | --- | --- |
| IK2025LL | virtual_kit | none | LL516SNA | 1 |
| IK2025LL | virtual_kit | none | NP019N1A | 1 |

### Components use approved lot policies with distinct allowed-lot lists — ✅ PASS

**Assertion:** LL516SNA allows LN2509/LN2510; NP019N1A allows LN2511/LN2512

```sql
SELECT p.sku, p.lot_policy, array_agg(al.lot_value ORDER BY al.lot_value) AS lots
     FROM org_products p
     JOIN org_product_allowed_lots al ON al.org_product_id = p.id
     WHERE p.id = ANY($1) GROUP BY p.id, p.sku, p.lot_policy ORDER BY p.sku
```

| sku | lot_policy | lots |
| --- | --- | --- |
| LL516SNA | approved | `["LN2509","LN2510"]` |
| NP019N1A | approved | `["LN2511","LN2512"]` |

### Kit catalog entry allows billing and ordering; account has effective, enabled pricing and holds owned stock — ✅ PASS

**Assertion:** allow_billing, allow_ordering, active, effective+enabled pricing, pricing_mode=fixed, holds_owned_stock all true

```sql
SELECT ci.allow_billing, ci.allow_ordering, ci.active,
            ap.price, ap.status AS pricing_status, ap.enabled AS pricing_enabled,
            p.pricing_mode, sa.holds_owned_stock
     FROM product_catalog_items ci
     JOIN org_products p ON p.id = $3
     JOIN sales_account_approved_pricing ap ON ap.id = $2
     JOIN sales_accounts sa ON sa.id = ap.sales_account_id
     WHERE ci.id = $1
```

| allow_billing | allow_ordering | active | price | pricing_status | pricing_enabled | pricing_mode | holds_owned_stock |
| --- | --- | --- | --- | --- | --- | --- | --- |
| true | true | true | 5000.00 | effective | true | fixed | true |

### Direct order for the kit exists, is approved, and produced a fulfillment order — ✅ PASS

**Assertion:** A direct-type order request for the kit is approved with a fulfillment order

```sql
SELECT orq.request_number, orq.order_type, orq.status, fo.order_number, fo.status AS fo_status
     FROM order_requests orq
     JOIN order_request_items ori ON ori.order_request_id = orq.id AND ori.product_id = $1
     LEFT JOIN fulfillment_orders fo ON fo.order_request_id = orq.id
     WHERE orq.notes LIKE $2
```

| request_number | order_type | status | order_number | fo_status |
| --- | --- | --- | --- | --- |
| OR-1 | direct | approved | OR-1-FO-1 | delivered |

### Shipping package carries the component SKUs with their lots and reached delivered — ✅ PASS

**Assertion:** Package items = LL516SNA/LN2509 + NP019N1A/LN2511, package status delivered

```sql
SELECT sp.status, spi.info->>'sku' AS sku, spi.info->>'lot' AS lot, spi.quantity
     FROM shipping_packages sp
     JOIN shipping_package_items spi ON spi.package_id = sp.id
     JOIN shipping_package_fulfillment_orders spfo ON spfo.shipping_package_id = sp.id
     JOIN fulfillment_orders fo ON fo.id = spfo.fulfillment_order_id
     JOIN order_requests orq ON orq.id = fo.order_request_id
     WHERE orq.notes LIKE $1
     ORDER BY spi.info->>'sku'
```

| status | sku | lot | quantity |
| --- | --- | --- | --- |
| delivered | LL516SNA | LN2509 | 1 |
| delivered | NP019N1A | LN2511 | 1 |

### Billing orders carry kit parent lines with component child rows for both lot sets — ✅ PASS

**Assertion:** Hospital-stock order children = LL516SNA/LN2509 + NP019N1A/LN2511; trunk order children = LL516SNA/LN2510 + NP019N1A/LN2512

```sql
SELECT parent.billing_order_id, child.lot_number, cp.sku AS component_sku
     FROM billing_order_items parent
     JOIN billing_order_items child ON child.parent_billing_order_item_id = parent.id
     JOIN org_products cp ON cp.id = child.product_id
     WHERE parent.product_id = $1
     ORDER BY child.lot_number
```

| billing_order_id | lot_number | component_sku |
| --- | --- | --- |
| 019fc9e2-89c7-71e6-8af4-094cc878b53e | LN2509 | LL516SNA |
| 019fc9e3-0aaa-7016-b943-ce38eb69f074 | LN2510 | LL516SNA |
| 019fc9e2-89c7-71e6-8af4-094cc878b53e | LN2511 | NP019N1A |
| 019fc9e3-0aaa-7016-b943-ce38eb69f074 | LN2512 | NP019N1A |

### Inventory returned to baseline after +1 (ASN delivery) and −1 (bill-only decrement) — ✅ PASS

**Assertion:** Each active lot ends at 5 (baseline 5 +1 delivered −1 billed)

```sql
SELECT lot, SUM(quantity_ready)::int AS quantity
     FROM inventory_items
     WHERE real_world_location_id = $1 AND lot = ANY($2)
     GROUP BY lot ORDER BY lot
```

| lot | quantity |
| --- | --- |
| LN2509 | 5 |
| LN2511 | 5 |

### Trunk stock decremented for the billable order (other approved lots) — ✅ PASS

**Assertion:** Each trunk lot ends at 4 (baseline 5 −1 billed)

```sql
SELECT lot, SUM(quantity_ready)::int AS quantity
     FROM inventory_items
     WHERE real_world_location_id = $1 AND lot = ANY($2)
     GROUP BY lot ORDER BY lot
```

| lot | quantity |
| --- | --- |
| LN2510 | 4 |
| LN2512 | 4 |

### Bill-only decrements recorded inventory transactions for the kit orders — ✅ PASS

**Assertion:** Each kit billing order has a bill_only_order inventory transaction

```sql
SELECT it.source_type, it.source_id
     FROM inventory_transactions it
     WHERE it.source_type = 'bill_only_order' AND it.source_id IN (
       SELECT DISTINCT boi.billing_order_id FROM billing_order_items boi
       WHERE boi.product_id = $1)
```

| source_type | source_id |
| --- | --- |
| bill_only_order | 019fc9e2-89c7-71e6-8af4-094cc878b53e |
| bill_only_order | 019fc9e3-0aaa-7016-b943-ce38eb69f074 |

### Direct Order Created email lists the kit components — ✅ PASS

**Assertion:** Captured email contains: IK2025LL, LL516SNA, NP019N1A

```sql
Email HTML inspection: a /Direct_Order_Created/ capture must contain IK2025LL, LL516SNA, NP019N1A
```

| file | matched |
| --- | --- |
| 2026-08-03T23-07-00-447Z-Direct_Order_Created_-_OR-1-FO-1.html | true |

### New Bill-Only email carries the hospital-stock component lots — ✅ PASS

**Assertion:** Captured email contains: LL516SNA, LN2509, NP019N1A, LN2511

```sql
Email HTML inspection: a /New_Bill-Only_Order/ capture must contain LL516SNA, LN2509, NP019N1A, LN2511
```

| file | matched |
| --- | --- |
| 2026-08-03T23-08-16-127Z-New_Bill-Only_Order_-_8_3_2026_-_Vantis_BO-2.html | true |
| 2026-08-03T23-08-49-205Z-New_Bill-Only_Order_-_8_3_2026_-_Vantis_BO-3.html | false |

### New Bill-Only email carries the trunk component lots — ✅ PASS

**Assertion:** Captured email contains: LL516SNA, LN2510, NP019N1A, LN2512

```sql
Email HTML inspection: a /New_Bill-Only_Order/ capture must contain LL516SNA, LN2510, NP019N1A, LN2512
```

| file | matched |
| --- | --- |
| 2026-08-03T23-08-16-127Z-New_Bill-Only_Order_-_8_3_2026_-_Vantis_BO-2.html | false |
| 2026-08-03T23-08-49-205Z-New_Bill-Only_Order_-_8_3_2026_-_Vantis_BO-3.html | true |

### Delivered Order (DOF) email carries the component lots — ✅ PASS

**Assertion:** Captured email contains: LL516SNA, LN2510, NP019N1A, LN2512

```sql
Email HTML inspection: a /Delivered_Order/ capture must contain LL516SNA, LN2510, NP019N1A, LN2512
```

| file | matched |
| --- | --- |
| 2026-08-03T23-08-59-743Z-Delivered_Order_-_8_3_2026_-_Vantis_BO-3.html | true |

## 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.

### Email Template Assertions

Each row asserts that a declared `expectedEmailTemplates` entry was matched (case-insensitive substring) by a captured email subject or template. A ❌ flips overall status to FAIL.

| Step | Expected Template | Found |
|------|-------------------|-------|
| Step 5: Approve order | `Direct Order Created` | ✅ |
| Step 10: Bill-only lots & decrement | `New Bill-Only Order` | ✅ |
| Step 12: DOF notification email | `Delivered Order` | ✅ |

## 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-08-03T23:05:34.040Z

<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>

35 event(s) captured:

| Time | Type | Action | User | Org | Object ID | Performed | Reason |
|------|------|--------|------|-----|-----------|-----------|--------|
| 2026-08-03 23:05:39Z | user_log | user:login | alex.admin@vantismedical.com | Vantis | — | — |  |
| 2026-08-03 23:05:49Z | user_log | user:login | alex.admin@vantismedical.com | Vantis | — | — |  |
| 2026-08-03 23:05:58Z | user_log | user:login | alex.admin@vantismedical.com | Vantis | — | — |  |
| 2026-08-03 23:06:33Z | user_log | user:login | blair.bennett@corvetasurgical.com | Corveta Surgical Group | — | — |  |
| 2026-08-03 23:06:49Z | checklist | checklists.create | blair.bennett@corvetasurgical.com | Vantis | 019fc9e1-3db3-7b8b-9f78-50e7717d1408 | — |  |
| 2026-08-03 23:06:49Z | decision | order_request_created | blair.bennett@corvetasurgical.com | Vantis | 019fc9e1-3da1-7376-a3d1-0e87765dec03 | yes | Order request OR-1 created (importSource=manual) |
| 2026-08-03 23:06:51Z | user_log | user:login | alex.admin@vantismedical.com | Vantis | — | — |  |
| 2026-08-03 23:06:59Z | fulfillment_order | status_change | alex.admin@vantismedical.com | Vantis | 019fc9e1-62e3-7fcd-8e52-0847f4e895f7 | — | Order automatically submitted for fulfillment |
| 2026-08-03 23:06:59Z | decision | extensiv_order_push.skipped | — | Vantis | 019fc9e1-62e3-7fcd-8e52-0847f4e895f7 | no | wms_feature_flag_disabled |
| 2026-08-03 23:06:59Z | decision | tickets.checklist_item_resolve.auto_resolve_ticket | — | Vantis | 019fc9e1-3db6-7765-ad64-5a361a0166bc | no | Checklist item is not linked to any ticket. |
| 2026-08-03 23:06:59Z | fulfillment_order | status_change | alex.admin@vantismedical.com | Vantis | 019fc9e1-62e3-7fcd-8e52-0847f4e895f7 | — | Fulfillment order created from approved items |
| 2026-08-03 23:07:00Z | transactional_email | direct_order_created | — | Corveta Surgical Group | 019fc9e1-62e3-7fcd-8e52-0847f4e895f7 | — |  |
| 2026-08-03 23:07:08Z | user_log | user:login | alex.admin@vantismedical.com | Vantis | — | — |  |
| 2026-08-03 23:07:19Z | fulfillment_order | status_change | — | Vantis | 019fc9e1-62e3-7fcd-8e52-0847f4e895f7 | — | All items shipped |
| 2026-08-03 23:07:19Z | decision | recalculate_order_status | — | Vantis | 019fc9e1-3da1-7376-a3d1-0e87765dec03 | yes | Shipping status updated from null to shipped |
| 2026-08-03 23:07:24Z | user_log | user:login | alex.admin@vantismedical.com | Vantis | — | — |  |
| 2026-08-03 23:07:32Z | user_log | user:login | alex.admin@vantismedical.com | Vantis | — | — |  |
| 2026-08-03 23:07:39Z | decision | enable_team_tracked_inventory_routing | — | Corveta Surgical Group | 019fc9e1-b075-7bf3-8911-3b03c6c4c74c | no | Package linked to direct order |
| 2026-08-03 23:07:39Z | decision | recalculate_order_status | — | Vantis | 019fc9e1-3da1-7376-a3d1-0e87765dec03 | yes | Shipping status updated from shipped to delivered |
| 2026-08-03 23:07:39Z | fulfillment_order | status_change | — | Vantis | 019fc9e1-62e3-7fcd-8e52-0847f4e895f7 | — | All items delivered |
| 2026-08-03 23:07:49Z | user_log | user:login | blair.bennett@corvetasurgical.com | Corveta Surgical Group | — | — |  |
| 2026-08-03 23:08:14Z | decision | bill_only_order.inventory_items_decrement | blair.bennett@corvetasurgical.com | Vantis | 019fc9e2-89c7-71e6-8af4-094cc878b53e | yes | inventory_items_decremented |
| 2026-08-03 23:08:14Z | decision | bill_only_order.direct_po_import_on_create | blair.bennett@corvetasurgical.com | Vantis | 019fc9e2-89c7-71e6-8af4-094cc878b53e | no | No uploaded PO documents |
| 2026-08-03 23:08:14Z | decision | bill_only.link_purchase_order | blair.bennett@corvetasurgical.com | Corveta Surgical Group | 019fc9e2-89c7-71e6-8af4-094cc878b53e | no | no_purchase_order_selected |
| 2026-08-03 23:08:14Z | billing_order | status_change | blair.bennett@corvetasurgical.com | Vantis | 019fc9e2-89c7-71e6-8af4-094cc878b53e | — |  |
| 2026-08-03 23:08:16Z | transactional_email | new_bill_only | — | Corveta Surgical Group | 019fc9e2-89c7-71e6-8af4-094cc878b53e | — |  |
| 2026-08-03 23:08:18Z | user_log | user:login | blair.bennett@corvetasurgical.com | Corveta Surgical Group | — | — |  |
| 2026-08-03 23:08:25Z | user_log | user:login | blair.bennett@corvetasurgical.com | Corveta Surgical Group | — | — |  |
| 2026-08-03 23:08:47Z | decision | bill_only_order.inventory_items_decrement | blair.bennett@corvetasurgical.com | Vantis | 019fc9e3-0aaa-7016-b943-ce38eb69f074 | yes | inventory_items_decremented |
| 2026-08-03 23:08:47Z | decision | bill_only_order.direct_po_import_on_create | blair.bennett@corvetasurgical.com | Vantis | 019fc9e3-0aaa-7016-b943-ce38eb69f074 | no | No uploaded PO documents |
| 2026-08-03 23:08:47Z | billing_order | status_change | blair.bennett@corvetasurgical.com | Vantis | 019fc9e3-0aaa-7016-b943-ce38eb69f074 | — |  |
| 2026-08-03 23:08:47Z | decision | bill_only.link_purchase_order | blair.bennett@corvetasurgical.com | Corveta Surgical Group | 019fc9e3-0aaa-7016-b943-ce38eb69f074 | no | no_purchase_order_selected |
| 2026-08-03 23:08:49Z | transactional_email | new_bill_only | — | Corveta Surgical Group | 019fc9e3-0aaa-7016-b943-ce38eb69f074 | — |  |
| 2026-08-03 23:08:51Z | user_log | user:login | alex.admin@vantismedical.com | Vantis | — | — |  |
| 2026-08-03 23:08:59Z | transactional_email | bill_only_dof_generated | — | Corveta Surgical Group | 019fc9e3-0aaa-7016-b943-ce38eb69f074 | — |  |

## Email Evidence

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

### 1. Direct Order Created - OR-1-FO-1

**Template:** `Direct_Order_Created_-_OR-1-FO-1`

![Direct Order Created - OR-1-FO-1](screenshots/emails/2026-08-03T23-07-00-447Z-Direct_Order_Created_-_OR-1-FO-1.png)

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

**Template:** `New_Bill-Only_Order_-_8_3_2026_-_Vantis_BO-2`

![New Bill-Only Order - 8/3/2026 - Vantis BO-2](screenshots/emails/2026-08-03T23-08-16-127Z-New_Bill-Only_Order_-_8_3_2026_-_Vantis_BO-2.png)

### 3. New Bill-Only Order - 8/3/2026 - Vantis BO-3

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

![New Bill-Only Order - 8/3/2026 - Vantis BO-3](screenshots/emails/2026-08-03T23-08-49-205Z-New_Bill-Only_Order_-_8_3_2026_-_Vantis_BO-3.png)

### 4. Delivered Order - 8/3/2026 - Vantis BO-3

**Template:** `Delivered_Order_-_8_3_2026_-_Vantis_BO-3`

![Delivered Order - 8/3/2026 - Vantis BO-3](screenshots/emails/2026-08-03T23-08-59-743Z-Delivered_Order_-_8_3_2026_-_Vantis_BO-3.png)
