core PK: id 8 required 1 unique

Description

Records demo requests submitted by prospective organizations through the Sales Website booking form. Captures contact details, organization information, and scheduling preferences, then triggers confirmation emails and webhook notifications to the sales team.

20
Attributes
5
Indexes
6
Validation Rules
6
CRUD Operations

Data Structure

Name Type Description Constraints
id uuid Primary key
PKrequiredunique
organization_name string Name of the prospective organization requesting the demo
required
organization_id uuid FK to organizations if the requester is an existing tenant; null for net-new prospects
-
contact_name string Full name of the person submitting the request
required
contact_email string Email address for booking confirmation and follow-up
required
contact_phone string Optional phone number for the sales team to reach the requester
-
organization_size enum Approximate number of peer mentors / members in the prospective organization
-
preferred_date datetime Requester's preferred date and time for the demo (UTC)
-
message text Free-text message from the requester describing their needs or questions
-
status enum Lifecycle state of the booking request
required
confirmation_sent_at datetime Timestamp when the confirmation email was dispatched to the requester
-
webhook_delivered_at datetime Timestamp when the webhook notification was successfully delivered to the sales team endpoint
-
webhook_attempts integer Number of webhook delivery attempts made; used for retry logic
required
source_url string The Sales Website page URL from which the booking form was submitted (for attribution)
-
utm_source string UTM source parameter captured at form submission for marketing attribution
-
utm_medium string UTM medium parameter captured at form submission
-
utm_campaign string UTM campaign parameter captured at form submission
-
ip_address string Anonymized IP address of the submitter for spam/abuse detection (last octet zeroed)
-
created_at datetime Timestamp when the booking record was created (UTC)
required
updated_at datetime Timestamp of the last status change or update
required

Database Indexes

idx_demo_bookings_status
btree

Columns: status

idx_demo_bookings_contact_email
btree

Columns: contact_email

idx_demo_bookings_created_at
btree

Columns: created_at

idx_demo_bookings_organization_id
btree

Columns: organization_id

idx_demo_bookings_webhook_delivered_at
btree

Columns: webhook_delivered_at

Validation Rules

contact_email_format error

Validation failed

organization_name_not_empty error

Validation failed

contact_name_not_empty error

Validation failed

message_max_length error

Validation failed

valid_status_transition error

Validation failed

ip_address_anonymization error

Validation failed

Business Rules

confirmation_email_on_create
on_create

A confirmation email must be sent to contact_email immediately after a booking record is successfully created

webhook_notification_on_create
on_create

A webhook POST must be dispatched to the configured sales team endpoint when a new booking is created; retried up to 5 times with exponential backoff if delivery fails

Enforced by: BookingWebhookHandler
no_delete_of_bookings
on_delete

Demo booking records must not be hard-deleted; they serve as a lead audit trail. Status transitions to 'cancelled' are the only allowed terminal state change.

preferred_date_must_be_future
on_create

If provided, preferred_date must be at least 24 hours in the future at the time of submission

rate_limit_per_email
on_create

The same contact_email may not submit more than 3 pending booking requests within a 7-day window to prevent spam

Storage Configuration

Storage Type
primary_table
Location
main_db
Partitioning
by_date
Retention
archive_after_1year