> ## Documentation Index
> Fetch the complete documentation index at: https://docs.apten.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Session Converted

> Get notified when a webchat session is converted into a lead.

The `webchat.session.converted` webhook event is triggered when a webchat session is
converted into a lead. This is the event that bridges the webchat session identity space
(`sessionId`) with the lead identity space (`leadId`) — subscribe to it if you need to
correlate webchat activity with downstream lead events.

## Payload

```json theme={null}
{
  "event": "webchat.session.converted",
  "data": {
    "sessionId": "550e8400-e29b-41d4-a716-446655440000",
    "orgId": "org-abc123",
    "profile": "Default Profile",
    "origin": "https://example.com/pricing",
    "leadId": "a7e92c5d-f301-4b89-ae16-8f35d02cx9z",
    "conversionType": "auto",
    "firstName": "Jane",
    "lastName": "Doe",
    "phone": "+12025550189",
    "email": "jane@example.com",
    "summary": "Visitor asked about annual pricing and requested a follow-up."
  },
  "timestamp": "2024-01-15T14:30:00Z"
}
```

## Properties

| Property              | Type   | Description                                                                                     |
| --------------------- | ------ | ----------------------------------------------------------------------------------------------- |
| `event`               | string | The webhook event type (`webchat.session.converted`).                                           |
| `data.sessionId`      | string | The unique identifier for the webchat session.                                                  |
| `data.orgId`          | string | The Apten organization ID that owns the session.                                                |
| `data.profile`        | string | The name of the webchat profile that handled the session.                                       |
| `data.origin`         | string | The URL of the page where the webchat widget was opened. Only included if set.                  |
| `data.leadId`         | string | The Apten lead ID created from the converted session. Use this to correlate with lead webhooks. |
| `data.conversionType` | string | How the session was converted: `auto` (automatic) or `tool` (triggered by an agent tool).       |
| `data.firstName`      | string | The lead's first name. Only included if available.                                              |
| `data.lastName`       | string | The lead's last name. Only included if available.                                               |
| `data.phone`          | string | The lead's phone number. Only included if available.                                            |
| `data.email`          | string | The lead's email address. Only included if available.                                           |
| `data.summary`        | string | An AI-generated summary of the webchat conversation. Only included if available.                |
| `timestamp`           | string | The ISO 8601 timestamp when the webhook was sent.                                               |
