Skip to main content

Module Detail

Until now, an agent that needed to change a booking had to create a fresh appointment and leave the old one hanging. The Cancel or Reschedule Appointment module lets the agent either cancel an existing slot or move it to a new time in a single call.

Setup

Adding the Module

  1. Open ModulesGoHighLevel sectionCancel or Reschedule AppointmentAdd
  2. No extra configuration required
  3. Click Save

Attach to Agent

  1. Edit your agent
  2. Add ToolModule LibraryCancel or Reschedule Appointment
  3. Leave async OFF (agent needs confirmation response)
  4. Save

Variables the Tool Expects

action (Required)

Values: cancel or reschedule Tells the tool whether to cancel the appointment or move it.

appointment_id (Required)

The ID of the appointment you are changing Where to get it:
  • After booking: Book Appointment tool returns appointment_id
  • Later on: Call Get Booked Appointments module to get the ID

new_start_time (Required for reschedule only)

ISO 8601 date-time for the new appointment Format: YYYY-MM-DDTHH:MM:SS
Example: 2025-01-16T14:30:00
Note: Only needed when action = reschedule

timezone (Optional, for reschedule)

IANA timezone such as America/New_York Default: Uses agent’s timezone if omitted Note: Only needed when rescheduling

Prompt Template

Cancellation

If the user wants to cancel:

1. Confirm which appointment (use ID from `get_appointments` if needed)

2. Call `cancel_or_reschedule_appointment` with:
   {
     "appointment_id": "<ID>",
     "action": "cancel"
   }

3. Acknowledge the cancellation

Rescheduling

If they want to move a booking:

1. Ask for the new desired start time (and timezone if unclear)

2. Call `cancel_or_reschedule_appointment` with:
   {
     "appointment_id": "<ID>",
     "action": "reschedule",
     "new_start_time": "<YYYY-MM-DDTHH:MM:SS>",
     "timezone": "<IANA TZ>"
   }

3. Confirm the new time

Conversation Examples

Example 1: Simple Cancellation

Caller: “I need to cancel my appointment” Agent: Runs get_booked_appointments to find the appointment Agent: “I see you have Tuesday, July 16 at 2pm. Want to cancel that one?” Caller: “Yes” Agent: Runs cancel_or_reschedule_appointment with action=“cancel” Agent: “Done! Your appointment has been cancelled. Want to rebook for a different time?”

Example 2: Reschedule Same Day

Caller: “I booked 10am next Tuesday but something came up.” Agent: “No worries—would you like to cancel or pick another time?” Caller: “Can we push it to 11am instead?” Agent: Runs module with reschedule, new_start_time, timezone, and appointment_id Agent: “All set. Your appointment is now Tuesday at 11am. See you then!”

Example 3: Reschedule Different Day

Caller: “I can’t make my Thursday appointment” Agent: Runs get_booked_appointments Agent: “You’re booked for Thursday at 3pm. What day would work better?” Caller: “How about next Monday?” Agent: Runs fetch_free_slots for Monday Agent: “Monday I have 10am, 2pm, and 4pm open. Which works?” Caller: “2pm” Agent: Runs cancel_or_reschedule_appointment with new Monday 2pm time Agent: “Perfect! You’re now booked for Monday at 2pm instead of Thursday.”

Example 4: Cancel and Rebook Later

Caller: “I need to cancel - I’m not sure when I can reschedule yet” Agent: “No problem! I’ve cancelled your Friday appointment. Just give us a call when you’re ready to rebook.” Agent: Runs cancel_or_reschedule_appointment with action=“cancel”

Common Use Cases

1. Simple Cancellation

User: "Cancel my appointment"
Agent: [finds appointment with get_booked_appointments]
       [cancels with action="cancel"]
       "Cancelled! Your [DATE] at [TIME] appointment has been removed."

2. Same-Time Different Day

User: "Move my Tuesday 2pm to Wednesday 2pm"
Agent: [reschedules with new date, same time]
       "Done! You're now Wednesday at 2pm instead."

3. Emergency Reschedule

User: "I'm running late, can we push back 30 minutes?"
Agent: [gets current appointment]
       [reschedules to 30 min later]
       "No worries! I've moved you from 2pm to 2:30pm."

4. Find Better Time

