{
  "ursId": "URS-062",
  "title": "Order Type Options (Dropship, Consignment, Direct Sales)",
  "timestamp": "2026-04-23T03:44:42.590Z",
  "durationMs": 161174,
  "config": {
    "inboxUrl": "http://localhost:65359",
    "dbHost": "localhost",
    "dbPort": 65360,
    "dbName": "cc_repinbox_dev"
  },
  "setup": {
    "status": "pass"
  },
  "scenarios": [
    {
      "name": "Step 1: Login as sales rep",
      "status": "pass",
      "description": "Step 1: Login as sales rep",
      "screenshots": [
        "/Users/jason/projects/casecohort/code/validation_test_results/urs-062-order-type-options/2026-04-23T03-44-42-589Z/screenshots/step-01-logged-in.png",
        "/Users/jason/projects/casecohort/code/validation_test_results/urs-062-order-type-options/2026-04-23T03-44-42-589Z/screenshots/step-01-order-creation-form.png"
      ],
      "explanation": "Proves that Bob Kauffman (StellarTech Sales Rep) can authenticate and reach the order creation form. Establishes the user context for all subsequent steps.",
      "startedAt": "2026-04-23T03:44:47.713Z",
      "finishedAt": "2026-04-23T03:44:51.983Z",
      "videoPath": "/Users/jason/projects/casecohort/code/validation_test_results/urs-062-order-type-options/2026-04-23T03-44-42-589Z/videos/step-01-login.webm"
    },
    {
      "name": "Step 2: All order types visible",
      "status": "pass",
      "description": "Step 2: All order types visible",
      "screenshots": [
        "/Users/jason/projects/casecohort/code/validation_test_results/urs-062-order-type-options/2026-04-23T03-44-42-589Z/screenshots/step-02-all-order-types-visible.png"
      ],
      "explanation": "After selecting an account delivery location, all three order types — Consignment, Direct Order, and Drop-ship — are simultaneously visible and Consignment is the default selection. This satisfies the URS-062 requirement that order type options are context-dependent on the chosen delivery location.",
      "startedAt": "2026-04-23T03:45:04.101Z",
      "finishedAt": "2026-04-23T03:45:04.101Z",
      "videoPath": "/Users/jason/projects/casecohort/code/validation_test_results/urs-062-order-type-options/2026-04-23T03-44-42-589Z/videos/step-02-order-types-visible.webm"
    },
    {
      "name": "Step 2b: Trunk hides order type selector",
      "status": "pass",
      "description": "Step 2b: Trunk hides order type selector",
      "screenshots": [
        "/Users/jason/projects/casecohort/code/validation_test_results/urs-062-order-type-options/2026-04-23T03-44-42-589Z/screenshots/step-02b-trunk-no-order-type-selector.png"
      ],
      "explanation": "Negative case for the context-dependent UI rule. Selecting the trunk delivery radio hides the order-type selector entirely — there are zero `input[name=\"orderType_display\"]` radios rendered. Trunk deliveries are implicitly typed as \"trunk\" and do not expose the Consignment / Direct / Drop-ship options available to account deliveries.",
      "startedAt": "2026-04-23T03:45:13.897Z",
      "finishedAt": "2026-04-23T03:45:13.897Z",
      "videoPath": "/Users/jason/projects/casecohort/code/validation_test_results/urs-062-order-type-options/2026-04-23T03-44-42-589Z/videos/step-02b-trunk-hides-selector.webm"
    },
    {
      "name": "Step 3: Select order types",
      "status": "pass",
      "description": "Step 3: Select order types",
      "screenshots": [
        "/Users/jason/projects/casecohort/code/validation_test_results/urs-062-order-type-options/2026-04-23T03-44-42-589Z/screenshots/step-03-direct-order-selected.png",
        "/Users/jason/projects/casecohort/code/validation_test_results/urs-062-order-type-options/2026-04-23T03-44-42-589Z/screenshots/step-03-dropship-selected-with-rep.png",
        "/Users/jason/projects/casecohort/code/validation_test_results/urs-062-order-type-options/2026-04-23T03-44-42-589Z/screenshots/step-03-consignment-selected.png"
      ],
      "explanation": "Each order type can be selected independently. Selecting Drop-ship reveals the \"Receiving Rep\" selector; selecting Consignment or Direct Order hides it. Confirms context-dependent UI responds correctly to user input.",
      "startedAt": "2026-04-23T03:45:27.699Z",
      "finishedAt": "2026-04-23T03:45:34.482Z",
      "videoPath": "/Users/jason/projects/casecohort/code/validation_test_results/urs-062-order-type-options/2026-04-23T03-44-42-589Z/videos/step-03-select-order-types.webm"
    },
    {
      "name": "Step 4: Change delivery location",
      "status": "pass",
      "description": "Step 4: Change delivery location",
      "screenshots": [
        "/Users/jason/projects/casecohort/code/validation_test_results/urs-062-order-type-options/2026-04-23T03-44-42-589Z/screenshots/step-04-boss-order-types.png",
        "/Users/jason/projects/casecohort/code/validation_test_results/urs-062-order-type-options/2026-04-23T03-44-42-589Z/screenshots/step-04-copley-order-types.png"
      ],
      "explanation": "Changing the delivery location from one account to another keeps all three order type options visible without a page reload, confirming the UI updates reactively and the order type selector is not cleared when the location changes.",
      "startedAt": "2026-04-23T03:45:47.317Z",
      "finishedAt": "2026-04-23T03:45:53.817Z",
      "videoPath": "/Users/jason/projects/casecohort/code/validation_test_results/urs-062-order-type-options/2026-04-23T03-44-42-589Z/videos/step-04-change-location.webm"
    },
    {
      "name": "Step 5: Consignment order",
      "status": "pass",
      "description": "Step 5: Consignment order",
      "screenshots": [
        "/Users/jason/projects/casecohort/code/validation_test_results/urs-062-order-type-options/2026-04-23T03-44-42-589Z/screenshots/step-05-consignment-step2.png",
        "/Users/jason/projects/casecohort/code/validation_test_results/urs-062-order-type-options/2026-04-23T03-44-42-589Z/screenshots/step-05-consignment-products.png",
        "/Users/jason/projects/casecohort/code/validation_test_results/urs-062-order-type-options/2026-04-23T03-44-42-589Z/screenshots/step-05-consignment-review.png",
        "/Users/jason/projects/casecohort/code/validation_test_results/urs-062-order-type-options/2026-04-23T03-44-42-589Z/screenshots/step-05-consignment-submitted.png"
      ],
      "explanation": "A complete consignment order is created and submitted end-to-end. The success screen confirms the order request was accepted with order type \"Consignment\", proving the consignment flow is fully operational.",
      "startedAt": "2026-04-23T03:46:06.927Z",
      "finishedAt": "2026-04-23T03:46:20.436Z",
      "videoPath": "/Users/jason/projects/casecohort/code/validation_test_results/urs-062-order-type-options/2026-04-23T03-44-42-589Z/videos/step-05-consignment-order.webm"
    },
    {
      "name": "Step 6: Direct order",
      "status": "pass",
      "description": "Step 6: Direct order",
      "screenshots": [
        "/Users/jason/projects/casecohort/code/validation_test_results/urs-062-order-type-options/2026-04-23T03-44-42-589Z/screenshots/step-06-direct-step2.png",
        "/Users/jason/projects/casecohort/code/validation_test_results/urs-062-order-type-options/2026-04-23T03-44-42-589Z/screenshots/step-06-direct-products.png",
        "/Users/jason/projects/casecohort/code/validation_test_results/urs-062-order-type-options/2026-04-23T03-44-42-589Z/screenshots/step-06-direct-review.png",
        "/Users/jason/projects/casecohort/code/validation_test_results/urs-062-order-type-options/2026-04-23T03-44-42-589Z/screenshots/step-06-direct-submitted.png"
      ],
      "explanation": "A complete direct sales order is created and submitted end-to-end. The success screen confirms the order request was accepted with order type \"Direct\", proving the direct sales flow is fully operational.",
      "startedAt": "2026-04-23T03:46:31.077Z",
      "finishedAt": "2026-04-23T03:46:44.585Z",
      "videoPath": "/Users/jason/projects/casecohort/code/validation_test_results/urs-062-order-type-options/2026-04-23T03-44-42-589Z/videos/step-06-direct-order.webm"
    },
    {
      "name": "Step 7: Dropship order",
      "status": "pass",
      "description": "Step 7: Dropship order",
      "screenshots": [
        "/Users/jason/projects/casecohort/code/validation_test_results/urs-062-order-type-options/2026-04-23T03-44-42-589Z/screenshots/step-07-dropship-step2.png",
        "/Users/jason/projects/casecohort/code/validation_test_results/urs-062-order-type-options/2026-04-23T03-44-42-589Z/screenshots/step-07-dropship-products.png",
        "/Users/jason/projects/casecohort/code/validation_test_results/urs-062-order-type-options/2026-04-23T03-44-42-589Z/screenshots/step-07-dropship-review.png",
        "/Users/jason/projects/casecohort/code/validation_test_results/urs-062-order-type-options/2026-04-23T03-44-42-589Z/screenshots/step-07-dropship-submitted.png"
      ],
      "explanation": "A complete dropship order is created and submitted end-to-end. The success screen confirms the order request was accepted with order type \"Drop-ship\", proving the dropship flow — including the Receiving Rep selector — is fully operational.",
      "startedAt": "2026-04-23T03:46:57.133Z",
      "finishedAt": "2026-04-23T03:47:12.970Z",
      "videoPath": "/Users/jason/projects/casecohort/code/validation_test_results/urs-062-order-type-options/2026-04-23T03-44-42-589Z/videos/step-07-dropship-order.webm"
    },
    {
      "name": "Step 8: Orders summary",
      "status": "pass",
      "description": "Step 8: Orders summary",
      "screenshots": [
        "/Users/jason/projects/casecohort/code/validation_test_results/urs-062-order-type-options/2026-04-23T03-44-42-589Z/screenshots/step-08-orders-list.png"
      ],
      "explanation": "The orders list is inspected after all three submissions. The recently created consignment, direct, and dropship orders are all visible, confirming the system persisted each order type correctly and all three types appear in the same list view.",
      "startedAt": "2026-04-23T03:47:20.317Z",
      "finishedAt": "2026-04-23T03:47:20.317Z",
      "videoPath": "/Users/jason/projects/casecohort/code/validation_test_results/urs-062-order-type-options/2026-04-23T03-44-42-589Z/videos/step-08-summary.webm"
    }
  ],
  "dbValidations": [
    {
      "name": "Recent orders created by test user",
      "query": "SELECT id, request_number, order_type, status, location_id, sales_account_id, created_at\n      FROM order_requests\n      WHERE requested_by_user_id = $1\n        AND notes LIKE '%URS-062%'\n      ORDER BY created_at DESC",
      "status": "pass",
      "rows": [
        {
          "id": "019db872-e06d-792a-aba6-7ac02c05de49",
          "request_number": "OR-3",
          "order_type": "dropship",
          "status": "submitted",
          "location_id": "a3e7f8a9-b0c1-2345-0123-456789012345",
          "sales_account_id": "2ac9d0e1-f2a3-4567-2345-678901234567",
          "created_at": "2026-04-23T03:47:09.538Z"
        },
        {
          "id": "019db872-71a1-72ed-aaac-698d95ff17ae",
          "request_number": "OR-2",
          "order_type": "direct",
          "status": "submitted",
          "location_id": "81c5d6e7-f8a9-0123-8901-234567890123",
          "sales_account_id": "1fb8c9d0-e1f2-3456-1234-567890123456",
          "created_at": "2026-04-23T03:46:41.173Z"
        },
        {
          "id": "019db872-133e-7d5c-8615-932d8b7daa48",
          "request_number": "OR-1",
          "order_type": "consignment",
          "status": "submitted",
          "location_id": "6ea3b4c5-d6e7-8901-6789-012345678901",
          "sales_account_id": "fea7b8c9-d0e1-2345-0123-456789012345",
          "created_at": "2026-04-23T03:46:17.003Z"
        }
      ],
      "assertion": "At least one order should have been created during the test"
    },
    {
      "name": "Consignment order created",
      "query": "SELECT id, request_number, order_type, status, sales_account_id\n      FROM order_requests\n      WHERE requested_by_user_id = $1\n        AND order_type = 'consignment'\n        AND notes LIKE '%URS-062%'\n      ORDER BY created_at DESC\n      LIMIT 1",
      "status": "pass",
      "rows": [
        {
          "id": "019db872-133e-7d5c-8615-932d8b7daa48",
          "request_number": "OR-1",
          "order_type": "consignment",
          "status": "submitted",
          "sales_account_id": "fea7b8c9-d0e1-2345-0123-456789012345"
        }
      ],
      "assertion": "A consignment order should exist from the test run"
    },
    {
      "name": "Direct order created",
      "query": "SELECT id, request_number, order_type, status, sales_account_id\n      FROM order_requests\n      WHERE requested_by_user_id = $1\n        AND order_type = 'direct'\n        AND notes LIKE '%URS-062%'\n      ORDER BY created_at DESC\n      LIMIT 1",
      "status": "pass",
      "rows": [
        {
          "id": "019db872-71a1-72ed-aaac-698d95ff17ae",
          "request_number": "OR-2",
          "order_type": "direct",
          "status": "submitted",
          "sales_account_id": "1fb8c9d0-e1f2-3456-1234-567890123456"
        }
      ],
      "assertion": "A direct order should exist from the test run"
    },
    {
      "name": "Dropship order created with receiving rep",
      "query": "SELECT id, request_number, order_type, status, sales_account_id, receiving_rep_user_id\n      FROM order_requests\n      WHERE requested_by_user_id = $1\n        AND order_type = 'dropship'\n        AND notes LIKE '%URS-062%'\n      ORDER BY created_at DESC\n      LIMIT 1",
      "status": "pass",
      "rows": [
        {
          "id": "019db872-e06d-792a-aba6-7ac02c05de49",
          "request_number": "OR-3",
          "order_type": "dropship",
          "status": "submitted",
          "sales_account_id": "2ac9d0e1-f2a3-4567-2345-678901234567",
          "receiving_rep_user_id": "17b8c9d0-e1f2-3456-1234-567890123456"
        }
      ],
      "assertion": "A dropship order should exist from the test run and have receiving_rep_user_id populated"
    },
    {
      "name": "All three order types present",
      "query": "SELECT order_type, COUNT(*) as order_count\n      FROM order_requests\n      WHERE requested_by_user_id = $1\n        AND notes LIKE '%URS-062%'\n      GROUP BY order_type\n      ORDER BY order_type",
      "status": "pass",
      "rows": [
        {
          "order_type": "consignment",
          "order_count": "1"
        },
        {
          "order_type": "direct",
          "order_count": "1"
        },
        {
          "order_type": "dropship",
          "order_count": "1"
        }
      ],
      "assertion": "Orders of all three types (consignment, direct, dropship) should exist"
    },
    {
      "name": "All orders have delivery locations",
      "query": "SELECT orq.id, orq.order_type, orq.location_id, orq.sales_account_id,\n        rwl.name as location_name, rwl.type as location_type\n      FROM order_requests orq\n      LEFT JOIN real_world_locations rwl ON rwl.id = orq.location_id\n      WHERE orq.requested_by_user_id = $1\n        AND orq.created_at > NOW() - INTERVAL '30 minutes'\n      ORDER BY orq.created_at DESC",
      "status": "pass",
      "rows": [
        {
          "id": "019db872-e06d-792a-aba6-7ac02c05de49",
          "order_type": "dropship",
          "location_id": "a3e7f8a9-b0c1-2345-0123-456789012345",
          "sales_account_id": "2ac9d0e1-f2a3-4567-2345-678901234567",
          "location_name": "Connecticut Ortho - Shipping",
          "location_type": "asc"
        },
        {
          "id": "019db872-71a1-72ed-aaac-698d95ff17ae",
          "order_type": "direct",
          "location_id": "81c5d6e7-f8a9-0123-8901-234567890123",
          "sales_account_id": "1fb8c9d0-e1f2-3456-1234-567890123456",
          "location_name": "Copley Hospital - Shipping",
          "location_type": "hospital"
        },
        {
          "id": "019db872-133e-7d5c-8615-932d8b7daa48",
          "order_type": "consignment",
          "location_id": "6ea3b4c5-d6e7-8901-6789-012345678901",
          "sales_account_id": "fea7b8c9-d0e1-2345-0123-456789012345",
          "location_name": "BOSS - Shipping",
          "location_type": "hospital"
        }
      ],
      "assertion": "Every order should have a delivery location assigned"
    }
  ],
  "overallStatus": "pass",
  "outputDir": "/Users/jason/projects/casecohort/code/validation_test_results/urs-062-order-type-options/2026-04-23T03-44-42-589Z",
  "auditStartTime": "2026-04-23T03:44:40.666Z",
  "auditEventEvidence": [
    {
      "createdAt": "2026-04-23T03:44:45.073Z",
      "eventType": "user_log",
      "action": "user:login",
      "userEmail": "bob.kauffman@stellartech.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "StellarTech Medical Solutions",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": null,
      "secondaryObjectId": null,
      "payload": {
        "email": "bob.kauffman@stellartech.com"
      },
      "route": "/login",
      "traceId": "00000000000000000000000000000000"
    },
    {
      "createdAt": "2026-04-23T03:44:53.356Z",
      "eventType": "user_log",
      "action": "user:login",
      "userEmail": "bob.kauffman@stellartech.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "StellarTech Medical Solutions",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": null,
      "secondaryObjectId": null,
      "payload": {
        "email": "bob.kauffman@stellartech.com"
      },
      "route": "/login",
      "traceId": "00000000000000000000000000000000"
    },
    {
      "createdAt": "2026-04-23T03:45:08.565Z",
      "eventType": "user_log",
      "action": "user:login",
      "userEmail": "bob.kauffman@stellartech.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "StellarTech Medical Solutions",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": null,
      "secondaryObjectId": null,
      "payload": {
        "email": "bob.kauffman@stellartech.com"
      },
      "route": "/login",
      "traceId": "00000000000000000000000000000000"
    },
    {
      "createdAt": "2026-04-23T03:45:18.314Z",
      "eventType": "user_log",
      "action": "user:login",
      "userEmail": "bob.kauffman@stellartech.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "StellarTech Medical Solutions",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": null,
      "secondaryObjectId": null,
      "payload": {
        "email": "bob.kauffman@stellartech.com"
      },
      "route": "/login",
      "traceId": "00000000000000000000000000000000"
    },
    {
      "createdAt": "2026-04-23T03:45:38.892Z",
      "eventType": "user_log",
      "action": "user:login",
      "userEmail": "bob.kauffman@stellartech.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "StellarTech Medical Solutions",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": null,
      "secondaryObjectId": null,
      "payload": {
        "email": "bob.kauffman@stellartech.com"
      },
      "route": "/login",
      "traceId": "00000000000000000000000000000000"
    },
    {
      "createdAt": "2026-04-23T03:45:58.358Z",
      "eventType": "user_log",
      "action": "user:login",
      "userEmail": "bob.kauffman@stellartech.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "StellarTech Medical Solutions",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": null,
      "secondaryObjectId": null,
      "payload": {
        "email": "bob.kauffman@stellartech.com"
      },
      "route": "/login",
      "traceId": "00000000000000000000000000000000"
    },
    {
      "createdAt": "2026-04-23T03:46:17.003Z",
      "eventType": "decision",
      "action": "order_request_created",
      "userEmail": "bob.kauffman@stellartech.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "ZuriMED",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "019db872-133e-7d5c-8615-932d8b7daa48",
      "secondaryObjectId": null,
      "payload": {
        "reason": "Order request OR-1 created (importSource=manual)",
        "priority": "normal",
        "itemCount": 1,
        "orderType": "consignment",
        "performed": true,
        "entityType": "order_request",
        "importSource": "manual",
        "requestNumber": "OR-1",
        "resolvedLocationId": "6ea3b4c5-d6e7-8901-6789-012345678901",
        "resolvedSalesAccountId": "fea7b8c9-d0e1-2345-0123-456789012345",
        "fulfillingOrganizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        "requestingOrganizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-04-23T03:46:21.578Z",
      "eventType": "user_log",
      "action": "user:login",
      "userEmail": "bob.kauffman@stellartech.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "StellarTech Medical Solutions",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": null,
      "secondaryObjectId": null,
      "payload": {
        "email": "bob.kauffman@stellartech.com"
      },
      "route": "/login",
      "traceId": "00000000000000000000000000000000"
    },
    {
      "createdAt": "2026-04-23T03:46:41.173Z",
      "eventType": "decision",
      "action": "order_request_created",
      "userEmail": "bob.kauffman@stellartech.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "ZuriMED",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "019db872-71a1-72ed-aaac-698d95ff17ae",
      "secondaryObjectId": null,
      "payload": {
        "reason": "Order request OR-2 created (importSource=manual)",
        "priority": "normal",
        "itemCount": 1,
        "orderType": "direct",
        "performed": true,
        "entityType": "order_request",
        "importSource": "manual",
        "requestNumber": "OR-2",
        "resolvedLocationId": "81c5d6e7-f8a9-0123-8901-234567890123",
        "resolvedSalesAccountId": "1fb8c9d0-e1f2-3456-1234-567890123456",
        "fulfillingOrganizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        "requestingOrganizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-04-23T03:46:45.736Z",
      "eventType": "user_log",
      "action": "user:login",
      "userEmail": "bob.kauffman@stellartech.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "StellarTech Medical Solutions",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": null,
      "secondaryObjectId": null,
      "payload": {
        "email": "bob.kauffman@stellartech.com"
      },
      "route": "/login",
      "traceId": "00000000000000000000000000000000"
    },
    {
      "createdAt": "2026-04-23T03:47:09.538Z",
      "eventType": "decision",
      "action": "order_request_created",
      "userEmail": "bob.kauffman@stellartech.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "ZuriMED",
      "organizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "objectId": "019db872-e06d-792a-aba6-7ac02c05de49",
      "secondaryObjectId": null,
      "payload": {
        "reason": "Order request OR-3 created (importSource=manual)",
        "priority": "normal",
        "itemCount": 1,
        "orderType": "dropship",
        "performed": true,
        "entityType": "order_request",
        "importSource": "manual",
        "requestNumber": "OR-3",
        "resolvedLocationId": "a3e7f8a9-b0c1-2345-0123-456789012345",
        "resolvedSalesAccountId": "2ac9d0e1-f2a3-4567-2345-678901234567",
        "fulfillingOrganizationId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
        "requestingOrganizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901"
      },
      "route": null,
      "traceId": null
    },
    {
      "createdAt": "2026-04-23T03:47:14.012Z",
      "eventType": "user_log",
      "action": "user:login",
      "userEmail": "bob.kauffman@stellartech.com",
      "userId": "17b8c9d0-e1f2-3456-1234-567890123456",
      "organizationName": "StellarTech Medical Solutions",
      "organizationId": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
      "objectId": null,
      "secondaryObjectId": null,
      "payload": {
        "email": "bob.kauffman@stellartech.com"
      },
      "route": "/login",
      "traceId": "00000000000000000000000000000000"
    }
  ],
  "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": [],
  "emailAssertions": []
}