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

# Webhook

> Send demo events to custom webhooks for flexible integration with any system.

export const MediaCard = ({title = '', url, type = 'demo'}) => {
  const attributes = type === 'demo' ? {
    'data-navattic-open': url,
    'data-navattic-title': title
  } : {
    'data-video': url
  };
  return <div {...attributes} className="hidden md:inline-block w-auto cursor-pointer overflow-hidden rounded-lg border border-gray-200 dark:border-gray-700 shadow-sm">
<div className="flex items-center gap-3 bg-white dark:bg-gray-800 px-3 py-2">
<div className={`flex h-7 w-7 items-center justify-center rounded-md ${type === 'video' ? 'bg-blue-100 dark:bg-blue-900' : 'bg-orange-100 dark:bg-orange-900'}`} style={{
    backgroundColor: type === 'video' ? 'var(--video-bg)' : 'var(--demo-bg)'
  }}>
<Icon icon={type === 'video' ? 'circle-play' : 'square-mouse-pointer'} color={type === 'video' ? 'var(--video-icon)' : 'var(--demo-icon)'} />
</div>
<div>
<div className="text-sm font-medium text-gray-900 dark:text-gray-100">
{type === 'video' ? 'Watch video' : 'Try a demo'}
</div>
<div className="text-sm text-gray-500 dark:text-gray-400">{title}</div>
</div>
</div>
<style jsx>{`
  :root {
    --video-bg: #dbeafe;
    --video-icon: #2563eb;
    --demo-bg: #ffedd5;
    --demo-icon: #ea580c;
  }
  :global(.dark) {
    --video-bg: #1e3a8a;
    --video-icon: #60a5fa;
    --demo-bg: #7c2d12;
    --demo-icon: #fb923c;
  }
`}</style>
</div>;
};

<Frame>
  <img className="overflow-hidden rounded-xl border" src="https://mintcdn.com/navattic-app/KyLVfu_TECs3vwBD/images/webhook.png?fit=max&auto=format&n=KyLVfu_TECs3vwBD&q=85&s=f2bd638f4c704b7ca0784b2fd889f84f" alt="Webhook integration" width="1736" height="768" data-path="images/webhook.png" />
</Frame>

Integrating with Webhook allows you to process the raw event data from Navattic in any way you want. Navattic strives to minimize the changes to the Webhook integration, and if necessary will provide ample notice for any breaking changes.

Events will be sent to your Webhook setup whenever a Visitor session in your demo is marked as closed. The timestamp in each respective event will be an ISO-8601 formatted date-time string that signifies the closing time of the session. The event will also contain information about the session, including a list of the recorded events associated with the session, as well as the corresponding end-user the session relates to, and the company account, if any (company account can be null).

## Example payloads

The following examples show the structure of the `session_closed` payloads for visitor and account events.

