Booking Services

Booking Services

Booking Service Documentation

Table of Contents


Overview

The Booking Service is a comprehensive appointment management system that allows you to:

  • Create and manage booking services for your business

  • Schedule appointments with automated reminders

  • Track booking status through the entire lifecycle

  • Send automated follow-ups after appointments

  • Integrate with your chatbot workflows

Important: Booking services are shared across all bots in your workspace, with a maximum limit of 20 booking services.


Key Features

1. Booking Services

  • Define different types of appointments (consultations, meetings, services, etc.)

  • Set default duration for each service type

  • Configure custom service identifiers (Service UID)

  • Enable/disable services as needed

2. Automated Reminders

  • Set up to 5 reminder sequences per service

  • Configure reminder timing (days, hours, minutes before appointment)

  • Customize reminder messages

  • Automatic reminder triggering based on scheduled time

3. Automated Follow-ups

  • Set up to 5 follow-up sequences per service

  • Send follow-ups after completed or no-show appointments

  • Configure follow-up timing (days, hours, minutes after appointment)

  • Customize follow-up messages

4. Booking Status Management

Track bookings through their complete lifecycle:

  • Pending: Initial booking state

  • Confirmed: Booking has been confirmed

  • In Progress: Meeting/appointment has started

  • Completed: Successfully completed

  • Cancelled: Booking was cancelled

  • No Show: Customer didn't attend

  • Inactive: Service is no longer active

5. Booking Information

  • Start and end times

  • Duration (in minutes)

  • Location details

  • Source tracking

  • Custom metadata

  • Rating system (0-5 stars)

  • Cancellation/reschedule reasons

  • Complete audit logs


Getting Started

Prerequisites

  • workspace account with Ticket/Lists/Bookings addon enabled

  • Access to booking service management

  • Basic understanding of your workspace timezone

Initial Setup Steps

  1. Navigate to Booking Services

    • Go to your workspace settings

    • Select "Booking Services" from the menu

  2. Create Your First Booking Service

    • Click the "+ Booking Service" button

    • Fill in the required information

    • Configure reminders and follow-ups

    • Save your service

  3. Integrate with Chatbot

    • Use the Service UID to reference the service in your bot flows

    • Configure triggers for booking events

    • Set up automated responses


How It Works

System Architecture

The booking system operates on a scheduled job basis:

  1. Booking Creation: When a booking is created, the system automatically generates reminder and follow-up schedules based on your configuration.

  2. Reminder Processing:

    • Runs every minute

    • Checks for pending reminders within a 2-hour window

    • Sends reminders and updates status to "sent"

  3. Meeting Events:

    • Meeting Start: Automatically triggered when the start time is reached

    • Meeting End: Automatically triggered when the end time is reached

  4. Follow-up Processing:

    • Scheduled after booking completion or no-show

    • Runs on the same schedule as reminders

    • Only sends for completed or no-show bookings


Setting Up Booking Services

Step 1: Create a Booking Service

Required Fields:

  • Name: Display name for your service (max 100 characters)

  • Service UID: Unique identifier using alphanumeric characters (max 50 characters)

    • Cannot be changed after creation

    • Example: consultation_30min, demo_call, support_session

  • Description: Detailed description (max 1,000 characters)

  • Default Duration: Duration in minutes (0-1000)

  • Status: Active or Inactive

Step 2: Configure Reminders

For each reminder:

  1. Sequence Number: Automatically assigned (1-5)

  2. Title: Short description (max 50 characters)

  3. Description: Detailed message (max 500 characters)

  4. Timing: Set when to send the reminder

    • Days before start time

    • Hours before start time

    • Minutes before start time

  5. Status: Active or Inactive

Example Reminder Configuration:

Reminder 1: - Title: "Appointment Tomorrow" - Days: 1, Hours: 0, Minutes: 0 - Description: "Your appointment is tomorrow at [TIME]" Reminder 2: - Title: "Appointment in 1 Hour" - Days: 0, Hours: 1, Minutes: 0 - Description: "Your appointment starts in 1 hour"

Step 3: Configure Follow-ups

