core PK: id 10 required 1 unique

Description

Records demo booking requests submitted by prospective organizations through the Meander sales website. Each booking captures the requested demo details, scheduling preferences, and links to the lead who submitted the request.

19
Attributes
6
Indexes
8
Validation Rules
10
CRUD Operations

Data Structure

Name Type Description Constraints
id uuid Unique identifier for the demo booking record
PKrequiredunique
lead_id uuid Foreign key referencing the lead who submitted the booking request
required
status enum Current status of the demo booking in its lifecycle
required
preferred_date datetime The prospective organization's preferred date and time for the demo
required
alternative_date datetime Optional second-choice date and time for the demo
-
confirmed_date datetime The finalized demo date after sales team confirmation
-
organization_name string Name of the prospective organization requesting the demo
required
organization_size enum Approximate size of the prospective organization
-
contact_name string Full name of the person requesting the demo
required
contact_email string Email address of the person requesting the demo
required
contact_phone string Phone number of the person requesting the demo
-
message text Free-text message or specific questions from the prospective organization
-
interest_areas json Array of platform areas the prospect is most interested in seeing demonstrated
-
referral_source string How the prospect found out about Meander (e.g., search, referral, conference)
-
confirmation_email_sent boolean Whether the automated confirmation email was successfully dispatched
required
internal_notes text Private notes from the Norse Digital Products sales team
-
submitted_ip string IP address of the form submission, used for rate limiting and spam prevention
-
created_at datetime Timestamp when the booking was submitted
required
updated_at datetime Timestamp of the last update to the booking record
required

Database Indexes

idx_demo_bookings_lead_id
btree

Columns: lead_id

idx_demo_bookings_status
btree

Columns: status

idx_demo_bookings_preferred_date
btree

Columns: preferred_date

idx_demo_bookings_created_at
btree

Columns: created_at

idx_demo_bookings_contact_email
btree

Columns: contact_email

idx_demo_bookings_submitted_ip
btree

Columns: submitted_ip

Validation Rules

contact_email_format error

Validation failed

contact_name_not_empty error

Validation failed

organization_name_not_empty error

Validation failed

phone_format_validation error

Validation failed

message_length_limit error

Validation failed

interest_areas_valid_json_array warning

Validation failed

alternative_date_differs_from_preferred warning

Validation failed

input_sanitization error

Validation failed

Business Rules

lead_required_before_booking
on_create

A lead record must exist or be created atomically before a demo booking can be persisted. The booking service upserts the lead by email before inserting the booking.

rate_limit_per_ip
on_create

Maximum 5 demo booking submissions per IP address within a 1-hour window to prevent spam and abuse.

rate_limit_per_email
on_create

Maximum 3 demo booking submissions per email address within a 24-hour window to prevent duplicate requests.

Enforced by: Booking Service
confirmation_email_dispatch
on_create

A branded confirmation email must be sent asynchronously to the contact email after a booking is successfully created. Delivery failures are logged but do not block the booking.

status_transition_constraints
on_update

Status can only transition forward: pending→confirmed→completed, pending→cancelled, confirmed→cancelled, confirmed→no_show. Completed/cancelled/no_show are terminal states.

Enforced by: Booking Service
confirmed_date_required_on_confirmation
on_update

When status transitions to 'confirmed', the confirmed_date field must be set with a valid future datetime.

Enforced by: Booking Service
preferred_date_must_be_future
on_create

The preferred_date must be at least 1 business day in the future at the time of submission to allow scheduling.

Storage Configuration

Storage Type
primary_table
Location
main_db
Partitioning
No Partitioning
Retention
Permanent Storage