VantageKitVantageKit Docs

Get Notified When Someone Views Your Deal Room

Set up webhooks to receive real-time alerts when prospects view your documents.

This is the most common VantageKit integration — know the moment a prospect opens your deal room so you can follow up at exactly the right time.

What you'll build

A webhook endpoint that receives deal_room.viewed events and can trigger actions like:

  • Sending a Slack notification to your sales team
  • Updating your CRM with engagement data
  • Triggering a follow-up email sequence

Prerequisites

  • A VantageKit account on the Scale plan
  • A publicly accessible HTTPS endpoint (see testing locally if you're developing)

1. Create your webhook endpoint

Build a simple Express.js server that receives and verifies webhook events:

server.js
import express from 'express'
import crypto from 'node:crypto'

const app = express()
app.use(express.raw({ type: 'application/json' }))

const WEBHOOK_SECRET = process.env.VANTAGEKIT_WEBHOOK_SECRET

app.post('/webhooks/vantagekit', (req, res) => {
  // 1. Verify the signature
  const signature = req.headers['x-vantagekit-signature']
  const timestamp = req.headers['x-vantagekit-timestamp']
  const body = req.body.toString()

  const expected = crypto
    .createHmac('sha256', WEBHOOK_SECRET)
    .update(`${timestamp}.${body}`)
    .digest('hex')

  const isValid = crypto.timingSafeEqual(
    Buffer.from(signature.replace('sha256=', '')),
    Buffer.from(expected)
  )

  if (!isValid) {
    return res.status(401).send('Invalid signature')
  }

  // 2. Reject stale timestamps (> 5 minutes old)
  const age = Math.floor(Date.now() / 1000) - Number(timestamp)
  if (age > 300) {
    return res.status(401).send('Timestamp too old')
  }

  // 3. Process the event
  const event = JSON.parse(body)

  if (event.type === 'deal_room.viewed') {
    const { dealRoomId, viewerEmail, duration, timestamp: viewTime } = event.data
    console.log(`${viewerEmail ?? 'Anonymous'} viewed deal room ${dealRoomId}`)

    // Send to Slack, update CRM, etc.
  }

  res.status(200).send('OK')
})

app.listen(3000)

2. Register the webhook in VantageKit

  1. Go to Settings > Webhooks in your dashboard
  2. Click Create Webhook Endpoint
  3. Enter your endpoint URL (e.g., https://yourapp.com/webhooks/vantagekit)
  4. Select the events you want: deal_room.viewed, document.viewed
  5. Copy the signing secret — you'll need it to verify signatures

For complete viewer tracking, subscribe to these events:

EventWhen it fires
deal_room.viewedSomeone views any page in the deal room
document.viewedSomeone views a specific document (includes pages viewed and duration)
viewer.identifiedA viewer is identified by email or name
viewer.email_capturedA viewer enters their email (e.g., via email gate)
document.downloadedA viewer downloads a document

See the full event catalog for all 21 event types and their payloads.

On this page