{
  "ursId": "URS-020",
  "title": "Duplicate Delivered Order Form (DOF / Bill-Only) Detection",
  "timestamp": "2026-09-29T02:31:02.531Z",
  "durationMs": 119119,
  "config": {
    "inboxUrl": "http://localhost:35057",
    "dbHost": "localhost",
    "dbPort": 43693,
    "dbName": "cc_repinbox_dev"
  },
  "setup": {
    "status": "pass"
  },
  "scenarios": [
    {
      "name": "Step 1: Login and open bill-only form",
      "status": "pass",
      "description": "Step 1: Login and open bill-only form",
      "screenshots": [
        "/home/runner/_work/code/code/validation_test_results/urs-020-duplicate-dof-detection/2026-09-29T02-31-02-531Z/screenshots/step-01-logged-in.png",
        "/home/runner/_work/code/code/validation_test_results/urs-020-duplicate-dof-detection/2026-09-29T02-31-02-531Z/screenshots/step-01-billing-form-step2.png"
      ],
      "explanation": "Blair Bennett (Corveta admin, has billing:create) signs in and opens the bill-only creation wizard. Establishes the user + permission context for every subsequent step.",
      "startedAt": "2026-09-29T02:31:09.333Z",
      "finishedAt": "2026-09-29T02:31:13.071Z",
      "videoPath": "/home/runner/_work/code/code/validation_test_results/urs-020-duplicate-dof-detection/2026-09-29T02-31-02-531Z/videos/step-01-login.webm"
    },
    {
      "name": "Step 2: Submit reference order",
      "status": "pass",
      "description": "Step 2: Submit reference order",
      "screenshots": [
        "/home/runner/_work/code/code/validation_test_results/urs-020-duplicate-dof-detection/2026-09-29T02-31-02-531Z/screenshots/step-02-reference-step2.png",
        "/home/runner/_work/code/code/validation_test_results/urs-020-duplicate-dof-detection/2026-09-29T02-31-02-531Z/screenshots/step-02-reference-review.png",
        "/home/runner/_work/code/code/validation_test_results/urs-020-duplicate-dof-detection/2026-09-29T02-31-02-531Z/screenshots/step-02-reference-submitted.png"
      ],
      "explanation": "Submits a bill-only order with the canonical reference values — ROSS Surgical account, procedure date 2026-04-15, patient PAT-URS020-001 / URS020TestLastName. No warning appears because no prior duplicate exists. This order becomes the match target for Step 3–5 and is persisted with the \"URS-020 validation test\" notes marker.",
      "expectedEmailTemplates": [
        "bill-only"
      ],
      "expectedAuditActions": [
        "decision:bill_only_order.inventory_items_decrement"
      ],
      "startedAt": "2026-09-29T02:31:23.746Z",
      "finishedAt": "2026-09-29T02:31:35.100Z",
      "videoPath": "/home/runner/_work/code/code/validation_test_results/urs-020-duplicate-dof-detection/2026-09-29T02-31-02-531Z/videos/step-02-reference-order.webm"
    },
    {
      "name": "Step 3: Duplicate warning with both badges",
      "status": "pass",
      "description": "Step 3: Duplicate warning with both badges",
      "screenshots": [
        "/home/runner/_work/code/code/validation_test_results/urs-020-duplicate-dof-detection/2026-09-29T02-31-02-531Z/screenshots/step-03-warning-with-both-badges.png",
        "/home/runner/_work/code/code/validation_test_results/urs-020-duplicate-dof-detection/2026-09-29T02-31-02-531Z/screenshots/step-03-duplicate-submitted.png"
      ],
      "explanation": "Re-entering the reference account + procedure date + patient ID + last name triggers \"Possible Duplicate Submission\". Both \"(Same patient ID)\" and \"(Same last name)\" badges render because the match row shares those annotation fields. Clicking \"This is not a duplicate — continue\" unlocks step advancement and the submission then completes end-to-end — proving duplicate detection is a soft block the user can acknowledge and override, and giving the DB a second row that shares the full (account, date, patient ID, last name) key with the reference order.",
      "expectedEmailTemplates": [
        "bill-only"
      ],
      "expectedAuditActions": [
        "decision:bill_only_order.inventory_items_decrement"
      ],
      "startedAt": "2026-09-29T02:31:45.775Z",
      "finishedAt": "2026-09-29T02:31:56.781Z",
      "videoPath": "/home/runner/_work/code/code/validation_test_results/urs-020-duplicate-dof-detection/2026-09-29T02-31-02-531Z/videos/step-03-duplicate-warning.webm"
    },
    {
      "name": "Step 4: Change date — warning hides",
      "status": "pass",
      "description": "Step 4: Change date — warning hides",
      "screenshots": [
        "/home/runner/_work/code/code/validation_test_results/urs-020-duplicate-dof-detection/2026-09-29T02-31-02-531Z/screenshots/step-04-alternate-date-no-warning.png",
        "/home/runner/_work/code/code/validation_test_results/urs-020-duplicate-dof-detection/2026-09-29T02-31-02-531Z/screenshots/step-04-date-restored-warning.png"
      ],
      "explanation": "Switching procedure date from 2026-04-15 to 2026-04-10 dismisses the warning because the primary match key (sales_account_id, procedure_date) no longer matches. Reverting the date brings the warning back — confirms the check is live-driven by form state, not cached server-side.",
      "startedAt": "2026-09-29T02:32:06.198Z",
      "finishedAt": "2026-09-29T02:32:08.622Z",
      "videoPath": "/home/runner/_work/code/code/validation_test_results/urs-020-duplicate-dof-detection/2026-09-29T02-31-02-531Z/videos/step-04-change-date.webm"
    },
    {
      "name": "Step 5: Clear patient ID — badge hides, warning remains",
      "status": "pass",
      "description": "Step 5: Clear patient ID — badge hides, warning remains",
      "screenshots": [
        "/home/runner/_work/code/code/validation_test_results/urs-020-duplicate-dof-detection/2026-09-29T02-31-02-531Z/screenshots/step-05-warning-last-name-only.png"
      ],
      "explanation": "Clearing the patient ID field while leaving account + procedure date intact keeps the \"Possible Duplicate Submission\" warning (primary key still hits) but drops the \"(Same patient ID)\" badge — proving patient_id is only an annotation, not part of the primary match, while last-name match still annotates.",
      "startedAt": "2026-09-29T02:32:19.092Z",
      "finishedAt": "2026-09-29T02:32:19.092Z",
      "videoPath": "/home/runner/_work/code/code/validation_test_results/urs-020-duplicate-dof-detection/2026-09-29T02-31-02-531Z/videos/step-05-clear-patient-id.webm"
    },
    {
      "name": "Step 6: Different account, same date — no warning",
      "status": "pass",
      "description": "Step 6: Different account, same date — no warning",
      "screenshots": [
        "/home/runner/_work/code/code/validation_test_results/urs-020-duplicate-dof-detection/2026-09-29T02-31-02-531Z/screenshots/step-06-different-account-no-warning.png",
        "/home/runner/_work/code/code/validation_test_results/urs-020-duplicate-dof-detection/2026-09-29T02-31-02-531Z/screenshots/step-06-different-account-submitted.png"
      ],
      "explanation": "Submits a bill-only for a DIFFERENT sales account (\"Cedar Crest Hospital Account Request\") on the reference procedure date (2026-04-15) with the same patient ID + last name as the reference. No warning appears and the order submits cleanly — proving that changing sales_account_id alone is sufficient to escape detection, even when every other field matches the reference row. This is the symmetric negative counterpart to Step 4: Step 4 proves date-variation escapes detection; Step 6 proves account-variation does too.",
      "expectedEmailTemplates": [
        "bill-only"
      ],
      "expectedAuditActions": [
        "decision:bill_only_order.inventory_items_decrement"
      ],
      "startedAt": "2026-09-29T02:32:30.237Z",
      "finishedAt": "2026-09-29T02:32:39.145Z",
      "videoPath": "/home/runner/_work/code/code/validation_test_results/urs-020-duplicate-dof-detection/2026-09-29T02-31-02-531Z/videos/step-06-different-account.webm"
    },
    {
      "name": "Step 7: Non-duplicate and verify billing list",
      "status": "pass",
      "description": "Step 7: Non-duplicate and verify billing list",
      "screenshots": [
        "/home/runner/_work/code/code/validation_test_results/urs-020-duplicate-dof-detection/2026-09-29T02-31-02-531Z/screenshots/step-07-non-duplicate-step2.png",
        "/home/runner/_work/code/code/validation_test_results/urs-020-duplicate-dof-detection/2026-09-29T02-31-02-531Z/screenshots/step-07-non-duplicate-submitted.png",
        "/home/runner/_work/code/code/validation_test_results/urs-020-duplicate-dof-detection/2026-09-29T02-31-02-531Z/screenshots/step-07-billing-list.png"
      ],
      "explanation": "Creates a fourth order with the SAME account + patient but the alternate procedure date (2026-04-10). No warning appears and the order submits without any acknowledgement. The billing list is then asserted to display every URS-020 PO number (reference, acknowledged duplicate, different-account negative, alternate-date non-duplicate) — proving every submission from this run landed in the shared view the next operator would see. (The list itself does not render a row-level duplicate indicator — the warning is a creation-time UX only; see README \"Known Deviations\".)",
      "expectedEmailTemplates": [
        "bill-only"
      ],
      "expectedAuditActions": [
        "decision:bill_only_order.inventory_items_decrement"
      ],
      "startedAt": "2026-09-29T02:32:47.253Z",
      "finishedAt": "2026-09-29T02:32:57.560Z",
      "videoPath": "/home/runner/_work/code/code/validation_test_results/urs-020-duplicate-dof-detection/2026-09-29T02-31-02-531Z/videos/step-07-non-duplicate.webm"
    }
  ],
  "dbValidations": [
    {
      "name": "Four URS-020 billing orders created",
      "query": "SELECT id, order_number, sales_account_id, procedure_date,\n                        patient_id, patient_last_name, po_number, status, notes, created_at\n                 FROM billing_orders\n                 WHERE created_by_user_id = $1\n                   AND notes LIKE $2\n                 ORDER BY created_at ASC",
      "status": "pass",
      "rows": [
        {
          "id": "01a0eb00-cc18-7893-a8a0-38472e67afff",
          "order_number": "BO-1",
          "sales_account_id": "fea7b8c9-d0e1-2345-0123-456789012345",
          "procedure_date": "2026-07-31T00:00:00.000Z",
          "patient_id": "PAT-URS020-001",
          "patient_last_name": "URS020TestLastName",
          "po_number": "PO-URS020-REF",
          "status": "submitted",
          "notes": "URS-020 validation test — reference order",
          "created_at": "2026-09-29T02:31:32.959Z"
        },
        {
          "id": "01a0eb01-2728-758e-a18a-663efc7745f3",
          "order_number": "BO-2",
          "sales_account_id": "fea7b8c9-d0e1-2345-0123-456789012345",
          "procedure_date": "2026-07-31T00:00:00.000Z",
          "patient_id": "PAT-URS020-001",
          "patient_last_name": "URS020TestLastName",
          "po_number": "PO-URS020-DUP",
          "status": "submitted",
          "notes": "URS-020 validation test — acknowledged duplicate",
          "created_at": "2026-09-29T02:31:56.379Z"
        },
        {
          "id": "01a0eb01-c7b3-7ae5-a049-f521d5195975",
          "order_number": "BO-3",
          "sales_account_id": "1fb8c9d0-e1f2-3456-1234-567890123456",
          "procedure_date": "2026-07-31T00:00:00.000Z",
          "patient_id": "PAT-URS020-001",
          "patient_last_name": "URS020TestLastName",
          "po_number": "PO-URS020-ALTACCT",
          "status": "submitted",
          "notes": "URS-020 validation test — different account negative case",
          "created_at": "2026-09-29T02:32:37.492Z"
        },
        {
          "id": "01a0eb02-09fb-7756-828a-eec0475bf73f",
          "order_number": "BO-4",
          "sales_account_id": "fea7b8c9-d0e1-2345-0123-456789012345",
          "procedure_date": "2026-07-26T00:00:00.000Z",
          "patient_id": "PAT-URS020-001",
          "patient_last_name": "URS020TestLastName",
          "po_number": "PO-URS020-NONE",
          "status": "submitted",
          "notes": "URS-020 validation test — non-duplicate (alternate procedure date)",
          "created_at": "2026-09-29T02:32:54.472Z"
        }
      ],
      "assertion": "Playwright submitted four bill-only orders — reference, acknowledged duplicate, different-account negative case, and alternate-date non-duplicate — all tagged with the URS-020 marker."
    },
    {
      "name": "Duplicate pair shares account + procedure date",
      "query": "SELECT id, order_number, po_number, patient_id, patient_last_name, created_at\n                 FROM billing_orders\n                 WHERE created_by_user_id = $1\n                   AND notes LIKE $2\n                   AND sales_account_id = $3\n                   AND procedure_date = $4\n                 ORDER BY created_at ASC",
      "status": "pass",
      "rows": [
        {
          "id": "01a0eb00-cc18-7893-a8a0-38472e67afff",
          "order_number": "BO-1",
          "po_number": "PO-URS020-REF",
          "patient_id": "PAT-URS020-001",
          "patient_last_name": "URS020TestLastName",
          "created_at": "2026-09-29T02:31:32.959Z"
        },
        {
          "id": "01a0eb01-2728-758e-a18a-663efc7745f3",
          "order_number": "BO-2",
          "po_number": "PO-URS020-DUP",
          "patient_id": "PAT-URS020-001",
          "patient_last_name": "URS020TestLastName",
          "created_at": "2026-09-29T02:31:56.379Z"
        }
      ],
      "assertion": "Two URS-020 orders must share the reference sales account and procedure date; that is exactly what `checkDuplicateBillingOrders` uses as its primary key."
    },
    {
      "name": "Alternate-date order: same account, different date (no warning)",
      "query": "SELECT id, order_number, po_number, sales_account_id, procedure_date\n                 FROM billing_orders\n                 WHERE created_by_user_id = $1\n                   AND notes LIKE $2\n                   AND sales_account_id = $3\n                   AND procedure_date = $4",
      "status": "pass",
      "rows": [
        {
          "id": "01a0eb02-09fb-7756-828a-eec0475bf73f",
          "order_number": "BO-4",
          "po_number": "PO-URS020-NONE",
          "sales_account_id": "fea7b8c9-d0e1-2345-0123-456789012345",
          "procedure_date": "2026-07-26T00:00:00.000Z"
        }
      ],
      "assertion": "A URS-020 order must exist with the reference sales account but the alternate procedure date. The UI rendered no warning at submission time — evidence that changing procedure_date alone is sufficient to escape duplicate detection."
    },
    {
      "name": "Different-account order: other account, same date (no warning)",
      "query": "SELECT id, order_number, po_number, sales_account_id, procedure_date\n                 FROM billing_orders\n                 WHERE created_by_user_id = $1\n                   AND notes LIKE $2\n                   AND sales_account_id = $3\n                   AND procedure_date = $4",
      "status": "pass",
      "rows": [
        {
          "id": "01a0eb01-c7b3-7ae5-a049-f521d5195975",
          "order_number": "BO-3",
          "po_number": "PO-URS020-ALTACCT",
          "sales_account_id": "1fb8c9d0-e1f2-3456-1234-567890123456",
          "procedure_date": "2026-07-31T00:00:00.000Z"
        }
      ],
      "assertion": "A URS-020 order must exist with the alternate sales account (Cedar) on the reference procedure date. The UI rendered no warning at submission time — evidence that changing sales_account_id alone is sufficient to escape duplicate detection, proving account is a primary-key element and the detection key is symmetric in account and date."
    },
    {
      "name": "Duplicate pair also matches patient ID and last name",
      "query": "SELECT COUNT(*) AS n\n                 FROM billing_orders\n                 WHERE created_by_user_id = $1\n                   AND notes LIKE $2\n                   AND sales_account_id = $3\n                   AND procedure_date = $4\n                   AND patient_id = $5\n                   AND patient_last_name = $6",
      "status": "pass",
      "rows": [
        {
          "n": "2"
        }
      ],
      "assertion": "Both duplicate-pair orders carry the reference patient ID and patient last name so the warning surfaced both \"(Same patient ID)\" and \"(Same last name)\" badges."
    }
  ],
  "overallStatus": "pass",
  "outputDir": "/home/runner/_work/code/code/validation_test_results/urs-020-duplicate-dof-detection/2026-09-29T02-31-02-531Z",
  "knownDeviations": [
    {
      "summary": "PO number is not a duplicate-detection input",
      "detail": "URS-020 lists PO number as a detection signal, but the implementation ignores it. `findDuplicateBillingOrderMatches` (in `modules/bill_only/src/services/duplicate_billing_orders.ts`), which both the client warning and the submission gate call, selects candidates on `sales_account_id` + `procedure_date` scoped to the user's organization, then flags a candidate when patient MRN, patient last name, or surgeon name also matches. PO number takes no part in either stage. This is intentional: sales reps typically submit bill-onlies before the PO has arrived, so requiring PO in the match would silently disable detection for the common case. The test below exercises the implemented behaviour rather than the URS wording.",
      "reference": "DF-2598"
    }
  ],
  "auditStartTime": "2026-09-29T02:31:00.676Z",
  "emailEvidence": [
    {
      "subject": "New Bill-Only Order - 7/31/2026 - Vantis BO-1",
      "template": "New_Bill-Only_Order_-_7_31_2026_-_Vantis_BO-1",
      "screenshotPath": "/home/runner/_work/code/code/validation_test_results/urs-020-duplicate-dof-detection/2026-09-29T02-31-02-531Z/screenshots/emails/2026-09-29T02-31-35-083Z-New_Bill-Only_Order_-_7_31_2026_-_Vantis_BO-1.png"
    },
    {
      "subject": "New Bill-Only Order - 7/31/2026 - Vantis BO-2",
      "template": "New_Bill-Only_Order_-_7_31_2026_-_Vantis_BO-2",
      "screenshotPath": "/home/runner/_work/code/code/validation_test_results/urs-020-duplicate-dof-detection/2026-09-29T02-31-02-531Z/screenshots/emails/2026-09-29T02-31-58-168Z-New_Bill-Only_Order_-_7_31_2026_-_Vantis_BO-2.png"
    },
    {
      "subject": "New Bill-Only Order - 7/31/2026 - Vantis BO-3",
      "template": "New_Bill-Only_Order_-_7_31_2026_-_Vantis_BO-3",
      "screenshotPath": "/home/runner/_work/code/code/validation_test_results/urs-020-duplicate-dof-detection/2026-09-29T02-31-02-531Z/screenshots/emails/2026-09-29T02-32-39-285Z-New_Bill-Only_Order_-_7_31_2026_-_Vantis_BO-3.png"
    },
    {
      "subject": "New Bill-Only Order - 7/26/2026 - Vantis BO-4",
      "template": "New_Bill-Only_Order_-_7_26_2026_-_Vantis_BO-4",
      "screenshotPath": "/home/runner/_work/code/code/validation_test_results/urs-020-duplicate-dof-detection/2026-09-29T02-31-02-531Z/screenshots/emails/2026-09-29T02-32-56-343Z-New_Bill-Only_Order_-_7_26_2026_-_Vantis_BO-4.png"
    }
  ],
  "auditEventEvidence": [
    {
      "createdAt": "2026-09-29T02:31:07.322Z",
      "eventType": "user_log",
      "action": "user:login",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": null,
      "secondaryObjectId": null,
      "payload": {
        "email": "blair.bennett@corvetasurgical.com"
      },
      "route": "/login",
      "traceId": "00000000000000000000000000000000"
    },
    {
      "createdAt": "2026-09-29T02:31:15.951Z",
      "eventType": "user_log",
      "action": "user:login",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": null,
      "secondaryObjectId": null,
      "payload": {
        "email": "blair.bennett@corvetasurgical.com"
      },
      "route": "/login",
      "traceId": "00000000000000000000000000000000"
    },
    {
      "createdAt": "2026-09-29T02:31:24.359Z",
      "eventType": "decision",
      "action": "bill_only_order.duplicate_submission_block",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": "fea7b8c9-d0e1-2345-0123-456789012345",
      "secondaryObjectId": null,
      "payload": {
        "step": "surgery",
        "reason": "no_same_day_candidates",
        "performed": false,
        "entityType": "sales_account",
        "vetoedCount": 0,
        "flaggedCount": 0,
        "candidateCount": 0,
        "matchedSignals": {
          "patientId": false,
          "surgeonName": false,
          "patientLastName": false
        },
        "unmatchedCount": 0
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:24.359Z",
      "eventType": "decision",
      "action": "representatives.gate_rep_action",
      "userEmail": "rana.reyes@corvetasurgical.com",
      "userId": "28c9d0e1-f2a3-4567-2345-678901234567",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "secondaryObjectId": null,
      "payload": {
        "reason": "no_blocking_relationship",
        "orderType": null,
        "performed": false,
        "entityType": "organization",
        "gatedAction": "bill_only",
        "isOwnTrunkDestination": null,
        "requestingOrganizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:32.959Z",
      "eventType": "scheduled_task",
      "action": "scheduled_task.scheduled",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01a0eb00-cc81-7bdf-8af4-055e78eda870",
      "secondaryObjectId": null,
      "payload": {
        "entityId": "01a0eb00-cc18-7893-a8a0-38472e67afff",
        "revision": 0,
        "taskKind": "bill_only_po_missing_followup",
        "entityType": "billing_order",
        "scheduledAt": "2026-10-13T02:31:33.218Z"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:32.959Z",
      "eventType": "decision",
      "action": "representatives.gate_rep_action",
      "userEmail": "rana.reyes@corvetasurgical.com",
      "userId": "28c9d0e1-f2a3-4567-2345-678901234567",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "secondaryObjectId": null,
      "payload": {
        "reason": "no_blocking_relationship",
        "orderType": null,
        "performed": false,
        "entityType": "organization",
        "gatedAction": "bill_only",
        "isOwnTrunkDestination": null,
        "requestingOrganizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:32.959Z",
      "eventType": "decision",
      "action": "representatives.gate_rep_action",
      "userEmail": "rana.reyes@corvetasurgical.com",
      "userId": "28c9d0e1-f2a3-4567-2345-678901234567",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "secondaryObjectId": null,
      "payload": {
        "reason": "no_blocking_relationship",
        "orderType": null,
        "performed": false,
        "entityType": "organization",
        "gatedAction": "bill_only",
        "isOwnTrunkDestination": null,
        "requestingOrganizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:32.959Z",
      "eventType": "decision",
      "action": "bill_only.link_purchase_order",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": "01a0eb00-cc18-7893-a8a0-38472e67afff",
      "secondaryObjectId": null,
      "payload": {
        "reason": "no_purchase_order_selected",
        "performed": false,
        "entityType": "billing_order",
        "salesOrganizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
        "manufacturerOrganizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:32.959Z",
      "eventType": "scheduled_task",
      "action": "scheduled_task.scheduled",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01a0eb00-cc64-7136-87cb-fc4c80c0ce2c",
      "secondaryObjectId": null,
      "payload": {
        "entityId": "01a0eb00-cc18-7893-a8a0-38472e67afff",
        "revision": 0,
        "taskKind": "bill_only_po_missing_followup",
        "entityType": "billing_order",
        "scheduledAt": "2026-10-06T02:31:33.218Z"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:32.959Z",
      "eventType": "scheduled_task",
      "action": "scheduled_task.scheduled",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01a0eb00-cc8a-7bf3-9173-9af6c5f1ac0b",
      "secondaryObjectId": null,
      "payload": {
        "entityId": "01a0eb00-cc18-7893-a8a0-38472e67afff",
        "revision": 0,
        "taskKind": "bill_only_po_missing_followup",
        "entityType": "billing_order",
        "scheduledAt": "2026-10-20T02:31:33.218Z"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:32.959Z",
      "eventType": "decision",
      "action": "bill_only_order.duplicate_submission_block",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": "fea7b8c9-d0e1-2345-0123-456789012345",
      "secondaryObjectId": null,
      "payload": {
        "step": "review",
        "reason": "no_same_day_candidates",
        "performed": false,
        "entityType": "sales_account",
        "vetoedCount": 0,
        "flaggedCount": 0,
        "candidateCount": 0,
        "matchedSignals": {
          "patientId": false,
          "surgeonName": false,
          "patientLastName": false
        },
        "unmatchedCount": 0
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:32.959Z",
      "eventType": "decision",
      "action": "representatives.gate_rep_action",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "secondaryObjectId": null,
      "payload": {
        "reason": "no_blocking_relationship",
        "orderType": null,
        "performed": false,
        "entityType": "organization",
        "gatedAction": "bill_only",
        "isOwnTrunkDestination": null,
        "requestingOrganizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:32.959Z",
      "eventType": "decision",
      "action": "bill_only_order.inventory_items_decrement",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01a0eb00-cc18-7893-a8a0-38472e67afff",
      "secondaryObjectId": null,
      "payload": {
        "reason": "inventory_items_decremented",
        "itemCount": 1,
        "performed": true,
        "entityType": "billing_order",
        "hasCaseToteItems": false
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:32.959Z",
      "eventType": "decision",
      "action": "bill_only_order.direct_po_import_on_create",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01a0eb00-cc18-7893-a8a0-38472e67afff",
      "secondaryObjectId": null,
      "payload": {
        "reason": "No uploaded PO documents",
        "performed": false,
        "entityType": "billing_order",
        "fileSourceOrganizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
        "hasSelectedPurchaseOrderId": false,
        "purchaseOrderDocumentCount": 0
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:32.959Z",
      "eventType": "billing_order",
      "action": "status_change",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01a0eb00-cc18-7893-a8a0-38472e67afff",
      "secondaryObjectId": null,
      "payload": {
        "reason": null,
        "toStatus": "submitted",
        "fromStatus": null,
        "automatedAction": false
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:32.959Z",
      "eventType": "decision",
      "action": "basicErp.deriveSalesOrder",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01a0eb00-cc18-7893-a8a0-38472e67afff",
      "secondaryObjectId": null,
      "payload": {
        "reason": "flag_disabled",
        "performed": false,
        "entityType": "billing_order"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:34.633Z",
      "eventType": "decision",
      "action": "bill_only.notifications.cc_incident_recipients",
      "userEmail": null,
      "userId": null,
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01a0eb00-cc18-7893-a8a0-38472e67afff",
      "secondaryObjectId": null,
      "payload": {
        "reason": "order has no no-charge item with an incident reason",
        "performed": false,
        "entityType": "billing_order"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:35.190Z",
      "eventType": "transactional_email",
      "action": "new_bill_only",
      "userEmail": null,
      "userId": null,
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": "01a0eb00-cc18-7893-a8a0-38472e67afff",
      "secondaryObjectId": null,
      "payload": {
        "to": [
          "blair.bennett@corvetasurgical.com",
          "rana.reyes@corvetasurgical.com"
        ],
        "s3Path": "email-audit/b2c3d4e5-f6a7-8901-bcde-f12345678901/01a0eb00-d3cf-7983-ac54-8b257d722f8a/",
        "subject": "New Bill-Only Order - 7/31/2026 - Vantis BO-1",
        "messageId": "dev-console-log",
        "relatedEntityType": "billing_order"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:37.722Z",
      "eventType": "user_log",
      "action": "user:login",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": null,
      "secondaryObjectId": null,
      "payload": {
        "email": "blair.bennett@corvetasurgical.com"
      },
      "route": "/login",
      "traceId": "00000000000000000000000000000000"
    },
    {
      "createdAt": "2026-09-29T02:31:49.648Z",
      "eventType": "decision",
      "action": "representatives.gate_rep_action",
      "userEmail": "rana.reyes@corvetasurgical.com",
      "userId": "28c9d0e1-f2a3-4567-2345-678901234567",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "secondaryObjectId": null,
      "payload": {
        "reason": "no_blocking_relationship",
        "orderType": null,
        "performed": false,
        "entityType": "organization",
        "gatedAction": "bill_only",
        "isOwnTrunkDestination": null,
        "requestingOrganizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:49.648Z",
      "eventType": "decision",
      "action": "bill_only_order.duplicate_submission_block",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": "fea7b8c9-d0e1-2345-0123-456789012345",
      "secondaryObjectId": null,
      "payload": {
        "step": "surgery",
        "reason": "acknowledged_not_duplicate",
        "performed": false,
        "entityType": "sales_account",
        "vetoedCount": 0,
        "flaggedCount": 1,
        "candidateCount": 1,
        "matchedSignals": {
          "patientId": true,
          "surgeonName": false,
          "patientLastName": true
        },
        "unmatchedCount": 0
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:56.379Z",
      "eventType": "decision",
      "action": "bill_only_order.duplicate_submission_block",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": "fea7b8c9-d0e1-2345-0123-456789012345",
      "secondaryObjectId": null,
      "payload": {
        "step": "review",
        "reason": "acknowledged_not_duplicate",
        "performed": false,
        "entityType": "sales_account",
        "vetoedCount": 0,
        "flaggedCount": 1,
        "candidateCount": 1,
        "matchedSignals": {
          "patientId": true,
          "surgeonName": false,
          "patientLastName": true
        },
        "unmatchedCount": 0
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:56.379Z",
      "eventType": "decision",
      "action": "bill_only.link_purchase_order",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": "01a0eb01-2728-758e-a18a-663efc7745f3",
      "secondaryObjectId": null,
      "payload": {
        "reason": "no_purchase_order_selected",
        "performed": false,
        "entityType": "billing_order",
        "salesOrganizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
        "manufacturerOrganizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:56.379Z",
      "eventType": "scheduled_task",
      "action": "scheduled_task.scheduled",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01a0eb01-275e-79b0-90dd-bf1b5a84a7b0",
      "secondaryObjectId": null,
      "payload": {
        "entityId": "01a0eb01-2728-758e-a18a-663efc7745f3",
        "revision": 0,
        "taskKind": "bill_only_po_missing_followup",
        "entityType": "billing_order",
        "scheduledAt": "2026-10-20T02:31:56.501Z"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:56.379Z",
      "eventType": "scheduled_task",
      "action": "scheduled_task.scheduled",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01a0eb01-275b-76d4-9bbf-8e4470334561",
      "secondaryObjectId": null,
      "payload": {
        "entityId": "01a0eb01-2728-758e-a18a-663efc7745f3",
        "revision": 0,
        "taskKind": "bill_only_po_missing_followup",
        "entityType": "billing_order",
        "scheduledAt": "2026-10-13T02:31:56.501Z"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:56.379Z",
      "eventType": "scheduled_task",
      "action": "scheduled_task.scheduled",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01a0eb01-2756-7089-80a7-48ef460f53a5",
      "secondaryObjectId": null,
      "payload": {
        "entityId": "01a0eb01-2728-758e-a18a-663efc7745f3",
        "revision": 0,
        "taskKind": "bill_only_po_missing_followup",
        "entityType": "billing_order",
        "scheduledAt": "2026-10-06T02:31:56.501Z"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:56.379Z",
      "eventType": "decision",
      "action": "basicErp.deriveSalesOrder",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01a0eb01-2728-758e-a18a-663efc7745f3",
      "secondaryObjectId": null,
      "payload": {
        "reason": "flag_disabled",
        "performed": false,
        "entityType": "billing_order"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:56.379Z",
      "eventType": "billing_order",
      "action": "status_change",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01a0eb01-2728-758e-a18a-663efc7745f3",
      "secondaryObjectId": null,
      "payload": {
        "reason": null,
        "toStatus": "submitted",
        "fromStatus": null,
        "automatedAction": false
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:56.379Z",
      "eventType": "decision",
      "action": "bill_only_order.direct_po_import_on_create",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01a0eb01-2728-758e-a18a-663efc7745f3",
      "secondaryObjectId": null,
      "payload": {
        "reason": "No uploaded PO documents",
        "performed": false,
        "entityType": "billing_order",
        "fileSourceOrganizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
        "hasSelectedPurchaseOrderId": false,
        "purchaseOrderDocumentCount": 0
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:56.379Z",
      "eventType": "decision",
      "action": "bill_only_order.inventory_items_decrement",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01a0eb01-2728-758e-a18a-663efc7745f3",
      "secondaryObjectId": null,
      "payload": {
        "reason": "inventory_items_decremented",
        "itemCount": 1,
        "performed": true,
        "entityType": "billing_order",
        "hasCaseToteItems": false
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:56.379Z",
      "eventType": "decision",
      "action": "representatives.gate_rep_action",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "secondaryObjectId": null,
      "payload": {
        "reason": "no_blocking_relationship",
        "orderType": null,
        "performed": false,
        "entityType": "organization",
        "gatedAction": "bill_only",
        "isOwnTrunkDestination": null,
        "requestingOrganizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:56.379Z",
      "eventType": "decision",
      "action": "representatives.gate_rep_action",
      "userEmail": "rana.reyes@corvetasurgical.com",
      "userId": "28c9d0e1-f2a3-4567-2345-678901234567",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "secondaryObjectId": null,
      "payload": {
        "reason": "no_blocking_relationship",
        "orderType": null,
        "performed": false,
        "entityType": "organization",
        "gatedAction": "bill_only",
        "isOwnTrunkDestination": null,
        "requestingOrganizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:56.379Z",
      "eventType": "decision",
      "action": "representatives.gate_rep_action",
      "userEmail": "rana.reyes@corvetasurgical.com",
      "userId": "28c9d0e1-f2a3-4567-2345-678901234567",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "secondaryObjectId": null,
      "payload": {
        "reason": "no_blocking_relationship",
        "orderType": null,
        "performed": false,
        "entityType": "organization",
        "gatedAction": "bill_only",
        "isOwnTrunkDestination": null,
        "requestingOrganizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:57.689Z",
      "eventType": "decision",
      "action": "bill_only.notifications.cc_incident_recipients",
      "userEmail": null,
      "userId": null,
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01a0eb01-2728-758e-a18a-663efc7745f3",
      "secondaryObjectId": null,
      "payload": {
        "reason": "order has no no-charge item with an incident reason",
        "performed": false,
        "entityType": "billing_order"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:58.194Z",
      "eventType": "transactional_email",
      "action": "new_bill_only",
      "userEmail": null,
      "userId": null,
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": "01a0eb01-2728-758e-a18a-663efc7745f3",
      "secondaryObjectId": null,
      "payload": {
        "to": [
          "blair.bennett@corvetasurgical.com",
          "rana.reyes@corvetasurgical.com"
        ],
        "s3Path": "email-audit/b2c3d4e5-f6a7-8901-bcde-f12345678901/01a0eb01-2de1-7268-82ac-b35ffea39381/",
        "subject": "New Bill-Only Order - 7/31/2026 - Vantis BO-2",
        "messageId": "dev-console-log",
        "relatedEntityType": "billing_order"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:31:58.518Z",
      "eventType": "user_log",
      "action": "user:login",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": null,
      "secondaryObjectId": null,
      "payload": {
        "email": "blair.bennett@corvetasurgical.com"
      },
      "route": "/login",
      "traceId": "00000000000000000000000000000000"
    },
    {
      "createdAt": "2026-09-29T02:32:10.269Z",
      "eventType": "user_log",
      "action": "user:login",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": null,
      "secondaryObjectId": null,
      "payload": {
        "email": "blair.bennett@corvetasurgical.com"
      },
      "route": "/login",
      "traceId": "00000000000000000000000000000000"
    },
    {
      "createdAt": "2026-09-29T02:32:22.045Z",
      "eventType": "user_log",
      "action": "user:login",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": null,
      "secondaryObjectId": null,
      "payload": {
        "email": "blair.bennett@corvetasurgical.com"
      },
      "route": "/login",
      "traceId": "00000000000000000000000000000000"
    },
    {
      "createdAt": "2026-09-29T02:32:30.799Z",
      "eventType": "decision",
      "action": "bill_only_order.duplicate_submission_block",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": "1fb8c9d0-e1f2-3456-1234-567890123456",
      "secondaryObjectId": null,
      "payload": {
        "step": "surgery",
        "reason": "no_same_day_candidates",
        "performed": false,
        "entityType": "sales_account",
        "vetoedCount": 0,
        "flaggedCount": 0,
        "candidateCount": 0,
        "matchedSignals": {
          "patientId": false,
          "surgeonName": false,
          "patientLastName": false
        },
        "unmatchedCount": 0
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:32:30.799Z",
      "eventType": "decision",
      "action": "representatives.gate_rep_action",
      "userEmail": "rana.reyes@corvetasurgical.com",
      "userId": "28c9d0e1-f2a3-4567-2345-678901234567",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "secondaryObjectId": null,
      "payload": {
        "reason": "no_blocking_relationship",
        "orderType": null,
        "performed": false,
        "entityType": "organization",
        "gatedAction": "bill_only",
        "isOwnTrunkDestination": null,
        "requestingOrganizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:32:37.492Z",
      "eventType": "decision",
      "action": "bill_only.link_purchase_order",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": "01a0eb01-c7b3-7ae5-a049-f521d5195975",
      "secondaryObjectId": null,
      "payload": {
        "reason": "no_purchase_order_selected",
        "performed": false,
        "entityType": "billing_order",
        "salesOrganizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
        "manufacturerOrganizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:32:37.492Z",
      "eventType": "decision",
      "action": "representatives.gate_rep_action",
      "userEmail": "rana.reyes@corvetasurgical.com",
      "userId": "28c9d0e1-f2a3-4567-2345-678901234567",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "secondaryObjectId": null,
      "payload": {
        "reason": "no_blocking_relationship",
        "orderType": null,
        "performed": false,
        "entityType": "organization",
        "gatedAction": "bill_only",
        "isOwnTrunkDestination": null,
        "requestingOrganizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:32:37.492Z",
      "eventType": "decision",
      "action": "representatives.gate_rep_action",
      "userEmail": "rana.reyes@corvetasurgical.com",
      "userId": "28c9d0e1-f2a3-4567-2345-678901234567",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "secondaryObjectId": null,
      "payload": {
        "reason": "no_blocking_relationship",
        "orderType": null,
        "performed": false,
        "entityType": "organization",
        "gatedAction": "bill_only",
        "isOwnTrunkDestination": null,
        "requestingOrganizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:32:37.492Z",
      "eventType": "decision",
      "action": "bill_only_order.duplicate_submission_block",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": "1fb8c9d0-e1f2-3456-1234-567890123456",
      "secondaryObjectId": null,
      "payload": {
        "step": "review",
        "reason": "no_same_day_candidates",
        "performed": false,
        "entityType": "sales_account",
        "vetoedCount": 0,
        "flaggedCount": 0,
        "candidateCount": 0,
        "matchedSignals": {
          "patientId": false,
          "surgeonName": false,
          "patientLastName": false
        },
        "unmatchedCount": 0
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:32:37.492Z",
      "eventType": "decision",
      "action": "representatives.gate_rep_action",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "secondaryObjectId": null,
      "payload": {
        "reason": "no_blocking_relationship",
        "orderType": null,
        "performed": false,
        "entityType": "organization",
        "gatedAction": "bill_only",
        "isOwnTrunkDestination": null,
        "requestingOrganizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:32:37.492Z",
      "eventType": "decision",
      "action": "bill_only_order.inventory_items_decrement",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01a0eb01-c7b3-7ae5-a049-f521d5195975",
      "secondaryObjectId": null,
      "payload": {
        "reason": "inventory_items_decremented",
        "itemCount": 1,
        "performed": true,
        "entityType": "billing_order",
        "hasCaseToteItems": false
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:32:37.492Z",
      "eventType": "billing_order",
      "action": "status_change",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01a0eb01-c7b3-7ae5-a049-f521d5195975",
      "secondaryObjectId": null,
      "payload": {
        "reason": null,
        "toStatus": "submitted",
        "fromStatus": null,
        "automatedAction": false
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:32:37.492Z",
      "eventType": "decision",
      "action": "bill_only_order.direct_po_import_on_create",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01a0eb01-c7b3-7ae5-a049-f521d5195975",
      "secondaryObjectId": null,
      "payload": {
        "reason": "No uploaded PO documents",
        "performed": false,
        "entityType": "billing_order",
        "fileSourceOrganizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
        "hasSelectedPurchaseOrderId": false,
        "purchaseOrderDocumentCount": 0
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:32:37.492Z",
      "eventType": "decision",
      "action": "basicErp.deriveSalesOrder",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01a0eb01-c7b3-7ae5-a049-f521d5195975",
      "secondaryObjectId": null,
      "payload": {
        "reason": "flag_disabled",
        "performed": false,
        "entityType": "billing_order"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:32:37.492Z",
      "eventType": "scheduled_task",
      "action": "scheduled_task.scheduled",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01a0eb01-c7cd-7833-9321-0c25454df4e6",
      "secondaryObjectId": null,
      "payload": {
        "entityId": "01a0eb01-c7b3-7ae5-a049-f521d5195975",
        "revision": 0,
        "taskKind": "bill_only_po_missing_followup",
        "entityType": "billing_order",
        "scheduledAt": "2026-10-06T02:32:37.580Z"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:32:37.492Z",
      "eventType": "scheduled_task",
      "action": "scheduled_task.scheduled",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01a0eb01-c7d1-710f-b73b-bcb1ea12923d",
      "secondaryObjectId": null,
      "payload": {
        "entityId": "01a0eb01-c7b3-7ae5-a049-f521d5195975",
        "revision": 0,
        "taskKind": "bill_only_po_missing_followup",
        "entityType": "billing_order",
        "scheduledAt": "2026-10-13T02:32:37.580Z"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:32:37.492Z",
      "eventType": "scheduled_task",
      "action": "scheduled_task.scheduled",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01a0eb01-c7d4-741f-9fa7-22c7a5bc8af1",
      "secondaryObjectId": null,
      "payload": {
        "entityId": "01a0eb01-c7b3-7ae5-a049-f521d5195975",
        "revision": 0,
        "taskKind": "bill_only_po_missing_followup",
        "entityType": "billing_order",
        "scheduledAt": "2026-10-20T02:32:37.580Z"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:32:38.795Z",
      "eventType": "decision",
      "action": "bill_only.notifications.cc_incident_recipients",
      "userEmail": null,
      "userId": null,
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01a0eb01-c7b3-7ae5-a049-f521d5195975",
      "secondaryObjectId": null,
      "payload": {
        "reason": "order has no no-charge item with an incident reason",
        "performed": false,
        "entityType": "billing_order"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:32:39.304Z",
      "eventType": "transactional_email",
      "action": "new_bill_only",
      "userEmail": null,
      "userId": null,
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": "01a0eb01-c7b3-7ae5-a049-f521d5195975",
      "secondaryObjectId": null,
      "payload": {
        "to": [
          "blair.bennett@corvetasurgical.com",
          "rana.reyes@corvetasurgical.com"
        ],
        "s3Path": "email-audit/b2c3d4e5-f6a7-8901-bcde-f12345678901/01a0eb01-ce7c-74ea-b55e-590e5f58a8d4/",
        "subject": "New Bill-Only Order - 7/31/2026 - Vantis BO-3",
        "messageId": "dev-console-log",
        "relatedEntityType": "billing_order"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:32:40.764Z",
      "eventType": "user_log",
      "action": "user:login",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": null,
      "secondaryObjectId": null,
      "payload": {
        "email": "blair.bennett@corvetasurgical.com"
      },
      "route": "/login",
      "traceId": "00000000000000000000000000000000"
    },
    {
      "createdAt": "2026-09-29T02:32:47.814Z",
      "eventType": "decision",
      "action": "representatives.gate_rep_action",
      "userEmail": "rana.reyes@corvetasurgical.com",
      "userId": "28c9d0e1-f2a3-4567-2345-678901234567",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "secondaryObjectId": null,
      "payload": {
        "reason": "no_blocking_relationship",
        "orderType": null,
        "performed": false,
        "entityType": "organization",
        "gatedAction": "bill_only",
        "isOwnTrunkDestination": null,
        "requestingOrganizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:32:47.814Z",
      "eventType": "decision",
      "action": "bill_only_order.duplicate_submission_block",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": "fea7b8c9-d0e1-2345-0123-456789012345",
      "secondaryObjectId": null,
      "payload": {
        "step": "surgery",
        "reason": "no_same_day_candidates",
        "performed": false,
        "entityType": "sales_account",
        "vetoedCount": 0,
        "flaggedCount": 0,
        "candidateCount": 0,
        "matchedSignals": {
          "patientId": false,
          "surgeonName": false,
          "patientLastName": false
        },
        "unmatchedCount": 0
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:32:54.472Z",
      "eventType": "scheduled_task",
      "action": "scheduled_task.scheduled",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01a0eb02-0a1c-7003-8b7e-71c6a6a75c5b",
      "secondaryObjectId": null,
      "payload": {
        "entityId": "01a0eb02-09fb-7756-828a-eec0475bf73f",
        "revision": 0,
        "taskKind": "bill_only_po_missing_followup",
        "entityType": "billing_order",
        "scheduledAt": "2026-10-13T02:32:54.552Z"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:32:54.472Z",
      "eventType": "decision",
      "action": "bill_only_order.duplicate_submission_block",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": "fea7b8c9-d0e1-2345-0123-456789012345",
      "secondaryObjectId": null,
      "payload": {
        "step": "review",
        "reason": "no_same_day_candidates",
        "performed": false,
        "entityType": "sales_account",
        "vetoedCount": 0,
        "flaggedCount": 0,
        "candidateCount": 0,
        "matchedSignals": {
          "patientId": false,
          "surgeonName": false,
          "patientLastName": false
        },
        "unmatchedCount": 0
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:32:54.472Z",
      "eventType": "decision",
      "action": "representatives.gate_rep_action",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "secondaryObjectId": null,
      "payload": {
        "reason": "no_blocking_relationship",
        "orderType": null,
        "performed": false,
        "entityType": "organization",
        "gatedAction": "bill_only",
        "isOwnTrunkDestination": null,
        "requestingOrganizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:32:54.472Z",
      "eventType": "decision",
      "action": "bill_only_order.inventory_items_decrement",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01a0eb02-09fb-7756-828a-eec0475bf73f",
      "secondaryObjectId": null,
      "payload": {
        "reason": "inventory_items_decremented",
        "itemCount": 1,
        "performed": true,
        "entityType": "billing_order",
        "hasCaseToteItems": false
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:32:54.472Z",
      "eventType": "decision",
      "action": "representatives.gate_rep_action",
      "userEmail": "rana.reyes@corvetasurgical.com",
      "userId": "28c9d0e1-f2a3-4567-2345-678901234567",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "secondaryObjectId": null,
      "payload": {
        "reason": "no_blocking_relationship",
        "orderType": null,
        "performed": false,
        "entityType": "organization",
        "gatedAction": "bill_only",
        "isOwnTrunkDestination": null,
        "requestingOrganizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:32:54.472Z",
      "eventType": "decision",
      "action": "representatives.gate_rep_action",
      "userEmail": "rana.reyes@corvetasurgical.com",
      "userId": "28c9d0e1-f2a3-4567-2345-678901234567",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "secondaryObjectId": null,
      "payload": {
        "reason": "no_blocking_relationship",
        "orderType": null,
        "performed": false,
        "entityType": "organization",
        "gatedAction": "bill_only",
        "isOwnTrunkDestination": null,
        "requestingOrganizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:32:54.472Z",
      "eventType": "scheduled_task",
      "action": "scheduled_task.scheduled",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01a0eb02-0a1e-7d5c-bf45-dffcb93726ad",
      "secondaryObjectId": null,
      "payload": {
        "entityId": "01a0eb02-09fb-7756-828a-eec0475bf73f",
        "revision": 0,
        "taskKind": "bill_only_po_missing_followup",
        "entityType": "billing_order",
        "scheduledAt": "2026-10-20T02:32:54.552Z"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:32:54.472Z",
      "eventType": "decision",
      "action": "bill_only_order.direct_po_import_on_create",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01a0eb02-09fb-7756-828a-eec0475bf73f",
      "secondaryObjectId": null,
      "payload": {
        "reason": "No uploaded PO documents",
        "performed": false,
        "entityType": "billing_order",
        "fileSourceOrganizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
        "hasSelectedPurchaseOrderId": false,
        "purchaseOrderDocumentCount": 0
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:32:54.472Z",
      "eventType": "billing_order",
      "action": "status_change",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01a0eb02-09fb-7756-828a-eec0475bf73f",
      "secondaryObjectId": null,
      "payload": {
        "reason": null,
        "toStatus": "submitted",
        "fromStatus": null,
        "automatedAction": false
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:32:54.472Z",
      "eventType": "decision",
      "action": "basicErp.deriveSalesOrder",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01a0eb02-09fb-7756-828a-eec0475bf73f",
      "secondaryObjectId": null,
      "payload": {
        "reason": "flag_disabled",
        "performed": false,
        "entityType": "billing_order"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:32:54.472Z",
      "eventType": "scheduled_task",
      "action": "scheduled_task.scheduled",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01a0eb02-0a18-7c44-98b7-8359808fd9d5",
      "secondaryObjectId": null,
      "payload": {
        "entityId": "01a0eb02-09fb-7756-828a-eec0475bf73f",
        "revision": 0,
        "taskKind": "bill_only_po_missing_followup",
        "entityType": "billing_order",
        "scheduledAt": "2026-10-06T02:32:54.552Z"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:32:54.472Z",
      "eventType": "decision",
      "action": "bill_only.link_purchase_order",
      "userEmail": "blair.bennett@corvetasurgical.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": "01a0eb02-09fb-7756-828a-eec0475bf73f",
      "secondaryObjectId": null,
      "payload": {
        "reason": "no_purchase_order_selected",
        "performed": false,
        "entityType": "billing_order",
        "salesOrganizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
        "manufacturerOrganizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:32:55.861Z",
      "eventType": "decision",
      "action": "bill_only.notifications.cc_incident_recipients",
      "userEmail": null,
      "userId": null,
      "organizationName": "Vantis",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "01a0eb02-09fb-7756-828a-eec0475bf73f",
      "secondaryObjectId": null,
      "payload": {
        "reason": "order has no no-charge item with an incident reason",
        "performed": false,
        "entityType": "billing_order"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-09-29T02:32:56.364Z",
      "eventType": "transactional_email",
      "action": "new_bill_only",
      "userEmail": null,
      "userId": null,
      "organizationName": "Corveta Surgical Group",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": "01a0eb02-09fb-7756-828a-eec0475bf73f",
      "secondaryObjectId": null,
      "payload": {
        "to": [
          "blair.bennett@corvetasurgical.com",
          "rana.reyes@corvetasurgical.com"
        ],
        "s3Path": "email-audit/b2c3d4e5-f6a7-8901-bcde-f12345678901/01a0eb02-111f-7bf7-8c5f-8ac8c31e97ba/",
        "subject": "New Bill-Only Order - 7/26/2026 - Vantis BO-4",
        "messageId": "dev-console-log",
        "relatedEntityType": "billing_order"
      },
      "route": null,
      "traceId": null
    }
  ],
  "auditQuery": "SELECT\n    ae.created_at,\n    ae.event_type,\n    ae.action,\n    ae.user_id,\n    u.email AS user_email,\n    ae.organization_id,\n    o.name AS organization_name,\n    ae.object_id,\n    ae.secondary_object_id,\n    ae.payload,\n    ae.route,\n    ae.trace_id\n  FROM audit_events ae\n  LEFT JOIN users u ON u.id = ae.user_id\n  LEFT JOIN organizations o ON o.id = ae.organization_id\n  WHERE ae.created_at >= $1\n    AND ae.organization_id = ANY($2::uuid[])\n  ORDER BY ae.created_at ASC",
  "auditAssertions": [
    {
      "stepName": "Step 2: Submit reference order",
      "expectedAction": "decision:bill_only_order.inventory_items_decrement",
      "found": true
    },
    {
      "stepName": "Step 3: Duplicate warning with both badges",
      "expectedAction": "decision:bill_only_order.inventory_items_decrement",
      "found": true
    },
    {
      "stepName": "Step 6: Different account, same date — no warning",
      "expectedAction": "decision:bill_only_order.inventory_items_decrement",
      "found": true
    },
    {
      "stepName": "Step 7: Non-duplicate and verify billing list",
      "expectedAction": "decision:bill_only_order.inventory_items_decrement",
      "found": true
    }
  ],
  "emailAssertions": [
    {
      "stepName": "Step 2: Submit reference order",
      "expectedTemplate": "bill-only",
      "found": true
    },
    {
      "stepName": "Step 3: Duplicate warning with both badges",
      "expectedTemplate": "bill-only",
      "found": true
    },
    {
      "stepName": "Step 6: Different account, same date — no warning",
      "expectedTemplate": "bill-only",
      "found": true
    },
    {
      "stepName": "Step 7: Non-duplicate and verify billing list",
      "expectedTemplate": "bill-only",
      "found": true
    }
  ]
}