```json Visitor event payload expandable theme={null}
{
  "eventType": "session_closed",
  "timestamp": "2026-07-14T18:32:05.000Z",
  "data": {
    "session": {
      "type": "INTERACTIVE_DEMO",
      "recordedGuideSessionId": "clx8f2k1a0003abcd12345678",
      "createdAt": "2026-07-14T18:20:11.000Z",
      "closedAt": "2026-07-14T18:32:05.000Z",
      "mostRecentDemoName": "Acme Product Tour",
      "mostRecentProjectId": "clx8f0aaa0001abcd12345678",
      "mostRecentShareLinkId": "clx8f0bbb0002abcd12345678",
      "recordedEvents": [
        {
          "id": "clx8f3xyz0004abcd12345678",
          "createdAt": "2026-07-14T18:20:12.000Z",
          "updatedAt": "2026-07-14T18:20:12.000Z",
          "type": "VIEW_STEP",
          "recordedStepId": "clx8f0ccc0005abcd12345678",
          "recordedStepIndex": 0,
          "recordedStepCommonId": "clx8f0ddd0006abcd12345678",
          "recordedStepName": "Welcome",
          "recordedFlowId": "clx8f0eee0007abcd12345678",
          "recordedFlowName": "Getting Started",
          "recordedProjectId": "clx8f0aaa0001abcd12345678",
          "recordedProjectName": "Acme Product Tour",
          "recordedChecklistId": "",
          "recordedChecklistName": "",
          "recordedTaskId": "",
          "recordedTaskName": "",
          "recordedInterestId": "",
          "recordedInterestName": "",
          "urlNavigated": "",
          "workspaceId": "clx8ezzzz0000abcd12345678",
          "projectId": "clx8f0aaa0001abcd12345678",
          "projectShareLinkId": "clx8f0bbb0002abcd12345678",
          "flowId": "clx8f0eee0007abcd12345678",
          "checklistId": null,
          "projectVersionId": "clx8f0fff0008abcd12345678",
          "projectLanguage": "EN",
          "guideId": "clx8f0ggg0009abcd12345678",
          "sessionId": "clx8f2k1a0003abcd12345678",
          "endUserId": "clx8f1hhh0010abcd12345678",
          "mobileId": null,
          "mobileVersionId": null
        }
      ]
    },
    "endUser": {
      "id": "clx8f1hhh0010abcd12345678",
      "createdAt": "2026-06-01T09:14:00.000Z",
      "updatedAt": "2026-07-14T18:32:05.000Z",
      "mostRecentEmail": "jane.doe@example.com",
      "mostRecentName": "Jane Doe",
      "mostRecentCompany": "Example Corp",
      "mostRecentCountry": "United States",
      "mostRecentCountryRegion": "California",
      "mostRecentCity": "San Francisco",
      "converted": true,
      "navigated": true,
      "engaged": true,
      "workspaceId": "clx8ezzzz0000abcd12345678",
      "sharedId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "companyAccountId": "clx8f4iii0011abcd12345678",
      "customPropertyValues": [
        {
          "propertyId": "clx8f6kkk0013abcd12345678",
          "value": "jane.doe@example.com",
          "createdAt": "2026-07-14T18:21:00.000Z",
          "source": "FORM",
          "property": {
            "id": "clx8f6kkk0013abcd12345678",
            "name": "Email",
            "object": "VISITOR"
          }
        }
      ],
      "recordedEvents": []
    },
    "companyAccount": {
      "id": "clx8f4iii0011abcd12345678",
      "createdAt": "2026-06-01T09:14:00.000Z",
      "updatedAt": "2026-07-14T18:32:05.000Z",
      "workspaceId": "clx8ezzzz0000abcd12345678",
      "name": "Example Corp",
      "websiteDomain": "example.com",
      "engaged": true,
      "description": "Example Corp builds widgets.",
      "linkedinUrl": "https://linkedin.com/company/example",
      "sector": "Information Technology",
      "industryGroup": "Software & Services",
      "industry": "Software",
      "subIndustry": "Application Software",
      "employeeCount": 250,
      "estimatedAnnualRevenue": "50000000",
      "amountRaised": "12000000",
      "trafficRank": "high",
      "foundedYear": 2015,
      "city": "San Francisco",
      "state": "CA",
      "country": "US",
      "postalCode": "94105",
      "technologies": "react,aws",
      "clearbitConfidence": null,
      "customPropertyValues": []
    }
  }
}
```

```json Account event payload expandable theme={null}
{
  "eventType": "session_closed",
  "timestamp": "2026-07-14T18:32:05.000Z",
  "data": {
    "id": "clx8f4iii0011abcd12345678",
    "createdAt": "2026-06-01T09:14:00.000Z",
    "updatedAt": "2026-07-14T18:32:05.000Z",
    "workspaceId": "clx8ezzzz0000abcd12345678",
    "name": "Example Corp",
    "websiteDomain": "example.com",
    "engaged": true,
    "description": "Example Corp builds widgets.",
    "linkedinUrl": "https://linkedin.com/company/example",
    "sector": "Information Technology",
    "industryGroup": "Software & Services",
    "industry": "Software",
    "subIndustry": "Application Software",
    "employeeCount": 250,
    "estimatedAnnualRevenue": "50000000",
    "amountRaised": "12000000",
    "trafficRank": "high",
    "foundedYear": 2015,
    "city": "San Francisco",
    "state": "CA",
    "country": "US",
    "postalCode": "94105",
    "technologies": "react,aws",
    "clearbitConfidence": null,
    "customPropertyValues": [
      {
        "propertyId": "clx8f7lll0014abcd12345678",
        "value": "Enterprise",
        "createdAt": "2026-07-14T18:21:00.000Z",
        "source": "ENRICHMENT",
        "property": {
          "id": "clx8f7lll0014abcd12345678",
          "name": "Plan Tier",
          "object": "ACCOUNT"
        }
      }
    ]
  }
}
```