For each follow-up:

  1. Sequence Number: Automatically assigned (1-5)

  2. Title: Short description (max 50 characters)

  3. Description: Detailed message (max 500 characters)

  4. Timing: Set when to send the follow-up

    • Days after end time

    • Hours after end time

    • Minutes after end time

  5. Status: Active or Inactive

Example Follow-up Configuration:

Follow-up 1: - Title: "How was your appointment?" - Days: 0, Hours: 2, Minutes: 0 - Description: "We'd love to hear about your experience" Follow-up 2: - Title: "Follow-up Survey" - Days: 1, Hours: 0, Minutes: 0 - Description: "Please take a moment to complete our survey"

Managing Bookings

Creating a Booking

Required Information:

  • Service UID or Booking Service ID

  • Start time (in workspace timezone)

  • Initial status (Pending or Confirmed)

Optional Information:

  • Custom duration (overrides default)

  • Location (max 1,000 characters)

  • Source (max 100 characters)

  • Metadata (max 5,000 characters)

  • Notes (max 1,000 characters)

Important Notes:

  • Start time must be in the future

  • Reminders are automatically scheduled

Booking Actions

1. Confirm Booking

  • Changes status from Pending to Confirmed

  • Only available for pending bookings

  • Dispatches BOOKING_CONFIRMED event

2. Reschedule Booking

  • Updates start time, end time, and duration

  • Can change status to Pending or Confirmed

  • Preserves already-sent reminders

  • Reschedules remaining reminders

  • Requires reschedule reason (max 500 characters)

Restrictions:

  • Cannot reschedule in-progress bookings

  • Cannot reschedule final state bookings (cancelled, completed, no-show)

3. Cancel Booking

  • Changes status to Cancelled

  • Cancels all pending reminders and follow-ups

  • Requires cancellation reason (max 500 characters)

  • Cannot cancel final state bookings

4. Mark as Completed

  • Changes status to Completed

  • Skips any unsent reminders

  • Schedules follow-up messages

  • Cannot complete final state bookings

5. Mark as No Show

  • Changes status to No Show

  • Skips any unsent reminders

  • Schedules follow-up messages (same as completed)

  • Cannot mark final state bookings as no-show

6. Update Rating

  • Set rating from 0-5 stars

  • Can be updated at any time

  • Logs the rating change

7. Update Booking Details

  • Modify location, source, or metadata

  • Does not affect status or schedule

8. Delete Booking

  • Permanently removes the booking

  • Deletes all associated reminders, follow-ups, and logs

  • Cannot be undone


Reminders and Followups

Reminder Behavior

Scheduling:

  • Created when booking is created

  • Calculated as: start_time - (days + hours + minutes)

  • Status set to "pending" if in future, "skipped" if in past

Sending:

  • Reminders are sent when scheduled time is reached

  • Status changes to "sent"

  • Records sent timestamp

  • Triggers REMINDER_SENDING event

Statuses:

  • Pending: Waiting to be sent

  • Sent: Successfully delivered

  • Skipped: Not sent (time passed or booking cancelled)

  • Cancelled: Booking was cancelled

Rescheduling:

  • Only unsent reminders are rescheduled

  • Sent reminders are preserved

  • New scheduled times are calculated

Follow-up Behavior

Scheduling:

  • Only created when booking is marked as Completed or No Show

  • Calculated as: end_time + (days + hours + minutes)

  • Status set to "pending" if in future, "skipped" if in past

Sending:

  • Follow-ups are sent when scheduled time is reached

  • Status changes to "sent"

  • Records sent timestamp

  • Triggers FOLLOWUP_SENDING event

Important:

  • Follow-ups are NOT created at booking time

  • They are only scheduled after completion or no-show

  • Cancelled bookings do not receive follow-ups


Booking Lifecycle

State Transitions

Created → Pending → Confirmed → In Progress → Completed ↓ ↓ Cancelled No Show

