UChat Official

Introduction

This detailed overview explores the process of integrating and automating appointment booking using Cal.com within a chatbot system, emphasizing its features, flow, and customization options.

The goal is to understand how Cal.com can be seamlessly incorporated into a booking workflow, providing a flexible, cost-effective alternative to traditional platforms like GoHighLevel or Airchatty.

This summary covers the entire process—from capturing user details to confirming appointments and notifying agents—highlighting key steps, technical considerations, and best practices.

Overview of Cal.com Appointment Booking System

Cal.com offers a versatile, free appointment booking solution that can be integrated into chatbots for automating scheduling tasks. Its compatibility with Google Calendar and ability to create custom flows make it an attractive choice for users seeking a budget-friendly, customizable alternative to paid booking platforms.

Key Features:

  • Multiple flow options: Main appointment booking, contact creation, and check-in.

  • Contact detail capture: Email, phone number, and timezone.

  • Dynamic date and time slot selection: Fetching available dates and times based on user input.

  • Timezone management: Converting UTC to user-specific time zones.

  • Booking confirmation: Generating detailed confirmation messages.

  • Agent notifications: Sending real-time alerts to agents about new bookings.

  • Integration flexibility: Can be connected with various channels and systems.

Step-by-Step Workflow Breakdown

1. Initiating the Booking Process

The process begins when a user expresses interest in scheduling an appointment. The chatbot presents options and prompts the user to provide necessary details, such as contact information and preferences.

2. Contact Details Collection

Flow Overview:

Step

Description

Key Points

Check contact info

Verify if email or phone number exists

If missing, prompt for email or phone

Capture email

Ask user for email, ensuring proper format

Use system message: "Please provide your email."

Capture phone

Ask for phone number, including country code (+ sign)

Example: "+1234567890"

Store details

Save email and phone in system fields

Use JSON format for structured data

Technical Notes:

  • Use system messages to prompt questions.

  • Exclude confirmation words; ask questions in first person.

  • Loop prompts until valid data is received.

  • Capture timezone info, asking user to select from options.

3. Time Zone Selection

Process:

  • Fetch user’s timezone via API or prompt.

  • Present options in list format.

  • Map user input to a predefined list of time zones.

  • Store selected timezone for subsequent scheduling.

Sample Message:

"Please select your time zone from the following options:

  1. Eastern Standard Time (EST)

  2. Central Standard Time (CST)

  3. Pacific Standard Time (PST)

  4. Mountain Standard Time (MST)"

Implementation Details:

  • Use a bot field for time zone.

  • Match user input with options.

  • Convert all times to user’s timezone for consistency.

4. Fetching Available Dates

Procedure:

  • Set an end date dynamically (e.g., today + 3 days).

  • Use Kale’s mini app to retrieve available dates within the range.

  • Format dates for display (e.g., December 25).

  • Present options in list format for user selection.

Sample Output:

"Please select a date for your appointment:
December 24
December 25
December 26"

Matching Selected Date:

  • Parse user input.

  • Map to the corresponding date in JSON.

  • Store the selected date for further processing.

5. Fetching Available Time Slots

Process:

  • Use the selected date to fetch available time slots.

  • Retrieve data via Kale’s API, considering user’s timezone.

  • Format options (e.g., 2:00 PM, 2:30 PM).

  • Present in list format for user selection.

Sample Message:

"Please select a time slot:
2:00 PM
2:30 PM
3:00 PM"

Matching and Storing:

  • Match user choice with available slots.

  • Save the selected time in JSON format.

6. Creating the Booking

Execution:

  • Use Kale’s create booking API.

  • Pass user details: name, email, start time, timezone, and event ID.

  • Attach location info if needed.

  • Save booking ID for reference.

Important Notes:

  • The event ID can be static or dynamic.

  • Kale sometimes requires specific parameters; test accordingly.

  • Store booking ID in a system field for future reference.

7. Fetching Booking Details

Purpose:

  • Retrieve full booking info using the stored booking ID.

  • Extract start/end times, location, and other details.

  • Convert UTC times to user’s timezone for clarity.

Implementation:

  • Use JavaScript to parse UTC times.

  • Format times into user-friendly display (e.g., December 24, 2:00 PM).

  • Save formatted times for confirmation.

8. Sending Confirmation Message

Content:

  • Summarize appointment details: date, time, duration.

  • Include a link to add the appointment to the user’s calendar.

  • Avoid formal closings; keep it concise and clear.

Sample Message:

"Your appointment is scheduled for December 24 at 2:00 PM. The meeting will last approximately 30 minutes. You can add this to your calendar below."

Technical Setup:

  • Use GPT to generate a detailed, friendly confirmation.

  • Map the output into a message payload.

  • Send to user with a "send message" action.

9. Notification to the Agent

Purpose:

  • Alert the real estate agent or relevant staff about the new booking.

  • Include key details: user contact, date, time, and location.

Implementation:

  • Save notification template in a custom field.

  • Send via preferred channel (email, SMS, internal notification).

  • Use dynamic data to personalize the message.

Technical Considerations and Best Practices

Data Handling & JSON Parsing

  • Use JavaScript snippets to parse JSON strings into objects.

  • Map extracted data into system fields for consistency.

  • Always validate data before proceeding to next steps.

Time Zone Management

  • Always convert UTC times to user’s timezone.

  • Use Kale’s fetch timezone action.

  • Present times in familiar formats to avoid confusion.

Looping & Error Handling

  • Loop prompts until valid input is received.

  • Set expiration for questions to prevent infinite loops.

  • Provide clear instructions for each step.

Customization & Flexibility

  • Adjust the number of days for date range dynamically.

  • Customize message formats and display options.

  • Use static or dynamic event IDs based on context.

Notifications & Integration

  • Use Kale’s notification system or external channels.

  • Attach relevant data for context.

  • Automate notifications for seamless workflow.

Summary Table of Key Actions and Data Flow

Step

Action

Input

Output

Notes

1

Initiate booking

User message

Trigger flow

-

2

Check contact info

User data

Prompt for missing info

Loop until complete

3

Capture email/phone

User input

Save in system fields

Validate format

4

Select timezone

User choice

Save timezone

Map to standard zones

5

Fetch available dates

Date range

List of dates

Format for display

6

User selects date

User input

Save selected date

Match with options

7

Fetch time slots

Date + timezone

List of times

Format for display

8

User selects time

User input

Save selected time

Match with options

9

Create booking

User details + slot

Booking ID

Save for reference

10

Fetch booking details

Booking ID

Full info

Convert times

11

Send confirmation

Booking details

User message

Include add-to-calendar link

12

Notify agent

Booking info

Alert message

Customize as needed

Final Thoughts

Integrating Kale into your chatbot for appointment booking offers a cost-effective, flexible, and powerful solution. Its ability to dynamically fetch available dates and times, handle time zone conversions, and send automated confirmations makes it ideal for real estate, consulting, or service-based businesses. The process involves meticulous data handling, clear user prompts, and precise API interactions, but once set up, it provides a seamless experience for both users and agents.

By following the outlined steps and best practices, you can create a robust, user-friendly booking system that leverages Kale’s capabilities without additional costs. Remember to test each step thoroughly, especially time zone conversions and data parsing, to ensure accuracy and reliability.