User: "That time doesn't work anymore"
Agent: "What would work better?"
User: "Do you have anything in the morning?"
Agent: [fetches morning slots]
       "I have 9am and 10:30am. Prefer one?"
User: "9am"
Agent: [reschedules to 9am]

Best Practices

Always Confirm Before Cancelling

Before running cancel action:
"Just to confirm - you want to cancel your [DATE] at [TIME] 
appointment, correct?"

[Wait for confirmation]

[Then cancel]

Offer Alternative When Cancelling

After cancelling:
"Your appointment is cancelled. Would you like to schedule 
a different time, or just leave it for now?"

If yes: [run fetch_free_slots]

Verify New Time is Available

Before rescheduling:
1. Run fetch_free_slots for desired day
2. Verify new_start_time is in the available slots
3. Then reschedule

This prevents double-booking.

Store Appointment ID

After booking or fetching appointments:
Store appointment_id in conversation memory

Use it for cancel/reschedule without asking user for it

Response Handling

Successful Cancel

{
  "status": "success",
  "message": "Appointment cancelled",
  "appointment_id": "appt_abc123"
}
Agent response: “Your appointment has been cancelled.”

Successful Reschedule

{
  "status": "success",
  "message": "Appointment rescheduled",
  "appointment_id": "appt_abc123",
  "new_start_time": "2025-01-16T14:30:00",
  "timezone": "America/New_York"
}
Agent response: “You’re all set for [NEW DATE] at [NEW TIME].”

Error - Appointment Not Found

{
  "status": "error",
  "message": "Appointment not found"
}
Agent response: “I couldn’t find that appointment. Let me double-check…”

Advanced Workflows

Cancel + Immediate Rebook

User: "I need to change my appointment"

Agent: [gets current appointment]
       "You're booked for [DATE] at [TIME]. What works better?"

User: "Friday afternoon"

Agent: [fetches Friday slots]
       "Friday I have 2pm, 3pm, and 4pm. Prefer one?"

User: "3pm"

Agent: [reschedules to Friday 3pm]
       "Perfect! Moved from [OLD TIME] to Friday 3pm."

No-Show Follow-up

[System detects no-show]

Agent: Calls customer next day

Agent: "Hi! We missed you yesterday at [TIME]. Everything okay?"

User: "Oh no, I completely forgot!"

Agent: [gets appointment ID from yesterday]
       "No worries! Want to reschedule?"

User: "Yes please"

Agent: [fetches available slots]
       [reschedules appointment]

Proactive Rescheduling

[Business needs to reschedule due to emergency]

Agent: Calls customer

Agent: "Hi! We need to reschedule your [DATE] appointment. 
        We have [ALTERNATIVE TIMES]. Any of those work?"

User: "Tuesday at 10am"

Agent: [reschedules appointment]
       "You're rebooked for Tuesday at 10am. Sorry for the inconvenience!"

Troubleshooting

Appointment ID Invalid

  • Verify ID format from get_booked_appointments
  • Check appointment still exists in GoHighLevel
  • Ensure not already cancelled or past

New Time Unavailable

  • Run fetch_free_slots first to verify availability
  • Check calendar working hours
  • Verify date is in the future

Timezone Issues

  • Always pass timezone explicitly when rescheduling
  • Use IANA format: “America/New_York” not “EST”
  • Confirm with user: “That’s 2pm your time, correct?”

Permission Errors

  • Verify GHL integration is connected
  • Check calendar permissions in GoHighLevel
  • Ensure agent has access to modify appointments

Integration with Full Appointment Flow

## Complete Appointment Management

### Check Existing
Run get_booked_appointments

### If Appointment Found:
"You have [DATE] at [TIME]. Keep it, reschedule, or cancel?"

**Option 1: Keep**
"Great! See you then."

**Option 2: Reschedule**
"What day would work better?"
[Run fetch_free_slots]
"I have [TIMES]. Which works?"
[Run cancel_or_reschedule_appointment with action="reschedule"]
"You're rebooked for [NEW TIME]!"

**Option 3: Cancel**
"Cancel completely, or want to rebook for later?"
[If cancel only: Run cancel_or_reschedule_appointment with action="cancel"]
[If rebook: Fetch slots then reschedule]

Next Steps

With the Cancel or Reschedule Appointment module, your agents can tidy up diaries on the spot—no duplicate events, no manual clean-up, and no lost bookings.