Event Flow

  1. BOOKING_CREATED: Initial booking creation

  2. BOOKING_CONFIRMED: Booking confirmed by user or system

  3. REMINDER_SENDING: Each reminder as it's sent

  4. MEETING_STARTED: Start time reached

  5. MEETING_ENDED: End time reached (auto-completes booking)

  6. BOOKING_COMPLETED: Manually or automatically completed

  7. BOOKING_NO_SHOW: Marked as no-show

  8. FOLLOWUP_SENDING: Each follow-up as it's sent

  9. UPDATE_RATING: Rating updated

  10. BOOKING_RESCHEDULED: Booking time changed

  11. BOOKING_CANCELLED: Booking cancelled

Automatic Status Changes

  • Pending/Confirmed → In Progress: When start_time is reached

  • In Progress → Completed: When end_time is reached (via automatic process)


API Actions

Service Management

  • list_booking_services: Get all booking services

  • get_booking_service: Get specific service details

  • list_booking_service_reminders: Get reminders for a service

  • list_booking_service_followups: Get follow-ups for a service

Booking Management

  • list_bookings: Get bookings (filtered by user, service, status)

  • get_booking: Get specific booking details

  • create_booking: Create new booking

  • confirm_booking: Confirm pending booking

  • reschedule_booking: Change booking time

  • cancel_booking: Cancel booking

  • mark_booking_completed: Mark as completed

  • mark_booking_no_show: Mark as no-show

  • update_booking_rating: Update rating

Parameters

Common Parameters:

  • bot_user_ns: Bot user identifier (for testing)

  • service_uid: Unique service identifier

  • booking_id: Specific booking ID

Booking Creation:

  • start_time: ISO 8601 format UTC (e.g., "2020-01-02T12:30:00Z")

  • duration: Minutes (optional, uses default if not specified)

  • pending_or_confirmed: Initial status

  • location: Appointment location

  • source: Booking source

  • metadata: Custom data (JSON string)

  • notes: Additional notes

Status Updates:

  • reschedule_reason: Reason for rescheduling (max 500 chars)

  • cancel_reason: Reason for cancellation (max 500 chars)

  • rating: Number between 0-5


Sequence Diagrams

Booking Creation Flow

User → System: Create Booking Request System → Database: Create booking record System → Database: Generate reminder schedules System → Database: Save reminder records System → EventDispatcher: Dispatch BOOKING_CREATED EventDispatcher → Triggers: Process configured triggers System → User: Return booking confirmation

Reminder Processing Flow

CronJob → System: Run reminder processor (every minute) System → Database: Query pending reminders (2-hour window) Database → System: Return pending reminders System → Validator: Check booking status Validator → System: Validate service is active System → BotUser: Retrieve bot user details System → EventDispatcher: Dispatch REMINDER_SENDING event EventDispatcher → Triggers: Execute reminder flow System → Database: Update reminder status to 'sent' System → Database: Record sent timestamp

Booking Completion Flow

User/System → System: Mark booking complete System → Database: Update booking status to 'completed' System → Database: Skip unsent reminders System → Database: Calculate follow-up schedules System → Database: Create follow-up records System → EventDispatcher: Dispatch BOOKING_COMPLETED EventDispatcher → Triggers: Process completion triggers System → User: Return success response

Meeting Start/End Automation

CronJob → System: Run booking processor (every minute) System → Database: Query bookings with start_time reached Database → System: Return matching bookings System → EventDispatcher: Dispatch MEETING_STARTED event System → Database: Update status to 'in_progress' [Later...] System → Database: Query bookings with end_time reached Database → System: Return matching bookings System → EventDispatcher: Dispatch MEETING_ENDED event System → Database: Update status to 'completed' System → Database: Schedule follow-ups

Reschedule Flow

User → System: Reschedule request System → Validator: Check booking status Validator → System: Validate can reschedule System → Database: Get sent reminder sequences System → Database: Delete unsent reminders System → Database: Update booking times System → Database: Increment reschedule_count System → Database: Calculate new reminder schedules System → Database: Create new reminder records System → EventDispatcher: Dispatch BOOKING_RESCHEDULED System → User: Return updated booking

 

