1. Overview
  2. Custom Tools
  3. Setting Up Multi-Calendar Booking with Custom Tools

Setting Up Multi-Calendar Booking with Custom Tools

Background and Purpose

This SOP provides a step-by-step guide to implementing multi-calendar booking using custom tools, Buildship, and your AI assistant. It enables your AI assistant to manage appointments across multiple calendars by retrieving available time slots and scheduling appointments seamlessly.


Overview

To implement multi-calendar booking, you’ll:

  1. Create two custom tools for each calendar:

    • One for fetching available times.
    • One for booking appointments.
  2. Use Buildship to create API endpoints for these tools.

  3. Integrate the tools into your AI assistant by configuring their prompts and descriptions.

  4. Test and refine the system to ensure smooth functionality.


Prerequisites

  • GoHighLevel Account: Ensure you have multiple calendars set up (e.g., mortgage and refinance).
  • Buildship Account: To create and host API endpoints.
  • AI Assistant Platform: To add custom tools and configure prompts (e.g., LeadIndicator.ai).

Step 1: Set Up Calendars in GoHighLevel

  • Create separate calendars for each service. Examples:
    • Mortgage Calendar: For mortgage-related appointments.
    • Refinance Calendar: For refinance-related appointments.

Step 2: Build Custom Tools Using Buildship

Create Two Tools for Each Calendar:

  1. Get Available Times Tool
  2. Book Appointment Tool

A. Create the “Get Available Times” Tool

 

  1. In Buildship:

    • Create a new workflow.
    • Name: get_times_<service> (e.g., get_times_mortgage).
  2. Functionality:

    • Make a GET request to the GoHighLevel API to retrieve available time slots.
    • Endpoint URL: Use the GoHighLevel endpoint for free time slots.
    • Query Parameters:
      • calendarId: The calendar's unique ID.
      • startTime: Start date/time for the query.
      • endTime: End date/time for the query.
    • Headers:
      • Authorization: Include your API key or token.
  3. Save and Deploy:

    • Buildship provides an endpoint URL for this workflow.

B. Create the “Book Appointment” Tool

 

  1. In Buildship:

    • Create a new workflow.
    • Name: book_appointment_<service> (e.g., book_appointment_mortgage).
  2. Functionality:

    • Make a POST request to the GoHighLevel API to book appointments.
    • Endpoint URL: The booking endpoint.
    • Request Body:
      • calendarId: Calendar's unique ID.
      • contactId: Client's unique ID.
      • locationId: GoHighLevel location ID.
      • startTime: Chosen time in ISO 8601 format.
    • Headers:
      • Authorization: API key or token.
      • Content-Type: application/json.
  3. Save and Deploy:

    • Buildship provides an endpoint URL for this workflow.

Step 3: Configure Tools in the AI Assistant

A. Add the “Get Available Times” Tool

  1. In Your AI Platform:

    • Create a custom tool.
    • Name: Match Buildship (e.g., get_times_mortgage).
  2. Configure the Tool:

    • Description: "Fetch available times for the mortgage calendar."
    • Endpoint URL: Paste the Buildship URL.
    • Parameters:
      • name: User's name.
      • email: User's email.

B. Add the “Book Appointment” Tool

  1. In Your AI Platform:

    • Create a custom tool.
    • Name: Match Buildship (e.g., book_appointment_mortgage).
  2. Configure the Tool:

    • Description: "Book an appointment on the mortgage calendar."
    • Endpoint URL: Paste the Buildship URL.
    • Parameters:
      • time: Selected appointment time.

C. Link the Tools Together

  • Reference the "Get Available Times" tool in the "Book Appointment" tool's description.
  • Example: "Use this tool to book an appointment with the selected time retrieved from the get_times_mortgage tool."

Step 4: Update AI Prompts or Task Framework

  1. Define the workflow for the AI:
    • Determine the service type (mortgage or refinance).
    • Use the appropriate tools to fetch times and book appointments.
  2. Example:
    • Mortgage:
      • Ask qualifying questions.
      • Use get_times_mortgage to fetch times.
      • Present options and book via book_appointment_mortgage.

Step 5: Test the Setup

  1. Simulate user interactions:
    • Ensure AI correctly fetches and books appointments for both mortgage and refinance services.
  2. Verify results in GoHighLevel:
    • Confirm appointments appear in the correct calendars with accurate user details.

Step 6: Refine the System

  • Debug Issues: Verify API calls and parameters in Buildship.
  • Optimize Responses: Make AI outputs clear and concise.
  • Prepare for Edge Cases: Handle no availability, rescheduling, or cancellations.

Additional Tips

  • Consistent Naming: Keep tool names uniform across Buildship and the AI assistant.
  • Security: Protect API keys using secure storage or environment variables.
  • Dynamic Parameters: Pass arguments like calendar IDs for scalability.

Conclusion

By following this guide, you can successfully implement a multi-calendar booking system integrated with your AI assistant. This setup simplifies scheduling across services, enhancing both user experience and operational efficiency.


Example Configurations

Get Available Times Tool (Mortgage):

  • Name: get_times_mortgage
  • Description: "Fetch available times for the mortgage calendar."
  • Endpoint URL: [Buildship Endpoint]
  • Parameters: name, email

Book Appointment Tool (Mortgage):

  • Name: book_appointment_mortgage
  • Description: "Book an appointment using the selected time from get_times_mortgage."
  • Endpoint URL: [Buildship Endpoint]
  • Parameters: time

This modular setup is scalable and easy to manage, making it adaptable to additional services or calendars as your needs grow.


Was this article helpful?