## Payload reference

There are two webhook action types, which share the same envelope but differ in what `data` contains:

* **Visitor event** — the full session, visitor, and account details
* **Account event** — the company account details only

All timestamps are ISO 8601 strings. Large numeric values (e.g. `estimatedAnnualRevenue`) are sent as strings.

### Top-level envelope

| Field       | Type   | Description                                                                                                                      |
| ----------- | ------ | -------------------------------------------------------------------------------------------------------------------------------- |
| `eventType` | string | The type of event. Currently always `session_closed`.                                                                            |
| `timestamp` | string | When the session closed.                                                                                                         |
| `data`      | object | The event body. For visitor events: `{ session, endUser, companyAccount }`. For account events: the company account object only. |

### `data.session` — the demo session

Fields common to all sessions:

| Field                | Type   | Description                                                                                 |
| -------------------- | ------ | ------------------------------------------------------------------------------------------- |
| `type`               | string | `INTERACTIVE_DEMO` or `AGENT_DEMO`.                                                         |
| `createdAt`          | string | When the session started.                                                                   |
| `closedAt`           | string | When the session ended.                                                                     |
| `mostRecentDemoName` | string | Name of the demo the visitor viewed.                                                        |
| `recordedEvents`     | array  | The activity events recorded during this session (see [Recorded events](#recorded-events)). |

Additional fields for interactive demo sessions (`type: INTERACTIVE_DEMO`):

| Field                    | Type   | Description                                                                                                                     |
| ------------------------ | ------ | ------------------------------------------------------------------------------------------------------------------------------- |
| `recordedGuideSessionId` | string | Unique ID of the session.                                                                                                       |
| `mostRecentProjectId`    | string | ID of the demo (project) the visitor viewed most recently.                                                                      |
| `mostRecentShareLinkId`  | string | ID of the share link used to open the demo, if any.                                                                             |
| `shareLink`              | object | Present when the session came from a share link: `{ id, createdBy: { id, email } }` — the link and the teammate who created it. |

Additional fields for AI agent demo sessions (`type: AGENT_DEMO`):

| Field                | Type   | Description                          |
| -------------------- | ------ | ------------------------------------ |
| `agentDemoSessionId` | string | Unique ID of the agent demo session. |
| `agentDemoId`        | string | ID of the agent demo.                |

### `data.endUser` — the visitor

| Field                     | Type           | Description                                                                                            |
| ------------------------- | -------------- | ------------------------------------------------------------------------------------------------------ |
| `id`                      | string         | Unique visitor ID.                                                                                     |
| `createdAt`               | string         | When the visitor was first seen.                                                                       |
| `updatedAt`               | string         | When the visitor record was last updated.                                                              |
| `sharedId`                | string         | Stable visitor identifier used across sessions.                                                        |
| `workspaceId`             | string         | ID of the Navattic workspace the visitor belongs to.                                                   |
| `companyAccountId`        | string \| null | ID of the company account the visitor is matched to, if any.                                           |
| `mostRecentEmail`         | string         | Visitor's most recently captured email address.                                                        |
| `mostRecentName`          | string         | Visitor's most recently captured name.                                                                 |
| `mostRecentCompany`       | string         | Visitor's most recently captured company name.                                                         |
| `mostRecentCountry`       | string         | Country from the visitor's most recent session.                                                        |
| `mostRecentCountryRegion` | string         | State/region from the visitor's most recent session.                                                   |
| `mostRecentCity`          | string         | City from the visitor's most recent session.                                                           |
| `converted`               | boolean        | Whether the visitor has ever converted (e.g. clicked a CTA).                                           |
| `navigated`               | boolean        | Whether the visitor has ever navigated through a demo.                                                 |
| `engaged`                 | boolean        | Whether the visitor has ever engaged with a demo.                                                      |
| `customPropertyValues`    | array          | Custom property values set on the visitor (see [Custom property values](#custom-property-values)).     |
| `recordedEvents`          | array          | The session's activity events, mirrored here for convenience (same shape as `session.recordedEvents`). |

### `data.companyAccount` — the account

`null` on visitor events when no account could be matched (or account info is unavailable for the visitor). This object is the entire `data` payload for account events.

| Field                    | Type           | Description                                                                                        |
| ------------------------ | -------------- | -------------------------------------------------------------------------------------------------- |
| `id`                     | string         | Unique account ID.                                                                                 |
| `createdAt`              | string         | When the account was first seen.                                                                   |
| `updatedAt`              | string         | When the account record was last updated.                                                          |
| `workspaceId`            | string         | ID of the Navattic workspace the account belongs to.                                               |
| `websiteDomain`          | string         | The account's website domain (e.g. `acme.com`).                                                    |
| `name`                   | string \| null | Company name.                                                                                      |
| `engaged`                | boolean        | Whether anyone from the account has engaged with a demo.                                           |
| `description`            | string \| null | Company description (from enrichment).                                                             |
| `linkedinUrl`            | string \| null | Company LinkedIn URL.                                                                              |
| `sector`                 | string \| null | Company sector.                                                                                    |
| `industryGroup`          | string \| null | Industry group.                                                                                    |
| `industry`               | string \| null | Industry.                                                                                          |
| `subIndustry`            | string \| null | Sub-industry.                                                                                      |
| `employeeCount`          | number \| null | Estimated employee count.                                                                          |
| `estimatedAnnualRevenue` | string \| null | Estimated annual revenue.                                                                          |
| `amountRaised`           | string \| null | Total funding raised.                                                                              |
| `trafficRank`            | string \| null | Website traffic rank.                                                                              |
| `foundedYear`            | number \| null | Year the company was founded.                                                                      |
| `city`                   | string \| null | Company HQ city.                                                                                   |
| `state`                  | string \| null | Company HQ state.                                                                                  |
| `country`                | string \| null | Company HQ country.                                                                                |
| `postalCode`             | string \| null | Company HQ postal code.                                                                            |
| `technologies`           | string \| null | Technologies detected on the company's website.                                                    |
| `clearbitConfidence`     | string \| null | Confidence level of the enrichment match.                                                          |
| `customPropertyValues`   | array          | Custom property values set on the account (see [Custom property values](#custom-property-values)). |

### Custom property values

Each entry in `endUser.customPropertyValues` and `companyAccount.customPropertyValues`:

| Field        | Type   | Description                                                                                                                                       |
| ------------ | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| `propertyId` | string | ID of the custom property.                                                                                                                        |
| `value`      | string | The property value.                                                                                                                               |
| `createdAt`  | string | When the value was set.                                                                                                                           |
| `source`     | string | How the value was captured: `FORM`, `IDENTIFY`, `QUERY_PARAMS`, `REDUCER`, `SHARE_LINK`, `PRESENTATION`, `ENRICHMENT`, `INTEGRATION`, or `OTHER`. |
| `property`   | object | The property definition: `{ id, name, object }`, where `object` is `END_USER` or `COMPANY_ACCOUNT`.                                               |

### Recorded events

Each entry in `session.recordedEvents` (and mirrored in `endUser.recordedEvents`) is one activity event from the session:

| Field                                           | Type           | Description                                                                                                                                                                                               |
| ----------------------------------------------- | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`                                            | string         | Unique event ID.                                                                                                                                                                                          |
| `createdAt` / `updatedAt`                       | string         | When the event occurred / was last updated.                                                                                                                                                               |
| `type`                                          | string         | Event type: `VIEW_STEP`, `START_FLOW`, `COMPLETE_FLOW`, `START_CHECKLIST`, `OPEN_CHECKLIST`, `CLOSE_CHECKLIST`, `IDENTIFY_USER`, `ENGAGE`, `CONVERTED`, `NAVIGATE`, `COMPLETE_TASK`, or `SESSION_CLOSED`. |
| `recordedStepId`                                | string         | ID of the demo step the event occurred on.                                                                                                                                                                |
| `recordedStepIndex`                             | number         | Position of the step within its flow.                                                                                                                                                                     |
| `recordedStepCommonId`                          | string         | Stable step identifier shared across demo versions.                                                                                                                                                       |
| `recordedStepName`                              | string         | Name of the step.                                                                                                                                                                                         |
| `recordedFlowId` / `recordedFlowName`           | string         | ID and name of the flow.                                                                                                                                                                                  |
| `recordedProjectId` / `recordedProjectName`     | string         | ID and name of the demo (project).                                                                                                                                                                        |
| `recordedChecklistId` / `recordedChecklistName` | string         | ID and name of the checklist, for checklist events.                                                                                                                                                       |
| `recordedTaskId` / `recordedTaskName`           | string         | ID and name of the checklist task, for task events.                                                                                                                                                       |
| `recordedInterestId` / `recordedInterestName`   | string         | ID and name of the interest, for interest-driven demos.                                                                                                                                                   |
| `urlNavigated`                                  | string         | Destination URL, for `NAVIGATE` events.                                                                                                                                                                   |
| `workspaceId`                                   | string         | ID of the Navattic workspace.                                                                                                                                                                             |
| `projectId`                                     | string \| null | ID of the demo the event belongs to.                                                                                                                                                                      |
| `projectShareLinkId`                            | string \| null | ID of the share link the session came from.                                                                                                                                                               |
| `flowId`                                        | string \| null | ID of the flow the event belongs to.                                                                                                                                                                      |
| `checklistId`                                   | string \| null | ID of the checklist the event belongs to.                                                                                                                                                                 |
| `projectVersionId`                              | string \| null | ID of the published demo version being viewed.                                                                                                                                                            |
| `projectLanguage`                               | string \| null | Language of the demo version being viewed.                                                                                                                                                                |
| `guideId`                                       | string \| null | ID of the guide shown during the event.                                                                                                                                                                   |
| `sessionId`                                     | string \| null | ID of the session the event belongs to.                                                                                                                                                                   |
| `endUserId`                                     | string         | ID of the visitor who triggered the event.                                                                                                                                                                |
| `mobileId` / `mobileVersionId`                  | string \| null | IDs of the mobile demo and version, for mobile demos.                                                                                                                                                     |

### Request headers

| Header          | Value                                                                                |
| --------------- | ------------------------------------------------------------------------------------ |
| `Content-Type`  | `application/json`                                                                   |
| `User-Agent`    | `navattic-tour`                                                                      |
| `Authorization` | Only sent when configured on the webhook: `Basic <credentials>` or `Bearer <token>`. |

## Testing

A free service like [webhook.site](https://webhook.site/) can be an easy way to get started and test the Webhook integration.

<Info>
  Webhook.site is a public webhook testing service, so it is recommended only to send test data when
  using this, as you could inadvertently expose customer event data.
</Info>

<MediaCard url="https://www.loom.com/embed/2978ceea6b674b27a90b09dba2cab312?sid=f5aa0602-6ac8-49a1-9385-07f7c6818f98" type="video" title="Segment and Webhook" />

## Opportunity owner fields

When a Launchpad presentation is connected to a Salesforce opportunity, the webhook payload includes two additional fields for the opportunity owner:

| Field                   | Description                                                   |
| ----------------------- | ------------------------------------------------------------- |
| `opportunityOwnerEmail` | Email address of the Salesforce user who owns the opportunity |
| `opportunityOwnerId`    | Salesforce user ID of the opportunity owner                   |

These fields let you route webhook events to the right rep — for example, triggering a Slack notification or Zapier workflow that notifies the opportunity owner when their prospect views a demo.

## Send data to Zapier using Webhook

Sending webhook events to Zapier allows you further filter and format the data within Zapier before sending it to additional destinations like Google Sheets, Gmail, Notion, or more. This [setup demo](https://training.navattic.com/ss60pxn) includes all the steps you need to send data from Navattic to Zapier.

<MediaCard url="https://training.navattic.com/ss60pxn" type="demo" title="Zapier Setup" />

<Info>
  Use the Webhook integration to integrate with a Zapier workflow using a Zap URL. Learn more about
  triggering [Zaps from
  webhooks](https://help.zapier.com/hc/en-us/articles/8496288690317-Trigger-Zaps-from-webhooks).
</Info>