https://mermaid.live/edit#pako:eNqdVs1u00AQfpXVHlArpSbOf30oKqkQHFpVCT2ActnaY8eK7Q2764RQ9SVoj0gcuXDhlXgCHoFZ_-XPTgy52M7OtzPzzTez-0Bt7gC1qIRPMUQ2XPnMEyycRAR_cyaUb_tzFilyJ0Hs_zteSQUl1ldMsXsmYRKlazdcAeELEMk-jXzZIqZBhgKY8iOPMPKa85l-G4NY-HaB1pizi4vUmZUCgNzAch9QYj4Gla-TGxYCeUGuYoEuecX2PHJ9LxZARhD6kQNCkpPlFCKiOJEQOadHYG94EPDlWTwvx6UARK5ZGLMFlOeSGaO1dmeR39-eimRSHhwyjm0bpHTjIFgdJbxlkGs226K7Ns0V9AZgrxl-kfCN_uDlez-EWilXGl3GiodYKZthamRsT8GJg426VHOUk5lURYTglJv--f70I7dJFEGukUnmAWYRqaNkto11iJtR7cJyrjQjBGnFRCQ-U3sis7wqaRhOwZ4RlwvixFDgZFVKz89FLFka5dGcgOEZDTKhH3gsCJvPuR-pEAHEl6jZkAvBlxN6epSGDmoKIOnhtOZVHnMrqXBWEKXZYEL4C5CVud_NHa3C-6ye2EoT-i4it4J7Aks1oZWF_VW4G2t32CgYkO-imNLWPxYkduz_hzjk4TwAdLoT4FYL5HouBkauPnmU8u6m8tYDp6b03MLhP2rP3fBUTvvXn_vp1FPhW74kSybJakeNr-pIsGeg5rNk6gy3kT7vpNLFKnBwaL7pMXh8qmVSyKfPQdsR4Fiz40AD1v1aVo_SybYO-9BsSwNytmdcrdnWx5OZ4Y0gqMVnanrwoMCWXfgO5LumoYyAyfwcLuHomolZkTFqI8PupLyl1zSQyyAgt9jBKVP1j4vS_XeOi83493ilDeoJ36GWEjE0aAi4qD_pg95yQtUUUBPUwlcHXBYHSk-IR4Thxekj52GOFDz2ptRyWSDxK07qmN3OChPQaQ15jG6t9uA82YNaD_Qztcx-0-g2W-ag2e91-50WLq6odWb2zHOj2-noZ7_XH5j9xwb9krhtG6222Ry0e22za3a7zXbn8S_zaHZ2

image-20251209-055323.png

 


Best Practices

1. Service Configuration

  • Use clear, descriptive service names

  • Create unique Service UIDs that are easy to reference

  • Set realistic default durations

  • Test reminder and follow-up timing before going live

2. Reminder Strategy

  • Don't over-remind (2-3 reminders is typically sufficient)

  • Space reminders appropriately (e.g., 1 day before, 1 hour before)

  • Make reminder messages clear and actionable

  • Include relevant booking details in reminders

3. Follow-up Strategy

  • Send immediate follow-up for feedback (2-4 hours after)

  • Send survey request 24 hours after appointment

  • Keep follow-up messages brief and focused

  • Always include opt-out options

4. Booking Management

  • Always provide cancellation reasons for analytics

  • Use the notes field to capture important context

  • Update ratings to track service quality

  • Review booking logs regularly

5. Testing

  • Test the complete booking lifecycle before launch

  • Verify reminder timing in your timezone

  • Test rescheduling scenarios

  • Validate event triggers fire correctly


Troubleshooting

Common Issues

Reminders Not Sending:

  • Check reminder is set to "Active"

  • Verify scheduled time is in the future

  • Confirm booking service is active

  • Check booking status is not in final state

Follow-ups Not Sending:

  • Follow-ups only send after completion or no-show

  • Check follow-up is set to "Active"

  • Verify booking was completed/no-show (not cancelled)

  • Confirm scheduled time is correct

Cannot Reschedule:

  • Ensure booking is not in final state

  • Verify booking is not currently in progress

  • Check service is still active

Timezone Issues: