{
  "generatedAt": "2026-07-18T19:22:41.493Z",
  "n8nVersion": "2.30.7",
  "workflowId": "port12ConversationEngine",
  "workflowPath": "/webhook/portfolio-conversation-engine",
  "results": [
    {
      "name": "consented-lead",
      "status": 200,
      "payload": {
        "ok": true,
        "status": "lead-captured",
        "conversation": {
          "responseId": "cf01a0ee-f201-4660-a026-6537ef63cddd",
          "providerEventId": "chat-evt-001",
          "sessionId": "session-lead-001",
          "channel": "chat",
          "botMode": "lead-generation",
          "intent": "qualified-lead",
          "responseText": "I can help with that. Which team size and preferred start date should I include in the request?",
          "nextStep": "collect-qualification",
          "promptVersion": 3,
          "groundedInApprovedContent": true,
          "voice": null,
          "requiresHuman": false,
          "idempotencyKey": "chatbot:chat-evt-001",
          "createdAt": "2026-07-18T19:22:39.160Z"
        },
        "lead": {
          "leadId": "65745afd-d0f6-4914-abd1-2617f8b204d4",
          "providerEventId": "chat-evt-001",
          "sessionId": "session-lead-001",
          "email": "buyer@example.test",
          "teamSize": 12,
          "source": "conversational-ai",
          "status": "qualified-awaiting-human",
          "consent": true,
          "idempotencyKey": "chatbot:chat-evt-001:lead",
          "createdAt": "2026-07-18T19:22:39.193Z"
        }
      }
    },
    {
      "name": "lead-replay",
      "status": 200,
      "payload": {
        "ok": true,
        "status": "lead-captured",
        "conversation": {
          "responseId": "cf01a0ee-f201-4660-a026-6537ef63cddd",
          "providerEventId": "chat-evt-001",
          "sessionId": "session-lead-001",
          "channel": "chat",
          "botMode": "lead-generation",
          "intent": "qualified-lead",
          "responseText": "I can help with that. Which team size and preferred start date should I include in the request?",
          "nextStep": "collect-qualification",
          "promptVersion": 3,
          "groundedInApprovedContent": true,
          "voice": null,
          "requiresHuman": false,
          "idempotencyKey": "chatbot:chat-evt-001",
          "createdAt": "2026-07-18T19:22:39.160Z",
          "replayed": true
        },
        "lead": {
          "leadId": "65745afd-d0f6-4914-abd1-2617f8b204d4",
          "providerEventId": "chat-evt-001",
          "sessionId": "session-lead-001",
          "email": "buyer@example.test",
          "teamSize": 12,
          "source": "conversational-ai",
          "status": "qualified-awaiting-human",
          "consent": true,
          "idempotencyKey": "chatbot:chat-evt-001:lead",
          "createdAt": "2026-07-18T19:22:39.193Z",
          "replayed": true
        }
      }
    },
    {
      "name": "voice-support",
      "status": 200,
      "payload": {
        "ok": true,
        "status": "conversation-response",
        "conversation": {
          "responseId": "421df9c2-be1d-4d2d-b716-75cb2811a61e",
          "providerEventId": "voice-evt-001",
          "sessionId": "session-support-001",
          "channel": "voice",
          "botMode": "customer-support",
          "intent": "support-answer",
          "responseText": "I found the relevant support procedure. I can summarize it or route this to a teammate.",
          "nextStep": "confirm-resolution",
          "promptVersion": 3,
          "groundedInApprovedContent": true,
          "voice": {
            "providerAdapter": "elevenlabs-compatible",
            "tone": "calm-helpful",
            "pace": "medium",
            "ssmlReady": true
          },
          "requiresHuman": false,
          "idempotencyKey": "chatbot:voice-evt-001",
          "createdAt": "2026-07-18T19:22:39.309Z"
        },
        "leadCreated": false
      }
    },
    {
      "name": "sensitive-handoff",
      "status": 202,
      "payload": {
        "ok": true,
        "status": "human-handoff",
        "handoff": {
          "handoffId": "97386a12-932e-4ddf-8b79-e0ba7674359f",
          "providerEventId": "chat-evt-002",
          "sessionId": "session-sensitive-001",
          "reason": "sensitive-or-unsupported-request",
          "transcriptIncluded": false,
          "status": "human-agent-required",
          "idempotencyKey": "chatbot:chat-evt-002:handoff",
          "createdAt": "2026-07-18T19:22:39.365Z"
        },
        "automatedReplySent": false
      }
    },
    {
      "name": "invalid",
      "status": 400,
      "payload": {
        "ok": false,
        "status": "invalid-conversation",
        "error": "Missing conversation fields: sessionId, botMode, promptVersion"
      }
    },
    {
      "name": "model-outage",
      "status": 503,
      "payload": {
        "ok": false,
        "status": "conversation-service-unavailable",
        "retryable": true,
        "error": "Model call failed after retries"
      }
    }
  ],
  "finalState": {
    "conversations": 3,
    "leads": 1,
    "handoffs": 1
  },
  "assertions": {
    "actualN8nWebhookExecuted": true,
    "consentedLeadCreated": true,
    "replayDeduplicated": true,
    "voiceMetadataVerified": true,
    "sensitiveActionHandedOff": true,
    "invalidReturned400": true,
    "modelOutageReturned503": true
  }
}
