Demo Booking
Data Entity
Description
Represents a demo request submitted by a prospective organization through the sales website booking form. Captures contact details, organizational context, scheduling preferences, and tracks the lifecycle of the booking from submission through confirmation and completion. Linked to a Lead record that consolidates all commercial pipeline data.
Data Structure
| Name | Type | Description | Constraints |
|---|---|---|---|
id |
uuid |
Globally unique identifier for the demo booking record | PKrequiredunique |
lead_id |
uuid |
Foreign key reference to the associated Lead record. A lead is created or matched before or alongside the booking to track the commercial pipeline entry | required |
contact_name |
string |
Full name of the person submitting the booking request | required |
contact_email |
string |
Email address of the submitting contact. Used for confirmation delivery and lead deduplication | required |
contact_phone |
string |
Phone number of the submitting contact. Optional but validated against E.164 or Norwegian format if provided | - |
organization_name |
string |
Name of the prospective organization requesting the demo | required |
contact_role |
string |
Job title or role of the submitting contact within their organization (e.g. IT Manager, CEO, Operations Lead) | - |
organization_size |
enum |
Approximate size bracket of the prospective organization, used for sales qualification and prioritization | - |
preferred_timing |
string |
Free-text or structured indication of the contact's preferred date, time, or availability window for the demo | - |
notes |
text |
Additional context, questions, or requirements submitted by the contact through the booking form | - |
status |
enum |
Lifecycle state of the demo booking from submission to outcome | required |
scheduled_at |
datetime |
Confirmed date and time of the scheduled demo session, set by the sales team after contact | - |
confirmed_by |
string |
Identifier or name of the Norse Digital Products sales team member who confirmed the booking | - |
confirmation_email_sent |
boolean |
Whether the automated confirmation email has been dispatched to the contact | required |
confirmation_email_sent_at |
datetime |
Timestamp when the confirmation email was successfully dispatched | - |
source_url |
string |
The referrer URL or UTM-tagged page URL from which the booking form was submitted, used for marketing attribution | - |
utm_source |
string |
UTM source parameter captured at submission for marketing attribution (e.g. google, linkedin) | - |
utm_medium |
string |
UTM medium parameter captured at submission (e.g. cpc, email, organic) | - |
utm_campaign |
string |
UTM campaign parameter captured at submission | - |
submitter_ip_hash |
string |
SHA-256 hash of the submitter's IP address, stored for rate-limit auditing and spam detection without retaining raw PII | - |
cancellation_reason |
text |
Optional reason recorded when a booking is cancelled, either by the contact or the sales team | - |
created_at |
datetime |
Timestamp when the booking record was created (form submission time) | required |
updated_at |
datetime |
Timestamp of the most recent update to this record | required |
Database Indexes
idx_demo_booking_lead_id
Columns: lead_id
idx_demo_booking_contact_email
Columns: contact_email
idx_demo_booking_status
Columns: status
idx_demo_booking_created_at
Columns: created_at
idx_demo_booking_status_created
Columns: status, created_at
Validation Rules
email_format_valid
error
Validation failed
required_fields_present
error
Validation failed
contact_name_min_length
error
Validation failed
phone_format_if_provided
error
Validation failed
notes_max_length
error
Validation failed
organization_name_min_length
error
Validation failed
status_enum_value
error
Validation failed
scheduled_at_must_be_future
error
Validation failed
Business Rules
lead_must_exist_before_booking
A Lead record must be created or matched by email before a DemoBooking is persisted. The booking-service creates the lead first, then links the booking to it. This ensures all pipeline entries are tracked even if the booking step fails.
confirmation_email_dispatched_on_create
Immediately after a booking record is persisted, the system must dispatch a confirmation email to contact_email and an internal notification to the sales team. The confirmation_email_sent flag is set to true and confirmation_email_sent_at is recorded only upon confirmed delivery.
rate_limit_per_ip
No more than 3 booking submissions may be accepted from the same IP address within a 15-minute rolling window. Submissions exceeding the limit receive a 429 response and are not persisted. The IP hash is stored for audit but the raw IP is not retained.
valid_status_transitions
Status transitions must follow the allowed lifecycle: pending → confirmed, pending → cancelled, confirmed → completed, confirmed → no_show, confirmed → cancelled. Direct transitions from pending to completed or no_show are not permitted.
scheduled_at_required_for_confirmed_status
When status is set to 'confirmed', scheduled_at must be provided and must be a future datetime. Confirming without a scheduled time is not allowed.
cancellation_reason_recommended_on_cancel
When status transitions to 'cancelled', a cancellation_reason should be recorded for sales process analysis. The absence of a reason is permitted but triggers a warning.